From 956efa59454339b47a09e9c36bea34e55f95a3e8 Mon Sep 17 00:00:00 2001 From: "jinguo24@163.com" Date: Thu, 30 Aug 2018 21:50:22 +0800 Subject: [PATCH] =?UTF-8?q?[=E4=BC=9A=E5=91=98=E6=9F=A5=E8=AF=A2][?= =?UTF-8?q?=E4=BF=AE=E6=94=B9]=E6=9F=A5=E8=AF=A2=E6=9D=A1=E4=BB=B6?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/WxUserStructureController.java | 5 +++- .../com/simple/domain/po/WxUserVisit.java | 24 +++++++++---------- .../main/resources/mapper/WxCUserMapper.xml | 3 +++ .../resources/mapper/WxUserVisitMapper.xml | 11 +++------ 4 files changed, 22 insertions(+), 21 deletions(-) diff --git a/mallinkAdmin/src/main/java/com/simple/controller/WxUserStructureController.java b/mallinkAdmin/src/main/java/com/simple/controller/WxUserStructureController.java index b9a100c30..007fcf1dc 100644 --- a/mallinkAdmin/src/main/java/com/simple/controller/WxUserStructureController.java +++ b/mallinkAdmin/src/main/java/com/simple/controller/WxUserStructureController.java @@ -42,7 +42,7 @@ import io.swagger.annotations.ApiOperation; @RestController @Api(description="会员洞察") @RequestMapping("userAnalysis") -public class WxUserStructureController { +public class WxUserStructureController extends BaseController{ @Autowired private WxCUserBasicInfoService wxCUserBasicInfoService; @@ -58,6 +58,7 @@ public class WxUserStructureController { Date startTime,Date endTime ) { WxCuerBasicInfoDto dto = new WxCuerBasicInfoDto(); + dto.setTenantId(getTenantId()); dto.setStartTime(startTime); if(endTime!=null) { Calendar c = Calendar.getInstance(); @@ -84,6 +85,7 @@ public class WxUserStructureController { @GetMapping("/findUserAgeStructure") public ResultData findUserAgeStructure( Date startTime,Date endTime) { WxCuerBasicInfoDto dto = new WxCuerBasicInfoDto(); + dto.setTenantId(getTenantId()); dto.setStartTime(startTime); if(endTime!=null) { Calendar c = Calendar.getInstance(); @@ -111,6 +113,7 @@ public class WxUserStructureController { @GetMapping("/findUserDataCount") public ResultData findUserCount(Date startTime,Date endTime) { WxCuerBasicInfoDto dto = new WxCuerBasicInfoDto(); + dto.setTenantId(getTenantId()); dto.setStartTime(startTime); if(endTime!=null) { Calendar c = Calendar.getInstance(); diff --git a/mallinkService/src/main/java/com/simple/domain/po/WxUserVisit.java b/mallinkService/src/main/java/com/simple/domain/po/WxUserVisit.java index c347cfdf9..c2719a57a 100644 --- a/mallinkService/src/main/java/com/simple/domain/po/WxUserVisit.java +++ b/mallinkService/src/main/java/com/simple/domain/po/WxUserVisit.java @@ -39,12 +39,12 @@ public class WxUserVisit implements Serializable { public void setIds(List ids) { this.ids = ids; } - - - /*租户ID**/ - @io.swagger.annotations.ApiModelProperty(value="租户ID",name="tenantId") + + + + /***/ + @io.swagger.annotations.ApiModelProperty(value="",name="tenantId") private String tenantId; - /*日期字符串**/ @io.swagger.annotations.ApiModelProperty(value="日期字符串",name="refDate") private String refDate; @@ -78,6 +78,12 @@ public class WxUserVisit implements Serializable { /*创建时间**/ @io.swagger.annotations.ApiModelProperty(value="创建时间",name="createDate") private Date createDate; + public String getTenantId() { + return tenantId; + } + public void setTenantId(String _tenantId) { + tenantId = _tenantId; + } public String getRefDate() { return refDate; } @@ -144,19 +150,13 @@ public class WxUserVisit implements Serializable { public void setCreateDate(Date _createDate) { createDate = _createDate; } - public String getTenantId() { - return tenantId; - } - - public void setTenantId(String tenantId) { - this.tenantId = tenantId; - } public static enum Field { Id_ASC("`id` ASC"),Id_DESC("`id` DESC") + ,TenantId_ASC("`tenantId` ASC"),TenantId_DESC("`tenantId` DESC") ,RefDate_ASC("`refDate` ASC"),RefDate_DESC("`refDate` DESC") ,DayDate_ASC("`dayDate` ASC"),DayDate_DESC("`dayDate` DESC") ,SessionCnt_ASC("`sessionCnt` ASC"),SessionCnt_DESC("`sessionCnt` DESC") diff --git a/mallinkService/src/main/resources/mapper/WxCUserMapper.xml b/mallinkService/src/main/resources/mapper/WxCUserMapper.xml index 30148783e..08aacf5f6 100644 --- a/mallinkService/src/main/resources/mapper/WxCUserMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxCUserMapper.xml @@ -195,6 +195,9 @@ and create_date <= #{endTime} + + and tenant_id =#{tenantId} + - - - - -