| @@ -207,11 +207,11 @@ public class WxFlowServiceImpl implements WxFlowService { | |||||
| if(EnumRentContractAppStatus.FINISH.getCode().intValue() == applyStatus.intValue()) { | if(EnumRentContractAppStatus.FINISH.getCode().intValue() == applyStatus.intValue()) { | ||||
| //减库存 | //减库存 | ||||
| if(EnumFlowKey.NEW_COUPON_UPLINE.getCode().equals(flowType) || EnumFlowKey.NEW_CARD_UPLINE.getCode().equals(flowType)) { | if(EnumFlowKey.NEW_COUPON_UPLINE.getCode().equals(flowType) || EnumFlowKey.NEW_CARD_UPLINE.getCode().equals(flowType)) { | ||||
| Integer inventory = (Integer) getVariableByKey(variables, "inventory"); | |||||
| Integer remainInventory = (Integer) getVariableByKey(variables, "remainInventory"); | |||||
| Integer type = (Integer) getVariableByKey(variables, "type"); | |||||
| Integer validDays = (Integer) getVariableByKey(variables, "validDays"); | |||||
| Integer validType = (Integer) getVariableByKey(variables, "validType"); | |||||
| Integer inventory = getIngeter(getVariableByKey(variables, "inventory")); | |||||
| Integer remainInventory = getIngeter(getVariableByKey(variables, "remainInventory")); | |||||
| Integer type = getIngeter(getVariableByKey(variables, "type")); | |||||
| Integer validDays = getIngeter(getVariableByKey(variables, "validDays")); | |||||
| Integer validType = getIngeter(getVariableByKey(variables, "validType")); | |||||
| wxCoupon.setInventory(inventory); | wxCoupon.setInventory(inventory); | ||||
| wxCoupon.setRemainInventory(remainInventory); | wxCoupon.setRemainInventory(remainInventory); | ||||
| @@ -220,11 +220,11 @@ public class WxFlowServiceImpl implements WxFlowService { | |||||
| wxCoupon.setValidType(validType); | wxCoupon.setValidType(validType); | ||||
| wxCouponService.updateCouponStockAndEndTime(wxCoupon); | wxCouponService.updateCouponStockAndEndTime(wxCoupon); | ||||
| }else if(EnumFlowKey.NEW_GROUP_UPLINE.getCode().equals(flowType)){ | }else if(EnumFlowKey.NEW_GROUP_UPLINE.getCode().equals(flowType)){ | ||||
| Integer remainInventory = (Integer) getVariableByKey(variables, "remainInventory"); | |||||
| Integer remainInventory = getIngeter(getVariableByKey(variables, "remainInventory")); | |||||
| wxCoupon.setRemainInventory(remainInventory); | wxCoupon.setRemainInventory(remainInventory); | ||||
| wxCouponMapper.updateByPrimaryKeySelective(wxCoupon); | wxCouponMapper.updateByPrimaryKeySelective(wxCoupon); | ||||
| }else if(EnumFlowKey.NEW_PRESS_UPLINE.getCode().equals(flowType)){ | }else if(EnumFlowKey.NEW_PRESS_UPLINE.getCode().equals(flowType)){ | ||||
| Integer inventory = (Integer) getVariableByKey(variables, "inventory"); | |||||
| Integer inventory = getIngeter(getVariableByKey(variables, "inventory")); | |||||
| wxCoupon.setInventory(inventory); | wxCoupon.setInventory(inventory); | ||||
| wxCouponMapper.updateByPrimaryKeySelective(wxCoupon); | wxCouponMapper.updateByPrimaryKeySelective(wxCoupon); | ||||
| } | } | ||||
| @@ -275,12 +275,12 @@ public class WxFlowServiceImpl implements WxFlowService { | |||||
| } | } | ||||
| } | } | ||||
| public Integer getBusinessType(Object businessType){ | |||||
| if(businessType == null) return null; | |||||
| if(businessType instanceof String){ | |||||
| return Integer.parseInt((String)businessType); | |||||
| }else if(businessType instanceof Integer){ | |||||
| return (Integer)businessType; | |||||
| public Integer getIngeter(Object obj){ | |||||
| if(obj == null) return null; | |||||
| if(obj instanceof String){ | |||||
| return Integer.parseInt((String)obj); | |||||
| }else if(obj instanceof Integer){ | |||||
| return (Integer)obj; | |||||
| } | } | ||||
| return null; | return null; | ||||
| } | } | ||||
| @@ -290,7 +290,7 @@ public class WxFlowServiceImpl implements WxFlowService { | |||||
| public ResultData start(Map<String, Object> params,Long userId,String userName,String tenantId) { | public ResultData start(Map<String, Object> params,Long userId,String userName,String tenantId) { | ||||
| String remark = (String)params.get("remark"); | String remark = (String)params.get("remark"); | ||||
| Long businessId = Long.parseLong(params.get("businessId").toString()); | Long businessId = Long.parseLong(params.get("businessId").toString()); | ||||
| Integer flowType = getBusinessType(params.get("businessType")); | |||||
| Integer flowType = getIngeter(params.get("businessType")); | |||||
| List<Map<String,Object>> variables = (List)params.get("variables"); | List<Map<String,Object>> variables = (List)params.get("variables"); | ||||
| Boolean supplement = (Boolean)params.get("supplement"); | Boolean supplement = (Boolean)params.get("supplement"); | ||||