Sfoglia il codice sorgente

fix

release_toaliyun_real
winter 1 anno fa
parent
commit
da7decb61c
1 ha cambiato i file con 6 aggiunte e 5 eliminazioni
  1. +6
    -5
      mallinkService/src/main/java/com/iformall/service/payBill/impl/WxMiniProgramServiceImpl.java

+ 6
- 5
mallinkService/src/main/java/com/iformall/service/payBill/impl/WxMiniProgramServiceImpl.java Vedi File

@@ -19,6 +19,7 @@ import com.iformall.domain.po.WxPayAccount;
import com.iformall.domain.po.WxPayAccountBill; import com.iformall.domain.po.WxPayAccountBill;
import com.iformall.domain.po.base.TenantEntity; import com.iformall.domain.po.base.TenantEntity;
import com.iformall.domain.po.base.WxBillBaseEntity; import com.iformall.domain.po.base.WxBillBaseEntity;
import com.iformall.enums.EnumAppPlat;
import com.iformall.enums.EnumBillAllType; import com.iformall.enums.EnumBillAllType;
import com.iformall.enums.EnumBillPayWay; import com.iformall.enums.EnumBillPayWay;
import com.iformall.enums.EnumPayWay; import com.iformall.enums.EnumPayWay;
@@ -49,11 +50,11 @@ public class WxMiniProgramServiceImpl extends PayBillBaseService implements PayB
if (StringUtils.isBlank(openId)) { if (StringUtils.isBlank(openId)) {
throw new MallinkException(ErrorCode.APP_ID_NOT_FOUND.getCode(),"参数openId为空"); throw new MallinkException(ErrorCode.APP_ID_NOT_FOUND.getCode(),"参数openId为空");
} }
WxAppinfo cAppInfo = wxAppinfoService.getCAppInfoFromRedis(wxPayAccountBill.getTenantId(), EnumPayWay.PAY_WAY_WECHAT.getPlat());
if(cAppInfo == null){
throw new MallinkException(ErrorCode.APP_ID_NOT_FOUND.getCode(),"未查询到C端小程序");
WxAppinfo bAppInfo = wxAppinfoService.getBAppInfo(wxPayAccountBill, EnumAppPlat.WX);
if(bAppInfo == null){
throw new MallinkException(ErrorCode.APP_ID_NOT_FOUND.getCode(),"未查询到B端小程序");
} }
WxPayAccount payAccount = wxPayAccountService.getByIdFromRedis(cAppInfo.getPayId());
WxPayAccount payAccount = wxPayAccountService.getByIdFromRedis(bAppInfo.getPayId());
if(payAccount == null){ if(payAccount == null){
throw new MallinkException(ErrorCode.API_KEY_NOT_FOUND.getCode(),"未查询到payAccount."); throw new MallinkException(ErrorCode.API_KEY_NOT_FOUND.getCode(),"未查询到payAccount.");
} }
@@ -68,7 +69,7 @@ public class WxMiniProgramServiceImpl extends PayBillBaseService implements PayB
try { try {
final IdWorker idWorker = IdWorker.get(); final IdWorker idWorker = IdWorker.get();
String uniquePayOrderNo = billdetail.getBillType()+"_"+idWorker.nextId(); String uniquePayOrderNo = billdetail.getBillType()+"_"+idWorker.nextId();
PayAdapterResult wxResult = wxMiniAppPayAdapterService.payIsv(payAccount, cAppInfo, payAccount.getSubMchId(), openId, billdetail.getBillTypeName(), attach, uniquePayOrderNo,
PayAdapterResult wxResult = wxMiniAppPayAdapterService.payIsv(payAccount, bAppInfo, payAccount.getSubMchId(), openId, billdetail.getBillTypeName(), attach, uniquePayOrderNo,
fee, "127.0.0.1", wxPayAccountBill.getPaidCallBack()+"/"+wxPayAccountBill.getTenantId(), new Date(), false); fee, "127.0.0.1", wxPayAccountBill.getPaidCallBack()+"/"+wxPayAccountBill.getTenantId(), new Date(), false);
if (wxResult.isSuccess()) { if (wxResult.isSuccess()) {
return wxResult; return wxResult;


Caricamento…
Annulla
Salva