+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.resi.group.dto.member;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+
+/**
+ * 退群记录表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-03-29
+ */
+@Data
+public class ExitGroupRecordDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 主键
+ */
+ private String id;
+
+ /**
+ * 客户id
+ */
+ private String customerId;
+
+ /**
+ * 小组id
+ */
+ private String groupId;
+
+ /**
+ * 组成员用户id
+ */
+ private String memberUserId;
+
+ /**
+ * 屏蔽他的话题及评论 yes:屏蔽 no:不屏蔽
+ */
+ private String shieldFlag;
+
+ /**
+ * 0:组长移除;
+ */
+ private String leaveType;
+
+ /**
+ * 删除标识
+ */
+ private String delFlag;
+
+ /**
+ * 乐观锁
+ */
+ private Integer revision;
+
+ /**
+ * 当前操作人id
+ */
+ private String createdBy;
+
+ /**
+ * 创建时间
+ */
+ private Date createdTime;
+
+ /**
+ * 更新人
+ */
+ private String updatedBy;
+
+ /**
+ * 更新时间
+ */
+ private Date updatedTime;
+
+}
\ No newline at end of file
diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/member/GroupLeaderTransferRecordDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/member/GroupLeaderTransferRecordDTO.java
new file mode 100644
index 0000000000..7bd1e2a490
--- /dev/null
+++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/member/GroupLeaderTransferRecordDTO.java
@@ -0,0 +1,97 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.modules.member.controller;
+
+import com.epmet.modules.member.service.ExitGroupRecordService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+
+/**
+ * 退群记录表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-03-29
+ */
+@RestController
+@RequestMapping("exitgroup")
+public class ExitGroupRecordController {
+
+ @Autowired
+ private ExitGroupRecordService exitGroupRecordService;
+
+
+}
\ No newline at end of file
diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/controller/GroupLeaderTransferRecordController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/controller/GroupLeaderTransferRecordController.java
new file mode 100644
index 0000000000..ef22370022
--- /dev/null
+++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/controller/GroupLeaderTransferRecordController.java
@@ -0,0 +1,40 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.modules.member.controller;
+
+import com.epmet.modules.member.service.GroupLeaderTransferRecordService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+
+/**
+ * 组长身份转让记录表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-03-29
+ */
+@RestController
+@RequestMapping("leadertransfer")
+public class GroupLeaderTransferRecordController {
+
+ @Autowired
+ private GroupLeaderTransferRecordService groupLeaderTransferRecordService;
+
+
+}
\ No newline at end of file
diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/dao/ExitGroupRecordDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/dao/ExitGroupRecordDao.java
new file mode 100644
index 0000000000..8169ded9f5
--- /dev/null
+++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/dao/ExitGroupRecordDao.java
@@ -0,0 +1,33 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.modules.member.dao;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.modules.member.entity.ExitGroupRecordEntity;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 退群记录表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-03-29
+ */
+@Mapper
+public interface ExitGroupRecordDao extends BaseDao {
+
+}
\ No newline at end of file
diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/dao/GroupLeaderTransferRecordDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/dao/GroupLeaderTransferRecordDao.java
new file mode 100644
index 0000000000..aa9b14bc0a
--- /dev/null
+++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/dao/GroupLeaderTransferRecordDao.java
@@ -0,0 +1,33 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.modules.member.dao;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.modules.member.entity.GroupLeaderTransferRecordEntity;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 组长身份转让记录表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-03-29
+ */
+@Mapper
+public interface GroupLeaderTransferRecordDao extends BaseDao {
+
+}
\ No newline at end of file
diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/entity/ExitGroupRecordEntity.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/entity/ExitGroupRecordEntity.java
new file mode 100644
index 0000000000..2af81275a9
--- /dev/null
+++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/entity/ExitGroupRecordEntity.java
@@ -0,0 +1,63 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.modules.member.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 退群记录表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-03-29
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("exit_group_record")
+public class ExitGroupRecordEntity extends BaseEpmetEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 客户id
+ */
+ private String customerId;
+
+ /**
+ * 小组id
+ */
+ private String groupId;
+
+ /**
+ * 组成员用户id
+ */
+ private String memberUserId;
+
+ /**
+ * 屏蔽他的话题及评论 yes:屏蔽 no:不屏蔽
+ */
+ private String shieldFlag;
+
+ /**
+ * 0:组长移除;
+ */
+ private String leaveType;
+
+}
diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/entity/GroupLeaderTransferRecordEntity.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/entity/GroupLeaderTransferRecordEntity.java
new file mode 100644
index 0000000000..652ac30046
--- /dev/null
+++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/entity/GroupLeaderTransferRecordEntity.java
@@ -0,0 +1,63 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.modules.member.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 组长身份转让记录表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-03-29
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("group_leader_transfer_record")
+public class GroupLeaderTransferRecordEntity extends BaseEpmetEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 客户id
+ */
+ private String customerId;
+
+ /**
+ * 小组id
+ */
+ private String groupId;
+
+ /**
+ * 原组长userId
+ */
+ private String originalLeader;
+
+ /**
+ * 新组长userId
+ */
+ private String newLeader;
+
+ /**
+ * 组长自主转让resi,工作人员转让gov
+ */
+ private String type;
+
+}
diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/ExitGroupRecordService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/ExitGroupRecordService.java
new file mode 100644
index 0000000000..b87212ba9f
--- /dev/null
+++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/ExitGroupRecordService.java
@@ -0,0 +1,95 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.modules.member.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
+import com.epmet.commons.tools.constant.FieldConstant;
+import com.epmet.commons.tools.page.PageData;
+import com.epmet.commons.tools.utils.ConvertUtils;
+import com.epmet.modules.member.dao.ExitGroupRecordDao;
+import com.epmet.modules.member.entity.ExitGroupRecordEntity;
+import com.epmet.modules.member.service.ExitGroupRecordService;
+import com.epmet.resi.group.dto.member.ExitGroupRecordDTO;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 退群记录表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-03-29
+ */
+@Service
+public class ExitGroupRecordServiceImpl extends BaseServiceImpl implements ExitGroupRecordService {
+
+ @Override
+ public PageData page(Map params) {
+ IPage page = baseDao.selectPage(
+ getPage(params, FieldConstant.CREATED_TIME, false),
+ getWrapper(params)
+ );
+ return getPageData(page, ExitGroupRecordDTO.class);
+ }
+
+ @Override
+ public List list(Map params) {
+ List entityList = baseDao.selectList(getWrapper(params));
+
+ return ConvertUtils.sourceToTarget(entityList, ExitGroupRecordDTO.class);
+ }
+
+ private QueryWrapper getWrapper(Map params){
+ String id = (String)params.get(FieldConstant.ID_HUMP);
+
+ QueryWrapper wrapper = new QueryWrapper<>();
+ wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
+
+ return wrapper;
+ }
+
+ @Override
+ public ExitGroupRecordDTO get(String id) {
+ ExitGroupRecordEntity entity = baseDao.selectById(id);
+ return ConvertUtils.sourceToTarget(entity, ExitGroupRecordDTO.class);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void save(ExitGroupRecordDTO dto) {
+ ExitGroupRecordEntity entity = ConvertUtils.sourceToTarget(dto, ExitGroupRecordEntity.class);
+ insert(entity);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void update(ExitGroupRecordDTO dto) {
+ ExitGroupRecordEntity entity = ConvertUtils.sourceToTarget(dto, ExitGroupRecordEntity.class);
+ updateById(entity);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void delete(String[] ids) {
+ // 逻辑删除(@TableLogic 注解)
+ baseDao.deleteBatchIds(Arrays.asList(ids));
+ }
+
+}
\ No newline at end of file
diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/GroupLeaderTransferRecordServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/GroupLeaderTransferRecordServiceImpl.java
new file mode 100644
index 0000000000..e0ce962528
--- /dev/null
+++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/GroupLeaderTransferRecordServiceImpl.java
@@ -0,0 +1,100 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.modules.member.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
+import com.epmet.commons.tools.constant.FieldConstant;
+import com.epmet.commons.tools.page.PageData;
+import com.epmet.commons.tools.utils.ConvertUtils;
+import com.epmet.modules.member.dao.GroupLeaderTransferRecordDao;
+import com.epmet.modules.member.entity.GroupLeaderTransferRecordEntity;
+import com.epmet.modules.member.service.GroupLeaderTransferRecordService;
+import com.epmet.resi.group.dto.member.GroupLeaderTransferRecordDTO;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 组长身份转让记录表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-03-29
+ */
+@Service
+public class GroupLeaderTransferRecordServiceImpl extends BaseServiceImpl implements GroupLeaderTransferRecordService {
+
+
+ @Override
+ public PageData page(Map params) {
+ IPage page = baseDao.selectPage(
+ getPage(params, FieldConstant.CREATED_TIME, false),
+ getWrapper(params)
+ );
+ return getPageData(page, GroupLeaderTransferRecordDTO.class);
+ }
+
+ @Override
+ public List list(Map params) {
+ List entityList = baseDao.selectList(getWrapper(params));
+
+ return ConvertUtils.sourceToTarget(entityList, GroupLeaderTransferRecordDTO.class);
+ }
+
+ private QueryWrapper getWrapper(Map params){
+ String id = (String)params.get(FieldConstant.ID_HUMP);
+
+ QueryWrapper wrapper = new QueryWrapper<>();
+ wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
+
+ return wrapper;
+ }
+
+ @Override
+ public GroupLeaderTransferRecordDTO get(String id) {
+ GroupLeaderTransferRecordEntity entity = baseDao.selectById(id);
+ return ConvertUtils.sourceToTarget(entity, GroupLeaderTransferRecordDTO.class);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void save(GroupLeaderTransferRecordDTO dto) {
+ GroupLeaderTransferRecordEntity entity = ConvertUtils.sourceToTarget(dto, GroupLeaderTransferRecordEntity.class);
+ insert(entity);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void update(GroupLeaderTransferRecordDTO dto) {
+ GroupLeaderTransferRecordEntity entity = ConvertUtils.sourceToTarget(dto, GroupLeaderTransferRecordEntity.class);
+ updateById(entity);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void delete(String[] ids) {
+ // 逻辑删除(@TableLogic 注解)
+ baseDao.deleteBatchIds(Arrays.asList(ids));
+ }
+
+}
\ No newline at end of file
diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/db/migration/V0.0.12__group_leader_transfer_record.sql b/epmet-module/resi-group/resi-group-server/src/main/resources/db/migration/V0.0.12__group_leader_transfer_record.sql
new file mode 100644
index 0000000000..f1bcfb11c9
--- /dev/null
+++ b/epmet-module/resi-group/resi-group-server/src/main/resources/db/migration/V0.0.12__group_leader_transfer_record.sql
@@ -0,0 +1,15 @@
+DROP TABLE IF EXISTS `group_leader_transfer_record`;
+CREATE TABLE `group_leader_transfer_record` (
+ `ID` varchar(64) NOT NULL COMMENT '主键',
+ `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id',
+ `GROUP_ID` varchar(64) NOT NULL COMMENT '小组id',
+ `ORIGINAL_LEADER` varchar(64) NOT NULL COMMENT '原组长userId',
+ `NEW_LEADER` varchar(64) NOT NULL COMMENT '新组长userId',
+ `TYPE` varchar(32) NOT NULL COMMENT '组长自主转让resi,工作人员转让gov',
+ `DEL_FLAG` varchar(1) NOT NULL DEFAULT '0' COMMENT '删除标识',
+ `REVISION` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁',
+ `CREATED_BY` varchar(64) NOT NULL COMMENT '当前操作人id即组长id',
+ `CREATED_TIME` datetime NOT NULL COMMENT '创建时间',
+ `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人',
+ `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间'
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='组长身份转让记录表';
\ No newline at end of file
diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/db/migration/V0.0.13__exit_group_record.sql b/epmet-module/resi-group/resi-group-server/src/main/resources/db/migration/V0.0.13__exit_group_record.sql
new file mode 100644
index 0000000000..fb717c4237
--- /dev/null
+++ b/epmet-module/resi-group/resi-group-server/src/main/resources/db/migration/V0.0.13__exit_group_record.sql
@@ -0,0 +1,15 @@
+DROP TABLE IF EXISTS `exit_group_record`;
+CREATE TABLE `exit_group_record` (
+ `ID` varchar(64) NOT NULL COMMENT '主键',
+ `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id',
+ `GROUP_ID` varchar(64) NOT NULL COMMENT '小组id',
+ `MEMBER_USER_ID` varchar(64) NOT NULL COMMENT '组成员用户id',
+ `SHIELD_FLAG` varchar(3) NOT NULL COMMENT '屏蔽他的话题及评论 yes:屏蔽 no:不屏蔽',
+ `LEAVE_TYPE` varchar(2) NOT NULL COMMENT '0:组长移除;',
+ `DEL_FLAG` varchar(1) NOT NULL DEFAULT '0' COMMENT '删除标识',
+ `REVISION` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁',
+ `CREATED_BY` varchar(64) NOT NULL COMMENT '当前操作人id',
+ `CREATED_TIME` datetime NOT NULL COMMENT '创建时间',
+ `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人',
+ `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间'
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='退群记录表';
\ No newline at end of file
diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/member/ExitGroupRecordDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/member/ExitGroupRecordDao.xml
new file mode 100644
index 0000000000..12f50ce380
--- /dev/null
+++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/member/ExitGroupRecordDao.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/member/GroupLeaderTransferRecordDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/member/GroupLeaderTransferRecordDao.xml
new file mode 100644
index 0000000000..b8a5334e28
--- /dev/null
+++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/member/GroupLeaderTransferRecordDao.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
From 6dea3eeff5ff626d4ed65c375efda20eb3cd3135 Mon Sep 17 00:00:00 2001
From: yinzuomei <576302893@qq.com>
Date: Tue, 30 Mar 2021 10:56:39 +0800
Subject: [PATCH 02/22] =?UTF-8?q?=E8=AF=9D=E9=A2=98=E8=AF=84=E8=AE=BA?=
=?UTF-8?q?=E5=88=97=E8=A1=A8=E6=B7=BB=E5=8A=A0=E6=9D=A1=E4=BB=B6and=20`ST?=
=?UTF-8?q?ATUS`=3D'discussing'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../mapper/topic/ResiTopicCommentDao.xml | 24 +++++++++----------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicCommentDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicCommentDao.xml
index 87f46e1efc..3dc42e00a4 100644
--- a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicCommentDao.xml
+++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicCommentDao.xml
@@ -54,20 +54,20 @@
From 2a20d01b90367b4a77af6bd0f44bd4f196f08e68 Mon Sep 17 00:00:00 2001
From: yinzuomei <576302893@qq.com>
Date: Tue, 30 Mar 2021 13:28:18 +0800
Subject: [PATCH 05/22] =?UTF-8?q?=E8=BD=AC=E8=AE=A9=E7=BB=84=E6=8E=A5?=
=?UTF-8?q?=E5=8F=A3v1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../group/dto/member/form/ConfirmTransferFormDTO.java | 4 +++-
.../GroupLeaderTransferRecordController.java | 1 +
.../impl/GroupLeaderTransferRecordServiceImpl.java | 10 ++++++++++
3 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/member/form/ConfirmTransferFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/member/form/ConfirmTransferFormDTO.java
index 9bda15a783..3fd80cd64c 100644
--- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/member/form/ConfirmTransferFormDTO.java
+++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/member/form/ConfirmTransferFormDTO.java
@@ -24,7 +24,9 @@ public class ConfirmTransferFormDTO implements Serializable {
@NotBlank(message = "type不能为空:自主转让resi,工作人员转让gov")
private String type;
+ /**************************以上是需要前端传入的参数*******************************************************/
@NotBlank(message = "tokenDto中获取customerId为空")
private String customerId;
-
+ @NotBlank(message = "tokenDto中获取userId为空")
+ private String currentUserId;
}
diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/controller/GroupLeaderTransferRecordController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/controller/GroupLeaderTransferRecordController.java
index 55d18521f5..98376bb68e 100644
--- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/controller/GroupLeaderTransferRecordController.java
+++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/controller/GroupLeaderTransferRecordController.java
@@ -53,6 +53,7 @@ public class GroupLeaderTransferRecordController {
@PostMapping("confirmtransfer")
public Result confirmTransfer(@LoginUser TokenDto tokenDto, @RequestBody ConfirmTransferFormDTO formDTO){
formDTO.setCustomerId(tokenDto.getCustomerId());
+ formDTO.setCurrentUserId(tokenDto.getUserId());
ValidatorUtils.validateEntity(formDTO);
groupLeaderTransferRecordService.confirmTransfer(formDTO);
return new Result();
diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/GroupLeaderTransferRecordServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/GroupLeaderTransferRecordServiceImpl.java
index 6134be2cf2..7b4564a41d 100644
--- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/GroupLeaderTransferRecordServiceImpl.java
+++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/GroupLeaderTransferRecordServiceImpl.java
@@ -21,6 +21,8 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.FieldConstant;
+import com.epmet.commons.tools.exception.EpmetErrorCode;
+import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.dto.form.UserMessageFormDTO;
@@ -128,6 +130,14 @@ public class GroupLeaderTransferRecordServiceImpl extends BaseServiceImpl
Date: Tue, 30 Mar 2021 13:59:43 +0800
Subject: [PATCH 06/22] =?UTF-8?q?=E8=BD=AC=E8=AE=A9=E7=BB=84=E6=8E=A5?=
=?UTF-8?q?=E5=8F=A3v2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../service/impl/GroupLeaderTransferRecordServiceImpl.java | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/GroupLeaderTransferRecordServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/GroupLeaderTransferRecordServiceImpl.java
index 7b4564a41d..bf557430a9 100644
--- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/GroupLeaderTransferRecordServiceImpl.java
+++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/GroupLeaderTransferRecordServiceImpl.java
@@ -130,6 +130,10 @@ public class GroupLeaderTransferRecordServiceImpl extends BaseServiceImpl
Date: Tue, 30 Mar 2021 15:34:56 +0800
Subject: [PATCH 07/22] =?UTF-8?q?=E5=B0=8F=E7=BB=84=E6=88=90=E5=91=98?=
=?UTF-8?q?=E5=88=A0=E9=99=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../epmet/feign/GovIssueOpenFeignClient.java | 8 ++
.../GovIssueOpenFeignClientFallBack.java | 5 +
.../IssueApplicationController.java | 10 ++
.../com/epmet/dao/IssueApplicationDao.java | 8 ++
.../service/IssueApplicationService.java | 7 +
.../impl/IssueApplicationServiceImpl.java | 11 ++
.../resources/mapper/IssueApplicationDao.xml | 14 ++
.../dto/group/form/ExitGroupFormDTO.java | 43 +++++++
.../group/controller/ExitGroupController.java | 48 +++++++
.../group/service/ExitGroupService.java | 18 +++
.../service/impl/ExitGroupServiceImpl.java | 120 ++++++++++++++++++
.../member/dao/GroupMemeberOperationDao.java | 6 +
.../member/dao/ResiGroupMemberDao.java | 6 +
.../topic/dao/ResiTopicCommentDao.java | 13 ++
.../epmet/modules/topic/dao/ResiTopicDao.java | 12 ++
.../member/GroupMemeberOperationDao.xml | 15 +++
.../mapper/member/ResiGroupMemberDao.xml | 13 ++
.../mapper/topic/ResiTopicCommentDao.xml | 27 ++++
.../resources/mapper/topic/ResiTopicDao.xml | 26 ++++
19 files changed, 410 insertions(+)
create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/form/ExitGroupFormDTO.java
create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/ExitGroupController.java
create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/ExitGroupService.java
create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ExitGroupServiceImpl.java
diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java
index f5d2786c93..f1768a23fd 100644
--- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java
+++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java
@@ -244,4 +244,12 @@ public interface GovIssueOpenFeignClient {
@PostMapping("/gov/issue/issue/detail")
Result queryIssueDetail(@RequestBody IssueDetailFormDTO formDTO);
+
+ /**
+ * @param topicIdList
+ * @Description 查询当前未成为议题的话题但是提交了转议题申请的
+ * @author sun
+ */
+ @PostMapping("/gov/issue/issueapplication/notissuetotopicids")
+ Result> notIssueToTopicIds(@RequestBody List topicIdList);
}
diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java
index 84b1220993..53f22684a1 100644
--- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java
+++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java
@@ -211,4 +211,9 @@ public class GovIssueOpenFeignClientFallBack implements GovIssueOpenFeignClient
public Result queryIssueDetail(IssueDetailFormDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "detail", formDTO);
}
+
+ @Override
+ public Result> notIssueToTopicIds(List topicIdList) {
+ return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "notIssueToTopicIds", topicIdList);
+ }
}
diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueApplicationController.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueApplicationController.java
index 63f5af6117..575b75a56b 100644
--- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueApplicationController.java
+++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueApplicationController.java
@@ -164,4 +164,14 @@ public class IssueApplicationController {
ValidatorUtils.validateEntity(fomrDTO, PageFormDTO.AddUserInternalGroup.class);
return new Result>().ok(issueApplicationService.queryUserPubAuditingIssues(fomrDTO));
}
+
+ /**
+ * @param topicIdList
+ * @Description 查询当前未成为议题的话题但是提交了转议题申请的
+ * @author sun
+ */
+ @PostMapping("notissuetotopicids")
+ public Result> notIssueToTopicIds(@RequestBody List topicIdList) {
+ return new Result>().ok(issueApplicationService.notIssueToTopicIds(topicIdList));
+ }
}
\ No newline at end of file
diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueApplicationDao.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueApplicationDao.java
index 38ec62c1d6..33296076b6 100644
--- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueApplicationDao.java
+++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueApplicationDao.java
@@ -66,4 +66,12 @@ public interface IssueApplicationDao extends BaseDao {
List selectUserPubAuditingIssues(UserPubAuditingIssueFormDTO formDTO);
List selectByTopicId(@Param("topicId") String topicId);
+
+ /**
+ * @param topicIdList
+ * @Description 查询当前未成为议题的话题但是提交了转议题申请的
+ * @author sun
+ */
+ List selectTopicIdList(@Param("topicIdList") List topicIdList);
+
}
\ No newline at end of file
diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueApplicationService.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueApplicationService.java
index 6c2df1b318..aecc10b0b5 100644
--- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueApplicationService.java
+++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueApplicationService.java
@@ -143,4 +143,11 @@ public interface IssueApplicationService extends BaseService queryUserPubAuditingIssues(UserPubAuditingIssueFormDTO fomrDTO);
+
+ /**
+ * @param topicIdList
+ * @Description 查询当前未成为议题的话题但是提交了转议题申请的
+ * @author sun
+ */
+ List notIssueToTopicIds(List topicIdList);
}
\ No newline at end of file
diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueApplicationServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueApplicationServiceImpl.java
index 71e62d3e1f..a699e58a61 100644
--- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueApplicationServiceImpl.java
+++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueApplicationServiceImpl.java
@@ -175,4 +175,15 @@ public class IssueApplicationServiceImpl extends BaseServiceImpl notIssueToTopicIds(List topicIdList) {
+ List idList = baseDao.selectTopicIdList(topicIdList);
+ return idList;
+ }
+
}
\ No newline at end of file
diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueApplicationDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueApplicationDao.xml
index 3d94af1c56..2820a43019 100644
--- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueApplicationDao.xml
+++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueApplicationDao.xml
@@ -72,4 +72,18 @@
AND TOPIC_ID = #{topicId}
ORDER BY CREATED_TIME DESC
+
+
+
\ No newline at end of file
diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/form/ExitGroupFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/form/ExitGroupFormDTO.java
new file mode 100644
index 0000000000..0c10e60de1
--- /dev/null
+++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/form/ExitGroupFormDTO.java
@@ -0,0 +1,43 @@
+package com.epmet.resi.group.dto.group.form;
+
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import javax.validation.constraints.NotBlank;
+import java.io.Serializable;
+
+/**
+ * @author sun
+ * @Description 删除组员-接口入参
+ */
+@NoArgsConstructor
+@Data
+public class ExitGroupFormDTO implements Serializable {
+
+ private static final long serialVersionUID = 9033824126731443502L;
+ /**
+ * 屏蔽突然的话题及评论,勾选:yes;不勾选:no
+ */
+ @NotBlank(message = "是否屏蔽话题及评论不能为空")
+ private String shieldFlag;
+ /**
+ * 组成员用户id
+ */
+ @NotBlank(message = "被删除用户Id不能为空")
+ private String userId;
+ /**
+ * 小组ID
+ */
+ @NotBlank(message = "小组Id不能为空")
+ private String groupId;
+
+ /**
+ * 客户Id
+ */
+ private String customerId;
+
+ /**
+ * OPERATE_USER_ID操作人id
+ */
+ private String operateUserId;
+}
diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/ExitGroupController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/ExitGroupController.java
new file mode 100644
index 0000000000..9f58b1eba7
--- /dev/null
+++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/ExitGroupController.java
@@ -0,0 +1,48 @@
+package com.epmet.modules.group.controller;
+
+import com.epmet.commons.tools.annotation.LoginUser;
+import com.epmet.commons.tools.exception.RenException;
+import com.epmet.commons.tools.security.dto.TokenDto;
+import com.epmet.commons.tools.utils.Result;
+import com.epmet.commons.tools.validator.ValidatorUtils;
+import com.epmet.modules.group.service.ExitGroupService;
+import com.epmet.resi.group.dto.group.form.ExitGroupFormDTO;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @author sun
+ * @dscription
+ */
+@Slf4j
+@RestController
+@RequestMapping("exitgroup")
+public class ExitGroupController {
+ @Autowired
+ private ExitGroupService exitGroupService;
+
+
+ /**
+ * @param formDTO
+ * @Description 删除组员
+ * @author sun
+ * 如果shieldFlag=yes, 则将讨论中的话题并且不存在正在审核的议题申请的置为已屏蔽
+ * 不要忘了插入:exit_group_record
+ */
+ @PostMapping("removemember")
+ public Result removeMember(@LoginUser TokenDto tokenDto, @RequestBody ExitGroupFormDTO formDTO) {
+ ValidatorUtils.validateEntity(formDTO);
+ if(!"".equals(formDTO.getShieldFlag())&&!"".equals(formDTO.getShieldFlag())){
+ throw new RenException("参数错误,是否屏蔽历史话题参数值错误");
+ }
+ formDTO.setCustomerId(tokenDto.getCustomerId());
+ formDTO.setOperateUserId(tokenDto.getUserId());
+ exitGroupService.removeMember(formDTO);
+ return new Result();
+ }
+
+}
diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/ExitGroupService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/ExitGroupService.java
new file mode 100644
index 0000000000..af8b7f30c7
--- /dev/null
+++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/ExitGroupService.java
@@ -0,0 +1,18 @@
+package com.epmet.modules.group.service;
+
+import com.epmet.resi.group.dto.group.form.ExitGroupFormDTO;
+
+/**
+ * @author sun
+ * @dscription
+ */
+public interface ExitGroupService {
+
+ /**
+ * @param formDTO
+ * @Description 删除组员
+ * @author sun
+ */
+ void removeMember(ExitGroupFormDTO formDTO);
+
+}
diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ExitGroupServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ExitGroupServiceImpl.java
new file mode 100644
index 0000000000..0b8392a927
--- /dev/null
+++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ExitGroupServiceImpl.java
@@ -0,0 +1,120 @@
+package com.epmet.modules.group.service.impl;
+
+import com.epmet.commons.tools.constant.NumConstant;
+import com.epmet.commons.tools.exception.RenException;
+import com.epmet.commons.tools.utils.Result;
+import com.epmet.feign.GovIssueOpenFeignClient;
+import com.epmet.modules.group.service.ExitGroupService;
+import com.epmet.modules.member.dao.ExitGroupRecordDao;
+import com.epmet.modules.member.dao.GroupMemeberOperationDao;
+import com.epmet.modules.member.dao.ResiGroupMemberDao;
+import com.epmet.modules.member.entity.ExitGroupRecordEntity;
+import com.epmet.modules.topic.dao.ResiTopicCommentDao;
+import com.epmet.modules.topic.dao.ResiTopicDao;
+import com.epmet.modules.topic.entity.ResiTopicEntity;
+import com.epmet.resi.group.dto.group.form.ExitGroupFormDTO;
+import com.epmet.resi.group.dto.member.GroupMemeberOperationDTO;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.CollectionUtils;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * @author sun
+ * @dscription
+ */
+@Slf4j
+@Service
+public class ExitGroupServiceImpl implements ExitGroupService {
+
+ @Autowired
+ private ResiGroupMemberDao resiGroupMemberDao;
+ @Autowired
+ private GroupMemeberOperationDao groupMemeberOperationDao;
+ @Autowired
+ private ExitGroupRecordDao exitGroupRecordDao;
+ @Autowired
+ private ResiTopicDao resiTopicDao;
+ @Autowired
+ private GovIssueOpenFeignClient govIssueOpenFeignClient;
+ @Autowired
+ private ResiTopicCommentDao resiTopicCommentDao;
+
+ /**
+ * @param formDTO
+ * @Description 删除组员
+ * @author sun
+ */
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void removeMember(ExitGroupFormDTO formDTO) {
+ //1.校验被删除人员是否是当前小组内成员
+ int num = resiGroupMemberDao.checkUserInGroup(formDTO.getUserId(), formDTO.getGroupId());
+ if (num < NumConstant.ONE) {
+ throw new RenException("当前待删除人员不是本小组成员");
+ }
+
+ //2.判断是否屏蔽本小组内历史话题
+ List delIdList = new ArrayList<>();
+ if ("yes".equals(formDTO.getShieldFlag())) {
+ //2-1.查询当前被删除人员发表过的话题还未成为议题的并且只是谈论中的数据
+ List topicIdList = resiTopicDao.selectIdList(formDTO.getGroupId(), formDTO.getUserId());
+ //2-2.查询当前未成为议题的话题但是提交了转议题申请的话题
+ if (!CollectionUtils.isEmpty(topicIdList)) {
+ Result> listResult = govIssueOpenFeignClient.notIssueToTopicIds(topicIdList);
+ if (!listResult.success()) {
+ throw new RenException(listResult.getInternalMsg());
+ }
+ //获取只是单纯的话题既没有被转成议题又不存在转议题申请待审核数据
+ delIdList = topicIdList.stream().filter(o -> !listResult.getData().contains(o)).collect(Collectors.toList());
+ }
+ //2-3.屏蔽这些单纯的话题
+ if (delIdList.size() > NumConstant.ZERO) {
+ resiTopicDao.upTopicList(delIdList, formDTO.getOperateUserId());
+ }
+ }
+
+ //3.判断是否屏蔽本小组内历史评论
+ if ("yes".equals(formDTO.getShieldFlag())) {
+ //3-1.查询别人的话题但自己评论过的话题Id
+ List commetTopicList = resiTopicCommentDao.selectTopicIds(formDTO.getGroupId(), formDTO.getUserId());
+ delIdList.addAll(commetTopicList);
+ //3-2.本小组内屏蔽自己创建的话题发表过的评论以及别人发表的话题自己评论过的评论
+ if (delIdList.size() > NumConstant.ZERO) {
+ resiTopicCommentDao.upTopicCommentList(delIdList, formDTO.getOperateUserId());
+ }
+ }
+
+ //4.修改组成员出入群记录表数据状态、删除组成员关系表数据、新增退群记录表数据
+ //4-1.修改组成员出入群记录表数据状态
+ GroupMemeberOperationDTO operationDTO = new GroupMemeberOperationDTO();
+ operationDTO.setGroupId(formDTO.getGroupId());
+ operationDTO.setCustomerUserId(formDTO.getUserId());
+ operationDTO.setOperateUserId(formDTO.getOperateUserId());
+ if (groupMemeberOperationDao.upByGroupAndUserId(operationDTO) < NumConstant.ONE) {
+ throw new RenException(String.format("修改组成员出入群记录表数据失败,小组Id【%s】被修改人Id【%s】", formDTO.getGroupId(), formDTO.getUserId()));
+ }
+ //4-2.删除组成员关系表数据并修改状态
+ if (resiGroupMemberDao.delByGroupAndUserId(formDTO.getGroupId(), formDTO.getUserId()) < NumConstant.ONE) {
+ throw new RenException(String.format("删除组成员关系表数据操作失败,小组Id【%s】被修改人Id【%s】", formDTO.getGroupId(), formDTO.getUserId()));
+ }
+ //4-3.新增退群记录表数据
+ ExitGroupRecordEntity entity = new ExitGroupRecordEntity();
+ entity.setCustomerId(formDTO.getCustomerId());
+ entity.setGroupId(formDTO.getGroupId());
+ entity.setMemberUserId(formDTO.getUserId());
+ entity.setShieldFlag(formDTO.getShieldFlag());
+ entity.setLeaveType("0");
+ if (exitGroupRecordDao.insert(entity) < NumConstant.ONE) {
+ throw new RenException(String.format("新增退群记录表数据操作失败,小组Id【%s】被修改人Id【%s】", formDTO.getGroupId(), formDTO.getUserId()));
+ }
+
+ }
+
+
+}
diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/dao/GroupMemeberOperationDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/dao/GroupMemeberOperationDao.java
index 49ecf7fbbe..bf0f443668 100644
--- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/dao/GroupMemeberOperationDao.java
+++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/dao/GroupMemeberOperationDao.java
@@ -59,4 +59,10 @@ public interface GroupMemeberOperationDao extends BaseDao {
* @date 2020/12/18 下午4:33
*/
Integer checkUserInGroup(@Param("userId")String userId,@Param("groupId")String groupId);
+
+ /**
+ * @Description 修改组成员数据状态
+ * @author sun
+ */
+ int delByGroupAndUserId(@Param("groupId")String groupId, @Param("userId")String userId);
}
diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/ResiTopicCommentDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/ResiTopicCommentDao.java
index 57ef0adc97..efa950684b 100644
--- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/ResiTopicCommentDao.java
+++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/ResiTopicCommentDao.java
@@ -67,4 +67,17 @@ public interface ResiTopicCommentDao extends BaseDao {
* @date 2020/12/23 上午11:09
*/
Integer selectCommentCountByUserId(@Param("userId") String userId);
+
+ /**
+ * @Description 查询本小组内自己评论过的别人发表的话题Id集合
+ * @author sun
+ */
+ List selectTopicIds(@Param("groupId") String groupId, @Param("userId") String userId);
+
+ /**
+ * @Description 屏蔽自己发表的话题且自己评论过的评论
+ * @author sun
+ */
+ void upTopicCommentList(@Param("delIdList") List delIdList, @Param("userId") String userId);
+
}
\ No newline at end of file
diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/ResiTopicDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/ResiTopicDao.java
index ebbab2046a..abc817659d 100644
--- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/ResiTopicDao.java
+++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/ResiTopicDao.java
@@ -212,4 +212,16 @@ public interface ResiTopicDao extends BaseDao {
String selectCustomerIdByTopicId(@Param("topicId")String topicId);
ResiTopicDTO selectByIssueId(@Param("issueId") String issueId);
+
+ /**
+ * @Description 查询当前小组里被删除人员创建的话题还未转为议题并且是讨论中的话题数据
+ * @author sun
+ */
+ List selectIdList(@Param("groupId") String groupId, @Param("userId") String userId);
+
+ /**
+ * @Description 批量修改话题状态
+ * @author sun
+ */
+ int upTopicList(@Param("delIdList") List delIdList, @Param("userId") String userId);
}
\ No newline at end of file
diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/member/GroupMemeberOperationDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/member/GroupMemeberOperationDao.xml
index c47f80f4d3..cd7d33e5ca 100644
--- a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/member/GroupMemeberOperationDao.xml
+++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/member/GroupMemeberOperationDao.xml
@@ -39,4 +39,19 @@
AND GROUP_ID = #{groupId}
AND OPERATE_STATUS = 'under_auditting'
+
+
+ UPDATE group_memeber_operation
+ SET operate_status = 'removed',
+ operate_user_id = #{operateUserId},
+ updated_by = #{operateUserId},
+ updated_time = NOW()
+ WHERE
+ group_id = #{groupId}
+ AND customer_user_id = #{customerUserId}
+ ORDER BY
+ created_time DESC
+ LIMIT 1
+
+
diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/member/ResiGroupMemberDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/member/ResiGroupMemberDao.xml
index ea34d4a39c..013e384ec9 100644
--- a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/member/ResiGroupMemberDao.xml
+++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/member/ResiGroupMemberDao.xml
@@ -164,4 +164,17 @@
AND RESI_GROUP_ID = #{groupId}
AND `STATUS` = 'approved'
+
+
+ UPDATE resi_group_member
+ SET del_flag = '1',
+ status = 'removed'
+ WHERE
+ resi_group_id = #{groupId}
+ AND customer_user_id = #{userId}
+ ORDER BY
+ created_time DESC
+ LIMIT 1
+
+
diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicCommentDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicCommentDao.xml
index 3dc42e00a4..7fe318b292 100644
--- a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicCommentDao.xml
+++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicCommentDao.xml
@@ -97,4 +97,31 @@
AND CREATED_BY = #{userId}
+
+
+
+ UPDATE resi_topic_comment
+ SET `status` = 'hidden',
+ updated_by = #{userId},
+ updated_time = NOW()
+ WHERE
+ del_flag = '0'
+
+ topic_id = #{topicId}
+
+
+
diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicDao.xml
index e1e57899c9..183169ab08 100644
--- a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicDao.xml
+++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicDao.xml
@@ -570,5 +570,31 @@
where rt.DEL_FLAG='0'
and rt.ISSUE_ID=#{issueId}
+
+
+
+
+ UPDATE resi_topic
+ SET status = 'hidden',
+ updated_by = #{userId},
+ updated_time = NOW()
+ WHERE
+ del_flag = '0'
+
+ id = #{id}
+
+
+
From 456e63b954896c4d80522817e2eb81aa0c2bd006 Mon Sep 17 00:00:00 2001
From: zxc <1272811460@qq.com>
Date: Tue, 30 Mar 2021 15:45:41 +0800
Subject: [PATCH 08/22] =?UTF-8?q?=E5=8F=AF=E8=83=9C=E4=BB=BB=E7=BB=84?=
=?UTF-8?q?=E9=95=BF-=E7=BB=84=E5=91=98=E5=88=97=E8=A1=A8(=E5=B7=A5?=
=?UTF-8?q?=E4=BD=9C=E7=AB=AF=E9=80=9A=E7=94=A8)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../epmet/commons/tools/redis/RedisUtils.java | 11 ++++
.../dataaggre/constant/GroupConstant.java | 4 ++
.../epmetuser/result/UserInfosResultDTO.java | 21 +++++++
.../resigroup/form/CandidateListFormDTO.java | 35 ++++++++++++
.../result/CandidateListResultDTO.java | 57 +++++++++++++++++++
.../controller/ResiGroupController.java | 29 ++++++++++
.../dao/epmetuser/UserBaseInfoDao.java | 14 ++++-
.../dataaggre/dao/resigroup/ResiGroupDao.java | 12 ++++
.../epmet/dataaggre/redis/ResiGroupRedis.java | 47 +++++++++++++++
.../service/epmetuser/EpmetUserService.java | 13 +++++
.../epmetuser/impl/EpmetUserServiceImpl.java | 19 +++++++
.../service/resigroup/ResiGroupService.java | 10 ++++
.../resigroup/impl/ResiGroupServiceImpl.java | 52 +++++++++++++++++
.../mapper/epmetuser/UserBaseInfoDao.xml | 19 +++++++
.../mapper/resigroup/ResiGroupDao.xml | 12 ++++
15 files changed, 354 insertions(+), 1 deletion(-)
create mode 100644 epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/result/UserInfosResultDTO.java
create mode 100644 epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/resigroup/form/CandidateListFormDTO.java
create mode 100644 epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/resigroup/result/CandidateListResultDTO.java
create mode 100644 epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/redis/ResiGroupRedis.java
diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisUtils.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisUtils.java
index 72a6db9b10..b18e48c389 100644
--- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisUtils.java
+++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisUtils.java
@@ -206,6 +206,17 @@ public class RedisUtils {
}).collect(Collectors.toList());
}
+ /**
+ * @Description 获取缓存List
+ * @Param key
+ * @author zxc
+ * @date 2021/3/30 下午3:33
+ */
+ public List