From 7f06090c4cd7cf8176cc64b9a6707d83c0cf3b73 Mon Sep 17 00:00:00 2001 From: masterspirit Date: Tue, 14 Aug 2018 21:53:25 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=8D=A1=E5=88=B8][=E4=BF=AE=E6=94=B9]:?= =?UTF-8?q?=E5=85=83=E8=BD=AC=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/simple/controller/WxCouponController.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/mallinkAdmin/src/main/java/com/simple/controller/WxCouponController.java b/mallinkAdmin/src/main/java/com/simple/controller/WxCouponController.java index 16decd238..e3813a4b7 100644 --- a/mallinkAdmin/src/main/java/com/simple/controller/WxCouponController.java +++ b/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));