From eb0b86df69141ec0d94ca79b8ee569bf6ef4639e Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 22 Apr 2021 10:29:41 +0800 Subject: [PATCH 01/15] =?UTF-8?q?=E6=9A=82=E5=AD=98=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/db/migration/V0.0.16__group_act.sql | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 epmet-module/resi-group/resi-group-server/src/main/resources/db/migration/V0.0.16__group_act.sql diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/db/migration/V0.0.16__group_act.sql b/epmet-module/resi-group/resi-group-server/src/main/resources/db/migration/V0.0.16__group_act.sql new file mode 100644 index 0000000000..e69de29bb2 From c686a2ba9a66c77396c9db386313986eb7947bb0 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 22 Apr 2021 10:43:07 +0800 Subject: [PATCH 02/15] =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E8=A1=A8+=E9=82=80=E8=AF=B7=E8=A1=A8+=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E8=A1=A8=EF=BC=8Csql=EF=BC=9Agroup=5Fmessage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../db/migration/V0.0.16__group_act.sql | 291 ++++++++++++++++++ 1 file changed, 291 insertions(+) diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/db/migration/V0.0.16__group_act.sql b/epmet-module/resi-group/resi-group-server/src/main/resources/db/migration/V0.0.16__group_act.sql index e69de29bb2..b0c49d6ce5 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/resources/db/migration/V0.0.16__group_act.sql +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/db/migration/V0.0.16__group_act.sql @@ -0,0 +1,291 @@ +CREATE TABLE `group_message` ( + `ID` varchar(64) NOT NULL COMMENT '主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id', + `GRID_ID` varchar(64) NOT NULL COMMENT '网格id', + `TYPE` varchar(64) NOT NULL COMMENT '话题:topic; 通知:notice; 活动:act', + `MESSAGE_ID` varchar(64) NOT NULL COMMENT '话题id , 通知id,活动id', + `PUBLISH_USER_ID` varchar(64) NOT NULL COMMENT '发布人用户id', + `DEL_FLAG` varchar(1) NOT NULL COMMENT '逻辑删除标识', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='组内消息(话题、通知、活动)记录表'; + + +/* + Navicat Premium Data Transfer + + Source Server : 192.168.1.130 + Source Server Type : MySQL + Source Server Version : 50728 + Source Host : 192.168.1.130:3306 + Source Schema : epmet_resi_group + + Target Server Type : MySQL + Target Server Version : 50728 + File Encoding : 65001 + + Date: 22/04/2021 10:39:14 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for act_category_dict +-- ---------------------------- +DROP TABLE IF EXISTS `act_category_dict`; +CREATE TABLE `act_category_dict` ( + `ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键', + `CUSTOMER_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '客户id', + `CATEGORY_CODE` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '类别编码', + `CATEGORY_NAME` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '活动类别名称;eg:支部建设、联建共建', + `LEVEL` int(11) NOT NULL COMMENT '等级1,2......', + `SORT` int(11) NOT NULL COMMENT '排序', + `PARENT_CODE` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '上级类别编码', + `DEL_FLAG` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '逻辑删除标识', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime(0) NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime(0) NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '活动类别字典' ROW_FORMAT = Dynamic; + +INSERT INTO `epmet_resi_group`.`act_category_dict`(`ID`, `CUSTOMER_ID`, `CATEGORY_CODE`, `CATEGORY_NAME`, `LEVEL`, `SORT`, `PARENT_CODE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1', 'default', '100', '支部建设', 1, 1, '0', '0', 0, 'APP_USER', '2021-04-15 15:17:15', 'APP_USER', '2021-04-15 15:17:18'); +INSERT INTO `epmet_resi_group`.`act_category_dict`(`ID`, `CUSTOMER_ID`, `CATEGORY_CODE`, `CATEGORY_NAME`, `LEVEL`, `SORT`, `PARENT_CODE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('10', 'default', '101001', '省级、市级机关', 2, 1, '101', '0', 0, 'APP_USER', '2021-04-15 15:27:13', 'APP_USER', '2021-04-15 15:27:18'); +INSERT INTO `epmet_resi_group`.`act_category_dict`(`ID`, `CUSTOMER_ID`, `CATEGORY_CODE`, `CATEGORY_NAME`, `LEVEL`, `SORT`, `PARENT_CODE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('11', 'default', '101002', '区直机关', 2, 2, '101', '0', 0, 'APP_USER', '2021-04-15 15:27:49', 'APP_USER', '2021-04-15 15:27:53'); +INSERT INTO `epmet_resi_group`.`act_category_dict`(`ID`, `CUSTOMER_ID`, `CATEGORY_CODE`, `CATEGORY_NAME`, `LEVEL`, `SORT`, `PARENT_CODE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('12', 'default', '101003', '驻区企事业单位', 2, 3, '101', '0', 0, 'APP_USER', '2021-04-15 15:28:31', 'APP_USER', '2021-04-15 15:28:33'); +INSERT INTO `epmet_resi_group`.`act_category_dict`(`ID`, `CUSTOMER_ID`, `CATEGORY_CODE`, `CATEGORY_NAME`, `LEVEL`, `SORT`, `PARENT_CODE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('13', 'default', '101004', '驻区\"两新\"组织', 2, 4, '101', '0', 0, 'APP_USER', '2021-04-15 15:29:13', 'APP_USER', '2021-04-15 15:29:16'); +INSERT INTO `epmet_resi_group`.`act_category_dict`(`ID`, `CUSTOMER_ID`, `CATEGORY_CODE`, `CATEGORY_NAME`, `LEVEL`, `SORT`, `PARENT_CODE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('14', 'default', '100001001', '三会一课-尹作梅测试', 3, 1, '100001', '0', 0, 'APP_USER', '2021-04-19 15:05:00', 'APP_USER', '2021-04-19 15:05:03'); +INSERT INTO `epmet_resi_group`.`act_category_dict`(`ID`, `CUSTOMER_ID`, `CATEGORY_CODE`, `CATEGORY_NAME`, `LEVEL`, `SORT`, `PARENT_CODE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('2', 'default', '101', '联建共建', 1, 2, '0', '0', 0, 'APP_USER', '2021-04-15 15:17:44', 'APP_USER', '2021-04-15 15:17:56'); +INSERT INTO `epmet_resi_group`.`act_category_dict`(`ID`, `CUSTOMER_ID`, `CATEGORY_CODE`, `CATEGORY_NAME`, `LEVEL`, `SORT`, `PARENT_CODE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('3', 'default', '102', '为民服务', 1, 3, '0', '0', 0, 'APP_USER', '2021-04-15 15:18:22', 'APP_USER', '2021-04-15 15:18:29'); +INSERT INTO `epmet_resi_group`.`act_category_dict`(`ID`, `CUSTOMER_ID`, `CATEGORY_CODE`, `CATEGORY_NAME`, `LEVEL`, `SORT`, `PARENT_CODE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('4', 'default', '100001', '三会一课', 2, 1, '100', '0', 0, 'APP_USER', '2021-04-15 15:19:50', 'APP_USER', '2021-04-15 15:19:57'); +INSERT INTO `epmet_resi_group`.`act_category_dict`(`ID`, `CUSTOMER_ID`, `CATEGORY_CODE`, `CATEGORY_NAME`, `LEVEL`, `SORT`, `PARENT_CODE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('5', 'default', '100002', '主题党日', 2, 2, '100', '0', 0, 'APP_USER', '2021-04-15 15:22:42', 'APP_USER', '2021-04-15 15:22:48'); +INSERT INTO `epmet_resi_group`.`act_category_dict`(`ID`, `CUSTOMER_ID`, `CATEGORY_CODE`, `CATEGORY_NAME`, `LEVEL`, `SORT`, `PARENT_CODE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('6', 'default', '100003', '\"三述\"专题', 2, 3, '100', '0', 0, 'APP_USER', '2021-04-15 15:24:06', 'APP_USER', '2021-04-15 15:24:12'); +INSERT INTO `epmet_resi_group`.`act_category_dict`(`ID`, `CUSTOMER_ID`, `CATEGORY_CODE`, `CATEGORY_NAME`, `LEVEL`, `SORT`, `PARENT_CODE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('7', 'default', '100004', '党内志愿服务', 2, 4, '100', '0', 0, 'APP_USER', '2021-04-15 15:24:52', 'APP_USER', '2021-04-15 15:24:58'); +INSERT INTO `epmet_resi_group`.`act_category_dict`(`ID`, `CUSTOMER_ID`, `CATEGORY_CODE`, `CATEGORY_NAME`, `LEVEL`, `SORT`, `PARENT_CODE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('9', 'default', '100005', '党内关怀服务', 2, 5, '100', '0', 0, 'APP_USER', '2021-04-15 15:25:36', 'APP_USER', '2021-04-15 15:25:43'); + +-- ---------------------------- +-- Table structure for act_comment +-- ---------------------------- +DROP TABLE IF EXISTS `act_comment`; +CREATE TABLE `act_comment` ( + `ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键', + `CUSTOMER_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '客户id', + `GROUP_ACT_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'group_act_info.id', + `COMMENT_USER_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '评论人id', + `COMMENT_CONTENT` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '评论内容;目前限制500字', + `DEL_FLAG` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '删除标记 0:未删除,1:已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '创建人,评论人Id,来自user', + `CREATED_TIME` datetime(0) NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime(0) NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '活动评论表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for act_operation_record +-- ---------------------------- +DROP TABLE IF EXISTS `act_operation_record`; +CREATE TABLE `act_operation_record` ( + `ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键(签到成功后插入此表)', + `CUSTOMER_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '客户id', + `GROUP_ACT_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'group_act_info.id', + `OPERATE_USER_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '操作人id', + `OPERATION_TYPE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '操作类型:发布:publish;\r\n取消:cancel;\r\n变更:change;\r\n关闭:close', + `NOTE` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注;取消理由', + `DEL_FLAG` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '逻辑删除标识', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime(0) NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime(0) NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '活动操作表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for act_read_record +-- ---------------------------- +DROP TABLE IF EXISTS `act_read_record`; +CREATE TABLE `act_read_record` ( + `ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键(发布活动后后台自动初始化记录)', + `CUSTOMER_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '客户id', + `GRID_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '小组所属网格id', + `GROUP_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '小组id', + `GROUP_ACT_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'group_act_info.id', + `READ_FLAG` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'un_read' COMMENT '已读: read未读:un_read;查看活动详情后修改此表,或者插入一条新的已读记录', + `USER_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户id', + `SHOULD_BE_READ` varchar(3) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'yes' COMMENT 'yes:应读;no: 新入群的人已读', + `DEL_FLAG` int(11) NOT NULL DEFAULT 0 COMMENT '删除标识 0.未删除 1.已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime(0) NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime(0) NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '活动已读记录' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for act_sign_in_code +-- ---------------------------- +DROP TABLE IF EXISTS `act_sign_in_code`; +CREATE TABLE `act_sign_in_code` ( + `ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键', + `CUSTOMER_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '客户id', + `GROUP_ACT_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'group_act_info.id', + `URL` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '签到码url', + `DEL_FLAG` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '删除标志', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime(0) NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime(0) NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '组织活动签到码' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for act_sign_in_record +-- ---------------------------- +DROP TABLE IF EXISTS `act_sign_in_record`; +CREATE TABLE `act_sign_in_record` ( + `ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键(签到成功后插入此表)', + `CUSTOMER_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '客户id', + `GROUP_ACT_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'group_act_info.id', + `SIGN_USER_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '签到用户id', + `SIGN_IN_ADDRESS` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '签到地点', + `LONGITUDE` decimal(32, 10) NULL DEFAULT NULL COMMENT '签到地点-经度', + `LATITUDE` decimal(32, 10) NULL DEFAULT NULL COMMENT '签到地点-纬度', + `DEL_FLAG` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '逻辑删除标识', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime(0) NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime(0) NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '组织活动签到记录' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for act_summary +-- ---------------------------- +DROP TABLE IF EXISTS `act_summary`; +CREATE TABLE `act_summary` ( + `ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键(确认提交后插入此表)', + `CUSTOMER_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '客户id', + `GROUP_ACT_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'group_act_info.id', + `SHOULD_ATTEND` int(11) NOT NULL COMMENT '应参加人数:来源于group_act_info', + `SIGNED_IN_NUM` int(11) NOT NULL COMMENT '已签到人数', + `SIGNED_IN_USERS` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '已签到人员姓名列表、分隔; 按照签到时间升序排列', + `USER_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '填写总结的人', + `DEL_FLAG` int(11) NOT NULL DEFAULT 0 COMMENT '删除标识 0.未删除 1.已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime(0) NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime(0) NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '活动总结' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for act_summary_content +-- ---------------------------- +DROP TABLE IF EXISTS `act_summary_content`; +CREATE TABLE `act_summary_content` ( + `ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键', + `CUSTOMER_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '客户id', + `ACT_SUMMARY_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'act_summary.id', + `GROUP_ACT_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'group_act_info.id', + `CONTENT` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '总结内容', + `CONTENT_TYPE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '内容类型: 文字:text;图片:img', + `SORT` int(11) NOT NULL COMMENT '内容顺序 从1开始', + `DEL_FLAG` int(11) NOT NULL DEFAULT 0 COMMENT '删除标识 0.未删除 1.已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime(0) NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime(0) NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '活动总结内容' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for group_act_content +-- ---------------------------- +DROP TABLE IF EXISTS `group_act_content`; +CREATE TABLE `group_act_content` ( + `ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键', + `CUSTOMER_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '客户id', + `GROUP_ACT_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'group_act_info.id', + `CONTENT` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '活动内容', + `CONTENT_TYPE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '内容类型: 文字:text;图片:img', + `SORT` int(11) NOT NULL COMMENT '内容顺序 从1开始', + `DEL_FLAG` int(11) NOT NULL DEFAULT 0 COMMENT '删除标识 0.未删除 1.已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime(0) NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime(0) NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '组织活动内容' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for group_act_info +-- ---------------------------- +DROP TABLE IF EXISTS `group_act_info`; +CREATE TABLE `group_act_info` ( + `ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键', + `CUSTOMER_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '客户id', + `GROUP_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '小组id', + `GRID_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '小组所属的网格id', + `AGENCY_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '网格所属的组织id', + `GRID_PIDS` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '网格的所有上级id', + `TITLE` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '活动标题;需内容审核', + `START_TIME` datetime(0) NOT NULL COMMENT '活动时间', + `CATEGORY_CODE` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '活动所属类别编码', + `PARENT_CODE` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '上级类别编码', + `ALL_CATEGORY_NAME` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '活动类别名称;eg:支部建设-三会一课', + `ADDRESS` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '活动地点', + `LONGITUDE` decimal(32, 10) NOT NULL COMMENT '活动地点-经度', + `LATITUDE` decimal(32, 10) NOT NULL COMMENT '活动地点-纬度', + `SHOULD_ATTEND` int(11) NOT NULL COMMENT '应参加人数组长填入;此列也是应签到人数;', + `STATUS` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '活动状态:已发布:published;已取消:canceled;已变更:changed;已关闭:closed', + `CHANGED_TIME` datetime(0) NOT NULL COMMENT '最后一次编辑时间;首次发布与CREATED_TIME一致', + `SIGN_IN_START_TIME` datetime(0) NULL DEFAULT NULL COMMENT '签到开始时间', + `SIGN_IN_END_TIME` datetime(0) NULL DEFAULT NULL COMMENT '签到截止时间', + `SUMMARY_FLAG` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否填写总结?1:已填写;0:未填写', + `SIGNED_IN_NUM` int(11) NOT NULL DEFAULT 0 COMMENT '已签到人数(有人签到自动+1)', + `CANCELED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '取消时间', + `CLOSED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '关闭时间', + `PUBLISH_USER_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '活动发布人用户id', + `DEL_FLAG` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT '删除标识', + `REVISION` int(11) NOT NULL DEFAULT 0 COMMENT '乐观锁', + `CREATED_BY` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime(0) NOT NULL COMMENT '创建时间(活动发布时间)', + `UPDATED_BY` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime(0) NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '组织活动信息' ROW_FORMAT = Dynamic; + +SET FOREIGN_KEY_CHECKS = 1; + +DROP TABLE IF EXISTS `invitation_record`; +CREATE TABLE `invitation_record` ( + `ID` varchar(64) NOT NULL COMMENT '主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id', + `GRID_ID` varchar(64) NOT NULL COMMENT '小组所属的网格id', + `GROUP_ID` varchar(64) NOT NULL COMMENT '小组id', + `SOURCE_TYPE` varchar(32) NOT NULL COMMENT 'act:活动;notice:通知', + `SOURCE_ID` varchar(64) NOT NULL COMMENT '活动id,或者通知id....', + `SHARE_USER_ID` varchar(64) NOT NULL COMMENT '分享人id', + `INVITE_CONTENT` varchar(255) DEFAULT NULL COMMENT '分享内容', + `DEL_FLAG` int(11) NOT NULL DEFAULT '0' COMMENT '删除标识 0.未删除 1.已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='分享记录(话题、通知...后续支持增加)'; \ No newline at end of file From 108607d2eb1e79af64690bc6569052bcbf97d076 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 22 Apr 2021 10:51:39 +0800 Subject: [PATCH 03/15] =?UTF-8?q?group=5Fmessage=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resi/group/dto/group/GroupMessageDTO.java | 97 ++++++++++++++++++ .../modules/group/dao/GroupMessageDao.java | 33 +++++++ .../group/entity/GroupMessageEntity.java | 63 ++++++++++++ .../group/service/GroupMessageService.java | 95 ++++++++++++++++++ .../service/impl/GroupMessageServiceImpl.java | 99 +++++++++++++++++++ .../mapper/group/GroupMessageDao.xml | 8 ++ 6 files changed, 395 insertions(+) create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/GroupMessageDTO.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/dao/GroupMessageDao.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/entity/GroupMessageEntity.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/GroupMessageService.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/GroupMessageServiceImpl.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/GroupMessageDao.xml diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/GroupMessageDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/GroupMessageDTO.java new file mode 100644 index 0000000000..89b86f29b1 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/GroupMessageDTO.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. + *

+ * 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.group; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 组内消息(话题、通知、活动)记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-22 + */ +@Data +public class GroupMessageDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户id + */ + private String customerId; + + /** + * 网格id + */ + private String gridId; + + /** + * 话题:topic; 通知:notice; 活动:act + */ + private String type; + + /** + * 话题id , 通知id,活动id + */ + private String messageId; + + /** + * 发布人用户id + */ + private String publishUserId; + + /** + * 逻辑删除标识 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + 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-server/src/main/java/com/epmet/modules/group/dao/GroupMessageDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/dao/GroupMessageDao.java new file mode 100644 index 0000000000..bbb804e7e5 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/dao/GroupMessageDao.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.group.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.modules.group.entity.GroupMessageEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 组内消息(话题、通知、活动)记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-22 + */ +@Mapper +public interface GroupMessageDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/entity/GroupMessageEntity.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/entity/GroupMessageEntity.java new file mode 100644 index 0000000000..b3a9929d77 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/entity/GroupMessageEntity.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.group.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-04-22 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("group_message") +public class GroupMessageEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 网格id + */ + private String gridId; + + /** + * 话题:topic; 通知:notice; 活动:act + */ + private String type; + + /** + * 话题id , 通知id,活动id + */ + private String messageId; + + /** + * 发布人用户id + */ + private String publishUserId; + +} diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/GroupMessageService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/GroupMessageService.java new file mode 100644 index 0000000000..0c0db25275 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/GroupMessageService.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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.modules.group.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.GroupMessageDTO; +import com.epmet.modules.group.entity.GroupMessageEntity; + +import java.util.List; +import java.util.Map; + +/** + * 组内消息(话题、通知、活动)记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-22 + */ +public interface GroupMessageService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-04-22 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-04-22 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return GroupMessageDTO + * @author generator + * @date 2021-04-22 + */ + GroupMessageDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-04-22 + */ + void save(GroupMessageDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-04-22 + */ + void update(GroupMessageDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-04-22 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/GroupMessageServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/GroupMessageServiceImpl.java new file mode 100644 index 0000000000..d0d01fb921 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/GroupMessageServiceImpl.java @@ -0,0 +1,99 @@ +/** + * 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.group.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.dto.GroupMessageDTO; +import com.epmet.modules.group.dao.GroupMessageDao; +import com.epmet.modules.group.entity.GroupMessageEntity; +import com.epmet.modules.group.service.GroupMessageService; +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-04-22 + */ +@Service +public class GroupMessageServiceImpl extends BaseServiceImpl implements GroupMessageService { + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, GroupMessageDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, GroupMessageDTO.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 GroupMessageDTO get(String id) { + GroupMessageEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, GroupMessageDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(GroupMessageDTO dto) { + GroupMessageEntity entity = ConvertUtils.sourceToTarget(dto, GroupMessageEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(GroupMessageDTO dto) { + GroupMessageEntity entity = ConvertUtils.sourceToTarget(dto, GroupMessageEntity.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/mapper/group/GroupMessageDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/GroupMessageDao.xml new file mode 100644 index 0000000000..289b4fdce5 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/GroupMessageDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file From cb73a8fe7e00b1c013b34f91b3068106f7bd9101 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 22 Apr 2021 10:53:00 +0800 Subject: [PATCH 04/15] =?UTF-8?q?group=5Fmessage=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/modules/group/service/GroupMessageService.java | 2 +- .../modules/group/service/impl/GroupMessageServiceImpl.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/GroupMessageService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/GroupMessageService.java index 0c0db25275..f67187df00 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/GroupMessageService.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/GroupMessageService.java @@ -19,8 +19,8 @@ package com.epmet.modules.group.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; -import com.epmet.dto.GroupMessageDTO; import com.epmet.modules.group.entity.GroupMessageEntity; +import com.epmet.resi.group.dto.group.GroupMessageDTO; import java.util.List; import java.util.Map; diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/GroupMessageServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/GroupMessageServiceImpl.java index d0d01fb921..5d8f97226f 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/GroupMessageServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/GroupMessageServiceImpl.java @@ -23,10 +23,10 @@ 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.dto.GroupMessageDTO; import com.epmet.modules.group.dao.GroupMessageDao; import com.epmet.modules.group.entity.GroupMessageEntity; import com.epmet.modules.group.service.GroupMessageService; +import com.epmet.resi.group.dto.group.GroupMessageDTO; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; From 4515e38692a86543a1cb4ca485c8550b40dbf619 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 22 Apr 2021 10:58:50 +0800 Subject: [PATCH 05/15] =?UTF-8?q?group=5Fmessage=E6=96=B0=E5=A2=9Estatus:?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/resi/group/dto/group/GroupMessageDTO.java | 7 +++++++ .../com/epmet/modules/group/entity/GroupMessageEntity.java | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/GroupMessageDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/GroupMessageDTO.java index 89b86f29b1..9fd81fbc15 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/GroupMessageDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/GroupMessageDTO.java @@ -64,6 +64,13 @@ public class GroupMessageDTO implements Serializable { */ private String publishUserId; + /** + * 话题状态(讨论中 - discussing、 已屏蔽 - hidden、 已关闭 - closed) + * 活动状态:已发布:published;已取消:canceled;已变更:changed;已关闭:closed + * 通知:已发布:published + */ + private String status; + /** * 逻辑删除标识 */ diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/entity/GroupMessageEntity.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/entity/GroupMessageEntity.java index b3a9929d77..2ef5e585ce 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/entity/GroupMessageEntity.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/entity/GroupMessageEntity.java @@ -60,4 +60,11 @@ public class GroupMessageEntity extends BaseEpmetEntity { */ private String publishUserId; + /** + * 话题状态(讨论中 - discussing、 已屏蔽 - hidden、 已关闭 - closed) + * 活动状态:已发布:published;已取消:canceled;已变更:changed;已关闭:closed + * 通知:已发布:published + */ + private String status; + } From e91480c94d22992770a326429a8c311d841c57c5 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 22 Apr 2021 11:02:51 +0800 Subject: [PATCH 06/15] getByMessageId --- .../java/com/epmet/modules/group/dao/GroupMessageDao.java | 3 ++- .../epmet/modules/group/service/GroupMessageService.java | 2 ++ .../modules/group/service/impl/GroupMessageServiceImpl.java | 6 ++++++ .../src/main/resources/mapper/group/GroupMessageDao.xml | 6 +++++- 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/dao/GroupMessageDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/dao/GroupMessageDao.java index bbb804e7e5..a65949e227 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/dao/GroupMessageDao.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/dao/GroupMessageDao.java @@ -29,5 +29,6 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface GroupMessageDao extends BaseDao { - + + GroupMessageEntity selectByMessageId(String messageId); } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/GroupMessageService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/GroupMessageService.java index f67187df00..6e2b57893a 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/GroupMessageService.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/GroupMessageService.java @@ -92,4 +92,6 @@ public interface GroupMessageService extends BaseService { * @date 2021-04-22 */ void delete(String[] ids); + + GroupMessageDTO getByMessageId(String messageId); } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/GroupMessageServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/GroupMessageServiceImpl.java index 5d8f97226f..d74e669533 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/GroupMessageServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/GroupMessageServiceImpl.java @@ -96,4 +96,10 @@ public class GroupMessageServiceImpl extends BaseServiceImpl - + \ No newline at end of file From 5d25fc3f61019987db2cf8924ec0de258e02bf2d Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 22 Apr 2021 11:08:50 +0800 Subject: [PATCH 07/15] operateTime --- .../java/com/epmet/resi/group/dto/group/GroupMessageDTO.java | 1 + .../com/epmet/modules/group/entity/GroupMessageEntity.java | 3 +++ 2 files changed, 4 insertions(+) diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/GroupMessageDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/GroupMessageDTO.java index 9fd81fbc15..06a70d0a40 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/GroupMessageDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/GroupMessageDTO.java @@ -101,4 +101,5 @@ public class GroupMessageDTO implements Serializable { */ private Date updatedTime; + private Date operateTime; } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/entity/GroupMessageEntity.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/entity/GroupMessageEntity.java index 2ef5e585ce..705f6cb9db 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/entity/GroupMessageEntity.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/entity/GroupMessageEntity.java @@ -22,6 +22,8 @@ import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; +import java.util.Date; + /** * 组内消息(话题、通知、活动)记录表 * @@ -66,5 +68,6 @@ public class GroupMessageEntity extends BaseEpmetEntity { * 通知:已发布:published */ private String status; + private Date operateTime; } From fd314eebecbce1927b264e0d0a479bb2eb90984a Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 22 Apr 2021 11:17:08 +0800 Subject: [PATCH 08/15] =?UTF-8?q?=E5=8F=91=E5=B8=83=E3=80=81=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E3=80=81=E5=8F=96=E6=B6=88=E3=80=81=E5=85=B3=E9=97=AD?= =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E8=AE=B0=E5=BD=95group=5Fmessage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/GroupActInfoServiceImpl.java | 43 ++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/GroupActInfoServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/GroupActInfoServiceImpl.java index 54a184983c..bbd593b609 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/GroupActInfoServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/GroupActInfoServiceImpl.java @@ -41,7 +41,10 @@ import com.epmet.dto.result.UserBaseInfoResultDTO; import com.epmet.feign.EpmetMessageOpenFeignClient; import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.feign.GovOrgOpenFeignClient; -import com.epmet.modules.act.dao.*; +import com.epmet.modules.act.dao.ActOperationRecordDao; +import com.epmet.modules.act.dao.ActReadRecordDao; +import com.epmet.modules.act.dao.GroupActContentDao; +import com.epmet.modules.act.dao.GroupActInfoDao; import com.epmet.modules.act.entity.*; import com.epmet.modules.act.service.ActCategoryDictService; import com.epmet.modules.act.service.ActSignInRecordService; @@ -49,6 +52,7 @@ import com.epmet.modules.act.service.ActSummaryService; import com.epmet.modules.act.service.GroupActInfoService; import com.epmet.modules.constant.GroupActConstant; import com.epmet.modules.constant.UserMessageConstant; +import com.epmet.modules.group.service.GroupMessageService; import com.epmet.modules.group.service.ResiGroupService; import com.epmet.modules.invitation.service.InvitationRecordService; import com.epmet.modules.member.service.ResiGroupMemberService; @@ -57,6 +61,7 @@ import com.epmet.resi.group.dto.act.GroupActInfoDTO; import com.epmet.resi.group.dto.act.form.*; import com.epmet.resi.group.dto.act.result.ActDetailByLinkResultDTO; import com.epmet.resi.group.dto.act.result.ActDetailResultDTO; +import com.epmet.resi.group.dto.group.GroupMessageDTO; import com.epmet.resi.group.dto.group.ResiGroupDTO; import com.epmet.resi.group.dto.invitation.InvitationRecordDTO; import com.epmet.resi.group.dto.member.ResiGroupMemberDTO; @@ -115,6 +120,9 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl memberDTOList, PublishGroupActFormDTO formDTO, GroupActInfoEntity groupActInfoEntity,ResiGroupDTO resiGroupDTO) { List list = new ArrayList<>(); @@ -637,6 +673,8 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl Date: Thu, 22 Apr 2021 11:18:38 +0800 Subject: [PATCH 09/15] =?UTF-8?q?=E5=8F=91=E5=B8=83=E3=80=81=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E3=80=81=E5=8F=96=E6=B6=88=E3=80=81=E5=85=B3=E9=97=AD?= =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E8=AE=B0=E5=BD=95group=5Fmessage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/act/service/impl/GroupActInfoServiceImpl.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/GroupActInfoServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/GroupActInfoServiceImpl.java index bbd593b609..fbb0ff629c 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/GroupActInfoServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/GroupActInfoServiceImpl.java @@ -210,7 +210,13 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl Date: Thu, 22 Apr 2021 12:36:09 +0800 Subject: [PATCH 10/15] group_message --- .../src/main/resources/db/migration/V0.0.16__group_act.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/db/migration/V0.0.16__group_act.sql b/epmet-module/resi-group/resi-group-server/src/main/resources/db/migration/V0.0.16__group_act.sql index b0c49d6ce5..6e96b274df 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/resources/db/migration/V0.0.16__group_act.sql +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/db/migration/V0.0.16__group_act.sql @@ -5,6 +5,8 @@ CREATE TABLE `group_message` ( `TYPE` varchar(64) NOT NULL COMMENT '话题:topic; 通知:notice; 活动:act', `MESSAGE_ID` varchar(64) NOT NULL COMMENT '话题id , 通知id,活动id', `PUBLISH_USER_ID` varchar(64) NOT NULL COMMENT '发布人用户id', + `STATUS` varchar(64) NOT NULL COMMENT '话题状态(讨论中 - discussing、 已屏蔽 - hidden、 已关闭 - closed)\r\n活动状态:已发布:published;已取消:canceled;已变更:changed;已关闭:closed\r\n通知:已发布:published', + `OPERATE_TIME` datetime NOT NULL COMMENT '操作时间', `DEL_FLAG` varchar(1) NOT NULL COMMENT '逻辑删除标识', `REVISION` int(11) NOT NULL COMMENT '乐观锁', `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', From a8fb2601446f1103ddc7dd798b988e8d763b72b1 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 22 Apr 2021 13:29:20 +0800 Subject: [PATCH 11/15] group_message --- .../java/com/epmet/resi/group/dto/group/GroupMessageDTO.java | 2 ++ .../epmet/modules/act/service/impl/GroupActInfoServiceImpl.java | 1 + .../java/com/epmet/modules/group/entity/GroupMessageEntity.java | 2 ++ 3 files changed, 5 insertions(+) diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/GroupMessageDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/GroupMessageDTO.java index 06a70d0a40..7678968c5f 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/GroupMessageDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/GroupMessageDTO.java @@ -49,6 +49,8 @@ public class GroupMessageDTO implements Serializable { */ private String gridId; + private String groupId; + /** * 话题:topic; 通知:notice; 活动:act */ diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/GroupActInfoServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/GroupActInfoServiceImpl.java index fbb0ff629c..771435fad6 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/GroupActInfoServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/GroupActInfoServiceImpl.java @@ -207,6 +207,7 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl Date: Thu, 22 Apr 2021 13:29:58 +0800 Subject: [PATCH 12/15] group_message --- .../src/main/resources/db/migration/V0.0.16__group_act.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/db/migration/V0.0.16__group_act.sql b/epmet-module/resi-group/resi-group-server/src/main/resources/db/migration/V0.0.16__group_act.sql index 6e96b274df..819b58e9ee 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/resources/db/migration/V0.0.16__group_act.sql +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/db/migration/V0.0.16__group_act.sql @@ -2,6 +2,7 @@ CREATE TABLE `group_message` ( `ID` varchar(64) NOT NULL COMMENT '主键', `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id', `GRID_ID` varchar(64) NOT NULL COMMENT '网格id', + `GROUP_ID` varchar(64) NOT NULL COMMENT '小组id', `TYPE` varchar(64) NOT NULL COMMENT '话题:topic; 通知:notice; 活动:act', `MESSAGE_ID` varchar(64) NOT NULL COMMENT '话题id , 通知id,活动id', `PUBLISH_USER_ID` varchar(64) NOT NULL COMMENT '发布人用户id', From 812cdc357180f62a4dde73a562422437c91e11a1 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Thu, 22 Apr 2021 13:45:25 +0800 Subject: [PATCH 13/15] =?UTF-8?q?=E5=B0=8F=E7=BB=84=E9=80=9A=E7=9F=A5?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=85=B3=E4=BA=8E=E7=BB=84=E5=86=85=E6=B6=88?= =?UTF-8?q?=E6=81=AF=E8=AE=B0=E5=BD=95=E8=A1=A8=E7=9A=84=E7=BB=B4=E6=8A=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/NoticeServiceImpl.java | 40 +++++++++++++++++-- 1 file changed, 36 insertions(+), 4 deletions(-) diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeServiceImpl.java index bc2636cd51..8b67ddbab7 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeServiceImpl.java @@ -39,7 +39,9 @@ import com.epmet.feign.EpmetMessageOpenFeignClient; import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.modules.constant.UserMessageConstant; +import com.epmet.modules.group.dao.GroupMessageDao; import com.epmet.modules.group.dao.ResiGroupDao; +import com.epmet.modules.group.entity.GroupMessageEntity; import com.epmet.modules.group.entity.ResiGroupEntity; import com.epmet.modules.member.dao.ResiGroupMemberDao; import com.epmet.modules.notice.dao.NoticeAttachmentDao; @@ -111,6 +113,8 @@ public class NoticeServiceImpl extends BaseServiceImpl private NoticeReadRecordService noticeReafdRecordService; @Autowired private NoticeReadRecordDao noticeReadRecordDao; + @Autowired + private GroupMessageDao groupMessageDao; @Override @@ -241,7 +245,18 @@ public class NoticeServiceImpl extends BaseServiceImpl noticeReafdRecordService.insertBatch(reafdRecordList); } - //7.组内成员推送站内信 + //7.组内消息记录表新增数据 + GroupMessageEntity messageEntity = new GroupMessageEntity(); + messageEntity.setCustomerId(resultDTO.getCustomerId()); + messageEntity.setGridId(groupEntity.getGridId()); + messageEntity.setType("notice"); + messageEntity.setMessageId(entity.getId()); + messageEntity.setPublishUserId(entity.getCreatedBy()); + messageEntity.setStatus("published"); + messageEntity.setOperateTime(entity.getChangeTime()); + groupMessageDao.insert(messageEntity); + + //8.组内成员推送站内信 List userMessageFormDTOS = new ArrayList<>(); memberList.forEach(m -> { if (!"".equals(m.getGroupLeaderFlag())) { @@ -362,13 +377,30 @@ public class NoticeServiceImpl extends BaseServiceImpl noticeReafdRecordService.insertBatch(reafdRecordList); } - //7.推送站内信 - //7-1.获取小组信息 + //7.组内消息记录表更新数据 + GroupMessageEntity groupMessage = groupMessageDao.selectByMessageId(formDTO.getNoticeId()); + if(null == groupMessage){ + GroupMessageEntity messageEntity = new GroupMessageEntity(); + messageEntity.setCustomerId(entity.getCustomerId()); + messageEntity.setGridId(entity.getGridId()); + messageEntity.setType("notice"); + messageEntity.setMessageId(entity.getId()); + messageEntity.setPublishUserId(entity.getCreatedBy()); + messageEntity.setStatus("published"); + messageEntity.setOperateTime(entity.getChangeTime()); + groupMessageDao.insert(messageEntity); + }else { + groupMessage.setOperateTime(entity.getChangeTime()); + groupMessageDao.updateById(groupMessage); + } + + //8.推送站内信 + //8-1.获取小组信息 ResiGroupEntity groupEntity = resiGroupDao.selectById(entity.getGroupId()); if (null == groupEntity) { throw new RenException(String.format("保存小组通知,获取小组数据失败,小组Id->", formDTO.getUserId())); } - //7-2.推送站内信信息 + //8-2.推送站内信信息 List userMessageFormDTOS = new ArrayList<>(); memberList.forEach(m -> { if (!"".equals(m.getGroupLeaderFlag())) { From 795a159078ca3a456c7e6ad5f752b1ffb044f10c Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 22 Apr 2021 15:39:56 +0800 Subject: [PATCH 14/15] =?UTF-8?q?=E5=B0=8F=E7=BB=84=E5=8E=86=E5=8F=B2?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=9F=A5=E8=AF=A2=EF=BC=8C=E6=9C=AA=E5=AE=8C?= =?UTF-8?q?=E5=BE=85=E7=BB=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../topic/form/GetPastTopicListV2FormDTO.java | 5 -- .../result/GetPastTopicListV2ResultDTO.java | 4 ++ .../modules/group/dao/GroupMessageDao.java | 11 ++++ .../epmet/modules/group/dao/ResiGroupDao.java | 9 +++ .../service/impl/ResiTopicServiceImpl.java | 43 +++++++++++++- .../epmet/modules/utils/ModuleConstant.java | 5 ++ .../mapper/group/GroupMessageDao.xml | 10 ++++ .../resources/mapper/group/ResiGroupDao.xml | 59 +++++++++++++++++++ 8 files changed, 140 insertions(+), 6 deletions(-) diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/GetPastTopicListV2FormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/GetPastTopicListV2FormDTO.java index ad41e9bf81..4c66b02c47 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/GetPastTopicListV2FormDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/GetPastTopicListV2FormDTO.java @@ -18,11 +18,6 @@ public class GetPastTopicListV2FormDTO implements Serializable { public interface GetPastTopicListV2Form{} - /** - * null默认查询讨论中、已关闭,dicussing讨论中,closed关闭 - */ - private String status; - @NotBlank(message = "小组ID不能为空",groups = GetPastTopicListV2Form.class) private String groupId; diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/GetPastTopicListV2ResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/GetPastTopicListV2ResultDTO.java index fcc28ddec8..d0dbe33963 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/GetPastTopicListV2ResultDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/GetPastTopicListV2ResultDTO.java @@ -1,5 +1,6 @@ package com.epmet.resi.group.dto.topic.result; +import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; import java.io.Serializable; @@ -74,4 +75,7 @@ public class GetPastTopicListV2ResultDTO implements Serializable { * 徽章Url集合 */ private List badgeList; + + @JsonIgnore + private String userId; } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/dao/GroupMessageDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/dao/GroupMessageDao.java index a65949e227..5cd1b0c0a3 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/dao/GroupMessageDao.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/dao/GroupMessageDao.java @@ -20,6 +20,9 @@ package com.epmet.modules.group.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.modules.group.entity.GroupMessageEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 组内消息(话题、通知、活动)记录表 @@ -31,4 +34,12 @@ import org.apache.ibatis.annotations.Mapper; public interface GroupMessageDao extends BaseDao { GroupMessageEntity selectByMessageId(String messageId); + + /** + * @Description 按条件获取分页后的ID + * @Param groupId + * @author zxc + * @date 2021/4/22 下午2:37 + */ + List selectNeedIds(@Param("groupId") String groupId); } \ No newline at end of file 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 928e039190..9429897f97 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 @@ -25,6 +25,7 @@ import com.epmet.resi.group.dto.group.form.*; import com.epmet.resi.group.dto.group.result.*; import com.epmet.resi.group.dto.member.ResiGroupMemberDTO; import com.epmet.resi.group.dto.notice.result.UnReadListResultDTO; +import com.epmet.resi.group.dto.topic.result.GetPastTopicListV2ResultDTO; import com.epmet.resi.group.dto.topic.result.LatestTenResultDTO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -295,4 +296,12 @@ public interface ResiGroupDao extends BaseDao { * @date 2021/4/21 下午5:08 */ List selectUnReadInfos(@Param("ids")List ids); + + /** + * @Description 根据IDs查询 topic,act,notice信息 + * @Param ids + * @author zxc + * @date 2021/4/22 下午2:59 + */ + List getPastTopicListV2ByIds(@Param("ids")List ids); } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java index e08ae50e7f..785545178d 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java @@ -57,6 +57,7 @@ import com.epmet.modules.constant.WxmpSubscribeConstant; import com.epmet.modules.feign.EpmetUserFeignClient; import com.epmet.modules.feign.GovIssueFeignClient; import com.epmet.modules.feign.GovOrgFeignClient; +import com.epmet.modules.group.dao.GroupMessageDao; import com.epmet.modules.group.dao.ResiGroupDao; import com.epmet.modules.group.dao.ResiGroupStatisticalDao; import com.epmet.modules.group.entity.ResiGroupEntity; @@ -183,6 +184,9 @@ public class ResiTopicServiceImpl extends BaseServiceImpl getPastTopicListV2(GetPastTopicListV2FormDTO formDTO) { - return null; + PageInfo pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> groupMessageDao.selectNeedIds(formDTO.getGroupId())); + List ids = pageInfo.getList(); + if (CollectionUtils.isEmpty(ids)){ + return new ArrayList<>(); + } + // 根据IDs查询 topic,act,notice信息 + List infos = resiGroupDao.getPastTopicListV2ByIds(ids); + if (CollectionUtils.isEmpty(infos)){ + return new ArrayList<>(); + } + ResiGroupEntity resiGroup = resiGroupDao.selectById(formDTO.getGroupId()); + List userIds = infos.stream().map(m -> m.getUserId()).collect(Collectors.toList()); + // 用户信息 + List userInfos = this.disPoseUserInfo(resiGroup.getGroupType(), userIds); + // 各字段赋值 + infos.forEach(i -> { + // 用户头像,姓名赋值 + if (!CollectionUtils.isEmpty(userInfos)){ + userInfos.forEach(u -> { + if (i.getUserId().equals(u.getUserId())){ + i.setReleaseUserName(u.getReleaseUserName()); + i.setReleaseUserHeadPhoto(u.getReleaseUserHeadPhoto()); + } + }); + } + // 是否是本人赋值 + i.setReleaseUserFlag(formDTO.getUserId().equals(i.getUserId())); + // 是否转议题赋值 + i.setShiftIssueFlag(StringUtils.isNotEmpty(i.getIssueId())); + if (i.getReleaseUserFlag()==true){ + // 如果此贴是自己发布的,肯定是已读 + i.setReadOrUnRead(ModuleConstant.READ_FLAG_YES); + }else { + // TODO 不是自己发布的 + + } + }); + return infos; } /** diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/utils/ModuleConstant.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/utils/ModuleConstant.java index fa0f11c3c1..e22a1b766a 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/utils/ModuleConstant.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/utils/ModuleConstant.java @@ -397,4 +397,9 @@ public interface ModuleConstant extends Constant { String GET_USER_INFO_ERR = "查询用户信息失败了"; + /** + * 已读 + */ + String READ_FLAG_YES = "read"; + } diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/GroupMessageDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/GroupMessageDao.xml index 1734736f66..00cef75da1 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/GroupMessageDao.xml +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/GroupMessageDao.xml @@ -9,4 +9,14 @@ AND gm.MESSAGE_ID=#{messageId} + + + \ No newline at end of file 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 ea0dd3fac9..d8859c6133 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 @@ -767,4 +767,63 @@ )temp + + + From 469268347e58c6445c73ce8a286412dbd2ad87db Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Thu, 22 Apr 2021 15:58:38 +0800 Subject: [PATCH 15/15] =?UTF-8?q?=E5=9B=A0=E6=96=B0=E5=A2=9E=E7=BB=84?= =?UTF-8?q?=E5=86=85=E6=B6=88=E6=81=AF=E8=AE=B0=E5=BD=95=E8=A1=A8=E5=BC=95?= =?UTF-8?q?=E8=B5=B7=E7=9A=84=E7=A8=8B=E5=BA=8F=E5=8F=98=E5=8A=A8(?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=AF=9D=E9=A2=98=E3=80=81=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=AE=A1=E6=A0=B8=E3=80=81=E7=BB=84=E9=95=BF=E5=AE=A1=E6=A0=B8?= =?UTF-8?q?=E3=80=81=E5=B1=8F=E8=94=BD=E3=80=81=E5=8F=96=E6=B6=88=E5=B1=8F?= =?UTF-8?q?=E8=94=BD=E3=80=81=E5=85=B3=E9=97=AD=E3=80=81=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E7=BB=84=E5=91=98)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/ExitGroupServiceImpl.java | 11 +++++ .../service/impl/NoticeServiceImpl.java | 2 + .../service/impl/ResiTopicServiceImpl.java | 25 ++++++++++ .../service/impl/TopicDraftServiceImpl.java | 49 +++++++++++++------ 4 files changed, 73 insertions(+), 14 deletions(-) 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 index 186531756b..0f627b2a11 100644 --- 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 @@ -11,8 +11,10 @@ import com.epmet.dto.result.UserRoleResultDTO; import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.feign.GovIssueOpenFeignClient; import com.epmet.modules.constant.GroupMemberConstant; +import com.epmet.modules.group.dao.GroupMessageDao; import com.epmet.modules.group.dao.ResiGroupDao; import com.epmet.modules.group.dao.ResiGroupStatisticalDao; +import com.epmet.modules.group.entity.GroupMessageEntity; import com.epmet.modules.group.entity.ResiGroupEntity; import com.epmet.modules.group.entity.ResiGroupStatisticalEntity; import com.epmet.modules.group.redis.ResiGroupRedis; @@ -68,6 +70,8 @@ public class ExitGroupServiceImpl implements ExitGroupService { private ResiGroupRedis resiGroupRedis; @Autowired private ResiGroupDao resiGroupDao; + @Autowired + private GroupMessageDao groupMessageDao; /** * @param formDTO @@ -113,6 +117,13 @@ public class ExitGroupServiceImpl implements ExitGroupService { entity.setOperationReason(GroupMemberConstant.DELETE_MEMBER_REASON); entity.setTopicId(d); list.add(entity); + //2021.4.22 start sun 因业务调整,新增组内消息记录表,话题状态变化时相应的修改数据状态 + GroupMessageEntity groupMessage = groupMessageDao.selectByMessageId(d); + if(null != groupMessage){ + groupMessage.setStatus(TopicConstant.HIDDEN); + groupMessageDao.updateById(groupMessage); + } + //2021.4.22 end sun }); resiTopicOperationService.insertBatch(list); } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeServiceImpl.java index 8b67ddbab7..65a2ecf861 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeServiceImpl.java @@ -249,6 +249,7 @@ public class NoticeServiceImpl extends BaseServiceImpl GroupMessageEntity messageEntity = new GroupMessageEntity(); messageEntity.setCustomerId(resultDTO.getCustomerId()); messageEntity.setGridId(groupEntity.getGridId()); + messageEntity.setGroupId(entity.getGroupId()); messageEntity.setType("notice"); messageEntity.setMessageId(entity.getId()); messageEntity.setPublishUserId(entity.getCreatedBy()); @@ -383,6 +384,7 @@ public class NoticeServiceImpl extends BaseServiceImpl GroupMessageEntity messageEntity = new GroupMessageEntity(); messageEntity.setCustomerId(entity.getCustomerId()); messageEntity.setGridId(entity.getGridId()); + messageEntity.setGroupId(entity.getGroupId()); messageEntity.setType("notice"); messageEntity.setMessageId(entity.getId()); messageEntity.setPublishUserId(entity.getCreatedBy()); diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java index 785545178d..2d37f62fba 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java @@ -60,6 +60,7 @@ import com.epmet.modules.feign.GovOrgFeignClient; import com.epmet.modules.group.dao.GroupMessageDao; import com.epmet.modules.group.dao.ResiGroupDao; import com.epmet.modules.group.dao.ResiGroupStatisticalDao; +import com.epmet.modules.group.entity.GroupMessageEntity; import com.epmet.modules.group.entity.ResiGroupEntity; import com.epmet.modules.group.entity.ResiGroupStatisticalEntity; import com.epmet.modules.group.redis.ResiGroupRedis; @@ -608,6 +609,15 @@ public class ResiTopicServiceImpl extends BaseServiceImpl statisticalWrapper = new QueryWrapper<>(); statisticalWrapper.eq(TopicConstant.RESI_GROUP_ID,topic.getGroupId()); @@ -711,6 +728,14 @@ public class ResiTopicServiceImpl extends BaseServiceImpl(500), namedThreadFactory, new ThreadPoolExecutor.CallerRunsPolicy()); - @Autowired private GovOrgOpenFeignClient govOrgOpenFeignClient; - @Autowired private ResiGroupMemberService resiGroupMemberService; - @Autowired private ResiTopicAttachmentDao resiTopicAttachmentDao; - @Autowired private ResiTopicOperationDao resiTopicOperationDao; - @Autowired private EpmetUserFeignClient epmetUserFeignClient; - @Autowired private ResiGroupDao resiGroupDao; - @Autowired private ResiGroupMemberDao resiGroupMemberDao; - @Autowired private ResiGroupStatisticalDao resiGroupStatisticalDao; - @Autowired private ResiTopicDao resiTopicDao; - @Autowired private ResiGroupRedis resiGroupRedis; - @Autowired private TopicDraftAttachmentService topicDraftAttachmentService; @Autowired @@ -155,6 +146,8 @@ public class TopicDraftServiceImpl extends BaseServiceImpl page(Map params) { @@ -778,6 +771,19 @@ public class TopicDraftServiceImpl extends BaseServiceImpl NumConstant.TEN ? (content.substring(NumConstant.ZERO,NumConstant.TEN) + "…") : content); + breviary.append(content.length() > NumConstant.TEN ? (content.substring(NumConstant.ZERO, NumConstant.TEN) + "…") : content); breviary.append("\""); - }else breviary.append("语音话题"); + } else { + breviary.append("语音话题"); + } sendMqMsg(tokenDto.getUserId(), formDTO.getCustomerId(),draft.getCreatedTime(),resiGroupRedis.get(draft.getGroupId()).getGroupName(),breviary.toString()); + //2021.4.22 start sun 因业务调整,新增组内消息记录表,新增话题时相应的初始数据 + GroupMessageEntity messageEntity = new GroupMessageEntity(); + messageEntity.setCustomerId(formDTO.getCustomerId()); + messageEntity.setGridId(formDTO.getGridId()); + messageEntity.setGroupId(formDTO.getGroupId()); + messageEntity.setType("topic"); + messageEntity.setMessageId(topic.getId()); + messageEntity.setPublishUserId(topic.getCreatedBy()); + messageEntity.setStatus(TopicConstant.PUBLISHMENT); + messageEntity.setOperateTime(null == topic.getCreatedTime() ? currentTime : topic.getCreatedTime()); + groupMessageDao.insert(messageEntity); + //2021.4.22 end sun + } /**