From f61578b233ce3359355ab5977528939aa9bb5f31 Mon Sep 17 00:00:00 2001 From: Stormeye Wu Date: Fri, 5 Jul 2019 09:53:58 +0800 Subject: [PATCH 01/23] =?UTF-8?q?[=E6=B4=BB=E5=8A=A8=E6=8A=A5=E5=90=8D][?= =?UTF-8?q?=E4=BF=AE=E6=94=B9]:catch=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/market/WxActivityController.java | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/mallinkAdmin/src/main/java/com/iformall/controller/market/WxActivityController.java b/mallinkAdmin/src/main/java/com/iformall/controller/market/WxActivityController.java index 0e8cac415..fea5d1104 100644 --- a/mallinkAdmin/src/main/java/com/iformall/controller/market/WxActivityController.java +++ b/mallinkAdmin/src/main/java/com/iformall/controller/market/WxActivityController.java @@ -7,6 +7,7 @@ import com.iformall.common.ResultData; import com.iformall.controller.base.BaseController; import com.iformall.domain.po.WxActivity; import com.iformall.enums.EnumActivityStatus; +import com.iformall.exception.MallinkException; import com.iformall.service.WxActivityService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; @@ -54,7 +55,12 @@ public class WxActivityController extends BaseController { logger.debug("[" + getIpAddr() + "] WxActivityController::add"); wxActivity.setStatus(EnumActivityStatus.STATUS_THROW_IN.getCode()); wxActivity.setTenantId(getTenantId()); - wxActivityService.saveOrUpdate(wxActivity); + try { + wxActivityService.saveOrUpdate(wxActivity); + } catch (MallinkException e) { + logger.error(e.getMessage()); + return new ResultData(e.getErrorCode(), e.getMessage()); + } return new ResultData(); } @@ -63,7 +69,12 @@ public class WxActivityController extends BaseController { @SystemControllerLog(description = "活动-id更新") public ResultData update(@RequestBody WxActivity wxActivity) { logger.debug("[" + getIpAddr() + "] WxActivityController::update"); - return wxActivityService.saveOrUpdate(wxActivity); + try { + return wxActivityService.saveOrUpdate(wxActivity); + } catch (MallinkException e) { + logger.error(e.getMessage()); + return new ResultData(e.getErrorCode(), e.getMessage()); + } } @ApiOperation("根据id更新接口") From 40698ac43775730137c3ee9debdc622902e534eb Mon Sep 17 00:00:00 2001 From: gongbiao Date: Fri, 5 Jul 2019 10:19:45 +0800 Subject: [PATCH 02/23] =?UTF-8?q?[=E7=89=A9=E4=B8=9A=E5=90=88=E5=90=8C][?= =?UTF-8?q?=E4=BF=AE=E6=94=B9][=E6=B2=A1=E6=9C=89=E7=A7=9F=E8=B5=81?= =?UTF-8?q?=E5=90=88=E5=90=8C=E4=B8=8D=E8=83=BD=E5=88=9B=E5=BB=BA=E7=89=A9?= =?UTF-8?q?=E4=B8=9A=E5=90=88=E5=90=8C]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iformall/service/impl/WxPropertyContractServiceImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java index 6e5813322..82249435e 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java @@ -262,6 +262,8 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService wxRentContract.getStatus().equals(EnumRentContractStatus.INVALID.getCode())) { return new ResultData(ErrorCode.RENT_CONTRACT_IS_TERMINATED); } + } else { + return new ResultData(ErrorCode.RENT_CONTRACT_IS_NOT_FOUND); } if (null == record.getMerchantId() && record.getOperationType().equals(EnumContractOperationType.PART.getCode())) { return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "merchantId不能为空"); @@ -365,7 +367,7 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService return new ResultData(ErrorCode.PROPERTY_CONTRACT_IS_NOT_FOUND); } - record.setRentalStartDate(wxPropertyContract.getRentalStartDate()); + record.setRentalStartDate(wxRentContract.getRentalStartDate()); record.setRentalEndDate(wxRentContract.getRentalEndDate()); record.setStartDate(wxRentContract.getStartDate()); record.setEndDate(wxRentContract.getEndDate()); From d9363fb9c191e86a6bc499e8c6a3cab772350cb7 Mon Sep 17 00:00:00 2001 From: Stormeye Wu Date: Fri, 5 Jul 2019 10:29:53 +0800 Subject: [PATCH 03/23] =?UTF-8?q?[queryData][=E4=BF=AE=E6=94=B9]:NullPoint?= =?UTF-8?q?er=E5=BC=82=E5=B8=B8=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/iformall/service/impl/WxChartServiceImpl.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 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 94110d4c1..e112021fb 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxChartServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxChartServiceImpl.java @@ -84,14 +84,18 @@ public class WxChartServiceImpl implements WxChartDataService { public ResultData queryData(Map paramsMap) { String tenantId = paramsMap.get("tenantId"); Integer chart = Integer.valueOf(paramsMap.get("chart")); - String startdate = paramsMap.get("startdate") + " 00:00:00"; - String enddate = paramsMap.get("enddate") + " 23:59:59"; + String startdate = paramsMap.get("startdate"); + String enddate = paramsMap.get("enddate"); if (StringUtils.isEmpty(startdate)) { startdate = DateUtils.getSystemTime("yyyy-MM-dd") + " 00:00:00" ; + } else { + startdate = startdate + " 00:00:00"; } if (StringUtils.isEmpty(enddate)) { enddate = DateUtils.getSystemTime("yyyy-MM-dd") + " 23:59:59"; + } else { + enddate = enddate + " 23:59:59"; } //出租率 From 23185a84f86ba1e7e807d82e8ca6522d2202439b Mon Sep 17 00:00:00 2001 From: luozukai Date: Fri, 5 Jul 2019 10:47:51 +0800 Subject: [PATCH 04/23] =?UTF-8?q?[=E5=8D=B7][=E4=BF=AE=E6=94=B9][=E8=A7=A3?= =?UTF-8?q?=E6=9E=90=E5=BC=95=E6=93=8E=E4=B8=8D=E8=BF=87=E6=BB=A4]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iformall/controller/market/WxCouponController.java | 8 ++++++++ .../src/main/java/com/iformall/tenant/TenantInfoImpl.java | 4 ++++ .../com/iformall/service/impl/WxChartServiceImpl.java | 4 ++++ 3 files changed, 16 insertions(+) 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 9def9d0b9..538c7a8ac 100644 --- a/mallinkAdmin/src/main/java/com/iformall/controller/market/WxCouponController.java +++ b/mallinkAdmin/src/main/java/com/iformall/controller/market/WxCouponController.java @@ -179,6 +179,14 @@ public class WxCouponController extends BaseController { if(wxCoupon.getValidEndDate()!=null && wxCoupon.getValidEndDate().before(coupon.getValidEndDate())){ return new ResultData(ErrorCode.COUPON_STOCK_ENDTIME_ERR); } + if(DateUtils.format(wxCoupon.getValidEndDate()).equals(DateUtils.format(coupon.getValidEndDate())) + && wxCoupon.getInventory().equals(coupon.getInventory()) + || + (DateUtils.format(wxCoupon.getValidEndDate()).equals(DateUtils.format(coupon.getValidEndDate())) && + wxCoupon.getValidDays().equals(coupon.getValidDays())) + ){ + return new ResultData(ErrorCode.COUPON_STOCK_VALID_DATE_SETTING_ERR); + } } //启动审批流 diff --git a/mallinkAdmin/src/main/java/com/iformall/tenant/TenantInfoImpl.java b/mallinkAdmin/src/main/java/com/iformall/tenant/TenantInfoImpl.java index 18ffe2c96..c8ff737d0 100644 --- a/mallinkAdmin/src/main/java/com/iformall/tenant/TenantInfoImpl.java +++ b/mallinkAdmin/src/main/java/com/iformall/tenant/TenantInfoImpl.java @@ -100,6 +100,10 @@ public class TenantInfoImpl implements TenantInfo { return true; if ("com.iformall.mapper.WxActivityJoinMapper.updateStatus".equals(ms.getId())) return true; + if ("com.iformall.mapper.WxCouponMapper.findCouponList".equals(ms.getId())) + return true; + if ("com.iformall.mapper.WxCouponMapper.findCouponListCount".equals(ms.getId())) + return true; return false; } } 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 e112021fb..cc656913a 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxChartServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxChartServiceImpl.java @@ -87,6 +87,10 @@ public class WxChartServiceImpl implements WxChartDataService { String startdate = paramsMap.get("startdate"); String enddate = paramsMap.get("enddate"); + if(chart == null){ + return new ResultData(ErrorCode.REPORT_TYPE_UNKNOWN); + } + if (StringUtils.isEmpty(startdate)) { startdate = DateUtils.getSystemTime("yyyy-MM-dd") + " 00:00:00" ; } else { From d572ea673726fbab1aa1655185a726e072904d3f Mon Sep 17 00:00:00 2001 From: luozukai Date: Fri, 5 Jul 2019 10:59:17 +0800 Subject: [PATCH 05/23] =?UTF-8?q?[=E5=8D=B7][=E4=BF=AE=E6=94=B9][=E8=A7=A3?= =?UTF-8?q?=E6=9E=90=E5=BC=95=E6=93=8E=E4=B8=8D=E8=BF=87=E6=BB=A4]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../V201907051056__L_ADD_FLOW_DATA.sql | 90 +++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 mallinkAdmin/src/main/resources/db/migration/V201907051056__L_ADD_FLOW_DATA.sql diff --git a/mallinkAdmin/src/main/resources/db/migration/V201907051056__L_ADD_FLOW_DATA.sql b/mallinkAdmin/src/main/resources/db/migration/V201907051056__L_ADD_FLOW_DATA.sql new file mode 100644 index 000000000..4c9a5fb53 --- /dev/null +++ b/mallinkAdmin/src/main/resources/db/migration/V201907051056__L_ADD_FLOW_DATA.sql @@ -0,0 +1,90 @@ +delete from wx_flow_config where name in('营销审批','拼团审批','有价卷审批','卡审批','砍价审批'); + +INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `create_date`, `update_date`, `sort`) +VALUES + (1560252222, 0, '789', '营销审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 3), + ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560252222, '789', '有价卷审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 1), + ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560252222, '789', '卡审批', 10, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 2), + ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560252222, '789', '拼团审批', 11, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 3), + ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560252222, '789', '砍价审批', 12, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 4); + +INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `create_date`, `update_date`, `sort`) +VALUES + (1560253333, 0, '790', '营销审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 3), + ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560253333, '790', '有价卷审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 1), + ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560253333, '790', '卡审批', 10, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 2), + ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560253333, '790', '拼团审批', 11, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 3), + ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560253333, '790', '砍价审批', 12, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 4); + +INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `create_date`, `update_date`, `sort`) +VALUES + (1560254444, 0, '1001', '营销审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 3), + ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560254444, '1001', '有价卷审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 1), + ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560254444, '1001', '卡审批', 10, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 2), + ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560254444, '1001', '拼团审批', 11, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 3), + ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560254444, '1001', '砍价审批', 12, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 4); + +INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `create_date`, `update_date`, `sort`) +VALUES + (1560255555, 0, '1002', '营销审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 3), + ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560255555, '1002', '有价卷审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 1), + ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560255555, '1002', '卡审批', 10, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 2), + ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560255555, '1002', '拼团审批', 11, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 3), + ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560255555, '1002', '砍价审批', 12, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 4); + +INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `create_date`, `update_date`, `sort`) +VALUES + (1560255556, 0, '1003', '营销审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 3), + ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560255556, '1003', '有价卷审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 1), + ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560255556, '1003', '卡审批', 10, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 2), + ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560255556, '1003', '拼团审批', 11, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 3), + ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560255556, '1003', '砍价审批', 12, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 4); + +INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `create_date`, `update_date`, `sort`) +VALUES + (1560256666, 0, '1004', '营销审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 3), + ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256666, '1004', '有价卷审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 1), + ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256666, '1004', '卡审批', 10, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 2), + ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256666, '1004', '拼团审批', 11, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 3), + ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256666, '1004', '砍价审批', 12, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 4); + +INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `create_date`, `update_date`, `sort`) +VALUES + (1560257777, 0, '1005', '营销审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 3), + ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560257777, '1005', '有价卷审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 1), + ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560257777, '1005', '卡审批', 10, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 2), + ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560257777, '1005', '拼团审批', 11, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 3), + ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560257777, '1005', '砍价审批', 12, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 4); + +INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `create_date`, `update_date`, `sort`) +VALUES + (1560258888, 0, '1006', '营销审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 3), + ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560258888, '1006', '有价卷审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 1), + ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560258888, '1006', '卡审批', 10, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 2), + ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560258888, '1006', '拼团审批', 11, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 3), + ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560258888, '1006', '砍价审批', 12, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 4); + +INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `create_date`, `update_date`, `sort`) +VALUES + (1560259999, 0, '1007', '营销审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 3), + ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560259999, '1007', '有价卷审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 1), + ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560259999, '1007', '卡审批', 10, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 2), + ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560259999, '1007', '拼团审批', 11, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 3), + ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560259999, '1007', '砍价审批', 12, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 4); + +INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `create_date`, `update_date`, `sort`) +VALUES + (1560260000, 0, '1008', '营销审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 3), + ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560260000, '1008', '有价卷审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 1), + ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560260000, '1008', '卡审批', 10, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 2), + ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560260000, '1008', '拼团审批', 11, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 3), + ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560260000, '1008', '砍价审批', 12, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 4); + +INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `create_date`, `update_date`, `sort`) +VALUES + (1560260001, 0, '1009', '营销审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 3), + ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560260001, '1009', '有价卷审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 1), + ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560260001, '1009', '卡审批', 10, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 2), + ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560260001, '1009', '拼团审批', 11, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 3), + ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560260001, '1009', '砍价审批', 12, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 4); + From 0512486012591c448a3479070fc449079b4d6105 Mon Sep 17 00:00:00 2001 From: luozukai Date: Fri, 5 Jul 2019 11:09:27 +0800 Subject: [PATCH 06/23] =?UTF-8?q?[=E5=8D=B7][=E4=BF=AE=E6=94=B9][=E8=A7=A3?= =?UTF-8?q?=E6=9E=90=E5=BC=95=E6=93=8E=E4=B8=8D=E8=BF=87=E6=BB=A4]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/iformall/controller/market/WxCouponController.java | 6 +++--- 1 file changed, 3 insertions(+), 3 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 538c7a8ac..4b8a1f401 100644 --- a/mallinkAdmin/src/main/java/com/iformall/controller/market/WxCouponController.java +++ b/mallinkAdmin/src/main/java/com/iformall/controller/market/WxCouponController.java @@ -179,10 +179,10 @@ public class WxCouponController extends BaseController { if(wxCoupon.getValidEndDate()!=null && wxCoupon.getValidEndDate().before(coupon.getValidEndDate())){ return new ResultData(ErrorCode.COUPON_STOCK_ENDTIME_ERR); } - if(DateUtils.format(wxCoupon.getValidEndDate()).equals(DateUtils.format(coupon.getValidEndDate())) - && wxCoupon.getInventory().equals(coupon.getInventory()) + if((wxCoupon.getValidEndDate()!=null&&coupon.getValidEndDate()!=null && DateUtils.format(wxCoupon.getValidEndDate()).equals(DateUtils.format(coupon.getValidEndDate())) + && wxCoupon.getInventory().equals(coupon.getInventory())) || - (DateUtils.format(wxCoupon.getValidEndDate()).equals(DateUtils.format(coupon.getValidEndDate())) && + (wxCoupon.getValidDays()!=null && coupon.getValidDays()!=null && wxCoupon.getInventory().equals(coupon.getInventory()) && wxCoupon.getValidDays().equals(coupon.getValidDays())) ){ return new ResultData(ErrorCode.COUPON_STOCK_VALID_DATE_SETTING_ERR); From 030035886476e90ba648a572a5b8297c9003463e Mon Sep 17 00:00:00 2001 From: gongbiao Date: Fri, 5 Jul 2019 11:09:41 +0800 Subject: [PATCH 07/23] =?UTF-8?q?[=E8=B4=A6=E5=8D=95=E5=88=97=E8=A1=A8][?= =?UTF-8?q?=E4=BF=AE=E6=94=B9][SQL=E8=B0=83=E6=95=B4]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/mapper/WxBillAllMapper.xml | 178 +++++++++--------- 1 file changed, 84 insertions(+), 94 deletions(-) diff --git a/mallinkService/src/main/resources/mapper/WxBillAllMapper.xml b/mallinkService/src/main/resources/mapper/WxBillAllMapper.xml index b5952dcfc..f85307324 100644 --- a/mallinkService/src/main/resources/mapper/WxBillAllMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxBillAllMapper.xml @@ -53,45 +53,37 @@ select id,merchant_id,shop_id,tenant_id,'租金' name,1 bill_type_value,'租金' bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type,case when shop_info is null then '[]' else shop_info end shop_info,comments - from wx_bill_rent where is_preview = 0 - union + from wx_bill_rent where tenant_id=#{tenantId} and is_preview = 0 + union all select id,merchant_id,shop_id,tenant_id,'租赁押金' name,2 bill_type_value,'租赁押金' bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' - endtime,rent_shop_type,shop_info,NULL comments from wx_bill_rent_deposit - union + endtime,rent_shop_type,shop_info,NULL comments from wx_bill_rent_deposit where tenant_id=#{tenantId} + union all select id,merchant_id,shop_id,tenant_id,'物业费' name,3 bill_type_value,'物业费' bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type,case when shop_info is null then '[]' else shop_info end shop_info,comments - from wx_bill_property where is_preview = 0 - union + from wx_bill_property where tenant_id=#{tenantId} and is_preview = 0 + union all select id,merchant_id,shop_id,tenant_id,'物业押金' name,4 bill_type_value,'物业押金' bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' - endtime,rent_shop_type,shop_info,NULL comments from wx_bill_property_deposit - union - select id,merchant_id,shop_id,tenant_id,'水费' name,5 bill_type_value,'水费' bill_type,0 as + endtime,rent_shop_type,shop_info,NULL comments from wx_bill_property_deposit where tenant_id=#{tenantId} + union all + select id,merchant_id,shop_id,tenant_id,case when type=1 then '水费' when type=2 then '电费' else '空调费' end name, + case when type=1 then 5 when type=2 then 6 else 9 end bill_type_value, + case when type=1 then '水费' when type=2 then '电费' else '空调费' end bill_type,0 as need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' endtime, rent_shop_type,'[]' shop_info,NULL comments - from wx_bill_daily where type=1 - union - select id,merchant_id,shop_id,tenant_id,'电费' name,6 bill_type_value,'电费' bill_type,0 as - need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' endtime, - rent_shop_type,'[]' shop_info,NULL comments - from wx_bill_daily where type=2 - union - select id,merchant_id,shop_id,tenant_id,'空调费' name,9 bill_type_value,'空调费' bill_type,0 as - need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' endtime, - rent_shop_type,'[]' shop_info,NULL comments - from wx_bill_daily where type=3 - union + from wx_bill_daily where tenant_id=#{tenantId} + union all select id,merchant_id,shop_id,tenant_id,name,7 bill_type_value,'其他' bill_type,0 as need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' endtime, rent_shop_type,'[]' shop_info,comments - from wx_bill_other - union + from wx_bill_other where tenant_id=#{tenantId} + union all select id,merchant_id,shop_id,tenant_id,comments as name,8 bill_type_value,'其他押金' bill_type,0 as need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' endtime, rent_shop_type,'[]' shop_info,comments - from wx_bill_other_deposit + from wx_bill_other_deposit where tenant_id=#{tenantId} ) bill left join wx_merchant m on bill.merchant_id=m.id left join wx_shop s on bill.shop_id=s.id @@ -130,34 +122,34 @@ select count(bill.id) owncount,IFNULL(sum(bill.owe),0) owe from ( select id,merchant_id,shop_id,tenant_id,1 bill_type_value,'租金' bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_rent where is_preview = 0 - union + union all select id,merchant_id,shop_id,tenant_id,2 bill_type_value,'租赁押金' bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_rent_deposit - union + union all select id,merchant_id,shop_id,tenant_id,3 bill_type_value,'物业费' bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_property where is_preview = 0 - union + union all select id,merchant_id,shop_id,tenant_id,4 bill_type_value,'物业押金' bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_property_deposit - union + union all select id,merchant_id,shop_id,tenant_id,5 bill_type_value,'水费' bill_type,0 as need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_daily where type=1 - union + union all select id,merchant_id,shop_id,tenant_id,6 bill_type_value,'电费' bill_type,0 as need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_daily where type=2 - union + union all select id,merchant_id,shop_id,tenant_id,9 bill_type_value,'空调费' bill_type,0 as need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_daily where type=3 - union + union all select id,merchant_id,shop_id,tenant_id,7 bill_type_value,'其他' bill_type,0 as need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_other - union + union all select id,merchant_id,shop_id,tenant_id,8 bill_type_value,'其他押金' bill_type,0 as need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_other_deposit ) bill @@ -185,34 +177,34 @@ select count(bill.id) paycount,IFNULL(sum(bill.pay),0) pay from ( select id,merchant_id,shop_id,tenant_id,1 bill_type_value,'租金' bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_rent where is_preview = 0 - union + union all select id,merchant_id,shop_id,tenant_id,2 bill_type_value,'租赁押金' bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_rent_deposit - union + union all select id,merchant_id,shop_id,tenant_id,3 bill_type_value,'物业费' bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_property where is_preview = 0 - union + union all select id,merchant_id,shop_id,tenant_id,4 bill_type_value,'物业押金' bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_property_deposit - union + union all select id,merchant_id,shop_id,tenant_id,5 bill_type_value,'水费' bill_type,0 as need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_daily where type=1 - union + union all select id,merchant_id,shop_id,tenant_id,6 bill_type_value,'电费' bill_type,0 as need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_daily where type=2 - union + union all select id,merchant_id,shop_id,tenant_id,9 bill_type_value,'空调费' bill_type,0 as need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_daily where type=3 - union + union all select id,merchant_id,shop_id,tenant_id,7 bill_type_value,'其他' bill_type,0 as need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_other - union + union all select id,merchant_id,shop_id,tenant_id,8 bill_type_value,'其他押金' bill_type,0 as need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_other_deposit ) bill @@ -237,42 +229,40 @@ rentShopType from ( select id,merchant_id,shop_id,tenant_id,'租金' name,1 bill_type_value,'租金' bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,starttime,endtime,rent_shop_type - from wx_bill_rent where is_preview = 0 and rent_contract_id in (select id from wx_rent_contract where status in + from wx_bill_rent where is_preview = 0 and tenant_id=#{tenantId}and rent_contract_id in (select id from + wx_rent_contract where status in (2,3,4)) - union + union all select id,merchant_id,shop_id,tenant_id,'租赁押金' name,2 bill_type_value,'租赁押金' bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,starttime,endtime,rent_shop_type - from wx_bill_rent_deposit where rent_contract_id in (select id from wx_rent_contract where status in (2,3,4)) - union + from wx_bill_rent_deposit where tenant_id=#{tenantId} and rent_contract_id in (select id from wx_rent_contract + where status in (2,3,4)) + union all select id,merchant_id,shop_id,tenant_id,'物业费' name,3 bill_type_value,'物业费' bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,starttime,endtime,rent_shop_type - from wx_bill_property where is_preview = 0 and property_contract_id in (select id from wx_property_contract + from wx_bill_property where is_preview = 0 and tenant_id=#{tenantId} and property_contract_id in (select id from + wx_property_contract where status in(2,3,4)) - union + union all select id,merchant_id,shop_id,tenant_id,'物业押金' name,4 bill_type_value,'物业押金' bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,starttime,endtime,rent_shop_type - from wx_bill_property_deposit where property_contract_id in (select id from wx_property_contract where status in + from wx_bill_property_deposit where tenant_id=#{tenantId} and property_contract_id in (select id from + wx_property_contract where status in (2,3,4)) - union - select id,merchant_id,shop_id,tenant_id,'水费' name,5 bill_type_value,'水费' bill_type, 0 as - need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type - from wx_bill_daily where type=1 - union - select id,merchant_id,shop_id,tenant_id,'电费' name,6 bill_type_value,'电费' bill_type,0 as - need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type - from wx_bill_daily where type=2 - union - select id,merchant_id,shop_id,tenant_id,'空调费' name,9 bill_type_value,'空调费' bill_type,0 as - need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type - from wx_bill_daily where type=3 - union + union all + select id,merchant_id,shop_id,tenant_id,case when type=1 then '水费' when type=2 then '电费' else '空调费' end name, + case when type=1 then 5 when type=2 then 6 else 9 end bill_type_value, + case when type=1 then '水费' when type=2 then '电费' else '空调费' end bill_type, 0 as need_pay,receive_pay, + pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type + from wx_bill_daily where tenant_id=#{tenantId} + union all select id,merchant_id,shop_id,tenant_id,name,7 bill_type_vaue,'其他' bill_type,0 as need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type - from wx_bill_other - union + from wx_bill_other where tenant_id=#{tenantId} + union all select id,merchant_id,shop_id,tenant_id,comments as name,8 bill_type_value,'其他押金' bill_type,0 as need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type - from wx_bill_other_deposit + from wx_bill_other_deposit where tenant_id=#{tenantId} ) bill left join wx_merchant m on bill.merchant_id=m.id left join wx_shop s on bill.shop_id=s.id @@ -323,35 +313,35 @@ select id,merchant_id,shop_id,tenant_id,'租金' name,1 bill_type_value,'租金' bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type from wx_bill_rent where is_preview = 0 - union + union all select id,merchant_id,shop_id,tenant_id,'租赁押金' name,2 bill_type_value,'租赁押金' bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type from wx_bill_rent_deposit - union + union all select id,merchant_id,shop_id,tenant_id,'物业费' name,3 bill_type_value,'物业费' bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type from wx_bill_property where is_preview = 0 - union + union all select id,merchant_id,shop_id,tenant_id,'物业押金' name,4 bill_type_value,'物业押金' bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type from wx_bill_property_deposit - union + union all select id,merchant_id,shop_id,tenant_id,'水费' name,5 bill_type_value,'水费' bill_type,0 as need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type from wx_bill_daily where type=1 - union + union all select id,merchant_id,shop_id,tenant_id,'电费' name,6 bill_type_value,'电费' bill_type,0 as need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type from wx_bill_daily where type=2 - union + union all select id,merchant_id,shop_id,tenant_id,'空调费' name,9 bill_type_value,'空调费' bill_type,0 as need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type from wx_bill_daily where type=3 - union + union all select id,merchant_id,shop_id,tenant_id,name,7 bill_type_value,'其他' bill_type,0 as need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type from wx_bill_other - union + union all select id,merchant_id,shop_id,tenant_id,name,8 bill_type_value,'其他押金' bill_type,0 as need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type from wx_bill_other_deposit @@ -370,35 +360,35 @@ select id,merchant_id,shop_id,tenant_id,'租金' name,1 bill_type_value,'租金' bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type from wx_bill_rent where is_preview = 0 - union + union all select id,merchant_id,shop_id,tenant_id,'租赁押金' name,2 bill_type_value,'租赁押金' bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type from wx_bill_rent_deposit - union + union all select id,merchant_id,shop_id,tenant_id,'物业费' name,3 bill_type_value,'物业费' bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type from wx_bill_property where is_preview = 0 - union + union all select id,merchant_id,shop_id,tenant_id,'物业押金' name,4 bill_type_value,'物业押金' bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type from wx_bill_property_deposit - union + union all select id,merchant_id,shop_id,tenant_id,'水费' name,5 bill_type_value,'水费' bill_type,0 as need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type from wx_bill_daily where type=1 - union + union all select id,merchant_id,shop_id,tenant_id,'电费' name,6 bill_type_value,'电费' bill_type,0 as need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type from wx_bill_daily where type=2 - union + union all select id,merchant_id,shop_id,tenant_id,'空调费' name,9 bill_type_value,'空调费' bill_type,0 as need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type from wx_bill_daily where type=3 - union + union all select id,merchant_id,shop_id,tenant_id,name,7 bill_type_value,'其他' bill_type,0 as need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type from wx_bill_other - union + union all select id,merchant_id,shop_id,tenant_id,name,8 bill_type_value,'其他押金' bill_type,0 as need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type from wx_bill_other_deposit @@ -417,11 +407,11 @@ select id,merchant_id,shop_id,tenant_id,'租金' name,1 bill_type_value,'租金' bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type from wx_bill_rent where is_preview = 0 - union + union all select id,merchant_id,shop_id,tenant_id,'租赁押金' name,2 bill_type_value,'租赁押金' bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type from wx_bill_rent_deposit - union + union all select id,merchant_id,shop_id,tenant_id,'物业费' name,3 bill_type_value,'物业费' bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type from wx_bill_property where is_preview = 0 @@ -429,23 +419,23 @@ select id,merchant_id,shop_id,tenant_id,'物业押金' name,4 bill_type_value,'物业押金' bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type from wx_bill_property_deposit - union + union all select id,merchant_id,shop_id,tenant_id,'水费' name,5 bill_type_value,'水费' bill_type,0 as need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type from wx_bill_daily where type=1 - union + union all select id,merchant_id,shop_id,tenant_id,'电费' name,6 bill_type_value,'电费' bill_type,0 as need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type from wx_bill_daily where type=2 - union + union all select id,merchant_id,shop_id,tenant_id,'空调费' name,9 bill_type_value,'空调费' bill_type,0 as need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type from wx_bill_daily where type=3 - union + union all select id,merchant_id,shop_id,tenant_id,name,7 bill_type_value,'其他' bill_type,0 as need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type from wx_bill_other - union + union all select id,merchant_id,shop_id,tenant_id,name,8 bill_type_value,'其他押金' bill_type,0 as need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type from wx_bill_other_deposit @@ -468,35 +458,35 @@ select id,merchant_id,shop_id,tenant_id,'租金' name,1 bill_type_value,'租金' bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type from wx_bill_rent where is_preview = 0 - union + union all select id,merchant_id,shop_id,tenant_id,'租赁押金' name,2 bill_type_value,'租赁押金' bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type from wx_bill_rent_deposit - union + union all select id,merchant_id,shop_id,tenant_id,'物业费' name,3 bill_type_value,'物业费' bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type from wx_bill_property where is_preview = 0 - union + union all select id,merchant_id,shop_id,tenant_id,'物业押金' name,4 bill_type_value,'物业押金' bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type from wx_bill_property_deposit - union + union all select id,merchant_id,shop_id,tenant_id,'水费' name,5 bill_type_value,'水费' bill_type,0 as need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type from wx_bill_daily where type=1 - union + union all select id,merchant_id,shop_id,tenant_id,'电费' name,6 bill_type_value,'电费' bill_type,0 as need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type from wx_bill_daily where type=2 - union + union all select id,merchant_id,shop_id,tenant_id,'空调费' name,9 bill_type_value,'空调费' bill_type,0 as need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type from wx_bill_daily where type=3 - union + union all select id,merchant_id,shop_id,tenant_id,name,7 bill_type_value,'其他' bill_type,0 as need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type from wx_bill_other - union + union all select id,merchant_id,shop_id,tenant_id,name,8 bill_type_value,'其他押金' bill_type,0 as need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type from wx_bill_other_deposit From 8f7259c42c99177fb4bb80de9bb055950dc2c972 Mon Sep 17 00:00:00 2001 From: Stormeye Wu Date: Fri, 5 Jul 2019 11:10:31 +0800 Subject: [PATCH 08/23] =?UTF-8?q?[ProperTyContract/findById][=E4=BF=AE?= =?UTF-8?q?=E6=94=B9]:=E5=BC=82=E5=B8=B8=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../contract/WxPropertyContractController.java | 10 ++++++++-- .../impl/WxRentPropertyContractServiceImpl.java | 9 +++++++-- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/mallinkAdmin/src/main/java/com/iformall/controller/contract/WxPropertyContractController.java b/mallinkAdmin/src/main/java/com/iformall/controller/contract/WxPropertyContractController.java index fc0ddd668..7c3ec44e9 100644 --- a/mallinkAdmin/src/main/java/com/iformall/controller/contract/WxPropertyContractController.java +++ b/mallinkAdmin/src/main/java/com/iformall/controller/contract/WxPropertyContractController.java @@ -8,6 +8,7 @@ import com.iformall.domain.po.MallUserInfo; import com.iformall.domain.po.WxBillProperty; import com.iformall.domain.po.WxPropertyContract; import com.iformall.enums.EnumRentStartType; +import com.iformall.exception.MallinkException; import com.iformall.mapper.WxPropertyContractMapper; import com.iformall.service.WxBillPropertyService; import com.iformall.service.WxPropertyContractService; @@ -107,8 +108,13 @@ public class WxPropertyContractController extends BaseController { WxBillProperty wxBillProperty = new WxBillProperty(); wxBillProperty.setTenantId(super.getTenantId()); wxBillPropertyService.updateBillStatus(wxBillProperty); - Map data = wxPropertyContractService.getById(id); - return new ResultData(data); + try { + Map data = wxPropertyContractService.getById(id); + return new ResultData(data); + } catch (MallinkException e) { + logger.error(e.getMessage()); + return new ResultData(e.getErrorCode(), e.getMessage()); + } } @RequestMapping("/download") diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxRentPropertyContractServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxRentPropertyContractServiceImpl.java index 49f94c4e4..5f11d9121 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxRentPropertyContractServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxRentPropertyContractServiceImpl.java @@ -7,6 +7,7 @@ import com.iformall.domain.po.WxBillProperty; import com.iformall.domain.po.WxPropertyContract; import com.iformall.domain.po.WxRentContract; import com.iformall.domain.vo.WxRentPropertyContractVo; +import com.iformall.exception.MallinkException; import com.iformall.mapper.WxPropertyContractMapper; import com.iformall.mapper.WxRentContractMapper; import com.iformall.service.WxPropertyContractService; @@ -71,8 +72,12 @@ public class WxRentPropertyContractServiceImpl implements WxRentPropertyContract wxPropertyContractQuery.setRentContractId(id); WxPropertyContract propertyContract = wxPropertyContractMapper.selectOne(wxPropertyContractQuery); if (propertyContract != null) { - Map property = wxPropertyContractService.getById(propertyContract.getId()); - data.put("property", property); + try { + Map property = wxPropertyContractService.getById(propertyContract.getId()); + data.put("property", property); + } catch (MallinkException e) { + logger.error(e.getMessage()); + } } return new ResultData(data); } From 73d74aad1eb6f0992cc02e7fac4c7041f49597b6 Mon Sep 17 00:00:00 2001 From: gongbiao Date: Fri, 5 Jul 2019 11:39:52 +0800 Subject: [PATCH 09/23] =?UTF-8?q?[BUG][=E4=BF=AE=E6=94=B9][=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E7=8E=AF=E5=A2=83-=E5=8A=B5=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E4=B8=8B-=E6=96=B0=E8=B4=AD=E4=B9=B0=E5=8A=B5=E6=8E=92?= =?UTF-8?q?=E5=BA=8F=E9=97=AE=E9=A2=98]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/WxCouponOrderMapper.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mallinkService/src/main/resources/mapper/WxCouponOrderMapper.xml b/mallinkService/src/main/resources/mapper/WxCouponOrderMapper.xml index 9eb8ee05d..c843b8ca8 100644 --- a/mallinkService/src/main/resources/mapper/WxCouponOrderMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxCouponOrderMapper.xml @@ -483,7 +483,7 @@ ) order by ${sortColumns} - order by id desc + order by co.create_date desc,co.id desc From ad854450e1bbd0a368bfe91e211047cdcd39a1eb Mon Sep 17 00:00:00 2001 From: luozukai Date: Fri, 5 Jul 2019 13:54:44 +0800 Subject: [PATCH 10/23] =?UTF-8?q?[=E5=AE=A1=E6=89=B9][=E4=BF=AE=E6=94=B9][?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=9A=E5=8A=A1=E7=8A=B6=E6=80=81]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/db/migration/V201907051354__L_ADD_FLOW_DATA.sql | 1 + .../main/java/com/iformall/service/impl/WxFlowServiceImpl.java | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 mallinkAdmin/src/main/resources/db/migration/V201907051354__L_ADD_FLOW_DATA.sql diff --git a/mallinkAdmin/src/main/resources/db/migration/V201907051354__L_ADD_FLOW_DATA.sql b/mallinkAdmin/src/main/resources/db/migration/V201907051354__L_ADD_FLOW_DATA.sql new file mode 100644 index 000000000..908fb5bbc --- /dev/null +++ b/mallinkAdmin/src/main/resources/db/migration/V201907051354__L_ADD_FLOW_DATA.sql @@ -0,0 +1 @@ +update wx_flow_config set name = '有价券审批' where name ='有价卷审批'; diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java index c4adb0d1d..fae2b2921 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java @@ -204,8 +204,7 @@ public class WxFlowServiceImpl implements WxFlowService { wxCoupon.setPutApplyStatus(applyStatus); }else if(EnumCouponAppType.STOCK.getCode().equals(operateType)){ wxCoupon.setStockApplyStatus(applyStatus); - if(EnumRentContractAppStatus.FINISH.getCode().intValue() == applyStatus.intValue() - ||EnumFlowKey.NEW_CARD_UPLINE.getCode().equals(flowType)) { + if(EnumRentContractAppStatus.FINISH.getCode().intValue() == applyStatus.intValue()) { //减库存 if(EnumFlowKey.NEW_COUPON_UPLINE.getCode().equals(flowType) || EnumFlowKey.NEW_CARD_UPLINE.getCode().equals(flowType)) { Integer inventory = (Integer) getVariableByKey(variables, "inventory"); From 1b51bc6ebdc8da243e62dbbaa983fbc30efbe5d7 Mon Sep 17 00:00:00 2001 From: Stormeye Wu Date: Fri, 5 Jul 2019 14:32:02 +0800 Subject: [PATCH 11/23] =?UTF-8?q?[bug][=E4=BF=AE=E6=94=B9]:auto=5Frefund?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mallinkService/src/main/resources/mapper/WxCouponCarMapper.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mallinkService/src/main/resources/mapper/WxCouponCarMapper.xml b/mallinkService/src/main/resources/mapper/WxCouponCarMapper.xml index 8545d5c5a..df003c06b 100644 --- a/mallinkService/src/main/resources/mapper/WxCouponCarMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxCouponCarMapper.xml @@ -127,7 +127,7 @@ c.id,c.tenant_id,c.type,c.cover_img,c.cover_picture,c.title,c.sub_title,c.sale_price,c.use_price,c.use_limit_quantity,c.send_type,c.valid_type,c.valid_start_date,c.valid_end_date,c.valid_days,c.detail,c.price,c.unit,c.remain_inventory,c.inventory,c.remark,c.status,c.create_date,c.update_date,c.business, - car.vendor_type, car.vendor_params,c.credit_price + car.vendor_type, car.vendor_params,c.credit_price, c.`auto_refund` select from - wx_coupon_order co, - wx_coupon c, - (select tco.id as tcoid, - (select count(*) from wx_coupon_merchant tcm - where tcm.product_id = tco.coupon_id - and tcm.status = 0) as mc - from wx_coupon_order tco) com - where com.tcoid = co.id + wx_coupon_order co inner join wx_coupon c on c.id = co.coupon_id + inner join (select tco.id as tcoid, + (select count(*) from wx_coupon_merchant tcm + where tcm.product_id = tco.coupon_id + and tcm.status = 0) as mc + from wx_coupon_order tco) com on com.tcoid = co.id + inner join wx_c_user cu on cu.id=co.c_user_id + left join ( + select bu.id as bu_id,m.name as verify_merchant_name + from wx_merchant_b_user bu inner join wx_merchant m on bu.merchant_id=m.id + where bu.tenant_id = #{tenantId} + ) bu on bu.bu_id = co.b_user_id + where 1=1 and co.coupon_type = #{couponType} @@ -423,7 +430,6 @@ and co.coupon_type < 100 - and c.id = co.coupon_id and co.tenant_id = #{tenantId} From 5aec05785c8668eaf0c66938e81531010a28d1be Mon Sep 17 00:00:00 2001 From: gongbiao Date: Fri, 5 Jul 2019 14:59:53 +0800 Subject: [PATCH 13/23] =?UTF-8?q?[=E5=88=B8=E8=AE=A2=E5=8D=95][=E4=BF=AE?= =?UTF-8?q?=E6=94=B9][=E5=AF=BC=E5=87=BA=E6=97=B6=E5=BE=85=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E4=B8=8D=E6=98=BE=E7=A4=BA=E6=9B=B4=E6=96=B0=E6=97=B6?= =?UTF-8?q?=E9=97=B4]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/iformall/service/impl/WxCouponOrderServiceImpl.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponOrderServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponOrderServiceImpl.java index d5eb0afa1..94e137783 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponOrderServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponOrderServiceImpl.java @@ -279,6 +279,9 @@ public class WxCouponOrderServiceImpl implements WxCouponOrderService { String filename = "券订单"; List list = wxCouponOrderMapper.findListOfAdmin(wxCouponOrder); list.parallelStream().forEach(c -> { + if (c.getCouponOrderStatus().equals(EnumCouponOrderStatus.COUPON_ORDER_USE_WAIT.getCode())) { + c.setUpdateDate(null); + } if (!c.getMerchantId().equals(0L)) { List merchantVoList = c.getMerchantVoList(); if (!merchantVoList.isEmpty()) { From c5904f32af682956af54d694dfbbe1e747b4adde Mon Sep 17 00:00:00 2001 From: luozukai Date: Fri, 5 Jul 2019 15:04:12 +0800 Subject: [PATCH 14/23] =?UTF-8?q?[=E5=AE=A1=E6=89=B9][=E4=BF=AE=E6=94=B9][?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8D=B7=E5=88=97=E8=A1=A8=E8=BF=87=E6=BB=A4?= =?UTF-8?q?=E5=AE=A1=E6=89=B9=E7=8A=B6=E6=80=81]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/WxCouponMapper.xml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/mallinkService/src/main/resources/mapper/WxCouponMapper.xml b/mallinkService/src/main/resources/mapper/WxCouponMapper.xml index 56d54cdde..14ba453c0 100644 --- a/mallinkService/src/main/resources/mapper/WxCouponMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxCouponMapper.xml @@ -410,17 +410,16 @@ - and if(type=8,put_apply_status =2,1=1) + and if(type=8,put_apply_status =2 or c.id in(select coupon_id from wx_coupon_channel where status=0 and tenant_id=#{tenantId}) ,1=1) - and if(type=9,put_apply_status =2,1=1) + and if(type=9,put_apply_status =2 or c.id in(select coupon_id from wx_coupon_channel where status=0 and tenant_id=#{tenantId}),1=1) - and if(type=100,put_apply_status =2,1=1) + and if(type=100,put_apply_status =2 or c.id in(select coupon_id from wx_coupon_channel where status=0 and tenant_id=#{tenantId}),1=1) - - and if(type !=8 and type !=9 and type!=100,put_apply_status =2,1=1) + and if(type !=8 and type !=9 and type!=100,put_apply_status =2 or c.id in(select coupon_id from wx_coupon_channel where status=0 and tenant_id=#{tenantId}),1=1) From a5e5555619561318c1e8a64c42d9964e18e9fd91 Mon Sep 17 00:00:00 2001 From: gongbiao Date: Fri, 5 Jul 2019 15:32:53 +0800 Subject: [PATCH 15/23] =?UTF-8?q?[=E7=A7=9F=E9=87=91=E8=B4=A6=E5=8D=95][?= =?UTF-8?q?=E4=BF=AE=E6=94=B9][=E6=9B=B4=E6=96=B0=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E6=95=B0=E6=8D=AE]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/iformall/service/impl/WxBillRentServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxBillRentServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxBillRentServiceImpl.java index e306d366f..a668b13f6 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxBillRentServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxBillRentServiceImpl.java @@ -172,7 +172,7 @@ public class WxBillRentServiceImpl implements WxBillRentService { logger.error("添加租赁账单行为日志,e:" + e.getMessage()); throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); } - return new ResultData(Result.SUCCESS, "更新租赁账单成功"); + return new ResultData(Result.SUCCESS, "更新租赁账单成功", wxBillRent); } } From 9824c22da25ee8969b3a64733e226ec21d2edde5 Mon Sep 17 00:00:00 2001 From: luozukai Date: Fri, 5 Jul 2019 15:41:55 +0800 Subject: [PATCH 16/23] =?UTF-8?q?[=E5=AE=A1=E6=89=B9][=E4=BF=AE=E6=94=B9][?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8D=B7=E5=88=97=E8=A1=A8=E8=BF=87=E6=BB=A4?= =?UTF-8?q?=E5=AE=A1=E6=89=B9=E7=8A=B6=E6=80=81]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mallinkService/src/main/resources/mapper/WxBusinessMapper.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mallinkService/src/main/resources/mapper/WxBusinessMapper.xml b/mallinkService/src/main/resources/mapper/WxBusinessMapper.xml index bfd24a89c..551dacdfa 100644 --- a/mallinkService/src/main/resources/mapper/WxBusinessMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxBusinessMapper.xml @@ -168,7 +168,7 @@ left join wx_merchant_trade_daily mtd on mtd.merchant_id = m.id left join wx_merchant_shop wmt on wmt.merchant_id = m.id left join wx_shop ws on(wmt.shop_id = ws.id) - where m.business_id=#{id} and m.tenant_id=#{tenantId}) + where m.business_id=#{id} and m.tenant_id=#{tenantId} and mtd.create_date between #{startdate} and #{enddate}) ,2) devoteRate from wx_merchant m @@ -176,6 +176,7 @@ left join wx_merchant_shop wmt on wmt.merchant_id = m.id left join wx_shop ws on(wmt.shop_id = ws.id) where m.business_id=#{id} and m.tenant_id=#{tenantId} + and mtd.create_date between #{startdate} and #{enddate} group by m.id order by devoteRate desc From def2bc80c02dc253d04914465b7942b0b6e74a1f Mon Sep 17 00:00:00 2001 From: Stormeye Wu Date: Fri, 5 Jul 2019 14:55:09 +0800 Subject: [PATCH 17/23] =?UTF-8?q?[=E4=BA=A4=E6=98=93=E8=AE=A2=E5=8D=95][?= =?UTF-8?q?=E4=BF=AE=E6=94=B9]:=E4=BA=A4=E6=98=93=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mallinkService/src/main/resources/mapper/WxOrderMapper.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mallinkService/src/main/resources/mapper/WxOrderMapper.xml b/mallinkService/src/main/resources/mapper/WxOrderMapper.xml index 36e0da58d..ae997cab2 100644 --- a/mallinkService/src/main/resources/mapper/WxOrderMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxOrderMapper.xml @@ -566,7 +566,7 @@ order by ${sortColumns} - order by o.id desc + order by o.create_date desc, o.id desc From 2f7cd8ad35ed297190da8e860ee4042bb2959fa6 Mon Sep 17 00:00:00 2001 From: Stormeye Wu Date: Fri, 5 Jul 2019 15:51:35 +0800 Subject: [PATCH 18/23] =?UTF-8?q?[HMAC][=E4=BF=AE=E6=94=B9]:=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mallinkService/src/main/java/com/iformall/pay/WxPayment.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mallinkService/src/main/java/com/iformall/pay/WxPayment.java b/mallinkService/src/main/java/com/iformall/pay/WxPayment.java index c1461fa0f..f5da84065 100644 --- a/mallinkService/src/main/java/com/iformall/pay/WxPayment.java +++ b/mallinkService/src/main/java/com/iformall/pay/WxPayment.java @@ -1,6 +1,7 @@ package com.iformall.pay; import com.iformall.utils.*; +import org.apache.commons.codec.digest.HmacAlgorithms; import org.apache.commons.codec.digest.HmacUtils; import org.apache.commons.lang3.StringUtils; @@ -416,7 +417,7 @@ public class WxPayment { params.remove("sign"); String stringA = packageSign(params, false); String stringSignTemp = stringA + "&key=" + partnerKey; - return HmacUtils.hmacSha256Hex(partnerKey, stringSignTemp).toUpperCase(); + return new HmacUtils(HmacAlgorithms.HMAC_SHA_256, partnerKey).hmacHex(stringSignTemp).toUpperCase(); } /** From e613f3f2c2f0a78069e71d949d3a10489c114233 Mon Sep 17 00:00:00 2001 From: Stormeye Wu Date: Fri, 5 Jul 2019 16:22:22 +0800 Subject: [PATCH 19/23] =?UTF-8?q?[=E6=A0=B8=E9=94=80][=E4=BF=AE=E6=94=B9]:?= =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E6=A8=A1=E6=9D=BF=E6=B6=88=E6=81=AF?= =?UTF-8?q?=EF=BC=8C=E6=9C=89=E4=BB=B7=E5=88=B8=E6=89=8D=E4=BC=9A=E6=9F=A5?= =?UTF-8?q?=E6=94=AF=E4=BB=98=E8=AE=A2=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/WxCouponOrderServiceImpl.java | 46 ++++++++++--------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponOrderServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponOrderServiceImpl.java index 94e137783..99e72c345 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponOrderServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponOrderServiceImpl.java @@ -638,28 +638,30 @@ public class WxCouponOrderServiceImpl implements WxCouponOrderService { // 6. get payOrder info int formType = EnumMsgLimitType.WEAPP_FORMID.getCode(); if(StringUtils.isBlank(order.getFormId()) || order.getFormId().equalsIgnoreCase("undefined")) { - // formId为空,获取prepayId - WxPayOrder payOrder = null; - WxPayOrder payOrderQ = new WxPayOrder(); - payOrderQ.setTenantId(couponOrder.getTenantId()); - payOrderQ.setOrderId(order.getId()); - payOrderQ.setPayOrderStatus(EnumPayStatus.PAY_STATUS_SUCCESS.getCode()); - List payList = wxPayOrderMapper.select(payOrderQ); - if (payList.size() > 0) { - payOrder = payList.get(0); - } - if (payOrder == null) { - logger.error("找不到payOrder信息"); - throw new MallinkException(ErrorCode.PAY_ORDER_NOT_FOUND); - } - if (payOrder.getPrepayId() == null) { - logger.error("payOrder信息中,prepay_id为空"); - throw new MallinkException(ErrorCode.PREPAY_ID_IS_EMPTY); - } - dateAfter7Day = DateUtils.getHourTimeAfter(7, payOrder.getCreateTime()); - if(curDate.before(dateAfter7Day)) { - formId = payOrder.getPrepayId(); - formType = EnumMsgLimitType.WEAPP_PREPAYID.getCode(); + if(order.getPayment() > 0) { + // formId为空,获取prepayId + WxPayOrder payOrder = null; + WxPayOrder payOrderQ = new WxPayOrder(); + payOrderQ.setTenantId(couponOrder.getTenantId()); + payOrderQ.setOrderId(order.getId()); + payOrderQ.setPayOrderStatus(EnumPayStatus.PAY_STATUS_SUCCESS.getCode()); + List payList = wxPayOrderMapper.select(payOrderQ); + if (payList.size() > 0) { + payOrder = payList.get(0); + } + if (payOrder == null) { + logger.error("找不到payOrder信息"); + throw new MallinkException(ErrorCode.PAY_ORDER_NOT_FOUND); + } + if (payOrder.getPrepayId() == null) { + logger.error("payOrder信息中,prepay_id为空"); + throw new MallinkException(ErrorCode.PREPAY_ID_IS_EMPTY); + } + dateAfter7Day = DateUtils.getHourTimeAfter(7, payOrder.getCreateTime()); + if (curDate.before(dateAfter7Day)) { + formId = payOrder.getPrepayId(); + formType = EnumMsgLimitType.WEAPP_PREPAYID.getCode(); + } } } From 0b6b508051afe8a0421f237276b77147c13e49f0 Mon Sep 17 00:00:00 2001 From: luozukai Date: Fri, 5 Jul 2019 16:27:14 +0800 Subject: [PATCH 20/23] =?UTF-8?q?[=E5=AE=A1=E6=89=B9][=E4=BF=AE=E6=94=B9][?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8D=B7=E5=88=97=E8=A1=A8=E8=BF=87=E6=BB=A4?= =?UTF-8?q?=E5=AE=A1=E6=89=B9=E7=8A=B6=E6=80=81]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/WxRentContractMapper.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mallinkService/src/main/resources/mapper/WxRentContractMapper.xml b/mallinkService/src/main/resources/mapper/WxRentContractMapper.xml index 8c93f53d6..5e65f056e 100644 --- a/mallinkService/src/main/resources/mapper/WxRentContractMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxRentContractMapper.xml @@ -348,7 +348,7 @@ and rc.`operation_type` = #{operationType} order by ${sortColumns} - order by rc.id desc + order by rc.createtime desc,rc.id desc From de96627dafb771886d469819d9f8b17d3a83260c Mon Sep 17 00:00:00 2001 From: gongbiao Date: Fri, 5 Jul 2019 16:33:12 +0800 Subject: [PATCH 21/23] =?UTF-8?q?[=E6=B4=BB=E5=8A=A8=E6=8A=A5=E5=90=8D][?= =?UTF-8?q?=E4=BF=AE=E6=94=B9][=E6=8A=A5=E5=90=8D=E8=BF=87=E6=9C=9F?= =?UTF-8?q?=E5=90=8E=E7=8A=B6=E6=80=81=E4=B8=BA=E6=8A=A5=E5=90=8D=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/iformall/schedule/ActivitySchedule.java | 1 + .../main/java/com/iformall/mapper/WxActivityJoinMapper.java | 1 + .../src/main/resources/mapper/WxActivityJoinMapper.xml | 5 ++++- .../src/main/resources/mapper/WxCouponOrderMapper.xml | 4 ++++ 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/mallinkSchedule/src/main/java/com/iformall/schedule/ActivitySchedule.java b/mallinkSchedule/src/main/java/com/iformall/schedule/ActivitySchedule.java index ef778a5b0..68a1267c8 100644 --- a/mallinkSchedule/src/main/java/com/iformall/schedule/ActivitySchedule.java +++ b/mallinkSchedule/src/main/java/com/iformall/schedule/ActivitySchedule.java @@ -99,6 +99,7 @@ public class ActivitySchedule { activity.setIsExpired(EnumActivityExpired.YES.getCode()); activity.setUpdateTime(new Date()); wxActivityMapper.activityExipred(activity); + wxActivityJoinMapper.activityExpired(); } /** diff --git a/mallinkService/src/main/java/com/iformall/mapper/WxActivityJoinMapper.java b/mallinkService/src/main/java/com/iformall/mapper/WxActivityJoinMapper.java index 25628e3a9..bd130e2dc 100644 --- a/mallinkService/src/main/java/com/iformall/mapper/WxActivityJoinMapper.java +++ b/mallinkService/src/main/java/com/iformall/mapper/WxActivityJoinMapper.java @@ -20,4 +20,5 @@ public interface WxActivityJoinMapper extends CommonMapper void updateStatus(List wxActivity); + void activityExpired(); } diff --git a/mallinkService/src/main/resources/mapper/WxActivityJoinMapper.xml b/mallinkService/src/main/resources/mapper/WxActivityJoinMapper.xml index 67b132c66..06eb2c96d 100644 --- a/mallinkService/src/main/resources/mapper/WxActivityJoinMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxActivityJoinMapper.xml @@ -104,6 +104,9 @@ #{activity.id} - + + + update wx_activity_join set `status`=2 where `status`!=2 and activity_id in(select id from wx_activity where is_expired=1) + diff --git a/mallinkService/src/main/resources/mapper/WxCouponOrderMapper.xml b/mallinkService/src/main/resources/mapper/WxCouponOrderMapper.xml index f24499988..702ac14e9 100644 --- a/mallinkService/src/main/resources/mapper/WxCouponOrderMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxCouponOrderMapper.xml @@ -474,6 +474,10 @@ and c.business = #{business} + + and bu.verify_merchant_name = #{verifyMerchantName} + + and co.coupon_id in( select cm.product_id from wx_merchant_shop ms left join wx_merchant m on ms.merchant_id=m.id From 98e54616161b9caf455587b9cd4610741a0cefed Mon Sep 17 00:00:00 2001 From: gongbiao Date: Fri, 5 Jul 2019 17:44:27 +0800 Subject: [PATCH 22/23] =?UTF-8?q?[=E5=88=B8=E8=AE=A2=E5=8D=95][=E4=BF=AE?= =?UTF-8?q?=E6=94=B9][=E5=AF=BC=E5=87=BA=E6=95=B0=E6=8D=AE=E5=88=97?= =?UTF-8?q?=E9=A1=BA=E5=BA=8F]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/iformall/domain/vo/WxCouponOrderBVo.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/mallinkService/src/main/java/com/iformall/domain/vo/WxCouponOrderBVo.java b/mallinkService/src/main/java/com/iformall/domain/vo/WxCouponOrderBVo.java index 8af8cc985..57216490b 100644 --- a/mallinkService/src/main/java/com/iformall/domain/vo/WxCouponOrderBVo.java +++ b/mallinkService/src/main/java/com/iformall/domain/vo/WxCouponOrderBVo.java @@ -57,23 +57,23 @@ public class WxCouponOrderBVo extends WxCouponOrder{ @io.swagger.annotations.ApiModelProperty(value="c用户绑定的手机号",name="cUserPhone") private String cUserPhone; - @Excel(name = "交易时间", width = 20, exportFormat = "yyyy-MM-dd HH:mm:ss", orderNum = "8") + @Excel(name = "交易时间", width = 20, exportFormat = "yyyy-MM-dd HH:mm:ss", orderNum = "9") @io.swagger.annotations.ApiModelProperty(value = "创建时间", name = "createDate") private Date createDate; @Transient - @Excel(name = "面额(元)", width = 20, orderNum = "6") + @Excel(name = "面额(元)", width = 20, orderNum = "7") private String priceStr; @Transient - @Excel(name = "交易价格(元)", width = 20, orderNum = "5") + @Excel(name = "交易价格(元)", width = 20, orderNum = "6") private String salePriceStr; @Excel(name = "状态", width = 20, replace = {"待使用_0", "已核销_1", "已过期_2", "已退款_3"}, orderNum = "14") @io.swagger.annotations.ApiModelProperty(value = "状态:0,待使用 1,已核销 2,已过期 3,已作废 ", name = "couponOrderStatus") private Integer couponOrderStatus; - @Excel(name = "核销/过期/退款时间", width = 20, exportFormat = "yyyy-MM-dd HH:mm:ss", orderNum = "9") + @Excel(name = "核销/过期/退款时间", width = 20, exportFormat = "yyyy-MM-dd HH:mm:ss", orderNum = "10") @io.swagger.annotations.ApiModelProperty(value = "", name = "updateDate") private Date updateDate; @@ -101,7 +101,7 @@ public class WxCouponOrderBVo extends WxCouponOrder{ return new BigDecimal(subsidyNum == null ? 0 : subsidyNum).divide(new BigDecimal(100)).setScale(2, RoundingMode.HALF_EVEN).toPlainString(); } - @Excel(name = "补贴额(元)", width = 50, orderNum = "7") + @Excel(name = "补贴额(元)", width = 50, orderNum = "8") @io.swagger.annotations.ApiModelProperty(value = "补贴额", name = "subsidyNumStr") private String subsidyNumStr; @@ -112,11 +112,11 @@ public class WxCouponOrderBVo extends WxCouponOrder{ private String bUserName; @io.swagger.annotations.ApiModelProperty(value="b端用户手机号",name="bUserPhone") private String bUserPhone; - @Excel(name = "商户名", width = 50, orderNum = "3") + @Excel(name = "发券商户", width = 50, orderNum = "3") @io.swagger.annotations.ApiModelProperty(value="使用券商户名",name="merchantName") private String merchantName; - @Excel(name = "商铺号", width = 50, orderNum = "4") + @Excel(name = "商铺号", width = 50, orderNum = "5") @Transient private String shopNumber; @@ -146,7 +146,7 @@ public class WxCouponOrderBVo extends WxCouponOrder{ @Transient private Integer couponType; - @Excel(name = "核销商户", width = 50, orderNum = "16") + @Excel(name = "核销商户", width = 50, orderNum = "4") @Transient private String verifyMerchantName; From bbc2ab120b810f6b3d9e61ced5f4e5d2995b9f64 Mon Sep 17 00:00:00 2001 From: gongbiao Date: Fri, 5 Jul 2019 18:03:34 +0800 Subject: [PATCH 23/23] =?UTF-8?q?[=E7=89=A9=E4=B8=9A=E8=B4=A6=E5=8D=95[?= =?UTF-8?q?=E4=BF=AE=E6=94=B9][=E6=9B=B4=E6=96=B0=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E6=95=B0=E6=8D=AE]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/iformall/controller/rent/WxBillPropertyController.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mallinkAdmin/src/main/java/com/iformall/controller/rent/WxBillPropertyController.java b/mallinkAdmin/src/main/java/com/iformall/controller/rent/WxBillPropertyController.java index 46279133e..dce5ca5ae 100644 --- a/mallinkAdmin/src/main/java/com/iformall/controller/rent/WxBillPropertyController.java +++ b/mallinkAdmin/src/main/java/com/iformall/controller/rent/WxBillPropertyController.java @@ -57,8 +57,7 @@ public class WxBillPropertyController extends BaseController { @SystemControllerLog(description = "物业账单-更新") public ResultData update(@RequestBody WxBillProperty wxBillProperty) { logger.debug("[" + getIpAddr() + "] WxBillPropertyController::update"); - wxBillPropertyService.saveOrUpdate(wxBillProperty, getUser()); - return new ResultData(); + return wxBillPropertyService.saveOrUpdate(wxBillProperty, getUser()); } @GetMapping("/del")