From 80c7ad1dcd5a78000d3506028fd37c8cec79b5b8 Mon Sep 17 00:00:00 2001 From: zhangyuan Date: Tue, 23 Jun 2020 17:12:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=B4=E8=B6=A3=E7=BE=A4=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E4=B8=9A=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../group/controller/GroupController.java | 14 ++++++ .../esua/epdc/modules/group/dao/GroupDao.java | 12 ++++- .../modules/group/service/GroupService.java | 12 ++++- .../group/service/impl/GroupServiceImpl.java | 7 +++ .../main/resources/mapper/group/GroupDao.xml | 45 ++++++++++++++++++- 5 files changed, 86 insertions(+), 4 deletions(-) diff --git a/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/group/controller/GroupController.java b/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/group/controller/GroupController.java index 16ab5ea..a26d6c0 100644 --- a/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/group/controller/GroupController.java +++ b/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/group/controller/GroupController.java @@ -81,6 +81,20 @@ public class GroupController { return new Result>().ok(page); } + /** + * 兴趣群信息 + * + * @return com.elink.esua.epdc.commons.tools.utils.Result> + * @params [params] + * @author liuchuang + * @since 2019/10/11 14:53 + */ + @GetMapping("interestpage") + public Result> interestPage(@RequestParam Map params) { + PageData page = groupService.interestPage(params); + return new Result>().ok(page); + } + @GetMapping("{id}") public Result get(@PathVariable("id") String id) { GroupDTO data = groupService.get(id); diff --git a/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/group/dao/GroupDao.java b/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/group/dao/GroupDao.java index 5131ac1..f940f05 100644 --- a/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/group/dao/GroupDao.java +++ b/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/group/dao/GroupDao.java @@ -52,7 +52,7 @@ public interface GroupDao extends BaseDao { List selectListOfGroups(Map params); /** - * 社群列表 + * 警民群列表 * * @return java.util.List * @params [params] @@ -61,6 +61,16 @@ public interface GroupDao extends BaseDao { */ List selectPoliceListOfGroups(Map params); + /** + * 兴趣群列表 + * + * @return java.util.List + * @params [params] + * @author liuchuang + * @since 2019/10/11 14:54 + */ + List selectInterestListOfGroups(Map params); + /** * 查询社群名称重复数量 * diff --git a/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/group/service/GroupService.java b/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/group/service/GroupService.java index 76b8f9e..bac4cc4 100644 --- a/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/group/service/GroupService.java +++ b/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/group/service/GroupService.java @@ -49,7 +49,7 @@ public interface GroupService extends BaseService { PageData page(Map params); /** - * 默认分页 社群列表 + * 默认分页 警民群列表 * * @param params * @return PageData @@ -58,6 +58,16 @@ public interface GroupService extends BaseService { */ PageData policePage(Map params); + /** + * 默认分页 兴趣群列表 + * + * @param params + * @return PageData + * @author generator + * @date 2019-10-10 + */ + PageData interestPage(Map params); + /** * 默认查询 * diff --git a/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/group/service/impl/GroupServiceImpl.java b/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/group/service/impl/GroupServiceImpl.java index 9347b62..9ae14b6 100644 --- a/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/group/service/impl/GroupServiceImpl.java +++ b/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/group/service/impl/GroupServiceImpl.java @@ -109,6 +109,13 @@ public class GroupServiceImpl extends BaseServiceImpl imp return new PageData<>(list, page.getTotal()); } + @Override + public PageData interestPage(Map params) { + IPage page = getPage(params); + List list = baseDao.selectInterestListOfGroups(params); + return new PageData<>(list, page.getTotal()); + } + @Override public List list(Map params) { List entityList = baseDao.selectList(getWrapper(params)); diff --git a/epdc-cloud-property/src/main/resources/mapper/group/GroupDao.xml b/epdc-cloud-property/src/main/resources/mapper/group/GroupDao.xml index 7950939..a92d559 100644 --- a/epdc-cloud-property/src/main/resources/mapper/group/GroupDao.xml +++ b/epdc-cloud-property/src/main/resources/mapper/group/GroupDao.xml @@ -18,7 +18,9 @@ AND ugp.LORD_FLAG = '1' WHERE gp.DEL_FLAG = '0' - AND gp.GROUP_CATEGORY = '2' + AND gp.SECTION_CODE = 'theme_group' + AND gp.CATEGORY_CODE = 'property_group' + AND gp.TYPE_KEY = 'grid_party' AND gp.STATE = #{state} @@ -53,7 +55,46 @@ AND ugp.LORD_FLAG = '1' WHERE gp.DEL_FLAG = '0' - AND gp.GROUP_CATEGORY = '3' + AND gp.SECTION_CODE = 'theme_group' + AND gp.CATEGORY_CODE = 'police_group' + AND gp.TYPE_KEY = 'grid_party' + + AND gp.STATE = #{state} + + + AND (gp.DEPT_ID = #{gridId} + OR find_in_set(#{gridId},gp.ALL_DEPT_IDS)) + + + AND (find_in_set(#{streetId},gp.PARENT_DEPT_IDS) + OR find_in_set(#{streetId},gp.ALL_DEPT_IDS)) + + + AND (find_in_set(#{communityId},gp.PARENT_DEPT_IDS) + OR find_in_set(#{communityId},gp.ALL_DEPT_IDS)) + + ORDER BY + gp.GROUP_CATEGORY, gp.CREATED_TIME DESC + + +