From f75dad3bb33ca9f06d63ec7e5df25649aac4849d Mon Sep 17 00:00:00 2001 From: 199901012 Date: Sat, 24 Apr 2021 22:45:11 +0800 Subject: [PATCH] =?UTF-8?q?'=E4=BF=AE=E5=A4=8D=E5=B7=B2=E7=9F=A5=E9=97=AE?= =?UTF-8?q?=E9=A2=98'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/bweb/controller/LoginController.java | 4 +- .../excelListener/ImportCouponListener.java | 4 +- .../hai/dao/HighCouponAgentRelMapperExt.java | 2 +- .../com/hai/dao/HighCouponCodeMapperExt.java | 27 +++++++--- .../hai/service/HighCouponAgentService.java | 8 +++ .../impl/HighCouponAgentServiceImpl.java | 19 +++++-- .../impl/HighCouponCodeServiceImpl.java | 52 +++++++++++++------ 7 files changed, 85 insertions(+), 31 deletions(-) diff --git a/hai-bweb/src/main/java/com/bweb/controller/LoginController.java b/hai-bweb/src/main/java/com/bweb/controller/LoginController.java index 53b32db6..3375fe01 100644 --- a/hai-bweb/src/main/java/com/bweb/controller/LoginController.java +++ b/hai-bweb/src/main/java/com/bweb/controller/LoginController.java @@ -111,7 +111,7 @@ public class LoginController { if (secUser.getObjectType() == 0 || secUser.getObjectType() == 1) { // 公司员工(超级管理员和单位员工) //查询公司 - BsCompany bsCompany = bsCompanyService.getCompanyById(secUser.getCompanyId()); +/* BsCompany bsCompany = bsCompanyService.getCompanyById(secUser.getCompanyId()); if(bsCompany == null){ log.error("login error!","未找到公司"); throw ErrorHelp.genException(SysCode.System, ErrorCode.NOT_FOUND_COMPANY, ""); @@ -128,7 +128,7 @@ public class LoginController { userInfoModel.setBsOrganization(bsOrganization); //部门信息 } - userInfoModel.setBsCompany(bsCompany); //公司信息 + userInfoModel.setBsCompany(bsCompany); //公司信息*/ } else if (secUser.getObjectType() == 2) { diff --git a/hai-bweb/src/main/java/com/bweb/excelListener/ImportCouponListener.java b/hai-bweb/src/main/java/com/bweb/excelListener/ImportCouponListener.java index 0f3abc0b..2c187761 100644 --- a/hai-bweb/src/main/java/com/bweb/excelListener/ImportCouponListener.java +++ b/hai-bweb/src/main/java/com/bweb/excelListener/ImportCouponListener.java @@ -27,6 +27,7 @@ public class ImportCouponListener extends AnalysisEventListener errorData = new ArrayList<>(); List successData = new ArrayList<>(); List allCouponCode = new ArrayList<>(); + List allCouponCodeKey = new ArrayList<>(); HighCouponCode highCouponCode; HighCoupon highCoupon; UserInfoModel userInfoModel; @@ -56,7 +57,7 @@ public class ImportCouponListener extends AnalysisEventListener codeList = allCouponCode.stream().filter(o -> o.getCodeKey().equals(importCouponModel.getCodeKey())).collect(Collectors.toList()); + List codeList = allCouponCodeKey.stream().filter(o -> o.getCodeKey().equals(importCouponModel.getCodeKey())).collect(Collectors.toList()); if (codeList.size() > 0) { importCouponModel.setErrorMessage("卡券编号id已存在"); errorData.add(importCouponModel); @@ -122,6 +123,7 @@ public class ImportCouponListener extends AnalysisEventListener()); + this.allCouponCodeKey = allCouponCode.stream().filter(o -> !Objects.equals(o.getCodeKey(), null)).collect(Collectors.toList()); } } diff --git a/hai-service/src/main/java/com/hai/dao/HighCouponAgentRelMapperExt.java b/hai-service/src/main/java/com/hai/dao/HighCouponAgentRelMapperExt.java index c94fb2ad..83d53beb 100644 --- a/hai-service/src/main/java/com/hai/dao/HighCouponAgentRelMapperExt.java +++ b/hai-service/src/main/java/com/hai/dao/HighCouponAgentRelMapperExt.java @@ -15,7 +15,7 @@ public interface HighCouponAgentRelMapperExt { " case when sum(c.sales_price) is not null then sum(c.sales_price) else 0 end salesCountPrice " + " from high_coupon_agent_code a,high_coupon_code b,high_coupon_agent_rel c" + " where c.id = a.coupon_agent_id and c.agent_id = #{agentId}" + - " and a.status = 2 and a.coupon_code_id = b.id and b.consume_time >= #{consumeTimeS} and b.consume_time <= #{consumeTimeE}") + " and a.status = 3 and a.coupon_code_id = b.id and b.consume_time >= #{consumeTimeS} and b.consume_time <= #{consumeTimeE}") AgentSalesModel getAgentSales(@Param("agentId") Long agentId, @Param("consumeTimeS")String consumeTimeS, @Param("consumeTimeE")String consumeTimeE); @Select(" select count(1) from high_coupon_agent_code a where a.agent_id = #{agentId} and a.`status` in (#{status}) ") diff --git a/hai-service/src/main/java/com/hai/dao/HighCouponCodeMapperExt.java b/hai-service/src/main/java/com/hai/dao/HighCouponCodeMapperExt.java index 2eb92a88..551432a9 100644 --- a/hai-service/src/main/java/com/hai/dao/HighCouponCodeMapperExt.java +++ b/hai-service/src/main/java/com/hai/dao/HighCouponCodeMapperExt.java @@ -13,18 +13,33 @@ public interface HighCouponCodeMapperExt { @Insert({ "