From dfdee5bb6254c1f86fddfabbe6b89d0300190b58 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 25 Aug 2021 13:55:42 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=B7=A5=E4=BD=9C?= =?UTF-8?q?=E4=BA=BA=E5=91=98=E6=97=A7=E6=8E=A5=E5=8F=A3=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=85=B3=E7=B3=BB=E8=A1=A8=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/service/impl/StaffServiceImpl.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffServiceImpl.java index 043694e0f7..00b787aca5 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffServiceImpl.java @@ -158,6 +158,17 @@ public class StaffServiceImpl implements StaffService { //机关总人数加一 customerAgencyEntity.setTotalUser(customerAgencyEntity.getTotalUser() + 1); customerAgencyService.updateById(customerAgencyEntity); + + //2021.8.25 sun 新增一张工作人员注册组织关系表,所以旧接口新增人员时关系表赋值关系数据 + //工作人员注册组织关系表新增数据 + StaffOrgRelationEntity staffOrgRelationEntity = new StaffOrgRelationEntity(); + staffOrgRelationEntity.setCustomerId(fromDTO.getCustomerId()); + staffOrgRelationEntity.setPids(("".equals(customerAgencyEntity.getPids()) ? "" : customerAgencyEntity.getPids())); + staffOrgRelationEntity.setStaffId(result.getData().getUserId()); + staffOrgRelationEntity.setOrgId(customerAgencyEntity.getId()); + staffOrgRelationEntity.setOrgType("agency"); + staffOrgRelationService.insert(staffOrgRelationEntity); + return new Result(); } From 63bf54c77adebf4c8a6cdab647a6aec85d0af464 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Wed, 25 Aug 2021 15:34:00 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=88=91=E7=9A=84=E5=B0=8F=E7=BB=84V2--?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6=E8=8E=B7=E5=8F=96=E6=88=91=E7=9A=84=E5=B0=8F?= =?UTF-8?q?=E7=BB=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epmet-gateway/pom.xml | 4 +- .../group/dto/group/form/MyGroupFormDTO.java | 2 + .../group/dto/group/result/LastTextDTO.java | 18 ++++ .../dto/group/result/MyGroupV2ResultDTO.java | 59 ++++++++++++ .../group/controller/ResiGroupController.java | 9 ++ .../epmet/modules/group/dao/ResiGroupDao.java | 4 +- .../group/service/ResiGroupService.java | 9 ++ .../service/impl/ResiGroupServiceImpl.java | 20 +++++ .../resources/mapper/group/ResiGroupDao.xml | 90 +++++++++++++++++++ 9 files changed, 212 insertions(+), 3 deletions(-) create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/LastTextDTO.java create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/MyGroupV2ResultDTO.java diff --git a/epmet-gateway/pom.xml b/epmet-gateway/pom.xml index dc71150423..ae84bbee2e 100644 --- a/epmet-gateway/pom.xml +++ b/epmet-gateway/pom.xml @@ -299,8 +299,8 @@ lb://resi-mine-server - - lb://resi-group-server + http://localhost:8095 + lb://resi-partymember-server diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/form/MyGroupFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/form/MyGroupFormDTO.java index 2a60e09ca0..72791ef205 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/form/MyGroupFormDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/form/MyGroupFormDTO.java @@ -43,4 +43,6 @@ public class MyGroupFormDTO implements Serializable { */ @NotBlank(message="当前用户id不能为空") private String userId; + + private String groupType; } diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/LastTextDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/LastTextDTO.java new file mode 100644 index 0000000000..4d781bf66c --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/LastTextDTO.java @@ -0,0 +1,18 @@ +package com.epmet.resi.group.dto.group.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description + * @Author zhaoqifeng + * @Date 2021/8/25 14:01 + */ +@Data +public class LastTextDTO implements Serializable { + private static final long serialVersionUID = 4908205806172407179L; + private String textId; + private String topicContent; + private String type; +} diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/MyGroupV2ResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/MyGroupV2ResultDTO.java new file mode 100644 index 0000000000..7fb522094d --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/MyGroupV2ResultDTO.java @@ -0,0 +1,59 @@ +package com.epmet.resi.group.dto.group.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description + * @Author zhaoqifeng + * @Date 2021/8/25 14:05 + */ +@Data +public class MyGroupV2ResultDTO implements Serializable { + private static final long serialVersionUID = -3299763394428383259L; + /** + * 群组id + */ + private String groupId; + + /** + * 群组头像 + */ + private String groupHeadPhoto; + + /** + * 群组名称 + */ + private String groupName; + + /** + * 成员总数 + */ + private Integer totalMember; + + /** + * 党员总数 + */ + private Integer totalPartyMember; + + /** + * (审核通过 - approved 、 审核中 - under_auditting、 审核未通过 - rejected 、 已屏蔽 - hidden、 已关闭 - closed) + */ + private String groupState; + + /** + * member成员,leader群主 + */ + private String groupLeaderFlag; + + /** + * 最新话题 + */ + private LastTextDTO lastText; + + /** + * 小组类型(ordinary:楼院小组 branch:支部小组) + */ + private String groupType; +} diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/ResiGroupController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/ResiGroupController.java index 002abfa9f6..5fa0d56be9 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/ResiGroupController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/ResiGroupController.java @@ -77,6 +77,15 @@ public class ResiGroupController { return new Result>().ok(myGroupList); } + + @PostMapping("getmygroupV2") + public Result> getMyGroupV2(@LoginUser TokenDto tokenDto, @RequestBody MyGroupFormDTO formDTO) { + formDTO.setUserId(tokenDto.getUserId()); + ValidatorUtils.validateEntity(formDTO); + List myGroupList = resiGroupService.getMyGroupV2(formDTO); + return new Result>().ok(myGroupList); + } + /** * @param tokenDto * @param recommendGroupFormDTO diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/dao/ResiGroupDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/dao/ResiGroupDao.java index d31a9a22c0..44f8312d9c 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/dao/ResiGroupDao.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/dao/ResiGroupDao.java @@ -52,7 +52,7 @@ public interface ResiGroupDao extends BaseDao { * @Date 2020/3/28 20:39 **/ List selectListMyGroup(MyGroupFormDTO myGroupFormDTO); - + List selectListMyGroupV2(MyGroupFormDTO myGroupFormDTO); /** * @return com.epmet.resi.group.dto.group.result.LatestTopicDTO * @param groupId @@ -62,6 +62,8 @@ public interface ResiGroupDao extends BaseDao { **/ LatestTopicDTO selectLatestTopic(String groupId); + LastTextDTO selectLatestText(String groupId); + /** * @param recommendGroupFormDTO * @return java.util.List diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/ResiGroupService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/ResiGroupService.java index d42a0d25e9..d7761738d8 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/ResiGroupService.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/ResiGroupService.java @@ -114,6 +114,15 @@ public interface ResiGroupService extends BaseService { **/ List getMyGroup(MyGroupFormDTO myGroupFormDTO); + /** + * @Description 我的小组查询(包含我创建的小组+我加入的小组),以各组的最新话题时间有近到远排序) + * @Param myGroupFormDTO + * @Return {@link List< MyGroupV2ResultDTO>} + * @Author zhaoqifeng + * @Date 2021/8/25 14:13 + */ + List getMyGroupV2(MyGroupFormDTO myGroupFormDTO); + /** * @param recommendGroupFormDTO * @return com.epmet.commons.tools.utils.Result> diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java index 6563945aac..122fafce0d 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java @@ -247,6 +247,26 @@ public class ResiGroupServiceImpl extends BaseServiceImpl} + * @Author zhaoqifeng + * @Date 2021/8/25 14:13 + */ + @Override + public List getMyGroupV2(MyGroupFormDTO myGroupFormDTO) { + int pageIndex = (myGroupFormDTO.getPageNo() - NumConstant.ONE) * myGroupFormDTO.getPageSize(); + myGroupFormDTO.setPageNo(pageIndex); + List myGroupList = baseDao.selectListMyGroupV2(myGroupFormDTO); + if (null == myGroupList || myGroupList.size() < 1) { + logger.info(String.format("我的小组V2查询为空,selectListMyGroup入参%s", JSON.toJSONString(myGroupFormDTO))); + return new ArrayList<>(); + } + return myGroupList; + } + /** * @param recommendGroupFormDTO * @return com.epmet.commons.tools.utils.Result> diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupDao.xml index 9c223c9fed..82d1531781 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupDao.xml +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupDao.xml @@ -14,6 +14,18 @@ + + + + + + + + + + + + + + + + +