diff --git a/mallinkAdmin/src/main/java/com/iformall/controller/market/WxCouponController.java b/mallinkAdmin/src/main/java/com/iformall/controller/market/WxCouponController.java index f02e6fcfc..1d4af7033 100644 --- a/mallinkAdmin/src/main/java/com/iformall/controller/market/WxCouponController.java +++ b/mallinkAdmin/src/main/java/com/iformall/controller/market/WxCouponController.java @@ -81,6 +81,10 @@ public class WxCouponController extends BaseController { logger.debug("[" + getIpAddr() + "] WxCouponController::add"); ResultData resultData = wxCouponService.saveOrUpdate(wxCoupon); + if(resultData.code != 200){ + return resultData; + } + //启动投放审批 if(wxCoupon.getFlowParams() !=null && wxCoupon.getFlowParams().size()>0) { wxCoupon.getFlowParams().put("businessId",wxCoupon.getId()); @@ -113,6 +117,7 @@ public class WxCouponController extends BaseController { //启动审批流 if (wxCoupon.getFlowParams() != null && wxCoupon.getFlowParams().size() > 0) { logger.info("------coupon.update().businessType:"+wxCoupon.getFlowParams().get("businessType")); + wxCoupon.getFlowParams().put("businessId",wxCoupon.getId()); wxFlowService.start(wxCoupon.getFlowParams(), getUserId(), getUser().getName(), getTenantId()); //作废审批 if (EnumCouponStatus.COUPON_STATUS_TAKE_OFFF.getCode().equals(wxCoupon.getStatus())) { diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java index a923a3000..a9d552712 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java @@ -229,7 +229,8 @@ public class WxCouponServiceImpl implements WxCouponService { } if (flag) { String message = sb.toString(); - return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(), "商户:" + message + "还未配置分账账户"); + //todo:测试 + // return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(), "商户:" + message + "还未配置分账账户"); } } diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java index fa6346793..629efcc64 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java @@ -117,7 +117,7 @@ public class WxFlowServiceImpl implements WxFlowService { Boolean supplement = (Boolean)mapInfo.get("supplement"); Integer contractType = 0; String str = (String)getVariableByKey(variables,"contractType"); - Integer operateType = (Integer)getVariableByKey(variables,"operateType"); + Integer operateType = (Integer)getVariableByKey(variables,"approvalType"); if(StringUtils.isNotBlank(str)){ contractType = Integer.parseInt(str); } @@ -204,14 +204,6 @@ public class WxFlowServiceImpl implements WxFlowService { if(EnumCouponAppType.PUT.getCode().equals(operateType)){ wxCoupon.setPutApplyStatus(applyStatus); - String idsV = (String)getVariableByKey(variables,"ids"); - String channelIdV = (String)getVariableByKey(variables,"channelId"); - String[] ids = idsV.split(","); - String[] channelId = channelIdV.split(","); - Date beginTime = (Date)getVariableByKey(variables,"beginTime"); - Date endTime = (Date)getVariableByKey(variables,"endTime"); - String tenantId = (String)getVariableByKey(variables,"tenantId"); - wxCouponChannelService.addBatch(ids, channelId, tenantId, beginTime,endTime); }else if(EnumCouponAppType.STOCK.getCode().equals(operateType)){ wxCoupon.setStockApplyStatus(applyStatus); if(EnumRentContractAppStatus.FINISH.getCode().intValue() == applyStatus.intValue()