|
|
|
@@ -59,6 +59,15 @@ public class WxCouponController extends BaseController |
|
|
|
public ResultData add(@RequestBody WxCoupon wxCoupon) { |
|
|
|
//Assert.notNull(wxCoupon.getName(), "角色名不能为空"); |
|
|
|
//Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); |
|
|
|
if(StringUtils.isNotEmpty(wxCoupon.getSalePriceStr())){ |
|
|
|
wxCoupon.setSalePrice((int)Double.parseDouble(wxCoupon.getSalePriceStr())*100); |
|
|
|
} |
|
|
|
if(StringUtils.isNotEmpty(wxCoupon.getUsePriceStr())){ |
|
|
|
wxCoupon.setUsePrice((int)Double.parseDouble(wxCoupon.getUsePriceStr())*100); |
|
|
|
} |
|
|
|
if(StringUtils.isNotEmpty(wxCoupon.getPriceStr())){ |
|
|
|
wxCoupon.setPrice((int)Double.parseDouble(wxCoupon.getPriceStr())*100); |
|
|
|
} |
|
|
|
if(StringUtils.isNotBlank(wxCoupon.getBusiness())) { |
|
|
|
String[] arys = wxCoupon.getBusiness().split(","); |
|
|
|
wxCoupon.setBusiness(JSON.toJSONString(arys)); |
|
|
|
|