ソースを参照

[积分][修改][bug1002019]

release_toaliyun_real
luozukai 6年前
コミット
fc5202ca5f
1個のファイルの変更14行の追加14行の削除
  1. +14
    -14
      mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java

+ 14
- 14
mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java ファイルの表示

@@ -207,11 +207,11 @@ public class WxFlowServiceImpl implements WxFlowService {
if(EnumRentContractAppStatus.FINISH.getCode().intValue() == applyStatus.intValue()) {
//减库存
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.setRemainInventory(remainInventory);
@@ -220,11 +220,11 @@ public class WxFlowServiceImpl implements WxFlowService {
wxCoupon.setValidType(validType);
wxCouponService.updateCouponStockAndEndTime(wxCoupon);
}else if(EnumFlowKey.NEW_GROUP_UPLINE.getCode().equals(flowType)){
Integer remainInventory = (Integer) getVariableByKey(variables, "remainInventory");
Integer remainInventory = getIngeter(getVariableByKey(variables, "remainInventory"));
wxCoupon.setRemainInventory(remainInventory);
wxCouponMapper.updateByPrimaryKeySelective(wxCoupon);
}else if(EnumFlowKey.NEW_PRESS_UPLINE.getCode().equals(flowType)){
Integer inventory = (Integer) getVariableByKey(variables, "inventory");
Integer inventory = getIngeter(getVariableByKey(variables, "inventory"));
wxCoupon.setInventory(inventory);
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;
}
@@ -290,7 +290,7 @@ public class WxFlowServiceImpl implements WxFlowService {
public ResultData start(Map<String, Object> params,Long userId,String userName,String tenantId) {
String remark = (String)params.get("remark");
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");
Boolean supplement = (Boolean)params.get("supplement");



読み込み中…
キャンセル
保存