}else if (EnumCouponType.COUPON_DOUYIN_BRAND.getCode() == coupon.getType()) {
@@ -1530,6 +1530,7 @@ public class WxCouponServiceImpl implements WxCouponService {
if (null == wxCoupon.getMerchantIds()) {
throw new MallinkException(Result.ERROR,"请选择商户");
}
Long makeMerchantId = coupon.getMakeMerchantId();
//
StringBuffer merchantParams = new StringBuffer("{\"tenantId\":").append(mallTenantEntity.getTenantId()).append(",\"mallMerchantParams\":").append("[");
Long[] mids = wxCoupon.getMerchantIds();
@@ -1544,6 +1545,10 @@ public class WxCouponServiceImpl implements WxCouponService {
checkCouponMerchantReceiver(coupon,true);
final IdWorker idWorker = IdWorker.get();
updateCouponMerchants(coupon,idWorker);
//平台券设置商管商户
if (null == makeMerchantId) {
wxCouponMapper.setMakeMerchantId(coupon);
}
}catch(Exception e) {
throw e;
}
+ 4- 0
mallinkService/src/main/resources/mapper/WxCouponMapper.xmlZobrazit soubor