Commit 3c35f340 by zhangchen

现金券规则修改

parent b7fe6454
...@@ -243,15 +243,18 @@ public class VoucherRuleService extends ...@@ -243,15 +243,18 @@ public class VoucherRuleService extends
try { try {
JSONObject json = JSONObject.parseObject(voucherRule.getConditionJson()); JSONObject json = JSONObject.parseObject(voucherRule.getConditionJson());
Integer type = json.getInteger("type"); Integer type = json.getInteger("type");
if(voucherRule.getMultiple()!=1 ){ if(type!=null){
if(type == 2){ if(voucherRule.getMultiple()!=1 ){
json.put("value", validateToParse(vo.getProdutIds())); if(type == 2){
json.put("resourceIds", validateToParse(vo.getResourceIds())); json.put("value", validateToParse(vo.getProdutIds()));
json.put("productStartDate", vo.getProductStartDate()); json.put("resourceIds", validateToParse(vo.getResourceIds()));
json.put("productEndDate", vo.getProductEndDate()); json.put("productStartDate", vo.getProductStartDate());
voucherRule.setConditionJson(json.toJSONString()); json.put("productEndDate", vo.getProductEndDate());
} voucherRule.setConditionJson(json.toJSONString());
}
}
} }
voucherRule.setEndUseDate(vo.getEndUseDate()); voucherRule.setEndUseDate(vo.getEndUseDate());
voucherRule.setStartUseDate(vo.getStartUseDate()); voucherRule.setStartUseDate(vo.getStartUseDate());
voucherRule.setRemark(vo.getRemark()); voucherRule.setRemark(vo.getRemark());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment