From 657984218c42a46562c37db47d9b54be9d100f39 Mon Sep 17 00:00:00 2001 From: zhengfangyuan Date: Sun, 1 Jan 2023 13:36:18 +0800 Subject: [PATCH] fix bug --- .../controller/market/WxCouponController.java | 48 +++++++++---------- .../mapper/WxCouponChannelMapper.xml | 8 +++- 2 files changed, 30 insertions(+), 26 deletions(-) diff --git a/mallinkAdmin/src/main/java/com/iformall/controller/market/WxCouponController.java b/mallinkAdmin/src/main/java/com/iformall/controller/market/WxCouponController.java index 5e65e2876..e149b5160 100644 --- a/mallinkAdmin/src/main/java/com/iformall/controller/market/WxCouponController.java +++ b/mallinkAdmin/src/main/java/com/iformall/controller/market/WxCouponController.java @@ -449,12 +449,12 @@ public class WxCouponController extends BaseController { Map result = new HashedMap(); TenantEntity tenantEntity = getTenantInfo(); List tenantEntitys = wxMallService.getTenantEntitys(tenantEntity); - if (wxCoupon.getStartdate() == null) { - wxCoupon.setStartdate(DateUtils.getFirstDayForCurrMonth()); - } - if (wxCoupon.getEnddate() == null) { - wxCoupon.setEnddate(DateUtils.stringToDate(DateUtils.getSystemTime("yyyy-MM-dd") + " 23:59:59")); - } +// if (wxCoupon.getStartdate() == null) { +// wxCoupon.setStartdate(DateUtils.getFirstDayForCurrMonth()); +// } +// if (wxCoupon.getEnddate() == null) { +// wxCoupon.setEnddate(DateUtils.stringToDate(DateUtils.getSystemTime("yyyy-MM-dd") + " 23:59:59")); +// } wxCoupon.setSourceType(EnumCouponSourceType.COUPONSource_Admin.getCode()); //根据上架时间查询券 WxCouponChannel couponChannelQ = new WxCouponChannel(); @@ -490,12 +490,12 @@ public class WxCouponController extends BaseController { //默认时间本月第一天,截止到当天 TenantEntity tenantEntity = getTenantInfo(); List tenantEntitys = wxMallService.getTenantEntitys(tenantEntity); - if (wxCoupon.getStartdate() == null) { - wxCoupon.setStartdate(DateUtils.getFirstDayForCurrMonth()); - } - if (wxCoupon.getEnddate() == null) { - wxCoupon.setEnddate(DateUtils.stringToDate(DateUtils.getSystemTime("yyyy-MM-dd") + " 23:59:59")); - } +// if (wxCoupon.getStartdate() == null) { +// wxCoupon.setStartdate(DateUtils.getFirstDayForCurrMonth()); +// } +// if (wxCoupon.getEnddate() == null) { +// wxCoupon.setEnddate(DateUtils.stringToDate(DateUtils.getSystemTime("yyyy-MM-dd") + " 23:59:59")); +// } wxCoupon.setSourceType(EnumCouponSourceType.COUPONSource_Admin.getCode()); //根据上架时间查询券 WxCouponChannel couponChannelQ = new WxCouponChannel(); @@ -523,12 +523,12 @@ public class WxCouponController extends BaseController { TenantEntity tenantEntity = getTenantInfo(); List tenantEntitys = wxMallService.getTenantEntitys(tenantEntity); Map result = new HashedMap(); - if (wxCoupon.getStartdate() == null) { - wxCoupon.setStartdate(DateUtils.getFirstDayForCurrMonth()); - } - if (wxCoupon.getEnddate() == null) { - wxCoupon.setEnddate(DateUtils.stringToDate(DateUtils.getSystemTime("yyyy-MM-dd") + " 23:59:59")); - } +// if (wxCoupon.getStartdate() == null) { +// wxCoupon.setStartdate(DateUtils.getFirstDayForCurrMonth()); +// } +// if (wxCoupon.getEnddate() == null) { +// wxCoupon.setEnddate(DateUtils.stringToDate(DateUtils.getSystemTime("yyyy-MM-dd") + " 23:59:59")); +// } wxCoupon.setSourceType(EnumCouponSourceType.COUPONSource_Admin.getCode()); //根据上架时间查询券 @@ -562,12 +562,12 @@ public class WxCouponController extends BaseController { //默认时间本月第一天,截止到当天 TenantEntity tenantEntity = getTenantInfo(); List tenantEntitys = wxMallService.getTenantEntitys(tenantEntity); - if (wxCoupon.getStartdate() == null) { - wxCoupon.setStartdate(DateUtils.getFirstDayForCurrMonth()); - } - if (wxCoupon.getEnddate() == null) { - wxCoupon.setEnddate(DateUtils.stringToDate(DateUtils.getSystemTime("yyyy-MM-dd") + " 23:59:59")); - } +// if (wxCoupon.getStartdate() == null) { +// wxCoupon.setStartdate(DateUtils.getFirstDayForCurrMonth()); +// } +// if (wxCoupon.getEnddate() == null) { +// wxCoupon.setEnddate(DateUtils.stringToDate(DateUtils.getSystemTime("yyyy-MM-dd") + " 23:59:59")); +// } wxCoupon.setSourceType(EnumCouponSourceType.COUPONSource_Admin.getCode()); //根据上架时间查询券 diff --git a/mallinkService/src/main/resources/mapper/WxCouponChannelMapper.xml b/mallinkService/src/main/resources/mapper/WxCouponChannelMapper.xml index 2dbf4dd37..0035626c8 100644 --- a/mallinkService/src/main/resources/mapper/WxCouponChannelMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxCouponChannelMapper.xml @@ -79,8 +79,12 @@ and cc.`show_begin_time` <= #{showBeginTime} - - and cc.`create_date` between #{startdate} and #{enddate} + + and cc.`create_date` >= #{startdate} + + + + and cc.`create_date` <= #{enddate}