Browse Source

fix bug

release_toaliyun_real
zhengfangyuan 3 years ago
parent
commit
b8f21f993f
1 changed files with 7 additions and 3 deletions
  1. +7
    -3
      mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java

+ 7
- 3
mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java View File

@@ -1475,10 +1475,14 @@ public class WxCouponServiceImpl implements WxCouponService {
}
@Override
public Map<Long, Boolean> couponMerchantAutoShare(WxCoupon wxCoupon) throws Exception {
if (null == wxCoupon.getMerchantIds() || null == wxCoupon.getId() || null == wxCoupon.getType() || null == wxCoupon.getMerchantType()) {
if (null == wxCoupon.getMerchantIds() || null == wxCoupon.getId()) {
throw new MallinkException(Result.ERROR,"缺少参数");
}
EnumAppPlat plat = EnumCouponType.getAppPlat(wxCoupon.getType());
WxCoupon coupon = wxCouponMapper.selectById(wxCoupon.getId(), wxCoupon.getTenantId());
if (null == coupon) {
throw new MallinkException(Result.ERROR,"未查询到券");
}
EnumAppPlat plat = EnumCouponType.getAppPlat(coupon.getType());
EnumPayWay payWay = EnumAppPlat.getPayWay(plat);
WxAppinfo cAppInfo = wxAppinfoService.getCAppInfo(wxCoupon,plat);
if (cAppInfo == null) {
@@ -1493,7 +1497,7 @@ public class WxCouponServiceImpl implements WxCouponService {
PayShareAdapterService payShareServie = payServiceFactory.getPayShareAdapterService(payWay.getCode(),payAccount.getPayVersion());
//直连模式,如果是单商户券,则都可以;如果是多商户券,抖音则只要开通了支付宝就可以,微信则不行。
if (payMchType == EnumPayMchType.DIRECT) {
if (EnumCouponMerchantType.ONE_MERCHANT.getCode() == wxCoupon.getMerchantType()) {
if (EnumCouponMerchantType.ONE_MERCHANT.getCode() == coupon.getMerchantType()) {
return generateMerchantAutoShareAll(wxCoupon.getMerchantIds(),true);
}else {
if (plat == EnumAppPlat.TOUTIAO) {


Loading…
Cancel
Save