Просмотр исходного кода

//coupon

release_toaliyun_real
xhxu 3 лет назад
Родитель
Сommit
161f7fc7bb
1 измененных файлов: 39 добавлений и 20 удалений
  1. +39
    -20
      mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java

+ 39
- 20
mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java Просмотреть файл

@@ -883,8 +883,20 @@ public class WxCouponServiceImpl implements WxCouponService {

PayShareAdapterService payShareServie = payServiceFactory.getPayShareAdapterService(payWay.getCode(),payAccount.getPayVersion());

List<String> badNames = new ArrayList();
if (EnumPayMchType.DIRECT.equals(payMchType)) {
//多商户券,抖音 直连 门店只有进件支付宝才能参加活动 todo
//多商户券,抖音 直连 门店只有进件支付宝才能参加活动
if(EnumCouponMerchantType.MULTIPLE_MERCHANT.getCode().equals(record.getMerchantType())){
for (WxMerchant merchant:merchantList) {
WxProfitSharingReceiver receiver = payShareServie.getReceiver(mallTenantEntity, merchant.getId(), null, payMchType.getCode());
if (receiver == null) {
badNames.add(merchant.getName());
}
if(!MerchantImportStatus.improt_success.getCode().equals(receiver.getAlipayImportStatus())){
badNames.add(merchant.getName());
}
}
}

// WxMerchant makeMerchant = getDirectPayAccountMerchant(merchantList,record);
// if (null == makeMerchant) {
@@ -913,16 +925,15 @@ public class WxCouponServiceImpl implements WxCouponService {
// }
// }
} else if (EnumPayShare.YES.equals(isShare)) {
List<String> badNames = new ArrayList();
for (WxMerchant merchant:merchantList) {
boolean isBad = toTalPayMchTypeMerchantIsBad(payShareServie,payAccount,merchant.getName(),merchant.getId(),payMchType,plat);
if (isBad) {
badNames.add(merchant.getName());
}
}
if(!badNames.isEmpty()){
throw new MallinkException(ErrorCode.SYS_PARAMETER_ERROR.getCode(), JSONArray.toJSONString(badNames)+"未配置分账账户");
}
}
if(!badNames.isEmpty()){
throw new MallinkException(ErrorCode.SYS_PARAMETER_ERROR.getCode(), JSONArray.toJSONString(badNames)+"未配置分账账户");
}
}
return merchantList;
@@ -966,26 +977,34 @@ public class WxCouponServiceImpl implements WxCouponService {
if (receiver == null) {
return true;
}
if (EnumAppPlat.TOUTIAO.equals(plat)) {
if (EnumAppPlat.TOUTIAO.equals(plat)) {//抖音只能开通支付宝
QueryMerchantResult openPayResult = payAccount.getOpenPayResult();

if(!EnumYesOrNo.YES.getCode().equals(openPayResult.getAlipay())
&& !EnumYesOrNo.YES.getCode().equals(openPayResult.getWx())
&& !EnumYesOrNo.YES.getCode().equals(openPayResult.getHz())){
throw new MallinkException(ErrorCode.SYS_PARAMETER_ERROR.getCode(), "分账模式未设置开通支付渠道");
}
if(EnumYesOrNo.YES.getCode().equals(openPayResult.getAlipay())
&& !MerchantImportStatus.improt_success.getCode().equals(receiver.getAlipayImportStatus())){
return true;
}
if(EnumYesOrNo.YES.getCode().equals(openPayResult.getWx())
&& !MerchantImportStatus.improt_success.getCode().equals(receiver.getWxImportStatus())){
return true;
|| EnumYesOrNo.YES.getCode().equals(openPayResult.getWx())
|| EnumYesOrNo.YES.getCode().equals(openPayResult.getHz())){
throw new MallinkException(ErrorCode.SYS_PARAMETER_ERROR.getCode(), "分账模式设置错误");
}
if(EnumYesOrNo.YES.getCode().equals(openPayResult.getHz())
&& !MerchantImportStatus.improt_success.getCode().equals(receiver.getHzImportStatus())){
if(!MerchantImportStatus.improt_success.getCode().equals(receiver.getAlipayImportStatus())){
return true;
}

// if(!EnumYesOrNo.YES.getCode().equals(openPayResult.getAlipay())
// && !EnumYesOrNo.YES.getCode().equals(openPayResult.getWx())
// && !EnumYesOrNo.YES.getCode().equals(openPayResult.getHz())){
// throw new MallinkException(ErrorCode.SYS_PARAMETER_ERROR.getCode(), "分账模式未设置开通支付渠道");
// }
// if(EnumYesOrNo.YES.getCode().equals(openPayResult.getAlipay())
// && !MerchantImportStatus.improt_success.getCode().equals(receiver.getAlipayImportStatus())){
// return true;
// }
// if(EnumYesOrNo.YES.getCode().equals(openPayResult.getWx())
// && !MerchantImportStatus.improt_success.getCode().equals(receiver.getWxImportStatus())){
// return true;
// }
// if(EnumYesOrNo.YES.getCode().equals(openPayResult.getHz())
// && !MerchantImportStatus.improt_success.getCode().equals(receiver.getHzImportStatus())){
// return true;
// }
}
return false;
}


Загрузка…
Отмена
Сохранить