浏览代码

[卡券][修改]:元转分

release_toaliyun_real
masterspirit 7 年前
父节点
当前提交
7f06090c4c
共有 1 个文件被更改,包括 9 次插入0 次删除
  1. +9
    -0
      mallinkAdmin/src/main/java/com/simple/controller/WxCouponController.java

+ 9
- 0
mallinkAdmin/src/main/java/com/simple/controller/WxCouponController.java 查看文件

@@ -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));


正在加载...
取消
保存