From 1d08dc6fa17c013c59cba418aa23d9247012cdff Mon Sep 17 00:00:00 2001 From: luozukai Date: Sat, 27 Apr 2019 12:03:50 +0800 Subject: [PATCH] =?UTF-8?q?[=E9=A6=96=E9=A1=B5=E7=BB=9F=E8=AE=A1][?= =?UTF-8?q?=E4=BF=AE=E6=94=B9][=E4=BF=AE=E6=94=B9=E7=BB=9F=E8=AE=A1]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iformall/service/impl/WxChartServiceImpl.java | 15 +++++++++------ .../src/main/resources/mapper/WxCouponMapper.xml | 10 +++++----- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxChartServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxChartServiceImpl.java index 0ae1743cd..22d31b5c8 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxChartServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxChartServiceImpl.java @@ -2294,12 +2294,6 @@ public class WxChartServiceImpl implements WxChartDataService { return new ResultData(datamap); } - public static void main(String[] args) { - double a = 0.0; - System.out.println(a==0.0); - System.out.println(); - } - /** * 费用收缴数据 * @param tenantId @@ -2445,6 +2439,15 @@ public class WxChartServiceImpl implements WxChartDataService { return new ResultData(datamap); } + public static void main(String[] args) { + BigDecimal receivepay = new BigDecimal(33); + BigDecimal pay = new BigDecimal(11); + BigDecimal divide = pay.divide(receivepay, 2, BigDecimal.ROUND_UNNECESSARY); + System.out.println(divide); + double zjcjl = divide.multiply(new BigDecimal(100)).doubleValue(); + System.out.println(zjcjl); + } + /** * 营销数据 * @param tenantId diff --git a/mallinkService/src/main/resources/mapper/WxCouponMapper.xml b/mallinkService/src/main/resources/mapper/WxCouponMapper.xml index 90fcd493a..44efa7e0f 100644 --- a/mallinkService/src/main/resources/mapper/WxCouponMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxCouponMapper.xml @@ -509,21 +509,21 @@ left join wx_coupon c on c.id = ci.coupon_id left join wx_coupon_order co on co.id = ci.id where c.type = 100 - and c.create_date between #{startdate} and #{enddate} + and co.create_date between #{startdate} and #{enddate} @@ -760,7 +760,7 @@ left join wx_coupon c on c.id = ci.coupon_id left join wx_coupon_order co on co.id = ci.id where c.type = 100 - and c.create_date between #{startdate} and #{enddate} + and co.create_date between #{startdate} and #{enddate} group by xtime