From 78dc00de477ec9681dc10f85d43c1da08e7d0bea Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 16 Apr 2021 18:28:10 +0800 Subject: [PATCH 001/202] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../group/dto/act/ActCategoryDictDTO.java | 102 ++++++++++ .../resi/group/dto/act/ActCommentDTO.java} | 27 ++- .../group/dto/act/ActOperationRecordDTO.java | 99 ++++++++++ .../resi/group/dto/act/ActReadRecordDTO.java | 96 +++++++++ .../resi/group/dto/act/ActSiginInCodeDTO.java | 86 ++++++++ .../group/dto/act/ActSiginInRecordDTO.java | 102 ++++++++++ .../group/dto/act/ActSummaryContentDTO.java | 96 +++++++++ .../resi/group/dto/act/ActSummaryDTO.java | 101 ++++++++++ .../group/dto/act/GroupActContentDTO.java | 96 +++++++++ .../resi/group/dto/act/GroupActInfoDTO.java | 187 ++++++++++++++++++ .../dto/invitation/InvitationRecordDTO.java | 107 ++++++++++ .../controller/ActCategoryDictController.java | 40 ++++ .../act/controller/ActCommentController.java | 40 ++++ .../ActSiginInRecordController.java | 39 ++++ .../act/controller/ActSummaryController.java | 40 ++++ .../controller/GroupActInfoController.java | 39 ++++ .../modules/act/dao/ActCategoryDictDao.java} | 10 +- .../epmet/modules/act/dao/ActCommentDao.java | 33 ++++ .../act/dao/ActOperationRecordDao.java | 33 ++++ .../modules/act/dao/ActReadRecordDao.java | 33 ++++ .../modules/act/dao/ActSiginInCodeDao.java | 33 ++++ .../modules/act/dao/ActSiginInRecordDao.java | 33 ++++ .../modules/act/dao/ActSummaryContentDao.java | 33 ++++ .../epmet/modules/act/dao/ActSummaryDao.java | 33 ++++ .../modules/act/dao/GroupActContentDao.java | 33 ++++ .../modules/act/dao/GroupActInfoDao.java | 33 ++++ .../act/entity/ActCategoryDictEntity.java | 68 +++++++ .../modules/act/entity/ActCommentEntity.java} | 22 +-- .../act/entity/ActOperationRecordEntity.java | 66 +++++++ .../act/entity/ActReadRecordEntity.java | 63 ++++++ .../act/entity/ActSiginInCodeEntity.java | 53 +++++ .../act/entity/ActSiginInRecordEntity.java | 70 +++++++ .../act/entity/ActSummaryContentEntity.java | 63 ++++++ .../modules/act/entity/ActSummaryEntity.java | 68 +++++++ .../act/entity/GroupActContentEntity.java | 63 ++++++ .../act/entity/GroupActInfoEntity.java | 156 +++++++++++++++ .../act/service/ActCategoryDictService.java | 31 +++ .../act/service/ActCommentService.java | 31 +++ .../service/ActOperationRecordService.java | 31 +++ .../act/service/ActReadRecordService.java | 31 +++ .../act/service/ActSiginInCodeService.java | 31 +++ .../act/service/ActSiginInRecordService.java | 31 +++ .../act/service/ActSummaryContentService.java | 31 +++ .../act/service/ActSummaryService.java | 30 +++ .../act/service/GroupActContentService.java | 31 +++ .../act/service/GroupActInfoService.java | 31 +++ .../impl/ActCategoryDictServiceImpl.java | 36 ++++ .../service/impl/ActCommentServiceImpl.java | 36 ++++ .../impl/ActOperationRecordServiceImpl.java | 36 ++++ .../impl/ActReadRecordServiceImpl.java | 36 ++++ .../impl/ActSiginInCodeServiceImpl.java | 36 ++++ .../impl/ActSiginInRecordServiceImpl.java | 36 ++++ .../impl/ActSummaryContentServiceImpl.java | 36 ++++ .../service/impl/ActSummaryServiceImpl.java | 35 ++++ .../impl/GroupActContentServiceImpl.java | 36 ++++ .../service/impl/GroupActInfoServiceImpl.java | 36 ++++ .../InvitationRecordController.java | 40 ++++ .../invitation/dao/InvitationRecordDao.java | 33 ++++ .../entity/InvitationRecordEntity.java | 73 +++++++ .../service/InvitationRecordService.java | 31 +++ .../impl/InvitationRecordServiceImpl.java | 36 ++++ .../mapper/act/ActCategoryDictDao.xml} | 4 +- .../resources/mapper/act/ActCommentDao.xml | 8 + .../mapper/act/ActOperationRecordDao.xml | 8 + .../resources/mapper/act/ActReadRecordDao.xml | 8 + .../mapper/act/ActSiginInCodeDao.xml | 8 + .../mapper/act/ActSiginInRecordDao.xml | 8 + .../mapper/act/ActSummaryContentDao.xml | 8 + .../resources/mapper/act/ActSummaryDao.xml | 8 + .../mapper/act/GroupActContentDao.xml | 8 + .../resources/mapper/act/GroupActInfoDao.xml | 8 + .../mapper/invitation/InvitationRecordDao.xml | 8 + 72 files changed, 3230 insertions(+), 31 deletions(-) create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActCategoryDictDTO.java rename epmet-module/{data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/resigroup/EnterGroupSwitchDTO.java => resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActCommentDTO.java} (79%) create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActOperationRecordDTO.java create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActReadRecordDTO.java create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActSiginInCodeDTO.java create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActSiginInRecordDTO.java create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActSummaryContentDTO.java create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActSummaryDTO.java create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/GroupActContentDTO.java create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/GroupActInfoDTO.java create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/invitation/InvitationRecordDTO.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/ActCategoryDictController.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/ActCommentController.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/ActSiginInRecordController.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/ActSummaryController.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java rename epmet-module/{data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/resigroup/EnterGroupSwitchDao.java => resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActCategoryDictDao.java} (79%) create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActCommentDao.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActOperationRecordDao.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActReadRecordDao.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActSiginInCodeDao.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActSiginInRecordDao.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActSummaryContentDao.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActSummaryDao.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/GroupActContentDao.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/GroupActInfoDao.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActCategoryDictEntity.java rename epmet-module/{data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/resigroup/EnterGroupSwitchEntity.java => resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActCommentEntity.java} (77%) create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActOperationRecordEntity.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActReadRecordEntity.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActSiginInCodeEntity.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActSiginInRecordEntity.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActSummaryContentEntity.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActSummaryEntity.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/GroupActContentEntity.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/GroupActInfoEntity.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActCategoryDictService.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActCommentService.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActOperationRecordService.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActReadRecordService.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSiginInCodeService.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSiginInRecordService.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSummaryContentService.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSummaryService.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/GroupActContentService.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/GroupActInfoService.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActCategoryDictServiceImpl.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActCommentServiceImpl.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActOperationRecordServiceImpl.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActReadRecordServiceImpl.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSiginInCodeServiceImpl.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSiginInRecordServiceImpl.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSummaryContentServiceImpl.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSummaryServiceImpl.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/GroupActContentServiceImpl.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/GroupActInfoServiceImpl.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/controller/InvitationRecordController.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/dao/InvitationRecordDao.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/entity/InvitationRecordEntity.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/service/InvitationRecordService.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/service/impl/InvitationRecordServiceImpl.java rename epmet-module/{data-aggregator/data-aggregator-server/src/main/resources/mapper/resigroup/EnterGroupSwitchDao.xml => resi-group/resi-group-server/src/main/resources/mapper/act/ActCategoryDictDao.xml} (63%) create mode 100644 epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActCommentDao.xml create mode 100644 epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActOperationRecordDao.xml create mode 100644 epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActReadRecordDao.xml create mode 100644 epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActSiginInCodeDao.xml create mode 100644 epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActSiginInRecordDao.xml create mode 100644 epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActSummaryContentDao.xml create mode 100644 epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActSummaryDao.xml create mode 100644 epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/GroupActContentDao.xml create mode 100644 epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/GroupActInfoDao.xml create mode 100644 epmet-module/resi-group/resi-group-server/src/main/resources/mapper/invitation/InvitationRecordDao.xml diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActCategoryDictDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActCategoryDictDTO.java new file mode 100644 index 0000000000..b8890d4368 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActCategoryDictDTO.java @@ -0,0 +1,102 @@ +/** + * 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.act; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 活动类别字典 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-16 + */ +@Data +public class ActCategoryDictDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户id + */ + private String customerId; + + /** + * 类别编码 + */ + private String categoryCode; + + /** + * 活动类别名称;eg:支部建设、联建共建 + */ + private String categoryName; + + /** + * 等级1,2...... + */ + private Integer level; + + /** + * 排序 + */ + private Integer sort; + + /** + * 上级类别编码 + */ + private String parentCode; + + /** + * 逻辑删除标识 + */ + 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/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/resigroup/EnterGroupSwitchDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActCommentDTO.java similarity index 79% rename from epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/resigroup/EnterGroupSwitchDTO.java rename to epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActCommentDTO.java index 3cd065cf39..fec7eb8808 100644 --- a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/resigroup/EnterGroupSwitchDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActCommentDTO.java @@ -15,22 +15,21 @@ * along with this program. If not, see . */ -package com.epmet.dataaggre.dto.resigroup; - -import lombok.Data; +package com.epmet.resi.group.dto.act; import java.io.Serializable; import java.util.Date; +import lombok.Data; /** - * + * 活动评论表 * * @author generator generator@elink-cn.com - * @since v1.0.0 2020-12-25 + * @since v1.0.0 2021-04-16 */ @Data -public class EnterGroupSwitchDTO implements Serializable { +public class ActCommentDTO implements Serializable { private static final long serialVersionUID = 1L; @@ -45,19 +44,19 @@ public class EnterGroupSwitchDTO implements Serializable { private String customerId; /** - * 小组所属网格id + * group_act_info.id */ - private String gridId; + private String groupActId; /** - * 小组id + * 评论人id */ - private String groupId; + private String commentUserId; /** - * open开启; close关闭 + * 评论内容;目前限制500字 */ - private String auditSwitch; + private String commentContent; /** * 删除标记 0:未删除,1:已删除 @@ -70,12 +69,12 @@ public class EnterGroupSwitchDTO implements Serializable { private Integer revision; /** - * 创建人(customer_user.id) + * 创建人,评论人Id,来自user */ private String createdBy; /** - * 创建时间(邀请时间) + * 创建时间 */ private Date createdTime; diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActOperationRecordDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActOperationRecordDTO.java new file mode 100644 index 0000000000..08c8a4a729 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActOperationRecordDTO.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.resi.group.dto.act; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 活动操作表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-16 + */ +@Data +public class ActOperationRecordDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键(签到成功后插入此表) + */ + private String id; + + /** + * 客户id + */ + private String customerId; + + /** + * group_act_info.id + */ + private String groupActId; + + /** + * 操作人id + */ + private String operateUserId; + + /** + * 操作类型:发布:publish; +取消:cancel; +变更:change; +关闭:close + */ + private String operationType; + + /** + * 备注;取消理由 + */ + private String note; + + /** + * 逻辑删除标识 + */ + 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-client/src/main/java/com/epmet/resi/group/dto/act/ActReadRecordDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActReadRecordDTO.java new file mode 100644 index 0000000000..78bbec055c --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActReadRecordDTO.java @@ -0,0 +1,96 @@ +/** + * 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.act; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 活动已读记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-16 + */ +@Data +public class ActReadRecordDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键(发布活动后后台自动初始化记录) + */ + private String id; + + /** + * 客户id + */ + private String customerId; + + /** + * group_act_info.id + */ + private String groupActId; + + /** + * 已读: read未读:un_read;查看活动详情后修改此表,或者插入一条新的已读记录 + */ + private String read; + + /** + * 用户id + */ + private String userId; + + /** + * yes:应读;no: 新入群的人已读 + */ + private String shouldBeRead; + + /** + * 删除标识 0.未删除 1.已删除 + */ + private Integer 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-client/src/main/java/com/epmet/resi/group/dto/act/ActSiginInCodeDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActSiginInCodeDTO.java new file mode 100644 index 0000000000..7d42b43e65 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActSiginInCodeDTO.java @@ -0,0 +1,86 @@ +/** + * 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.act; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 组织活动签到码 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-16 + */ +@Data +public class ActSiginInCodeDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户id + */ + private String customerId; + + /** + * group_act_info.id + */ + private String groupActId; + + /** + * 签到码url + */ + private String url; + + /** + * 删除标志 + */ + 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-client/src/main/java/com/epmet/resi/group/dto/act/ActSiginInRecordDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActSiginInRecordDTO.java new file mode 100644 index 0000000000..7e002c177f --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActSiginInRecordDTO.java @@ -0,0 +1,102 @@ +/** + * 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.act; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +/** + * 组织活动签到记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-16 + */ +@Data +public class ActSiginInRecordDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键(签到成功后插入此表) + */ + private String id; + + /** + * 客户id + */ + private String customerId; + + /** + * group_act_info.id + */ + private String groupActId; + + /** + * 签到用户id + */ + private String siginUserId; + + /** + * 签到地点 + */ + private String siginInAddress; + + /** + * 签到地点-经度 + */ + private BigDecimal longitude; + + /** + * 签到地点-纬度 + */ + private BigDecimal latitude; + + /** + * 逻辑删除标识 + */ + 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-client/src/main/java/com/epmet/resi/group/dto/act/ActSummaryContentDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActSummaryContentDTO.java new file mode 100644 index 0000000000..eca0cc8fc2 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActSummaryContentDTO.java @@ -0,0 +1,96 @@ +/** + * 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.act; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 活动总结内容 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-16 + */ +@Data +public class ActSummaryContentDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户id + */ + private String customerId; + + /** + * group_act_info.id + */ + private String groupActId; + + /** + * 总结内容 + */ + private String content; + + /** + * 内容类型: 文字:text;图片:img + */ + private String contentType; + + /** + * 内容顺序 从1开始 + */ + private Integer sort; + + /** + * 删除标识 0.未删除 1.已删除 + */ + private Integer 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-client/src/main/java/com/epmet/resi/group/dto/act/ActSummaryDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActSummaryDTO.java new file mode 100644 index 0000000000..60d56e9ee8 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActSummaryDTO.java @@ -0,0 +1,101 @@ +/** + * 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.act; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 活动总结 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-16 + */ +@Data +public class ActSummaryDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键(确认提交后插入此表) + */ + private String id; + + /** + * 客户id + */ + private String customerId; + + /** + * group_act_info.id + */ + private String groupActId; + + /** + * 应参加人数:来源于group_act_info + */ + private Integer shouldAttend; + + /** + * 已签到人数 + */ + private Integer siginInNum; + + /** + * 已签到人员姓名列表、分隔 + */ + private String signedInUsers; + + /** + * 填写总结的人 + */ + private String userId; + + /** + * 删除标识 0.未删除 1.已删除 + */ + private Integer 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-client/src/main/java/com/epmet/resi/group/dto/act/GroupActContentDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/GroupActContentDTO.java new file mode 100644 index 0000000000..65ce8cf5e8 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/GroupActContentDTO.java @@ -0,0 +1,96 @@ +/** + * 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.act; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 组织活动内容 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-16 + */ +@Data +public class GroupActContentDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户id + */ + private String customerId; + + /** + * group_act_info.id + */ + private String groupActId; + + /** + * 活动内容 + */ + private String content; + + /** + * 内容类型: 文字:text;图片:img + */ + private String contentType; + + /** + * 内容顺序 从1开始 + */ + private Integer sort; + + /** + * 删除标识 0.未删除 1.已删除 + */ + private Integer 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-client/src/main/java/com/epmet/resi/group/dto/act/GroupActInfoDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/GroupActInfoDTO.java new file mode 100644 index 0000000000..f34bc37bc3 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/GroupActInfoDTO.java @@ -0,0 +1,187 @@ +/** + * 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.act; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * 组织活动信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-16 + */ +@Data +public class GroupActInfoDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户id + */ + private String customerId; + + /** + * 小组id + */ + private String groupId; + + /** + * 小组所属的网格id + */ + private String gridId; + + /** + * 网格所属的组织id + */ + private String agencyId; + + /** + * 网格的所有上级id + */ + private String gridPids; + + /** + * 活动标题;需内容审核 + */ + private String title; + + /** + * 活动时间 + */ + private Date startTime; + + /** + * 活动所属类别编码 + */ + private String categoryCode; + + /** + * 上级类别编码 + */ + private String parentCode; + + /** + * 活动类别名称;eg:支部建设-三会一课 + */ + private String allCategoryName; + + /** + * 活动地点 + */ + private String address; + + /** + * 活动地点-经度 + */ + private BigDecimal longitude; + + /** + * 活动地点-纬度 + */ + private BigDecimal latitude; + + /** + * 应参加人数组长填入;此列也是应签到人数; + */ + private Integer shouldAttend; + + /** + * 活动状态:已发布:published;已取消:canceled;已变更:changed;已关闭:closed + */ + private String status; + + /** + * 最后一次编辑时间;首次发布与CREATED_TIME一致 + */ + private Date changedTime; + + /** + * 签到开始时间 + */ + private Date siginInStartTime; + + /** + * 签到截止时间 + */ + private Date siginInEndTime; + + /** + * 是否填写总结?1:已填写;0:未填写 + */ + private Integer summaryFlag; + + /** + * 已签到人数(有人签到自动+1) + */ + private Integer siginedInNum; + + /** + * 取消时间 + */ + private Date canceldTime; + + /** + * 关闭时间 + */ + private Date closedTime; + + /** + * 活动发布人用户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-client/src/main/java/com/epmet/resi/group/dto/invitation/InvitationRecordDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/invitation/InvitationRecordDTO.java new file mode 100644 index 0000000000..754fb585bd --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/invitation/InvitationRecordDTO.java @@ -0,0 +1,107 @@ +/** + * 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.invitation; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 分享记录(话题、通知...后续支持增加) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-16 + */ +@Data +public class InvitationRecordDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户id + */ + private String customerId; + + /** + * 小组所属的网格id + */ + private String gridId; + + /** + * 小组id + */ + private String groupId; + + /** + * act:活动;notice:通知 + */ + private String sourceType; + + /** + * 活动id,或者通知id.... + */ + private String sourceId; + + /** + * 分享人id + */ + private String shareUserId; + + /** + * 分享内容 + */ + private String inviteContent; + + /** + * 删除标识 0.未删除 1.已删除 + */ + private Integer 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/act/controller/ActCategoryDictController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/ActCategoryDictController.java new file mode 100644 index 0000000000..b7d4908d91 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/ActCategoryDictController.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.act.controller; + +import com.epmet.modules.act.service.ActCategoryDictService; +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-04-16 + */ +@RestController +@RequestMapping("actdict") +public class ActCategoryDictController { + + @Autowired + private ActCategoryDictService actCategoryDictService; + + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/ActCommentController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/ActCommentController.java new file mode 100644 index 0000000000..331cf578ce --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/ActCommentController.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.act.controller; + +import com.epmet.modules.act.service.ActCommentService; +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-04-16 + */ +@RestController +@RequestMapping("actcomment") +public class ActCommentController { + + @Autowired + private ActCommentService actCommentService; + + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/ActSiginInRecordController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/ActSiginInRecordController.java new file mode 100644 index 0000000000..40234f9352 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/ActSiginInRecordController.java @@ -0,0 +1,39 @@ +/** + * 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.act.controller; + +import com.epmet.modules.act.service.ActSiginInRecordService; +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-04-16 + */ +@RestController +@RequestMapping("actsigin") +public class ActSiginInRecordController { + + @Autowired + private ActSiginInRecordService actSiginInRecordService; + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/ActSummaryController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/ActSummaryController.java new file mode 100644 index 0000000000..c9a9568799 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/ActSummaryController.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.act.controller; + +import com.epmet.modules.act.service.ActSummaryService; +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-04-16 + */ +@RestController +@RequestMapping("actsummary") +public class ActSummaryController { + + @Autowired + private ActSummaryService actSummaryService; + + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java new file mode 100644 index 0000000000..dfd248aad9 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java @@ -0,0 +1,39 @@ +/** + * 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.act.controller; + +import com.epmet.modules.act.service.GroupActInfoService; +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-04-16 + */ +@RestController +@RequestMapping("act") +public class GroupActInfoController { + + @Autowired + private GroupActInfoService groupActInfoService; + +} \ No newline at end of file diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/resigroup/EnterGroupSwitchDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActCategoryDictDao.java similarity index 79% rename from epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/resigroup/EnterGroupSwitchDao.java rename to epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActCategoryDictDao.java index fa28a17e4a..953256d85c 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/resigroup/EnterGroupSwitchDao.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActCategoryDictDao.java @@ -15,19 +15,19 @@ * along with this program. If not, see . */ -package com.epmet.dataaggre.dao.resigroup; +package com.epmet.modules.act.dao; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.dataaggre.entity.resigroup.EnterGroupSwitchEntity; +import com.epmet.modules.act.entity.ActCategoryDictEntity; import org.apache.ibatis.annotations.Mapper; /** - * + * 活动类别字典 * * @author generator generator@elink-cn.com - * @since v1.0.0 2020-12-25 + * @since v1.0.0 2021-04-16 */ @Mapper -public interface EnterGroupSwitchDao extends BaseDao { +public interface ActCategoryDictDao extends BaseDao { } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActCommentDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActCommentDao.java new file mode 100644 index 0000000000..93a72a4913 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActCommentDao.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.act.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.modules.act.entity.ActCommentEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 活动评论表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-16 + */ +@Mapper +public interface ActCommentDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActOperationRecordDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActOperationRecordDao.java new file mode 100644 index 0000000000..aa37d62b60 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActOperationRecordDao.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.act.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.modules.act.entity.ActOperationRecordEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 活动操作表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-16 + */ +@Mapper +public interface ActOperationRecordDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActReadRecordDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActReadRecordDao.java new file mode 100644 index 0000000000..7627bf30d3 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActReadRecordDao.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.act.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.modules.act.entity.ActReadRecordEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 活动已读记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-16 + */ +@Mapper +public interface ActReadRecordDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActSiginInCodeDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActSiginInCodeDao.java new file mode 100644 index 0000000000..e588c7be80 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActSiginInCodeDao.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.act.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.modules.act.entity.ActSiginInCodeEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 组织活动签到码 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-16 + */ +@Mapper +public interface ActSiginInCodeDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActSiginInRecordDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActSiginInRecordDao.java new file mode 100644 index 0000000000..8ebfa22ce2 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActSiginInRecordDao.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.act.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.modules.act.entity.ActSiginInRecordEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 组织活动签到记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-16 + */ +@Mapper +public interface ActSiginInRecordDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActSummaryContentDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActSummaryContentDao.java new file mode 100644 index 0000000000..146c31c225 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActSummaryContentDao.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.act.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.modules.act.entity.ActSummaryContentEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 活动总结内容 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-16 + */ +@Mapper +public interface ActSummaryContentDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActSummaryDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActSummaryDao.java new file mode 100644 index 0000000000..315c124d3f --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActSummaryDao.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.act.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.modules.act.entity.ActSummaryEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 活动总结 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-16 + */ +@Mapper +public interface ActSummaryDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/GroupActContentDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/GroupActContentDao.java new file mode 100644 index 0000000000..7f3b3129ee --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/GroupActContentDao.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.act.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.modules.act.entity.GroupActContentEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 组织活动内容 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-16 + */ +@Mapper +public interface GroupActContentDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/GroupActInfoDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/GroupActInfoDao.java new file mode 100644 index 0000000000..85f243e608 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/GroupActInfoDao.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.act.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.modules.act.entity.GroupActInfoEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 组织活动信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-16 + */ +@Mapper +public interface GroupActInfoDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActCategoryDictEntity.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActCategoryDictEntity.java new file mode 100644 index 0000000000..5fff3d4a4a --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActCategoryDictEntity.java @@ -0,0 +1,68 @@ +/** + * 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.act.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-16 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("act_category_dict") +public class ActCategoryDictEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 类别编码 + */ + private String categoryCode; + + /** + * 活动类别名称;eg:支部建设、联建共建 + */ + private String categoryName; + + /** + * 等级1,2...... + */ + private Integer level; + + /** + * 排序 + */ + private Integer sort; + + /** + * 上级类别编码 + */ + private String parentCode; + +} diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/resigroup/EnterGroupSwitchEntity.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActCommentEntity.java similarity index 77% rename from epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/resigroup/EnterGroupSwitchEntity.java rename to epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActCommentEntity.java index 998b777710..3871eaa1a1 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/resigroup/EnterGroupSwitchEntity.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActCommentEntity.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.dataaggre.entity.resigroup; +package com.epmet.modules.act.entity; import com.baomidou.mybatisplus.annotation.TableName; import com.epmet.commons.mybatis.entity.BaseEpmetEntity; @@ -23,15 +23,15 @@ import lombok.Data; import lombok.EqualsAndHashCode; /** - * + * 活动评论表 * * @author generator generator@elink-cn.com - * @since v1.0.0 2020-12-25 + * @since v1.0.0 2021-04-16 */ @Data @EqualsAndHashCode(callSuper=false) -@TableName("enter_group_switch") -public class EnterGroupSwitchEntity extends BaseEpmetEntity { +@TableName("act_comment") +public class ActCommentEntity extends BaseEpmetEntity { private static final long serialVersionUID = 1L; @@ -41,18 +41,18 @@ public class EnterGroupSwitchEntity extends BaseEpmetEntity { private String customerId; /** - * 小组所属网格id + * group_act_info.id */ - private String gridId; + private String groupActId; /** - * 小组id + * 评论人id */ - private String groupId; + private String commentUserId; /** - * open开启; close关闭 + * 评论内容;目前限制500字 */ - private String auditSwitch; + private String commentContent; } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActOperationRecordEntity.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActOperationRecordEntity.java new file mode 100644 index 0000000000..ae49d5bbf1 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActOperationRecordEntity.java @@ -0,0 +1,66 @@ +/** + * 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.act.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-16 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("act_operation_record") +public class ActOperationRecordEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * group_act_info.id + */ + private String groupActId; + + /** + * 操作人id + */ + private String operateUserId; + + /** + * 操作类型:发布:publish; +取消:cancel; +变更:change; +关闭:close + */ + private String operationType; + + /** + * 备注;取消理由 + */ + private String note; + +} diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActReadRecordEntity.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActReadRecordEntity.java new file mode 100644 index 0000000000..ad7809400d --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActReadRecordEntity.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.act.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-16 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("act_read_record") +public class ActReadRecordEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * group_act_info.id + */ + private String groupActId; + + /** + * 已读: read未读:un_read;查看活动详情后修改此表,或者插入一条新的已读记录 + */ + private String read; + + /** + * 用户id + */ + private String userId; + + /** + * yes:应读;no: 新入群的人已读 + */ + private String shouldBeRead; + +} diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActSiginInCodeEntity.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActSiginInCodeEntity.java new file mode 100644 index 0000000000..154e7a2f31 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActSiginInCodeEntity.java @@ -0,0 +1,53 @@ +/** + * 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.act.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-16 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("act_sigin_in_code") +public class ActSiginInCodeEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * group_act_info.id + */ + private String groupActId; + + /** + * 签到码url + */ + private String url; + +} diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActSiginInRecordEntity.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActSiginInRecordEntity.java new file mode 100644 index 0000000000..251f5ca3a9 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActSiginInRecordEntity.java @@ -0,0 +1,70 @@ +/** + * 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.act.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; + +/** + * 组织活动签到记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-16 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("act_sigin_in_record") +public class ActSiginInRecordEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * group_act_info.id + */ + private String groupActId; + + /** + * 签到用户id + */ + private String siginUserId; + + /** + * 签到地点 + */ + private String siginInAddress; + + /** + * 签到地点-经度 + */ + private BigDecimal longitude; + + /** + * 签到地点-纬度 + */ + private BigDecimal latitude; + +} diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActSummaryContentEntity.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActSummaryContentEntity.java new file mode 100644 index 0000000000..74855472f6 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActSummaryContentEntity.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.act.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-16 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("act_summary_content") +public class ActSummaryContentEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * group_act_info.id + */ + private String groupActId; + + /** + * 总结内容 + */ + private String content; + + /** + * 内容类型: 文字:text;图片:img + */ + private String contentType; + + /** + * 内容顺序 从1开始 + */ + private Integer sort; + +} diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActSummaryEntity.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActSummaryEntity.java new file mode 100644 index 0000000000..5fb0c98015 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActSummaryEntity.java @@ -0,0 +1,68 @@ +/** + * 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.act.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-16 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("act_summary") +public class ActSummaryEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * group_act_info.id + */ + private String groupActId; + + /** + * 应参加人数:来源于group_act_info + */ + private Integer shouldAttend; + + /** + * 已签到人数 + */ + private Integer siginInNum; + + /** + * 已签到人员姓名列表、分隔 + */ + private String signedInUsers; + + /** + * 填写总结的人 + */ + private String userId; + +} diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/GroupActContentEntity.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/GroupActContentEntity.java new file mode 100644 index 0000000000..9a43b20cea --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/GroupActContentEntity.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.act.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-16 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("group_act_content") +public class GroupActContentEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * group_act_info.id + */ + private String groupActId; + + /** + * 活动内容 + */ + private String content; + + /** + * 内容类型: 文字:text;图片:img + */ + private String contentType; + + /** + * 内容顺序 从1开始 + */ + private Integer sort; + +} diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/GroupActInfoEntity.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/GroupActInfoEntity.java new file mode 100644 index 0000000000..8edbccd090 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/GroupActInfoEntity.java @@ -0,0 +1,156 @@ +/** + * 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.act.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 组织活动信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-16 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("group_act_info") +public class GroupActInfoEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 小组id + */ + private String groupId; + + /** + * 小组所属的网格id + */ + private String gridId; + + /** + * 网格所属的组织id + */ + private String agencyId; + + /** + * 网格的所有上级id + */ + private String gridPids; + + /** + * 活动标题;需内容审核 + */ + private String title; + + /** + * 活动时间 + */ + private Date startTime; + + /** + * 活动所属类别编码 + */ + private String categoryCode; + + /** + * 上级类别编码 + */ + private String parentCode; + + /** + * 活动类别名称;eg:支部建设-三会一课 + */ + private String allCategoryName; + + /** + * 活动地点 + */ + private String address; + + /** + * 活动地点-经度 + */ + private BigDecimal longitude; + + /** + * 活动地点-纬度 + */ + private BigDecimal latitude; + + /** + * 应参加人数组长填入;此列也是应签到人数; + */ + private Integer shouldAttend; + + /** + * 活动状态:已发布:published;已取消:canceled;已变更:changed;已关闭:closed + */ + private String status; + + /** + * 最后一次编辑时间;首次发布与CREATED_TIME一致 + */ + private Date changedTime; + + /** + * 签到开始时间 + */ + private Date siginInStartTime; + + /** + * 签到截止时间 + */ + private Date siginInEndTime; + + /** + * 是否填写总结?1:已填写;0:未填写 + */ + private Integer summaryFlag; + + /** + * 已签到人数(有人签到自动+1) + */ + private Integer siginedInNum; + + /** + * 取消时间 + */ + private Date canceldTime; + + /** + * 关闭时间 + */ + private Date closedTime; + + /** + * 活动发布人用户id + */ + private String publishUserId; + +} diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActCategoryDictService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActCategoryDictService.java new file mode 100644 index 0000000000..5531847600 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActCategoryDictService.java @@ -0,0 +1,31 @@ +/** + * 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.act.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.modules.act.entity.ActCategoryDictEntity; + +/** + * 活动类别字典 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-16 + */ +public interface ActCategoryDictService extends BaseService { + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActCommentService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActCommentService.java new file mode 100644 index 0000000000..e8da2bae21 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActCommentService.java @@ -0,0 +1,31 @@ +/** + * 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.act.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.modules.act.entity.ActCommentEntity; + +/** + * 活动评论表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-16 + */ +public interface ActCommentService extends BaseService { + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActOperationRecordService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActOperationRecordService.java new file mode 100644 index 0000000000..dc2303e2f7 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActOperationRecordService.java @@ -0,0 +1,31 @@ +/** + * 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.act.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.modules.act.entity.ActOperationRecordEntity; + +/** + * 活动操作表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-16 + */ +public interface ActOperationRecordService extends BaseService { + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActReadRecordService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActReadRecordService.java new file mode 100644 index 0000000000..71bdc78d93 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActReadRecordService.java @@ -0,0 +1,31 @@ +/** + * 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.act.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.modules.act.entity.ActReadRecordEntity; + +/** + * 活动已读记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-16 + */ +public interface ActReadRecordService extends BaseService { + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSiginInCodeService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSiginInCodeService.java new file mode 100644 index 0000000000..99d562ee52 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSiginInCodeService.java @@ -0,0 +1,31 @@ +/** + * 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.act.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.modules.act.entity.ActSiginInCodeEntity; + +/** + * 组织活动签到码 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-16 + */ +public interface ActSiginInCodeService extends BaseService { + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSiginInRecordService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSiginInRecordService.java new file mode 100644 index 0000000000..b3d9c81bd6 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSiginInRecordService.java @@ -0,0 +1,31 @@ +/** + * 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.act.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.modules.act.entity.ActSiginInRecordEntity; + +/** + * 组织活动签到记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-16 + */ +public interface ActSiginInRecordService extends BaseService { + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSummaryContentService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSummaryContentService.java new file mode 100644 index 0000000000..e23ce2919b --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSummaryContentService.java @@ -0,0 +1,31 @@ +/** + * 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.act.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.modules.act.entity.ActSummaryContentEntity; + +/** + * 活动总结内容 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-16 + */ +public interface ActSummaryContentService extends BaseService { + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSummaryService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSummaryService.java new file mode 100644 index 0000000000..d3c987bed7 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSummaryService.java @@ -0,0 +1,30 @@ +/** + * 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.act.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.modules.act.entity.ActSummaryEntity; + +/** + * 活动总结 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-16 + */ +public interface ActSummaryService extends BaseService { +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/GroupActContentService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/GroupActContentService.java new file mode 100644 index 0000000000..7d45bd0871 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/GroupActContentService.java @@ -0,0 +1,31 @@ +/** + * 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.act.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.modules.act.entity.GroupActContentEntity; + +/** + * 组织活动内容 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-16 + */ +public interface GroupActContentService extends BaseService { + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/GroupActInfoService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/GroupActInfoService.java new file mode 100644 index 0000000000..1a13bac8e8 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/GroupActInfoService.java @@ -0,0 +1,31 @@ +/** + * 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.act.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.modules.act.entity.GroupActInfoEntity; + +/** + * 组织活动信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-16 + */ +public interface GroupActInfoService extends BaseService { + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActCategoryDictServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActCategoryDictServiceImpl.java new file mode 100644 index 0000000000..0234447876 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActCategoryDictServiceImpl.java @@ -0,0 +1,36 @@ +/** + * 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.act.service.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.modules.act.dao.ActCategoryDictDao; +import com.epmet.modules.act.entity.ActCategoryDictEntity; +import com.epmet.modules.act.service.ActCategoryDictService; +import org.springframework.stereotype.Service; + +/** + * 活动类别字典 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-16 + */ +@Service +public class ActCategoryDictServiceImpl extends BaseServiceImpl implements ActCategoryDictService { + + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActCommentServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActCommentServiceImpl.java new file mode 100644 index 0000000000..6f4ea05296 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActCommentServiceImpl.java @@ -0,0 +1,36 @@ +/** + * 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.act.service.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.modules.act.dao.ActCommentDao; +import com.epmet.modules.act.entity.ActCommentEntity; +import com.epmet.modules.act.service.ActCommentService; +import org.springframework.stereotype.Service; + +/** + * 活动评论表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-16 + */ +@Service +public class ActCommentServiceImpl extends BaseServiceImpl implements ActCommentService { + + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActOperationRecordServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActOperationRecordServiceImpl.java new file mode 100644 index 0000000000..3809653dc5 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActOperationRecordServiceImpl.java @@ -0,0 +1,36 @@ +/** + * 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.act.service.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.modules.act.dao.ActOperationRecordDao; +import com.epmet.modules.act.entity.ActOperationRecordEntity; +import com.epmet.modules.act.service.ActOperationRecordService; +import org.springframework.stereotype.Service; + +/** + * 活动操作表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-16 + */ +@Service +public class ActOperationRecordServiceImpl extends BaseServiceImpl implements ActOperationRecordService { + + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActReadRecordServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActReadRecordServiceImpl.java new file mode 100644 index 0000000000..e264402251 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActReadRecordServiceImpl.java @@ -0,0 +1,36 @@ +/** + * 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.act.service.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.modules.act.dao.ActReadRecordDao; +import com.epmet.modules.act.entity.ActReadRecordEntity; +import com.epmet.modules.act.service.ActReadRecordService; +import org.springframework.stereotype.Service; + +/** + * 活动已读记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-16 + */ +@Service +public class ActReadRecordServiceImpl extends BaseServiceImpl implements ActReadRecordService { + + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSiginInCodeServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSiginInCodeServiceImpl.java new file mode 100644 index 0000000000..632f271ed3 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSiginInCodeServiceImpl.java @@ -0,0 +1,36 @@ +/** + * 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.act.service.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.modules.act.dao.ActSiginInCodeDao; +import com.epmet.modules.act.entity.ActSiginInCodeEntity; +import com.epmet.modules.act.service.ActSiginInCodeService; +import org.springframework.stereotype.Service; + +/** + * 组织活动签到码 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-16 + */ +@Service +public class ActSiginInCodeServiceImpl extends BaseServiceImpl implements ActSiginInCodeService { + + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSiginInRecordServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSiginInRecordServiceImpl.java new file mode 100644 index 0000000000..7daa9ce36e --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSiginInRecordServiceImpl.java @@ -0,0 +1,36 @@ +/** + * 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.act.service.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.modules.act.dao.ActSiginInRecordDao; +import com.epmet.modules.act.entity.ActSiginInRecordEntity; +import com.epmet.modules.act.service.ActSiginInRecordService; +import org.springframework.stereotype.Service; + +/** + * 组织活动签到记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-16 + */ +@Service +public class ActSiginInRecordServiceImpl extends BaseServiceImpl implements ActSiginInRecordService { + + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSummaryContentServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSummaryContentServiceImpl.java new file mode 100644 index 0000000000..df7187c1c7 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSummaryContentServiceImpl.java @@ -0,0 +1,36 @@ +/** + * 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.act.service.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.modules.act.dao.ActSummaryContentDao; +import com.epmet.modules.act.entity.ActSummaryContentEntity; +import com.epmet.modules.act.service.ActSummaryContentService; +import org.springframework.stereotype.Service; + +/** + * 活动总结内容 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-16 + */ +@Service +public class ActSummaryContentServiceImpl extends BaseServiceImpl implements ActSummaryContentService { + + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSummaryServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSummaryServiceImpl.java new file mode 100644 index 0000000000..6cd4a741d8 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSummaryServiceImpl.java @@ -0,0 +1,35 @@ +/** + * 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.act.service.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.modules.act.dao.ActSummaryDao; +import com.epmet.modules.act.entity.ActSummaryEntity; +import com.epmet.modules.act.service.ActSummaryService; +import org.springframework.stereotype.Service; + +/** + * 活动总结 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-16 + */ +@Service +public class ActSummaryServiceImpl extends BaseServiceImpl implements ActSummaryService { + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/GroupActContentServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/GroupActContentServiceImpl.java new file mode 100644 index 0000000000..2d22dc91d8 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/GroupActContentServiceImpl.java @@ -0,0 +1,36 @@ +/** + * 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.act.service.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.modules.act.dao.GroupActContentDao; +import com.epmet.modules.act.entity.GroupActContentEntity; +import com.epmet.modules.act.service.GroupActContentService; +import org.springframework.stereotype.Service; + +/** + * 组织活动内容 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-16 + */ +@Service +public class GroupActContentServiceImpl extends BaseServiceImpl implements GroupActContentService { + + +} \ No newline at end of file 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 new file mode 100644 index 0000000000..12b2186419 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/GroupActInfoServiceImpl.java @@ -0,0 +1,36 @@ +/** + * 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.act.service.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.modules.act.dao.GroupActInfoDao; +import com.epmet.modules.act.entity.GroupActInfoEntity; +import com.epmet.modules.act.service.GroupActInfoService; +import org.springframework.stereotype.Service; + +/** + * 组织活动信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-16 + */ +@Service +public class GroupActInfoServiceImpl extends BaseServiceImpl implements GroupActInfoService { + + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/controller/InvitationRecordController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/controller/InvitationRecordController.java new file mode 100644 index 0000000000..71e713a734 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/controller/InvitationRecordController.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.invitation.controller; + +import com.epmet.modules.invitation.service.InvitationRecordService; +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-04-16 + */ +@RestController +@RequestMapping("invitationrecord") +public class InvitationRecordController { + + @Autowired + private InvitationRecordService invitationRecordService; + + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/dao/InvitationRecordDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/dao/InvitationRecordDao.java new file mode 100644 index 0000000000..607c4820f9 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/dao/InvitationRecordDao.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.invitation.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.modules.invitation.entity.InvitationRecordEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 分享记录(话题、通知...后续支持增加) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-16 + */ +@Mapper +public interface InvitationRecordDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/entity/InvitationRecordEntity.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/entity/InvitationRecordEntity.java new file mode 100644 index 0000000000..d13568a121 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/entity/InvitationRecordEntity.java @@ -0,0 +1,73 @@ +/** + * 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.invitation.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-16 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("invitation_record") +public class InvitationRecordEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 小组所属的网格id + */ + private String gridId; + + /** + * 小组id + */ + private String groupId; + + /** + * act:活动;notice:通知 + */ + private String sourceType; + + /** + * 活动id,或者通知id.... + */ + private String sourceId; + + /** + * 分享人id + */ + private String shareUserId; + + /** + * 分享内容 + */ + private String inviteContent; + +} diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/service/InvitationRecordService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/service/InvitationRecordService.java new file mode 100644 index 0000000000..ebddafaa7f --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/service/InvitationRecordService.java @@ -0,0 +1,31 @@ +/** + * 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.invitation.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.modules.invitation.entity.InvitationRecordEntity; + +/** + * 分享记录(话题、通知...后续支持增加) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-16 + */ +public interface InvitationRecordService extends BaseService { + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/service/impl/InvitationRecordServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/service/impl/InvitationRecordServiceImpl.java new file mode 100644 index 0000000000..4d873bba21 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/service/impl/InvitationRecordServiceImpl.java @@ -0,0 +1,36 @@ +/** + * 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.invitation.service.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.modules.invitation.dao.InvitationRecordDao; +import com.epmet.modules.invitation.entity.InvitationRecordEntity; +import com.epmet.modules.invitation.service.InvitationRecordService; +import org.springframework.stereotype.Service; + +/** + * 分享记录(话题、通知...后续支持增加) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-16 + */ +@Service +public class InvitationRecordServiceImpl extends BaseServiceImpl implements InvitationRecordService { + + +} \ No newline at end of file diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/resigroup/EnterGroupSwitchDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActCategoryDictDao.xml similarity index 63% rename from epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/resigroup/EnterGroupSwitchDao.xml rename to epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActCategoryDictDao.xml index cdb6940650..66391dd3a9 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/resigroup/EnterGroupSwitchDao.xml +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActCategoryDictDao.xml @@ -1,6 +1,8 @@ - + + + \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActCommentDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActCommentDao.xml new file mode 100644 index 0000000000..e04b803f59 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActCommentDao.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/act/ActOperationRecordDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActOperationRecordDao.xml new file mode 100644 index 0000000000..aa2a3e7679 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActOperationRecordDao.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/act/ActReadRecordDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActReadRecordDao.xml new file mode 100644 index 0000000000..2410bc9793 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActReadRecordDao.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/act/ActSiginInCodeDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActSiginInCodeDao.xml new file mode 100644 index 0000000000..c536ac8cbd --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActSiginInCodeDao.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/act/ActSiginInRecordDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActSiginInRecordDao.xml new file mode 100644 index 0000000000..0e985b9970 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActSiginInRecordDao.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/act/ActSummaryContentDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActSummaryContentDao.xml new file mode 100644 index 0000000000..1ec609cbdb --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActSummaryContentDao.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/act/ActSummaryDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActSummaryDao.xml new file mode 100644 index 0000000000..936bc6df1b --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActSummaryDao.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/act/GroupActContentDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/GroupActContentDao.xml new file mode 100644 index 0000000000..ccb7d49437 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/GroupActContentDao.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/act/GroupActInfoDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/GroupActInfoDao.xml new file mode 100644 index 0000000000..70b86b20e5 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/GroupActInfoDao.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/invitation/InvitationRecordDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/invitation/InvitationRecordDao.xml new file mode 100644 index 0000000000..00ed2225bb --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/invitation/InvitationRecordDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file From 3b2efc5990e15b6b325fe2f9e09cc9f8dcffaacd Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Mon, 19 Apr 2021 09:41:16 +0800 Subject: [PATCH 002/202] =?UTF-8?q?=E5=B0=8F=E7=BB=84=E9=80=9A=E7=9F=A5?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../group/dto/notice/NoticeAttachmentDTO.java | 121 ++++++++++++++++++ .../group/dto/notice/NoticeCommentDTO.java | 86 +++++++++++++ .../resi/group/dto/notice/NoticeDTO.java | 111 ++++++++++++++++ .../dto/notice/NoticeReafdRecordDTO.java | 101 +++++++++++++++ .../NoticeAttachmentController.java | 94 ++++++++++++++ .../controller/NoticeCommentController.java | 94 ++++++++++++++ .../notice/controller/NoticeController.java | 94 ++++++++++++++ .../NoticeReafdRecordController.java | 94 ++++++++++++++ .../notice/dao/NoticeAttachmentDao.java | 33 +++++ .../modules/notice/dao/NoticeCommentDao.java | 33 +++++ .../epmet/modules/notice/dao/NoticeDao.java | 33 +++++ .../notice/dao/NoticeReafdRecordDao.java | 33 +++++ .../notice/entity/NoticeAttachmentEntity.java | 91 +++++++++++++ .../notice/entity/NoticeCommentEntity.java | 56 ++++++++ .../modules/notice/entity/NoticeEntity.java | 81 ++++++++++++ .../entity/NoticeReafdRecordEntity.java | 71 ++++++++++ .../notice/excel/NoticeAttachmentExcel.java | 86 +++++++++++++ .../notice/excel/NoticeCommentExcel.java | 65 ++++++++++ .../modules/notice/excel/NoticeExcel.java | 80 ++++++++++++ .../notice/excel/NoticeReafdRecordExcel.java | 74 +++++++++++ .../notice/redis/NoticeAttachmentRedis.java | 47 +++++++ .../notice/redis/NoticeCommentRedis.java | 47 +++++++ .../notice/redis/NoticeReafdRecordRedis.java | 47 +++++++ .../modules/notice/redis/NoticeRedis.java | 47 +++++++ .../service/NoticeAttachmentService.java | 95 ++++++++++++++ .../notice/service/NoticeCommentService.java | 95 ++++++++++++++ .../service/NoticeReafdRecordService.java | 95 ++++++++++++++ .../modules/notice/service/NoticeService.java | 95 ++++++++++++++ .../impl/NoticeAttachmentServiceImpl.java | 104 +++++++++++++++ .../impl/NoticeCommentServiceImpl.java | 104 +++++++++++++++ .../impl/NoticeReafdRecordServiceImpl.java | 104 +++++++++++++++ .../service/impl/NoticeServiceImpl.java | 104 +++++++++++++++ .../mapper/notice/NoticeAttachmentDao.xml | 7 + .../mapper/notice/NoticeCommentDao.xml | 7 + .../resources/mapper/notice/NoticeDao.xml | 7 + .../mapper/notice/NoticeReafdRecordDao.xml | 7 + 36 files changed, 2543 insertions(+) create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/NoticeAttachmentDTO.java create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/NoticeCommentDTO.java create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/NoticeDTO.java create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/NoticeReafdRecordDTO.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeAttachmentController.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeCommentController.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeController.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeReafdRecordController.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/dao/NoticeAttachmentDao.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/dao/NoticeCommentDao.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/dao/NoticeDao.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/dao/NoticeReafdRecordDao.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/entity/NoticeAttachmentEntity.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/entity/NoticeCommentEntity.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/entity/NoticeEntity.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/entity/NoticeReafdRecordEntity.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/excel/NoticeAttachmentExcel.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/excel/NoticeCommentExcel.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/excel/NoticeExcel.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/excel/NoticeReafdRecordExcel.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/redis/NoticeAttachmentRedis.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/redis/NoticeCommentRedis.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/redis/NoticeReafdRecordRedis.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/redis/NoticeRedis.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeAttachmentService.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeCommentService.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeReafdRecordService.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeService.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeAttachmentServiceImpl.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeCommentServiceImpl.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeReafdRecordServiceImpl.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeServiceImpl.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/resources/mapper/notice/NoticeAttachmentDao.xml create mode 100644 epmet-module/resi-group/resi-group-server/src/main/resources/mapper/notice/NoticeCommentDao.xml create mode 100644 epmet-module/resi-group/resi-group-server/src/main/resources/mapper/notice/NoticeDao.xml create mode 100644 epmet-module/resi-group/resi-group-server/src/main/resources/mapper/notice/NoticeReafdRecordDao.xml diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/NoticeAttachmentDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/NoticeAttachmentDTO.java new file mode 100644 index 0000000000..8ad5ed7d44 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/NoticeAttachmentDTO.java @@ -0,0 +1,121 @@ +/** + * 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.notice; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 小组通知附件表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-19 + */ +@Data +public class NoticeAttachmentDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 通知Id + */ + private String noticeId; + + /** + * 文件名 + */ + private String fileName; + + /** + * 附件名(uuid随机生成) + */ + private String attachmentName; + + /** + * 文件大小,单位b + */ + private Integer attachmentSize; + + /** + * 文件格式(JPG、PNG、PDF、JPEG、BMP、MP4、WMA、M4A、MP3、DOC、DOCX、XLS) + */ + private String attachmentFormat; + + /** + * 附件类型((图片 - image、 视频 - video、 语音 - voice、 文档 - doc)) + */ + private String attachmentType; + + /** + * 附件地址 + */ + private String attachmentUrl; + + /** + * 排序字段 + */ + private Integer sort; + + /** + * 语音或视频时长,秒 + */ + private Integer duration; + + /** + * 删除标记 0:未删除,1:已删除 + */ + 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-client/src/main/java/com/epmet/resi/group/dto/notice/NoticeCommentDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/NoticeCommentDTO.java new file mode 100644 index 0000000000..fd23f4bef1 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/NoticeCommentDTO.java @@ -0,0 +1,86 @@ +/** + * 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.notice; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 小组通知评论表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-19 + */ +@Data +public class NoticeCommentDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 通知Id + */ + private String noticeId; + + /** + * 评论内容(最多300字符) + */ + private String commentContent; + + /** + * 删除标记 0:未删除,1:已删除 + */ + 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-client/src/main/java/com/epmet/resi/group/dto/notice/NoticeDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/NoticeDTO.java new file mode 100644 index 0000000000..1ef416538c --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/NoticeDTO.java @@ -0,0 +1,111 @@ +/** + * 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.notice; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 小组通知表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-19 + */ +@Data +public class NoticeDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 组织机构Id + */ + private String agencyId; + + /** + * 小组所属网格id + */ + private String gridId; + + /** + * 小组Id + */ + private String groupId; + + /** + * 通知标题 + */ + private String title; + + /** + * 通知内容 + */ + private String content; + + /** + * 是否变更过(是:yes 否:no) + */ + private String isChange; + + /** + * 通知变更时间,初始值为首次创建时间 + */ + private Date changeTime; + + /** + * 删除标记 0:未删除,1:已删除 + */ + 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-client/src/main/java/com/epmet/resi/group/dto/notice/NoticeReafdRecordDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/NoticeReafdRecordDTO.java new file mode 100644 index 0000000000..8574f2deb2 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/NoticeReafdRecordDTO.java @@ -0,0 +1,101 @@ +/** + * 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.notice; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 小组通知组成员阅读记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-19 + */ +@Data +public class NoticeReafdRecordDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户id + */ + private String customerId; + + /** + * 小组所属网格id + */ + private String gridId; + + /** + * 小组id + */ + private String groupId; + + /** + * 通知Id + */ + private String noticeId; + + /** + * 用户id + */ + private String userId; + + /** + * read已读、unread未读 + */ + private String readFlag; + + /** + * 删除标识 + */ + 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/notice/controller/NoticeAttachmentController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeAttachmentController.java new file mode 100644 index 0000000000..f38795b2a7 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeAttachmentController.java @@ -0,0 +1,94 @@ +/** + * 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.notice.controller; + +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.modules.notice.excel.NoticeAttachmentExcel; +import com.epmet.modules.notice.service.NoticeAttachmentService; +import com.epmet.resi.group.dto.notice.NoticeAttachmentDTO; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 小组通知附件表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-19 + */ +@RestController +@RequestMapping("noticeattachment") +public class NoticeAttachmentController { + + @Autowired + private NoticeAttachmentService noticeAttachmentService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = noticeAttachmentService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + NoticeAttachmentDTO data = noticeAttachmentService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody NoticeAttachmentDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + noticeAttachmentService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody NoticeAttachmentDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + noticeAttachmentService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + noticeAttachmentService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = noticeAttachmentService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, NoticeAttachmentExcel.class); + } + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeCommentController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeCommentController.java new file mode 100644 index 0000000000..a7114f3834 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeCommentController.java @@ -0,0 +1,94 @@ +/** + * 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.notice.controller; + +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.modules.notice.excel.NoticeCommentExcel; +import com.epmet.modules.notice.service.NoticeCommentService; +import com.epmet.resi.group.dto.notice.NoticeCommentDTO; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 小组通知评论表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-19 + */ +@RestController +@RequestMapping("noticecomment") +public class NoticeCommentController { + + @Autowired + private NoticeCommentService noticeCommentService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = noticeCommentService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + NoticeCommentDTO data = noticeCommentService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody NoticeCommentDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + noticeCommentService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody NoticeCommentDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + noticeCommentService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + noticeCommentService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = noticeCommentService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, NoticeCommentExcel.class); + } + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeController.java new file mode 100644 index 0000000000..b2a8478edd --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeController.java @@ -0,0 +1,94 @@ +/** + * 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.notice.controller; + +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.modules.notice.excel.NoticeExcel; +import com.epmet.modules.notice.service.NoticeService; +import com.epmet.resi.group.dto.notice.NoticeDTO; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 小组通知表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-19 + */ +@RestController +@RequestMapping("notice") +public class NoticeController { + + @Autowired + private NoticeService noticeService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = noticeService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + NoticeDTO data = noticeService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody NoticeDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + noticeService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody NoticeDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + noticeService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + noticeService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = noticeService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, NoticeExcel.class); + } + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeReafdRecordController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeReafdRecordController.java new file mode 100644 index 0000000000..79c38a852b --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeReafdRecordController.java @@ -0,0 +1,94 @@ +/** + * 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.notice.controller; + +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.modules.notice.excel.NoticeReafdRecordExcel; +import com.epmet.modules.notice.service.NoticeReafdRecordService; +import com.epmet.resi.group.dto.notice.NoticeReafdRecordDTO; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 小组通知组成员阅读记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-19 + */ +@RestController +@RequestMapping("noticereafdrecord") +public class NoticeReafdRecordController { + + @Autowired + private NoticeReafdRecordService noticeReafdRecordService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = noticeReafdRecordService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + NoticeReafdRecordDTO data = noticeReafdRecordService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody NoticeReafdRecordDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + noticeReafdRecordService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody NoticeReafdRecordDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + noticeReafdRecordService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + noticeReafdRecordService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = noticeReafdRecordService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, NoticeReafdRecordExcel.class); + } + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/dao/NoticeAttachmentDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/dao/NoticeAttachmentDao.java new file mode 100644 index 0000000000..5561248f73 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/dao/NoticeAttachmentDao.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.notice.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.modules.notice.entity.NoticeAttachmentEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 小组通知附件表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-19 + */ +@Mapper +public interface NoticeAttachmentDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/dao/NoticeCommentDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/dao/NoticeCommentDao.java new file mode 100644 index 0000000000..db988edb81 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/dao/NoticeCommentDao.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.notice.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.modules.notice.entity.NoticeCommentEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 小组通知评论表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-19 + */ +@Mapper +public interface NoticeCommentDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/dao/NoticeDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/dao/NoticeDao.java new file mode 100644 index 0000000000..2cab9440db --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/dao/NoticeDao.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.notice.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.modules.notice.entity.NoticeEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 小组通知表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-19 + */ +@Mapper +public interface NoticeDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/dao/NoticeReafdRecordDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/dao/NoticeReafdRecordDao.java new file mode 100644 index 0000000000..3cfb9389a4 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/dao/NoticeReafdRecordDao.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.notice.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.modules.notice.entity.NoticeReafdRecordEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 小组通知组成员阅读记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-19 + */ +@Mapper +public interface NoticeReafdRecordDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/entity/NoticeAttachmentEntity.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/entity/NoticeAttachmentEntity.java new file mode 100644 index 0000000000..8bce82e2fd --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/entity/NoticeAttachmentEntity.java @@ -0,0 +1,91 @@ +/** + * 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.notice.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 小组通知附件表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-19 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("notice_attachment") +public class NoticeAttachmentEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 通知Id + */ + private String noticeId; + + /** + * 文件名 + */ + private String fileName; + + /** + * 附件名(uuid随机生成) + */ + private String attachmentName; + + /** + * 文件大小,单位b + */ + private Integer attachmentSize; + + /** + * 文件格式(JPG、PNG、PDF、JPEG、BMP、MP4、WMA、M4A、MP3、DOC、DOCX、XLS) + */ + private String attachmentFormat; + + /** + * 附件类型((图片 - image、 视频 - video、 语音 - voice、 文档 - doc)) + */ + private String attachmentType; + + /** + * 附件地址 + */ + private String attachmentUrl; + + /** + * 排序字段 + */ + private Integer sort; + + /** + * 语音或视频时长,秒 + */ + private Integer duration; + +} diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/entity/NoticeCommentEntity.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/entity/NoticeCommentEntity.java new file mode 100644 index 0000000000..ce1f653f3c --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/entity/NoticeCommentEntity.java @@ -0,0 +1,56 @@ +/** + * 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.notice.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 小组通知评论表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-19 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("notice_comment") +public class NoticeCommentEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 通知Id + */ + private String noticeId; + + /** + * 评论内容(最多300字符) + */ + private String commentContent; + +} diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/entity/NoticeEntity.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/entity/NoticeEntity.java new file mode 100644 index 0000000000..b12dce96ca --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/entity/NoticeEntity.java @@ -0,0 +1,81 @@ +/** + * 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.notice.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 小组通知表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-19 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("notice") +public class NoticeEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 组织机构Id + */ + private String agencyId; + + /** + * 小组所属网格id + */ + private String gridId; + + /** + * 小组Id + */ + private String groupId; + + /** + * 通知标题 + */ + private String title; + + /** + * 通知内容 + */ + private String content; + + /** + * 是否变更过(是:yes 否:no) + */ + private String isChange; + + /** + * 通知变更时间,初始值为首次创建时间 + */ + private Date changeTime; + +} diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/entity/NoticeReafdRecordEntity.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/entity/NoticeReafdRecordEntity.java new file mode 100644 index 0000000000..e9a63804a1 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/entity/NoticeReafdRecordEntity.java @@ -0,0 +1,71 @@ +/** + * 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.notice.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 小组通知组成员阅读记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-19 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("notice_reafd_record") +public class NoticeReafdRecordEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 小组所属网格id + */ + private String gridId; + + /** + * 小组id + */ + private String groupId; + + /** + * 通知Id + */ + private String noticeId; + + /** + * 用户id + */ + private String userId; + + /** + * read已读、unread未读 + */ + private String readFlag; + +} diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/excel/NoticeAttachmentExcel.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/excel/NoticeAttachmentExcel.java new file mode 100644 index 0000000000..c514d27310 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/excel/NoticeAttachmentExcel.java @@ -0,0 +1,86 @@ +/** + * 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.notice.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 小组通知附件表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-19 + */ +@Data +public class NoticeAttachmentExcel { + + @Excel(name = "主键") + private String id; + + @Excel(name = "客户ID") + private String customerId; + + @Excel(name = "通知Id") + private String noticeId; + + @Excel(name = "文件名") + private String fileName; + + @Excel(name = "附件名(uuid随机生成)") + private String attachmentName; + + @Excel(name = "文件大小,单位b") + private Integer attachmentSize; + + @Excel(name = "文件格式(JPG、PNG、PDF、JPEG、BMP、MP4、WMA、M4A、MP3、DOC、DOCX、XLS)") + private String attachmentFormat; + + @Excel(name = "附件类型((图片 - image、 视频 - video、 语音 - voice、 文档 - doc))") + private String attachmentType; + + @Excel(name = "附件地址") + private String attachmentUrl; + + @Excel(name = "排序字段") + private Integer sort; + + @Excel(name = "语音或视频时长,秒") + private Integer duration; + + @Excel(name = "删除标记 0:未删除,1:已删除") + private String delFlag; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + 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/notice/excel/NoticeCommentExcel.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/excel/NoticeCommentExcel.java new file mode 100644 index 0000000000..3d294f9752 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/excel/NoticeCommentExcel.java @@ -0,0 +1,65 @@ +/** + * 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.notice.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 小组通知评论表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-19 + */ +@Data +public class NoticeCommentExcel { + + @Excel(name = "主键") + private String id; + + @Excel(name = "客户ID") + private String customerId; + + @Excel(name = "通知Id") + private String noticeId; + + @Excel(name = "评论内容(最多300字符)") + private String commentContent; + + @Excel(name = "删除标记 0:未删除,1:已删除") + private String delFlag; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + 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/notice/excel/NoticeExcel.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/excel/NoticeExcel.java new file mode 100644 index 0000000000..5eff654327 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/excel/NoticeExcel.java @@ -0,0 +1,80 @@ +/** + * 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.notice.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 小组通知表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-19 + */ +@Data +public class NoticeExcel { + + @Excel(name = "主键") + private String id; + + @Excel(name = "客户ID") + private String customerId; + + @Excel(name = "组织机构Id") + private String agencyId; + + @Excel(name = "小组所属网格id") + private String gridId; + + @Excel(name = "小组Id") + private String groupId; + + @Excel(name = "通知标题") + private String title; + + @Excel(name = "通知内容") + private String content; + + @Excel(name = "是否变更过(是:yes 否:no)") + private String isChange; + + @Excel(name = "通知变更时间,初始值为首次创建时间") + private Date changeTime; + + @Excel(name = "删除标记 0:未删除,1:已删除") + private String delFlag; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + 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/notice/excel/NoticeReafdRecordExcel.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/excel/NoticeReafdRecordExcel.java new file mode 100644 index 0000000000..8f005770cd --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/excel/NoticeReafdRecordExcel.java @@ -0,0 +1,74 @@ +/** + * 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.notice.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 小组通知组成员阅读记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-19 + */ +@Data +public class NoticeReafdRecordExcel { + + @Excel(name = "主键") + private String id; + + @Excel(name = "客户id") + private String customerId; + + @Excel(name = "小组所属网格id") + private String gridId; + + @Excel(name = "小组id") + private String groupId; + + @Excel(name = "通知Id") + private String noticeId; + + @Excel(name = "用户id") + private String userId; + + @Excel(name = "read已读、unread未读") + private String readFlag; + + @Excel(name = "删除标识") + private String delFlag; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + 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/notice/redis/NoticeAttachmentRedis.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/redis/NoticeAttachmentRedis.java new file mode 100644 index 0000000000..be61675826 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/redis/NoticeAttachmentRedis.java @@ -0,0 +1,47 @@ +/** + * 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.notice.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 小组通知附件表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-19 + */ +@Component +public class NoticeAttachmentRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/redis/NoticeCommentRedis.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/redis/NoticeCommentRedis.java new file mode 100644 index 0000000000..b81e042fda --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/redis/NoticeCommentRedis.java @@ -0,0 +1,47 @@ +/** + * 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.notice.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 小组通知评论表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-19 + */ +@Component +public class NoticeCommentRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/redis/NoticeReafdRecordRedis.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/redis/NoticeReafdRecordRedis.java new file mode 100644 index 0000000000..dc20469216 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/redis/NoticeReafdRecordRedis.java @@ -0,0 +1,47 @@ +/** + * 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.notice.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 小组通知组成员阅读记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-19 + */ +@Component +public class NoticeReafdRecordRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/redis/NoticeRedis.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/redis/NoticeRedis.java new file mode 100644 index 0000000000..3033c69583 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/redis/NoticeRedis.java @@ -0,0 +1,47 @@ +/** + * 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.notice.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 小组通知表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-19 + */ +@Component +public class NoticeRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeAttachmentService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeAttachmentService.java new file mode 100644 index 0000000000..f83b3a88de --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeAttachmentService.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.notice.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.modules.notice.entity.NoticeAttachmentEntity; +import com.epmet.resi.group.dto.notice.NoticeAttachmentDTO; + +import java.util.List; +import java.util.Map; + +/** + * 小组通知附件表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-19 + */ +public interface NoticeAttachmentService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-04-19 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-04-19 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return NoticeAttachmentDTO + * @author generator + * @date 2021-04-19 + */ + NoticeAttachmentDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-04-19 + */ + void save(NoticeAttachmentDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-04-19 + */ + void update(NoticeAttachmentDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-04-19 + */ + 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/notice/service/NoticeCommentService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeCommentService.java new file mode 100644 index 0000000000..0204df5cc9 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeCommentService.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.notice.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.modules.notice.entity.NoticeCommentEntity; +import com.epmet.resi.group.dto.notice.NoticeCommentDTO; + +import java.util.List; +import java.util.Map; + +/** + * 小组通知评论表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-19 + */ +public interface NoticeCommentService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-04-19 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-04-19 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return NoticeCommentDTO + * @author generator + * @date 2021-04-19 + */ + NoticeCommentDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-04-19 + */ + void save(NoticeCommentDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-04-19 + */ + void update(NoticeCommentDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-04-19 + */ + 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/notice/service/NoticeReafdRecordService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeReafdRecordService.java new file mode 100644 index 0000000000..b5c470dd8a --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeReafdRecordService.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.notice.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.modules.notice.entity.NoticeReafdRecordEntity; +import com.epmet.resi.group.dto.notice.NoticeReafdRecordDTO; + +import java.util.List; +import java.util.Map; + +/** + * 小组通知组成员阅读记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-19 + */ +public interface NoticeReafdRecordService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-04-19 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-04-19 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return NoticeReafdRecordDTO + * @author generator + * @date 2021-04-19 + */ + NoticeReafdRecordDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-04-19 + */ + void save(NoticeReafdRecordDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-04-19 + */ + void update(NoticeReafdRecordDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-04-19 + */ + 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/notice/service/NoticeService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeService.java new file mode 100644 index 0000000000..4ae16bbce4 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeService.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.notice.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.modules.notice.entity.NoticeEntity; +import com.epmet.resi.group.dto.notice.NoticeDTO; + +import java.util.List; +import java.util.Map; + +/** + * 小组通知表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-19 + */ +public interface NoticeService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-04-19 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-04-19 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return NoticeDTO + * @author generator + * @date 2021-04-19 + */ + NoticeDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-04-19 + */ + void save(NoticeDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-04-19 + */ + void update(NoticeDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-04-19 + */ + 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/notice/service/impl/NoticeAttachmentServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeAttachmentServiceImpl.java new file mode 100644 index 0000000000..a4d58c5805 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeAttachmentServiceImpl.java @@ -0,0 +1,104 @@ +/** + * 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.notice.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.notice.dao.NoticeAttachmentDao; +import com.epmet.modules.notice.entity.NoticeAttachmentEntity; +import com.epmet.modules.notice.redis.NoticeAttachmentRedis; +import com.epmet.modules.notice.service.NoticeAttachmentService; +import com.epmet.resi.group.dto.notice.NoticeAttachmentDTO; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +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-19 + */ +@Service +public class NoticeAttachmentServiceImpl extends BaseServiceImpl implements NoticeAttachmentService { + + @Autowired + private NoticeAttachmentRedis noticeAttachmentRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, NoticeAttachmentDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, NoticeAttachmentDTO.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 NoticeAttachmentDTO get(String id) { + NoticeAttachmentEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, NoticeAttachmentDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(NoticeAttachmentDTO dto) { + NoticeAttachmentEntity entity = ConvertUtils.sourceToTarget(dto, NoticeAttachmentEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(NoticeAttachmentDTO dto) { + NoticeAttachmentEntity entity = ConvertUtils.sourceToTarget(dto, NoticeAttachmentEntity.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/notice/service/impl/NoticeCommentServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeCommentServiceImpl.java new file mode 100644 index 0000000000..81ed00809a --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeCommentServiceImpl.java @@ -0,0 +1,104 @@ +/** + * 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.notice.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.notice.dao.NoticeCommentDao; +import com.epmet.modules.notice.entity.NoticeCommentEntity; +import com.epmet.modules.notice.redis.NoticeCommentRedis; +import com.epmet.modules.notice.service.NoticeCommentService; +import com.epmet.resi.group.dto.notice.NoticeCommentDTO; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +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-19 + */ +@Service +public class NoticeCommentServiceImpl extends BaseServiceImpl implements NoticeCommentService { + + @Autowired + private NoticeCommentRedis noticeCommentRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, NoticeCommentDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, NoticeCommentDTO.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 NoticeCommentDTO get(String id) { + NoticeCommentEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, NoticeCommentDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(NoticeCommentDTO dto) { + NoticeCommentEntity entity = ConvertUtils.sourceToTarget(dto, NoticeCommentEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(NoticeCommentDTO dto) { + NoticeCommentEntity entity = ConvertUtils.sourceToTarget(dto, NoticeCommentEntity.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/notice/service/impl/NoticeReafdRecordServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeReafdRecordServiceImpl.java new file mode 100644 index 0000000000..23075ecea9 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeReafdRecordServiceImpl.java @@ -0,0 +1,104 @@ +/** + * 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.notice.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.notice.dao.NoticeReafdRecordDao; +import com.epmet.modules.notice.entity.NoticeReafdRecordEntity; +import com.epmet.modules.notice.redis.NoticeReafdRecordRedis; +import com.epmet.modules.notice.service.NoticeReafdRecordService; +import com.epmet.resi.group.dto.notice.NoticeReafdRecordDTO; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +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-19 + */ +@Service +public class NoticeReafdRecordServiceImpl extends BaseServiceImpl implements NoticeReafdRecordService { + + @Autowired + private NoticeReafdRecordRedis noticeReafdRecordRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, NoticeReafdRecordDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, NoticeReafdRecordDTO.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 NoticeReafdRecordDTO get(String id) { + NoticeReafdRecordEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, NoticeReafdRecordDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(NoticeReafdRecordDTO dto) { + NoticeReafdRecordEntity entity = ConvertUtils.sourceToTarget(dto, NoticeReafdRecordEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(NoticeReafdRecordDTO dto) { + NoticeReafdRecordEntity entity = ConvertUtils.sourceToTarget(dto, NoticeReafdRecordEntity.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/notice/service/impl/NoticeServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeServiceImpl.java new file mode 100644 index 0000000000..0478a8cca6 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeServiceImpl.java @@ -0,0 +1,104 @@ +/** + * 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.notice.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.notice.dao.NoticeDao; +import com.epmet.modules.notice.entity.NoticeEntity; +import com.epmet.modules.notice.redis.NoticeRedis; +import com.epmet.modules.notice.service.NoticeService; +import com.epmet.resi.group.dto.notice.NoticeDTO; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +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-19 + */ +@Service +public class NoticeServiceImpl extends BaseServiceImpl implements NoticeService { + + @Autowired + private NoticeRedis noticeRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, NoticeDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, NoticeDTO.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 NoticeDTO get(String id) { + NoticeEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, NoticeDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(NoticeDTO dto) { + NoticeEntity entity = ConvertUtils.sourceToTarget(dto, NoticeEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(NoticeDTO dto) { + NoticeEntity entity = ConvertUtils.sourceToTarget(dto, NoticeEntity.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/notice/NoticeAttachmentDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/notice/NoticeAttachmentDao.xml new file mode 100644 index 0000000000..0fda19e6bf --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/notice/NoticeAttachmentDao.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/notice/NoticeCommentDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/notice/NoticeCommentDao.xml new file mode 100644 index 0000000000..90c7baed49 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/notice/NoticeCommentDao.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/notice/NoticeDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/notice/NoticeDao.xml new file mode 100644 index 0000000000..7f7dc8e127 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/notice/NoticeDao.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/notice/NoticeReafdRecordDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/notice/NoticeReafdRecordDao.xml new file mode 100644 index 0000000000..c726525ef0 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/notice/NoticeReafdRecordDao.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file From 726db623dc2565d7f1c631e36e9e2db330a147d8 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 19 Apr 2021 10:36:22 +0800 Subject: [PATCH 003/202] =?UTF-8?q?=E5=88=97=E5=90=8D=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...{ActSiginInCodeDTO.java => ActSignInCodeDTO.java} | 5 +++-- ...SiginInRecordDTO.java => ActSignInRecordDTO.java} | 6 +++--- .../com/epmet/resi/group/dto/act/ActSummaryDTO.java | 5 +++-- .../epmet/resi/group/dto/act/GroupActInfoDTO.java | 12 ++++++------ ...ontroller.java => ActSignInRecordController.java} | 8 ++++---- ...{ActSiginInCodeDao.java => ActSignInCodeDao.java} | 4 ++-- ...SiginInRecordDao.java => ActSignInRecordDao.java} | 4 ++-- ...ginInCodeEntity.java => ActSignInCodeEntity.java} | 4 ++-- ...nRecordEntity.java => ActSignInRecordEntity.java} | 8 ++++---- .../epmet/modules/act/entity/ActSummaryEntity.java | 2 +- .../epmet/modules/act/entity/GroupActInfoEntity.java | 8 ++++---- ...nInCodeService.java => ActSignInCodeService.java} | 4 ++-- ...ecordService.java => ActSignInRecordService.java} | 4 ++-- ...erviceImpl.java => ActSignInCodeServiceImpl.java} | 8 ++++---- ...viceImpl.java => ActSignInRecordServiceImpl.java} | 8 ++++---- .../{ActSiginInCodeDao.xml => ActSignInCodeDao.xml} | 2 +- ...ctSiginInRecordDao.xml => ActSignInRecordDao.xml} | 2 +- 17 files changed, 48 insertions(+), 46 deletions(-) rename epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/{ActSiginInCodeDTO.java => ActSignInCodeDTO.java} (96%) rename epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/{ActSiginInRecordDTO.java => ActSignInRecordDTO.java} (93%) rename epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/{ActSiginInRecordController.java => ActSignInRecordController.java} (85%) rename epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/{ActSiginInCodeDao.java => ActSignInCodeDao.java} (87%) rename epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/{ActSiginInRecordDao.java => ActSignInRecordDao.java} (87%) rename epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/{ActSiginInCodeEntity.java => ActSignInCodeEntity.java} (93%) rename epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/{ActSiginInRecordEntity.java => ActSignInRecordEntity.java} (90%) rename epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/{ActSiginInCodeService.java => ActSignInCodeService.java} (86%) rename epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/{ActSiginInRecordService.java => ActSignInRecordService.java} (86%) rename epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/{ActSiginInCodeServiceImpl.java => ActSignInCodeServiceImpl.java} (76%) rename epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/{ActSiginInRecordServiceImpl.java => ActSignInRecordServiceImpl.java} (75%) rename epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/{ActSiginInCodeDao.xml => ActSignInCodeDao.xml} (67%) rename epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/{ActSiginInRecordDao.xml => ActSignInRecordDao.xml} (66%) diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActSiginInCodeDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActSignInCodeDTO.java similarity index 96% rename from epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActSiginInCodeDTO.java rename to epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActSignInCodeDTO.java index 7d42b43e65..fb236618f8 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActSiginInCodeDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActSignInCodeDTO.java @@ -17,9 +17,10 @@ package com.epmet.resi.group.dto.act; +import lombok.Data; + import java.io.Serializable; import java.util.Date; -import lombok.Data; /** @@ -29,7 +30,7 @@ import lombok.Data; * @since v1.0.0 2021-04-16 */ @Data -public class ActSiginInCodeDTO implements Serializable { +public class ActSignInCodeDTO implements Serializable { private static final long serialVersionUID = 1L; diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActSiginInRecordDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActSignInRecordDTO.java similarity index 93% rename from epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActSiginInRecordDTO.java rename to epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActSignInRecordDTO.java index 7e002c177f..2ff892364a 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActSiginInRecordDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActSignInRecordDTO.java @@ -30,7 +30,7 @@ import java.util.Date; * @since v1.0.0 2021-04-16 */ @Data -public class ActSiginInRecordDTO implements Serializable { +public class ActSignInRecordDTO implements Serializable { private static final long serialVersionUID = 1L; @@ -52,12 +52,12 @@ public class ActSiginInRecordDTO implements Serializable { /** * 签到用户id */ - private String siginUserId; + private String signUserId; /** * 签到地点 */ - private String siginInAddress; + private String signInAddress; /** * 签到地点-经度 diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActSummaryDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActSummaryDTO.java index 60d56e9ee8..49ca083379 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActSummaryDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActSummaryDTO.java @@ -17,9 +17,10 @@ package com.epmet.resi.group.dto.act; +import lombok.Data; + import java.io.Serializable; import java.util.Date; -import lombok.Data; /** @@ -56,7 +57,7 @@ public class ActSummaryDTO implements Serializable { /** * 已签到人数 */ - private Integer siginInNum; + private Integer signInNum; /** * 已签到人员姓名列表、分隔 diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/GroupActInfoDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/GroupActInfoDTO.java index f34bc37bc3..5b63bbf6be 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/GroupActInfoDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/GroupActInfoDTO.java @@ -17,11 +17,11 @@ package com.epmet.resi.group.dto.act; -import java.io.Serializable; -import java.util.Date; import lombok.Data; +import java.io.Serializable; import java.math.BigDecimal; +import java.util.Date; /** * 组织活动信息 @@ -122,12 +122,12 @@ public class GroupActInfoDTO implements Serializable { /** * 签到开始时间 */ - private Date siginInStartTime; + private Date signInStartTime; /** * 签到截止时间 */ - private Date siginInEndTime; + private Date signInEndTime; /** * 是否填写总结?1:已填写;0:未填写 @@ -137,12 +137,12 @@ public class GroupActInfoDTO implements Serializable { /** * 已签到人数(有人签到自动+1) */ - private Integer siginedInNum; + private Integer signedInNum; /** * 取消时间 */ - private Date canceldTime; + private Date canceledTime; /** * 关闭时间 diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/ActSiginInRecordController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/ActSignInRecordController.java similarity index 85% rename from epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/ActSiginInRecordController.java rename to epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/ActSignInRecordController.java index 40234f9352..f315d843b5 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/ActSiginInRecordController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/ActSignInRecordController.java @@ -17,7 +17,7 @@ package com.epmet.modules.act.controller; -import com.epmet.modules.act.service.ActSiginInRecordService; +import com.epmet.modules.act.service.ActSignInRecordService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @@ -30,10 +30,10 @@ import org.springframework.web.bind.annotation.RestController; * @since v1.0.0 2021-04-16 */ @RestController -@RequestMapping("actsigin") -public class ActSiginInRecordController { +@RequestMapping("actsign") +public class ActSignInRecordController { @Autowired - private ActSiginInRecordService actSiginInRecordService; + private ActSignInRecordService actSignInRecordService; } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActSiginInCodeDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActSignInCodeDao.java similarity index 87% rename from epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActSiginInCodeDao.java rename to epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActSignInCodeDao.java index e588c7be80..cc918ba292 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActSiginInCodeDao.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActSignInCodeDao.java @@ -18,7 +18,7 @@ package com.epmet.modules.act.dao; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.modules.act.entity.ActSiginInCodeEntity; +import com.epmet.modules.act.entity.ActSignInCodeEntity; import org.apache.ibatis.annotations.Mapper; /** @@ -28,6 +28,6 @@ import org.apache.ibatis.annotations.Mapper; * @since v1.0.0 2021-04-16 */ @Mapper -public interface ActSiginInCodeDao extends BaseDao { +public interface ActSignInCodeDao extends BaseDao { } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActSiginInRecordDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActSignInRecordDao.java similarity index 87% rename from epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActSiginInRecordDao.java rename to epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActSignInRecordDao.java index 8ebfa22ce2..788ed87051 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActSiginInRecordDao.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActSignInRecordDao.java @@ -18,7 +18,7 @@ package com.epmet.modules.act.dao; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.modules.act.entity.ActSiginInRecordEntity; +import com.epmet.modules.act.entity.ActSignInRecordEntity; import org.apache.ibatis.annotations.Mapper; /** @@ -28,6 +28,6 @@ import org.apache.ibatis.annotations.Mapper; * @since v1.0.0 2021-04-16 */ @Mapper -public interface ActSiginInRecordDao extends BaseDao { +public interface ActSignInRecordDao extends BaseDao { } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActSiginInCodeEntity.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActSignInCodeEntity.java similarity index 93% rename from epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActSiginInCodeEntity.java rename to epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActSignInCodeEntity.java index 154e7a2f31..747251144f 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActSiginInCodeEntity.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActSignInCodeEntity.java @@ -30,8 +30,8 @@ import lombok.EqualsAndHashCode; */ @Data @EqualsAndHashCode(callSuper=false) -@TableName("act_sigin_in_code") -public class ActSiginInCodeEntity extends BaseEpmetEntity { +@TableName("act_sign_in_code") +public class ActSignInCodeEntity extends BaseEpmetEntity { private static final long serialVersionUID = 1L; diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActSiginInRecordEntity.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActSignInRecordEntity.java similarity index 90% rename from epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActSiginInRecordEntity.java rename to epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActSignInRecordEntity.java index 251f5ca3a9..254f2d833c 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActSiginInRecordEntity.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActSignInRecordEntity.java @@ -32,8 +32,8 @@ import java.math.BigDecimal; */ @Data @EqualsAndHashCode(callSuper=false) -@TableName("act_sigin_in_record") -public class ActSiginInRecordEntity extends BaseEpmetEntity { +@TableName("act_sign_in_record") +public class ActSignInRecordEntity extends BaseEpmetEntity { private static final long serialVersionUID = 1L; @@ -50,12 +50,12 @@ public class ActSiginInRecordEntity extends BaseEpmetEntity { /** * 签到用户id */ - private String siginUserId; + private String signUserId; /** * 签到地点 */ - private String siginInAddress; + private String signInAddress; /** * 签到地点-经度 diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActSummaryEntity.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActSummaryEntity.java index 5fb0c98015..98e1279695 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActSummaryEntity.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActSummaryEntity.java @@ -53,7 +53,7 @@ public class ActSummaryEntity extends BaseEpmetEntity { /** * 已签到人数 */ - private Integer siginInNum; + private Integer signInNum; /** * 已签到人员姓名列表、分隔 diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/GroupActInfoEntity.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/GroupActInfoEntity.java index 8edbccd090..5314c9c49f 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/GroupActInfoEntity.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/GroupActInfoEntity.java @@ -121,12 +121,12 @@ public class GroupActInfoEntity extends BaseEpmetEntity { /** * 签到开始时间 */ - private Date siginInStartTime; + private Date signInStartTime; /** * 签到截止时间 */ - private Date siginInEndTime; + private Date signInEndTime; /** * 是否填写总结?1:已填写;0:未填写 @@ -136,12 +136,12 @@ public class GroupActInfoEntity extends BaseEpmetEntity { /** * 已签到人数(有人签到自动+1) */ - private Integer siginedInNum; + private Integer signedInNum; /** * 取消时间 */ - private Date canceldTime; + private Date canceledTime; /** * 关闭时间 diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSiginInCodeService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSignInCodeService.java similarity index 86% rename from epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSiginInCodeService.java rename to epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSignInCodeService.java index 99d562ee52..a5d713dcb2 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSiginInCodeService.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSignInCodeService.java @@ -18,7 +18,7 @@ package com.epmet.modules.act.service; import com.epmet.commons.mybatis.service.BaseService; -import com.epmet.modules.act.entity.ActSiginInCodeEntity; +import com.epmet.modules.act.entity.ActSignInCodeEntity; /** * 组织活动签到码 @@ -26,6 +26,6 @@ import com.epmet.modules.act.entity.ActSiginInCodeEntity; * @author generator generator@elink-cn.com * @since v1.0.0 2021-04-16 */ -public interface ActSiginInCodeService extends BaseService { +public interface ActSignInCodeService extends BaseService { } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSiginInRecordService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSignInRecordService.java similarity index 86% rename from epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSiginInRecordService.java rename to epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSignInRecordService.java index b3d9c81bd6..279a72fd3a 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSiginInRecordService.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSignInRecordService.java @@ -18,7 +18,7 @@ package com.epmet.modules.act.service; import com.epmet.commons.mybatis.service.BaseService; -import com.epmet.modules.act.entity.ActSiginInRecordEntity; +import com.epmet.modules.act.entity.ActSignInRecordEntity; /** * 组织活动签到记录 @@ -26,6 +26,6 @@ import com.epmet.modules.act.entity.ActSiginInRecordEntity; * @author generator generator@elink-cn.com * @since v1.0.0 2021-04-16 */ -public interface ActSiginInRecordService extends BaseService { +public interface ActSignInRecordService extends BaseService { } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSiginInCodeServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSignInCodeServiceImpl.java similarity index 76% rename from epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSiginInCodeServiceImpl.java rename to epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSignInCodeServiceImpl.java index 632f271ed3..3ee20b3195 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSiginInCodeServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSignInCodeServiceImpl.java @@ -18,9 +18,9 @@ package com.epmet.modules.act.service.impl; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; -import com.epmet.modules.act.dao.ActSiginInCodeDao; -import com.epmet.modules.act.entity.ActSiginInCodeEntity; -import com.epmet.modules.act.service.ActSiginInCodeService; +import com.epmet.modules.act.dao.ActSignInCodeDao; +import com.epmet.modules.act.entity.ActSignInCodeEntity; +import com.epmet.modules.act.service.ActSignInCodeService; import org.springframework.stereotype.Service; /** @@ -30,7 +30,7 @@ import org.springframework.stereotype.Service; * @since v1.0.0 2021-04-16 */ @Service -public class ActSiginInCodeServiceImpl extends BaseServiceImpl implements ActSiginInCodeService { +public class ActSignInCodeServiceImpl extends BaseServiceImpl implements ActSignInCodeService { } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSiginInRecordServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSignInRecordServiceImpl.java similarity index 75% rename from epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSiginInRecordServiceImpl.java rename to epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSignInRecordServiceImpl.java index 7daa9ce36e..3dd6e6e8e1 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSiginInRecordServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSignInRecordServiceImpl.java @@ -18,9 +18,9 @@ package com.epmet.modules.act.service.impl; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; -import com.epmet.modules.act.dao.ActSiginInRecordDao; -import com.epmet.modules.act.entity.ActSiginInRecordEntity; -import com.epmet.modules.act.service.ActSiginInRecordService; +import com.epmet.modules.act.dao.ActSignInRecordDao; +import com.epmet.modules.act.entity.ActSignInRecordEntity; +import com.epmet.modules.act.service.ActSignInRecordService; import org.springframework.stereotype.Service; /** @@ -30,7 +30,7 @@ import org.springframework.stereotype.Service; * @since v1.0.0 2021-04-16 */ @Service -public class ActSiginInRecordServiceImpl extends BaseServiceImpl implements ActSiginInRecordService { +public class ActSignInRecordServiceImpl extends BaseServiceImpl implements ActSignInRecordService { } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActSiginInCodeDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActSignInCodeDao.xml similarity index 67% rename from epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActSiginInCodeDao.xml rename to epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActSignInCodeDao.xml index c536ac8cbd..21072b30c4 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActSiginInCodeDao.xml +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActSignInCodeDao.xml @@ -1,7 +1,7 @@ - + diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActSiginInRecordDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActSignInRecordDao.xml similarity index 66% rename from epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActSiginInRecordDao.xml rename to epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActSignInRecordDao.xml index 0e985b9970..cc6b2a0261 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActSiginInRecordDao.xml +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActSignInRecordDao.xml @@ -1,7 +1,7 @@ - + From 93ce9becddcaa6700663357c2a38492fe0f1f935 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 19 Apr 2021 10:52:10 +0800 Subject: [PATCH 004/202] =?UTF-8?q?=E5=88=97=E5=90=8D=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/resi/group/dto/act/ActSummaryDTO.java | 2 +- .../java/com/epmet/modules/act/entity/ActSummaryEntity.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActSummaryDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActSummaryDTO.java index 49ca083379..c118fd27f6 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActSummaryDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActSummaryDTO.java @@ -57,7 +57,7 @@ public class ActSummaryDTO implements Serializable { /** * 已签到人数 */ - private Integer signInNum; + private Integer signedInNum; /** * 已签到人员姓名列表、分隔 diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActSummaryEntity.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActSummaryEntity.java index 98e1279695..abe18e4bf7 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActSummaryEntity.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActSummaryEntity.java @@ -53,7 +53,7 @@ public class ActSummaryEntity extends BaseEpmetEntity { /** * 已签到人数 */ - private Integer signInNum; + private Integer signedInNum; /** * 已签到人员姓名列表、分隔 From fa76242e0b6eb00e8e3f3a82dfec794d43825dde Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Mon, 19 Apr 2021 14:17:12 +0800 Subject: [PATCH 005/202] =?UTF-8?q?=E5=B0=8F=E7=BB=84=E9=80=9A=E7=9F=A5?= =?UTF-8?q?=E4=BF=9D=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/form/UserMessageFormDTO.java | 2 +- .../dto/topic/form/AddNoticeFormDTO.java | 43 +++++ .../modules/constant/UserMessageConstant.java | 9 + .../member/dao/ResiGroupMemberDao.java | 6 + .../notice/controller/NoticeController.java | 16 ++ .../modules/notice/service/NoticeService.java | 10 + .../service/impl/NoticeServiceImpl.java | 180 +++++++++++++++++- .../mapper/member/ResiGroupMemberDao.xml | 13 ++ 8 files changed, 274 insertions(+), 5 deletions(-) create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/AddNoticeFormDTO.java diff --git a/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/form/UserMessageFormDTO.java b/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/form/UserMessageFormDTO.java index f3298183d6..e00bb88342 100644 --- a/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/form/UserMessageFormDTO.java +++ b/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/form/UserMessageFormDTO.java @@ -58,7 +58,7 @@ public class UserMessageFormDTO implements Serializable { private String readFlag; /** - * 调用者 + * 调用者 【分内部调用和外部调用,内部调用值为空,外部默认为:外挂-站内信】 */ private String referer; } diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/AddNoticeFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/AddNoticeFormDTO.java new file mode 100644 index 0000000000..767bb639ca --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/AddNoticeFormDTO.java @@ -0,0 +1,43 @@ +package com.epmet.resi.group.dto.topic.form; + +import lombok.Data; +import org.hibernate.validator.constraints.Length; + +import javax.validation.constraints.NotBlank; +import java.util.List; + +/** + * @Author sun + * @Description 小组通知保存-接口入参 + */ +@Data +public class AddNoticeFormDTO { + + /** + * 小组Id + */ + @NotBlank(message = "小组Id不能为空",groups = {AddNoticeFormDTO.Add.class}) + private String groupId; + /** + * 通知标题 + */ + @NotBlank(message = "通知标题不能为空",groups = {AddNoticeFormDTO.Add.class}) + @Length(max = 20, message = "通知标题不能超过20个字符") + private String title; + /** + * 通知内容 + */ + @NotBlank(message = "通知内容不能为空",groups = {AddNoticeFormDTO.Add.class}) + @Length(max = 1000, message = "通知内容不能超过1000个字符") + private String content; + /** + * 图片附件集合 + */ + private List imageList; + /** + * 文件附件url集合 + */ + private List docList; + + public interface Add{} +} diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/constant/UserMessageConstant.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/constant/UserMessageConstant.java index eff45ac9a5..374e056117 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/constant/UserMessageConstant.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/constant/UserMessageConstant.java @@ -99,4 +99,13 @@ public interface UserMessageConstant { * 原组长下台 * */ String ORIGINAL_LEADER_DOWN="您已失去【%s】的组长身份,请查看。"; + + /** + * 小组通知发布 + * */ + String GROUP_NOTICE_ADD = "【%s】发布了%s通知,请查看。"; + /** + * 小组通知变更 + * */ + String GROUP_NOTICE_EDIT = "【%s】变更了%s通知,请查看。"; } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/dao/ResiGroupMemberDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/dao/ResiGroupMemberDao.java index 6b2df49d00..069ad9de92 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/dao/ResiGroupMemberDao.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/dao/ResiGroupMemberDao.java @@ -144,4 +144,10 @@ public interface ResiGroupMemberDao extends BaseDao { * @Date 2021/4/6 12:50 **/ List queryMemberRemovedRecs(@Param("groupId")String groupId, @Param("userId")String userId); + + /** + * @Description 查询组内有效人员列表 + * @author sun + */ + List getMemberList(@Param("groupId") String groupId); } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeController.java index b2a8478edd..6b1c5cb5b6 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeController.java @@ -17,7 +17,9 @@ package com.epmet.modules.notice.controller; +import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.AssertUtils; @@ -28,6 +30,7 @@ import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.modules.notice.excel.NoticeExcel; import com.epmet.modules.notice.service.NoticeService; import com.epmet.resi.group.dto.notice.NoticeDTO; +import com.epmet.resi.group.dto.topic.form.AddNoticeFormDTO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -91,4 +94,17 @@ public class NoticeController { ExcelUtils.exportExcelToTarget(response, null, list, NoticeExcel.class); } + /** + * @param formDTO + * @return + * @Author sun + * @Description 小组通知保存 + **/ + @PostMapping(value = "add") + public Result add(@LoginUser TokenDto tokenDto, @RequestBody AddNoticeFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, AddNoticeFormDTO.Add.class); + noticeService.add(tokenDto, formDTO); + return new Result(); + } + } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeService.java index 4ae16bbce4..fb153f03c4 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeService.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeService.java @@ -19,8 +19,10 @@ package com.epmet.modules.notice.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.modules.notice.entity.NoticeEntity; import com.epmet.resi.group.dto.notice.NoticeDTO; +import com.epmet.resi.group.dto.topic.form.AddNoticeFormDTO; import java.util.List; import java.util.Map; @@ -92,4 +94,12 @@ public interface NoticeService extends BaseService { * @date 2021-04-19 */ void delete(String[] ids); + + /** + * @param formDTO + * @return + * @Author sun + * @Description 小组通知保存 + **/ + void add(TokenDto tokenDto, AddNoticeFormDTO formDTO); } \ No newline at end of file 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 0478a8cca6..e0f274e4e9 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 @@ -17,25 +17,55 @@ package com.epmet.modules.notice.service.impl; +import cn.hutool.core.collection.CollUtil; 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.AppClientConstant; import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.constant.NumConstant; +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.scan.param.ImgScanParamDTO; +import com.epmet.commons.tools.scan.param.ImgTaskDTO; +import com.epmet.commons.tools.scan.param.TextScanParamDTO; +import com.epmet.commons.tools.scan.param.TextTaskDTO; +import com.epmet.commons.tools.scan.result.SyncScanResult; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.utils.ScanContentUtils; +import com.epmet.constant.ReadFlagConstant; +import com.epmet.dto.form.LoginUserDetailsFormDTO; +import com.epmet.dto.form.UserMessageFormDTO; +import com.epmet.dto.result.LoginUserDetailsResultDTO; +import com.epmet.feign.EpmetMessageOpenFeignClient; +import com.epmet.feign.EpmetUserOpenFeignClient; +import com.epmet.modules.constant.UserMessageConstant; +import com.epmet.modules.group.dao.ResiGroupDao; +import com.epmet.modules.group.entity.ResiGroupEntity; +import com.epmet.modules.member.dao.ResiGroupMemberDao; import com.epmet.modules.notice.dao.NoticeDao; import com.epmet.modules.notice.entity.NoticeEntity; import com.epmet.modules.notice.redis.NoticeRedis; import com.epmet.modules.notice.service.NoticeService; +import com.epmet.resi.group.constant.TopicConstant; +import com.epmet.resi.group.dto.member.ResiGroupMemberDTO; import com.epmet.resi.group.dto.notice.NoticeDTO; +import com.epmet.resi.group.dto.topic.form.AddNoticeFormDTO; +import com.epmet.resi.group.dto.topic.form.FileDTO; import org.apache.commons.lang3.StringUtils; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import java.util.Arrays; -import java.util.List; -import java.util.Map; +import java.util.*; +import java.util.concurrent.atomic.AtomicReference; +import java.util.stream.Collectors; /** * 小组通知表 @@ -45,9 +75,24 @@ import java.util.Map; */ @Service public class NoticeServiceImpl extends BaseServiceImpl implements NoticeService { - + private final Log logger = LogFactory.getLog(getClass()); @Autowired private NoticeRedis noticeRedis; + @Value("${openapi.scan.server.url}") + private String scanApiUrl; + @Value("${openapi.scan.method.textSyncScan}") + private String textSyncScanMethod; + @Value("${openapi.scan.method.imgSyncScan}") + private String imgSyncScanMethod;ResiGroupMemberDao; + @Autowired + private ResiGroupMemberDao resiGroupMemberDao; + @Autowired + private ResiGroupDao resiGroupDao; + @Autowired + private EpmetUserOpenFeignClient epmetUserOpenFeignClient; + @Autowired + private EpmetMessageOpenFeignClient epmetMessageOpenFeignClient; + @Override public PageData page(Map params) { @@ -101,4 +146,131 @@ public class NoticeServiceImpl extends BaseServiceImpl baseDao.deleteBatchIds(Arrays.asList(ids)); } + /** + * @param formDTO + * @return + * @Author sun + * @Description 小组通知保存 + **/ + @Override + @Transactional(rollbackFor = Exception.class) + public void add(TokenDto tokenDto, AddNoticeFormDTO formDTO) { + //1.查询组内成员数据 + List memberList = resiGroupMemberDao.getMemberList(formDTO.getGroupId()); + if(CollUtil.isEmpty(memberList)){ + throw new RenException(String.format("保存小组通知,获取组内成员列表失败,小组Id->", formDTO.getGroupId())); + } + + //2.校验当前操作人员是否为组长 + AtomicReference bl = new AtomicReference<>(true); + memberList.forEach(m->{ + if(m.getCustomerUserId().equals(tokenDto.getUserId())&&"leader".equals(m.getGroupLeaderFlag())){ + bl.set(false); + } + }); + if(bl.get()){ + throw new RenException(String.format("保存小组通知,当前操作人员不是群组长,小组Id->", formDTO.getGroupId())); + } + + //3.文字、图片安全校验 + List wordList = new ArrayList<>(); + wordList.add(formDTO.getTitle());wordList.add(formDTO.getContent()); + List imageList = formDTO.getImageList().stream().map(FileDTO::getUrl).collect(Collectors.toList()); + safetyCheck(wordList, imageList); + + //4.保存小组通知基础数据 + //4-1.获取小组信息 + ResiGroupEntity groupEntity = resiGroupDao.selectById(formDTO.getGroupId()); + if(null == groupEntity){ + throw new RenException(String.format("保存小组通知,获取小组数据失败,小组Id->", tokenDto.getUserId())); + } + //4-2.获取token用户所属组织信息 + LoginUserDetailsFormDTO dto = new LoginUserDetailsFormDTO(); + dto.setApp(tokenDto.getApp()); + dto.setClient(tokenDto.getClient()); + dto.setUserId(tokenDto.getUserId()); + Result result = epmetUserOpenFeignClient.getLoginUserDetails(dto); + if (!result.success() || org.springframework.util.StringUtils.isEmpty(result.getData().getAgencyId())) { + throw new RenException(String.format("调用user服务查询用户数据失败,userId->", tokenDto.getUserId())); + } + LoginUserDetailsResultDTO resultDTO = result.getData(); + + //4-3.保存通知数据 + NoticeEntity entity = new NoticeEntity(); + entity.setCustomerId(resultDTO.getCustomerId()); + entity.setAgencyId(resultDTO.getAgencyId()); + entity.setGridId(groupEntity.getGridId()); + entity.setGroupId(formDTO.getGroupId()); + entity.setTitle(formDTO.getTitle()); + entity.setContent(formDTO.getContent()); + entity.setIsChange("no"); + entity.setChangeTime(new Date()); + insert(entity); + + //5.组内成员推送站内信 + List userMessageFormDTOS = new ArrayList<>(); + memberList.forEach(m->{ + if(!"".equals(m.getGroupLeaderFlag())){ + UserMessageFormDTO userMessageFormDTO = new UserMessageFormDTO(); + userMessageFormDTO.setCustomerId(resultDTO.getCustomerId()); + userMessageFormDTO.setUserId(m.getCustomerUserId()); + userMessageFormDTO.setGridId(groupEntity.getGridId()); + userMessageFormDTO.setApp(AppClientConstant.APP_RESI); + userMessageFormDTO.setTitle(UserMessageConstant.GROUP_TITLE); + userMessageFormDTO.setReadFlag(ReadFlagConstant.UN_READ); + userMessageFormDTO.setMessageContent(String.format(UserMessageConstant.GROUP_NOTICE_ADD, groupEntity.getGroupName(), formDTO.getTitle())); + userMessageFormDTOS.add(userMessageFormDTO); + } + }); + Result sendMessageRes = epmetMessageOpenFeignClient.saveUserMessageList(userMessageFormDTOS); + if (!sendMessageRes.success()) { + logger.warn("小组通知,给组内成员推送站内信失败。"); + } + + } + + /** + * @Author sun + * @Description 文字、图片安全校验 + **/ + private void safetyCheck(List wordList, List imageList){ + if (imageList.size() != NumConstant.ZERO){ + wordList.forEach(word->{ + //创建话题内容审核 + TextScanParamDTO textScanParamDTO = new TextScanParamDTO(); + TextTaskDTO taskDTO = new TextTaskDTO(); + taskDTO.setContent(word); + taskDTO.setDataId(UUID.randomUUID().toString().replace("-", "")); + textScanParamDTO.getTasks().add(taskDTO); + Result textSyncScanResult = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScanParamDTO); + if (!textSyncScanResult.success()) { + throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); + } else { + if (!textSyncScanResult.getData().isAllPass()) { + logger.error(String.format(TopicConstant.CREATE_TOPIC, word)); + throw new RenException(EpmetErrorCode.TEXT_SCAN_FAILED.getCode()); + } + } + }); + } + //创建话题图片审核 + if (imageList.size() != NumConstant.ZERO){ + ImgScanParamDTO imgScanParamDTO = new ImgScanParamDTO(); + imageList.forEach(url -> { + ImgTaskDTO task = new ImgTaskDTO(); + task.setDataId(UUID.randomUUID().toString().replace("-", "")); + task.setUrl(url); + imgScanParamDTO.getTasks().add(task); + }); + Result imgScanResult = ScanContentUtils.imgSyncScan(scanApiUrl.concat(imgSyncScanMethod), imgScanParamDTO); + if (!imgScanResult.success()){ + throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); + } else { + if (!imgScanResult.getData().isAllPass()) { + throw new RenException(EpmetErrorCode.IMG_SCAN_FAILED.getCode()); + } + } + } + } + } \ No newline at end of file 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 620bac3066..de37af3b95 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 @@ -191,4 +191,17 @@ ORDER BY rgm.CREATED_TIME DESC + + From c723ecd7769033345c9066464c69b197c89c6e14 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Mon, 19 Apr 2021 14:28:24 +0800 Subject: [PATCH 006/202] =?UTF-8?q?=E7=BC=96=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/modules/notice/service/impl/NoticeServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 e0f274e4e9..6080c245ea 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 @@ -83,7 +83,7 @@ public class NoticeServiceImpl extends BaseServiceImpl @Value("${openapi.scan.method.textSyncScan}") private String textSyncScanMethod; @Value("${openapi.scan.method.imgSyncScan}") - private String imgSyncScanMethod;ResiGroupMemberDao; + private String imgSyncScanMethod; @Autowired private ResiGroupMemberDao resiGroupMemberDao; @Autowired From 06467acabf435e0b8e5fce74058396d27d8ef4db Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 19 Apr 2021 15:06:57 +0800 Subject: [PATCH 007/202] =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E7=B1=BB=E5=88=AB?= =?UTF-8?q?=E5=AD=97=E5=85=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/act/form/ActCategoryFormDTO.java | 29 +++++++++++ .../group/dto/act/form/ActMenuFormDTO.java | 28 +++++++++++ .../dto/act/result/ActMenuResultDTO.java | 28 +++++++++++ .../dto/act/result/CategoryCodeResultDTO.java | 24 ++++++++++ .../group/dto/act/result/CategoryDTO.java | 18 +++++++ .../controller/ActCategoryDictController.java | 41 ++++++++++++++++ .../modules/act/dao/ActCategoryDictDao.java | 24 +++++++++- .../act/service/ActCategoryDictService.java | 21 ++++++++ .../impl/ActCategoryDictServiceImpl.java | 48 +++++++++++++++++++ .../modules/constant/GroupActConstant.java | 11 +++++ .../member/dao/ResiGroupMemberDao.java | 9 ++++ .../service/ResiGroupMemberService.java | 9 ++++ .../impl/ResiGroupMemberServiceImpl.java | 12 +++++ .../mapper/act/ActCategoryDictDao.xml | 38 +++++++++++++++ .../mapper/member/ResiGroupMemberDao.xml | 11 +++++ 15 files changed, 350 insertions(+), 1 deletion(-) create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/ActCategoryFormDTO.java create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/ActMenuFormDTO.java create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/ActMenuResultDTO.java create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/CategoryCodeResultDTO.java create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/CategoryDTO.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/constant/GroupActConstant.java diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/ActCategoryFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/ActCategoryFormDTO.java new file mode 100644 index 0000000000..11f4dfc2f5 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/ActCategoryFormDTO.java @@ -0,0 +1,29 @@ +package com.epmet.resi.group.dto.act.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * 002、活动类别下拉框查询 + * + * @author yinzuomei@elink-cn.com + * @date 2021/4/19 14:16 + */ +@Data +public class ActCategoryFormDTO implements Serializable { + + + public interface AddUserInternalGroup { + } + + /** + * 组Id + */ + @NotBlank(message = "categoryCode不能为空", groups = ActCategoryFormDTO.AddUserInternalGroup.class) + private String categoryCode; + + @NotBlank(message = "tokenDto获取customerId为空", groups = ActCategoryFormDTO.AddUserInternalGroup.class) + private String customerId; +} diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/ActMenuFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/ActMenuFormDTO.java new file mode 100644 index 0000000000..0a36724680 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/ActMenuFormDTO.java @@ -0,0 +1,28 @@ +package com.epmet.resi.group.dto.act.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * 001、活动类别列表 入参 + * + * @author yinzuomei@elink-cn.com + * @date 2021/4/19 13:13 + */ +@Data +public class ActMenuFormDTO implements Serializable { + public interface AddUserInternalGroup { + } + + /** + * 组Id + */ + @NotBlank(message = "groupId不能为空", groups =AddUserInternalGroup.class) + private String groupId; + + @NotBlank(message = "tokenDto获取customerId为空", groups =AddUserInternalGroup.class) + private String customerId; + +} diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/ActMenuResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/ActMenuResultDTO.java new file mode 100644 index 0000000000..f28787e7f6 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/ActMenuResultDTO.java @@ -0,0 +1,28 @@ +package com.epmet.resi.group.dto.act.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * 001、活动类别列表 返参 + * + * @author yinzuomei@elink-cn.com + * @date 2021/4/19 13:14 + */ +@Data +public class ActMenuResultDTO implements Serializable { + private static final long serialVersionUID = 7376609450780826924L; + + /** + * 活动应参加人数 + */ + private Integer shouldAttend; + + /** + * 一级菜单列表 + */ + private List categoryList; + +} diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/CategoryCodeResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/CategoryCodeResultDTO.java new file mode 100644 index 0000000000..561fcee752 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/CategoryCodeResultDTO.java @@ -0,0 +1,24 @@ +package com.epmet.resi.group.dto.act.result; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * 002、活动类别下拉框查询 返参 + * + * @author yinzuomei@elink-cn.com + * @date 2021/4/19 14:18 + */ +@Data +public class CategoryCodeResultDTO implements Serializable { + private static final long serialVersionUID = 8615713807759844661L; + @JsonIgnore + private String customerId; + private String categoryCode; + private String categoryName; + private String parentCode; + private List children; +} diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/CategoryDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/CategoryDTO.java new file mode 100644 index 0000000000..c188bc5b19 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/CategoryDTO.java @@ -0,0 +1,18 @@ +package com.epmet.resi.group.dto.act.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 001、活动类别列表 返参-一级类别信息 + * + * @author yinzuomei@elink-cn.com + * @date 2021/4/19 13:28 + */ +@Data +public class CategoryDTO implements Serializable { + private String categoryCode; + private String categoryName; + private String parentCode; +} diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/ActCategoryDictController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/ActCategoryDictController.java index b7d4908d91..d80c7b807b 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/ActCategoryDictController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/ActCategoryDictController.java @@ -17,11 +17,23 @@ package com.epmet.modules.act.controller; +import com.epmet.commons.tools.annotation.LoginUser; +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.act.service.ActCategoryDictService; +import com.epmet.resi.group.dto.act.form.ActCategoryFormDTO; +import com.epmet.resi.group.dto.act.form.ActMenuFormDTO; +import com.epmet.resi.group.dto.act.result.ActMenuResultDTO; +import com.epmet.resi.group.dto.act.result.CategoryCodeResultDTO; 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; +import java.util.List; + /** * 活动类别字典 @@ -37,4 +49,33 @@ public class ActCategoryDictController { private ActCategoryDictService actCategoryDictService; + /** + * @param tokenDto + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @author yinzuomei + * @description 001、活动类别列表 + * @Date 2021/4/19 13:25 + **/ + @PostMapping("menulist") + public Result queryMenuList(@LoginUser TokenDto tokenDto, @RequestBody ActMenuFormDTO formDTO) { + formDTO.setCustomerId(tokenDto.getCustomerId()); + ValidatorUtils.validateEntity(formDTO, ActMenuFormDTO.AddUserInternalGroup.class); + return new Result().ok(actCategoryDictService.queryMenuList(formDTO)); + } + + /** + * @return com.epmet.commons.tools.utils.Result> + * @param tokenDto + * @param formDTO + * @author yinzuomei + * @description 002、活动类别下拉框查询 + * @Date 2021/4/19 14:22 + **/ + @PostMapping("categorylist") + public Result> queryCategoryList(@LoginUser TokenDto tokenDto, @RequestBody ActCategoryFormDTO formDTO) { + formDTO.setCustomerId(tokenDto.getCustomerId()); + ValidatorUtils.validateEntity(formDTO, ActCategoryFormDTO.AddUserInternalGroup.class); + return new Result>().ok(actCategoryDictService.queryCategoryList(formDTO)); + } } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActCategoryDictDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActCategoryDictDao.java index 953256d85c..c1bfafed16 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActCategoryDictDao.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActCategoryDictDao.java @@ -19,7 +19,12 @@ package com.epmet.modules.act.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.modules.act.entity.ActCategoryDictEntity; +import com.epmet.resi.group.dto.act.result.CategoryCodeResultDTO; +import com.epmet.resi.group.dto.act.result.CategoryDTO; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 活动类别字典 @@ -29,5 +34,22 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface ActCategoryDictDao extends BaseDao { - + + /** + * 查询一级类别 + * + * @param customerId + * @return com.epmet.resi.group.dto.act.result.CategoryDTO + */ + List selectFirstLevelCategory(String customerId); + + /** + * 查询一级类别 + * + * @param parentCode + * @param customerId + * @return com.epmet.resi.group.dto.act.result.CategoryCodeResultDTO + */ + List selectCategoryList(@Param("parentCode") String parentCode, + @Param("customerId") String customerId); } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActCategoryDictService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActCategoryDictService.java index 5531847600..5fe3d02360 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActCategoryDictService.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActCategoryDictService.java @@ -19,6 +19,12 @@ package com.epmet.modules.act.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.modules.act.entity.ActCategoryDictEntity; +import com.epmet.resi.group.dto.act.form.ActCategoryFormDTO; +import com.epmet.resi.group.dto.act.form.ActMenuFormDTO; +import com.epmet.resi.group.dto.act.result.ActMenuResultDTO; +import com.epmet.resi.group.dto.act.result.CategoryCodeResultDTO; + +import java.util.List; /** * 活动类别字典 @@ -28,4 +34,19 @@ import com.epmet.modules.act.entity.ActCategoryDictEntity; */ public interface ActCategoryDictService extends BaseService { + /** + * 001、活动类别列表 + * + * @param formDTO + * @return com.epmet.resi.group.dto.act.result.ActMenuResultDTO + */ + ActMenuResultDTO queryMenuList(ActMenuFormDTO formDTO); + + /** + * 002、活动类别下拉框查询 + * + * @param formDTO + * @return com.epmet.resi.group.dto.act.result.CategoryCodeResultDTO + */ + List queryCategoryList(ActCategoryFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActCategoryDictServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActCategoryDictServiceImpl.java index 0234447876..96f034b305 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActCategoryDictServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActCategoryDictServiceImpl.java @@ -21,16 +21,64 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.modules.act.dao.ActCategoryDictDao; import com.epmet.modules.act.entity.ActCategoryDictEntity; import com.epmet.modules.act.service.ActCategoryDictService; +import com.epmet.modules.constant.GroupActConstant; +import com.epmet.modules.member.service.ResiGroupMemberService; +import com.epmet.resi.group.dto.act.form.ActCategoryFormDTO; +import com.epmet.resi.group.dto.act.form.ActMenuFormDTO; +import com.epmet.resi.group.dto.act.result.ActMenuResultDTO; +import com.epmet.resi.group.dto.act.result.CategoryCodeResultDTO; +import com.epmet.resi.group.dto.act.result.CategoryDTO; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.CollectionUtils; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.util.List; + /** * 活动类别字典 * * @author generator generator@elink-cn.com * @since v1.0.0 2021-04-16 */ +@Slf4j @Service public class ActCategoryDictServiceImpl extends BaseServiceImpl implements ActCategoryDictService { + @Autowired + private ResiGroupMemberService resiGroupMemberService; + + + /** + * 001、活动类别列表 + * + * @param formDTO + * @return com.epmet.resi.group.dto.act.result.ActMenuResultDTO + */ + @Override + public ActMenuResultDTO queryMenuList(ActMenuFormDTO formDTO) { + ActMenuResultDTO resultDTO = new ActMenuResultDTO(); + resultDTO.setShouldAttend(resiGroupMemberService.selectCountMember(formDTO.getGroupId())); + List categoryList = baseDao.selectFirstLevelCategory(formDTO.getCustomerId()); + if (CollectionUtils.isEmpty(categoryList)) { + categoryList = baseDao.selectFirstLevelCategory(GroupActConstant.DEFAULT_CUSTOMER_ID); + } + resultDTO.setCategoryList(categoryList); + return resultDTO; + } + /** + * 002、活动类别下拉框查询 + * + * @param formDTO + * @return com.epmet.resi.group.dto.act.result.CategoryCodeResultDTO + */ + @Override + public List queryCategoryList(ActCategoryFormDTO formDTO) { + List list = baseDao.selectCategoryList(formDTO.getCategoryCode(), formDTO.getCustomerId()); + if (CollectionUtils.isEmpty(list)) { + list = baseDao.selectCategoryList(formDTO.getCategoryCode(), GroupActConstant.DEFAULT_CUSTOMER_ID); + } + return list; + } } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/constant/GroupActConstant.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/constant/GroupActConstant.java new file mode 100644 index 0000000000..5fa2e8cd79 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/constant/GroupActConstant.java @@ -0,0 +1,11 @@ +package com.epmet.modules.constant; + +/** + * 描述一下 + * + * @author yinzuomei@elink-cn.com + * @date 2021/4/19 13:41 + */ +public interface GroupActConstant { + String DEFAULT_CUSTOMER_ID = "default"; +} diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/dao/ResiGroupMemberDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/dao/ResiGroupMemberDao.java index 6b2df49d00..db3b286b5f 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/dao/ResiGroupMemberDao.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/dao/ResiGroupMemberDao.java @@ -144,4 +144,13 @@ public interface ResiGroupMemberDao extends BaseDao { * @Date 2021/4/6 12:50 **/ List queryMemberRemovedRecs(@Param("groupId")String groupId, @Param("userId")String userId); + + /** + * @return java.lang.Integer + * @param groupId + * @author yinzuomei + * @description 查询组内成员总数 + * @Date 2021/4/19 13:54 + **/ + Integer selectCountMember(String groupId); } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/ResiGroupMemberService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/ResiGroupMemberService.java index 5a9563141b..276ec73387 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/ResiGroupMemberService.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/ResiGroupMemberService.java @@ -225,4 +225,13 @@ public interface ResiGroupMemberService extends BaseService queryMemberRemovedRecs(String groupId, String userId); + + /** + * @return java.lang.Integer + * @param groupId + * @author yinzuomei + * @description 查询组内成员总数 + * @Date 2021/4/19 13:53 + **/ + Integer selectCountMember(String groupId); } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/ResiGroupMemberServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/ResiGroupMemberServiceImpl.java index 7fd7e48259..489467de93 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/ResiGroupMemberServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/ResiGroupMemberServiceImpl.java @@ -339,6 +339,18 @@ public class ResiGroupMemberServiceImpl extends BaseServiceImpl + + + + + + + + + + + + \ No newline at end of file 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 620bac3066..867b18eb4c 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 @@ -191,4 +191,15 @@ ORDER BY rgm.CREATED_TIME DESC + + + From eed1afa908566d88a824cd482301a982cc2d1617 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 19 Apr 2021 15:11:21 +0800 Subject: [PATCH 008/202] =?UTF-8?q?=E5=88=9B=E5=BB=BA=E5=B0=8F=E7=BB=84?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20groupType?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resi/group/dto/group/form/ApplyCreateGroupFormDTO.java | 6 ++++++ .../com/epmet/modules/group/entity/ResiGroupEntity.java | 5 +++++ .../modules/group/service/impl/ResiGroupServiceImpl.java | 7 ++++--- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/form/ApplyCreateGroupFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/form/ApplyCreateGroupFormDTO.java index 69efcf295c..fc14ffd2f5 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/form/ApplyCreateGroupFormDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/form/ApplyCreateGroupFormDTO.java @@ -69,4 +69,10 @@ public class ApplyCreateGroupFormDTO implements Serializable { * 小组是否允许参观:允许:open;不允许:closed */ private String visitSwitch; + + /** + * 小组类型(ordinary:楼院小组 branch:支部小组) + */ + @NotBlank(message = "小组类型不能为空") + private String groupType; } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/entity/ResiGroupEntity.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/entity/ResiGroupEntity.java index 1c80c117eb..147aed6717 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/entity/ResiGroupEntity.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/entity/ResiGroupEntity.java @@ -83,4 +83,9 @@ Ps: 如果一个小组被拒绝,当前小组的状态将永久停留在“审 * VISIT_SWITCH 小组是否允许参观:允许:open;不允许:closed */ private String visitSwitch; + + /** + * 小组类型(ordinary:楼院小组 branch:支部小组) + */ + private String groupType; } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java index 26f1b8c746..4d5baf8b16 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java @@ -373,9 +373,9 @@ public class ResiGroupServiceImpl extends BaseServiceImpl Date: Mon, 19 Apr 2021 15:11:57 +0800 Subject: [PATCH 009/202] =?UTF-8?q?=E5=88=9B=E5=BB=BA=E5=B0=8F=E7=BB=84?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20groupType?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/group/service/impl/ResiGroupServiceImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java index 4d5baf8b16..a2876cf267 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java @@ -373,9 +373,9 @@ public class ResiGroupServiceImpl extends BaseServiceImpl Date: Mon, 19 Apr 2021 15:44:35 +0800 Subject: [PATCH 010/202] =?UTF-8?q?=E6=8E=A8=E8=8D=90=E5=B0=8F=E7=BB=84?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20groupType=EF=BC=8C=E5=B0=8F=E7=BB=84?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=20=EF=BC=81=3D=20=E6=94=AF=E9=83=A8=20?= =?UTF-8?q?=E6=88=91=E7=9A=84=E5=B0=8F=E7=BB=84=E6=B7=BB=E5=8A=A0groupType?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/resi/group/dto/group/result/MyGroupResultDTO.java | 5 +++++ .../resi/group/dto/group/result/RecommendGroupResultDTO.java | 5 +++++ .../src/main/resources/mapper/group/ResiGroupDao.xml | 5 ++++- 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/group/result/MyGroupResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/MyGroupResultDTO.java index 55b32591c0..29a074e451 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/MyGroupResultDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/MyGroupResultDTO.java @@ -52,4 +52,9 @@ public class MyGroupResultDTO implements Serializable { * 最新话题 */ private LatestTopicDTO latestTopic; + + /** + * 小组类型(ordinary:楼院小组 branch:支部小组) + */ + private String groupType; } diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/RecommendGroupResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/RecommendGroupResultDTO.java index 1c2fb006a0..72de523d2a 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/RecommendGroupResultDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/RecommendGroupResultDTO.java @@ -43,4 +43,9 @@ public class RecommendGroupResultDTO implements Serializable { */ private String status=""; + /** + * 小组类型(ordinary:楼院小组 branch:支部小组) + */ + private String groupType; + } 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 760a420020..3a451a9342 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 @@ -24,7 +24,8 @@ rgs.TOTAL_MEMBERS , rgs.TOTAL_PARTY_MEMBERS , rg.STATE , - rgm.GROUP_LEADER_FLAG + rgm.GROUP_LEADER_FLAG, + rg.GROUP_TYPE FROM resi_group_member rgm LEFT JOIN resi_group rg ON ( rgm.RESI_GROUP_ID = rg.ID ) @@ -64,6 +65,7 @@ rg.id AS groupId, rg.GROUP_HEAD_PHOTO AS groupHeadPhoto, rg.GROUP_NAME AS groupName, + rg.GROUP_TYPE AS groupType, rgs.TOTAL_MEMBERS AS totalMember, rgs.TOTAL_PARTY_MEMBERS AS totalPartyMember FROM @@ -85,6 +87,7 @@ and rg.CUSTOMER_ID=#{customerId} and rg.GRID_ID=#{gridId} and rg.STATE ='approved' + and rg.GROUP_TYPE != 'branch' order by totalMember desc,rg.LATEST_TOPIC_PUBLISH_DATE desc LIMIT #{pageNo}, #{pageSize} From 18bffe8aa156d6742dfd97de9fa02fc2d5351a06 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 19 Apr 2021 16:03:04 +0800 Subject: [PATCH 011/202] =?UTF-8?q?=E6=A5=BC=E9=99=A2=E5=B0=8F=E7=BB=84?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=94=99=E8=AF=AF=E7=BC=96=E7=A0=81=EF=BC=8C?= =?UTF-8?q?8901=E3=80=818902=EF=BC=8C=E6=97=A5=E5=90=8E=E6=A5=BC=E9=99=A2?= =?UTF-8?q?=E5=B0=8F=E7=BB=84=E7=BB=9F=E4=B8=80=E7=94=A889xx=E5=90=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/commons/tools/exception/EpmetErrorCode.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java index 5673b272f1..df2336eec5 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java @@ -158,7 +158,11 @@ public enum EpmetErrorCode { OPEN_API_SIGN_ERROR(10104, "签名错误"), OPEN_API_PARAMS_APPID_DIFF(10105, "app_id不一致"), // app_id在请求参数中和在token中不一致 OPEN_API_REQUEST_EXPIRED(10106, "请求过期"), - OPEN_API_REQUEST_REPEAT(10107, "请求重复"); + OPEN_API_REQUEST_REPEAT(10107, "请求重复"), + + //楼院小组89 + GROUP_ACT_CANCELED(8901,"活动已取消,不能编辑"), + GROUP_ACT_CLOSED(8902,"活动已关闭,不能编辑"); private int code; private String msg; From 6b1a6192d73a48c8a1db4d8cf95bdcc7a720452e Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Mon, 19 Apr 2021 16:10:42 +0800 Subject: [PATCH 012/202] =?UTF-8?q?=E5=B0=8F=E7=BB=84=E9=80=9A=E7=9F=A5?= =?UTF-8?q?=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/topic/form/EditNoticeFormDTO.java | 41 +++ .../notice/controller/NoticeController.java | 14 ++ .../notice/dao/NoticeAttachmentDao.java | 8 +- .../notice/dao/NoticeReafdRecordDao.java | 8 +- .../modules/notice/service/NoticeService.java | 9 + .../service/impl/NoticeServiceImpl.java | 235 ++++++++++++++++-- .../mapper/notice/NoticeAttachmentDao.xml | 7 + .../mapper/notice/NoticeReafdRecordDao.xml | 7 + 8 files changed, 311 insertions(+), 18 deletions(-) create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/EditNoticeFormDTO.java diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/EditNoticeFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/EditNoticeFormDTO.java new file mode 100644 index 0000000000..effa23bc47 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/EditNoticeFormDTO.java @@ -0,0 +1,41 @@ +package com.epmet.resi.group.dto.topic.form; + +import lombok.Data; +import org.hibernate.validator.constraints.Length; + +import javax.validation.constraints.NotBlank; +import java.util.List; + +/** + * @Author sun + * @Description 小组通知编辑-接口入参 + */ +@Data +public class EditNoticeFormDTO { + + /** + * 通知Id + */ + @NotBlank(message = "通知Id不能为空",groups = {EditNoticeFormDTO.Edit.class}) + private String noticeId; + /** + * 通知标题 + */ + @Length(max = 20, message = "通知标题不能超过20个字符") + private String title; + /** + * 通知内容 + */ + @Length(max = 1000, message = "通知内容不能超过1000个字符") + private String content; + /** + * 图片附件集合 + */ + private List imageList; + /** + * 文件附件url集合 + */ + private List docList; + + public interface Edit{} +} diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeController.java index 6b1c5cb5b6..81504025c2 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeController.java @@ -31,6 +31,7 @@ import com.epmet.modules.notice.excel.NoticeExcel; import com.epmet.modules.notice.service.NoticeService; import com.epmet.resi.group.dto.notice.NoticeDTO; import com.epmet.resi.group.dto.topic.form.AddNoticeFormDTO; +import com.epmet.resi.group.dto.topic.form.EditNoticeFormDTO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -107,4 +108,17 @@ public class NoticeController { return new Result(); } + /** + * @param formDTO + * @return + * @Author sun + * @Description 小组通知变更 + **/ + @PostMapping(value = "edit") + public Result edit(@LoginUser TokenDto tokenDto, @RequestBody EditNoticeFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, EditNoticeFormDTO.Edit.class); + noticeService.edit(tokenDto, formDTO); + return new Result(); + } + } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/dao/NoticeAttachmentDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/dao/NoticeAttachmentDao.java index 5561248f73..34aef12db5 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/dao/NoticeAttachmentDao.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/dao/NoticeAttachmentDao.java @@ -20,6 +20,7 @@ package com.epmet.modules.notice.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.modules.notice.entity.NoticeAttachmentEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; /** * 小组通知附件表 @@ -29,5 +30,10 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface NoticeAttachmentDao extends BaseDao { - + + /** + * @Author sun + * @Description 删除通知附件-物理删除 + **/ + void delByNoticeId(@Param("noticeId") String noticeId); } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/dao/NoticeReafdRecordDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/dao/NoticeReafdRecordDao.java index 3cfb9389a4..bc16f1881b 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/dao/NoticeReafdRecordDao.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/dao/NoticeReafdRecordDao.java @@ -20,6 +20,7 @@ package com.epmet.modules.notice.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.modules.notice.entity.NoticeReafdRecordEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; /** * 小组通知组成员阅读记录表 @@ -29,5 +30,10 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface NoticeReafdRecordDao extends BaseDao { - + + /** + * @Author sun + * @Description 删除通知已读未读数据-物理删除 + **/ + void delByNoticeId(@Param("noticeId") String noticeId); } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeService.java index fb153f03c4..abc9a43894 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeService.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeService.java @@ -23,6 +23,7 @@ import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.modules.notice.entity.NoticeEntity; import com.epmet.resi.group.dto.notice.NoticeDTO; import com.epmet.resi.group.dto.topic.form.AddNoticeFormDTO; +import com.epmet.resi.group.dto.topic.form.EditNoticeFormDTO; import java.util.List; import java.util.Map; @@ -102,4 +103,12 @@ public interface NoticeService extends BaseService { * @Description 小组通知保存 **/ void add(TokenDto tokenDto, AddNoticeFormDTO formDTO); + + /** + * @param formDTO + * @return + * @Author sun + * @Description 小组通知变更 + **/ + void edit(TokenDto tokenDto, EditNoticeFormDTO formDTO); } \ No newline at end of file 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 6080c245ea..b87d78f76e 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 @@ -46,15 +46,23 @@ import com.epmet.modules.constant.UserMessageConstant; import com.epmet.modules.group.dao.ResiGroupDao; import com.epmet.modules.group.entity.ResiGroupEntity; import com.epmet.modules.member.dao.ResiGroupMemberDao; +import com.epmet.modules.notice.dao.NoticeAttachmentDao; import com.epmet.modules.notice.dao.NoticeDao; +import com.epmet.modules.notice.dao.NoticeReafdRecordDao; +import com.epmet.modules.notice.entity.NoticeAttachmentEntity; import com.epmet.modules.notice.entity.NoticeEntity; +import com.epmet.modules.notice.entity.NoticeReafdRecordEntity; import com.epmet.modules.notice.redis.NoticeRedis; +import com.epmet.modules.notice.service.NoticeAttachmentService; +import com.epmet.modules.notice.service.NoticeReafdRecordService; import com.epmet.modules.notice.service.NoticeService; import com.epmet.resi.group.constant.TopicConstant; import com.epmet.resi.group.dto.member.ResiGroupMemberDTO; import com.epmet.resi.group.dto.notice.NoticeDTO; import com.epmet.resi.group.dto.topic.form.AddNoticeFormDTO; +import com.epmet.resi.group.dto.topic.form.EditNoticeFormDTO; import com.epmet.resi.group.dto.topic.form.FileDTO; +import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -64,6 +72,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.*; +import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReference; import java.util.stream.Collectors; @@ -92,6 +101,14 @@ public class NoticeServiceImpl extends BaseServiceImpl private EpmetUserOpenFeignClient epmetUserOpenFeignClient; @Autowired private EpmetMessageOpenFeignClient epmetMessageOpenFeignClient; + @Autowired + private NoticeAttachmentService noticeAttachmentService; + @Autowired + private NoticeAttachmentDao noticeAttachmentDao; + @Autowired + private NoticeReafdRecordService noticeReafdRecordService; + @Autowired + private NoticeReafdRecordDao noticeReafdRecordDao; @Override @@ -110,8 +127,8 @@ public class NoticeServiceImpl extends BaseServiceImpl return ConvertUtils.sourceToTarget(entityList, NoticeDTO.class); } - private QueryWrapper getWrapper(Map params){ - String id = (String)params.get(FieldConstant.ID_HUMP); + 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); @@ -157,31 +174,32 @@ public class NoticeServiceImpl extends BaseServiceImpl public void add(TokenDto tokenDto, AddNoticeFormDTO formDTO) { //1.查询组内成员数据 List memberList = resiGroupMemberDao.getMemberList(formDTO.getGroupId()); - if(CollUtil.isEmpty(memberList)){ + if (CollUtil.isEmpty(memberList)) { throw new RenException(String.format("保存小组通知,获取组内成员列表失败,小组Id->", formDTO.getGroupId())); } //2.校验当前操作人员是否为组长 AtomicReference bl = new AtomicReference<>(true); - memberList.forEach(m->{ - if(m.getCustomerUserId().equals(tokenDto.getUserId())&&"leader".equals(m.getGroupLeaderFlag())){ + memberList.forEach(m -> { + if (m.getCustomerUserId().equals(tokenDto.getUserId()) && "leader".equals(m.getGroupLeaderFlag())) { bl.set(false); } }); - if(bl.get()){ + if (bl.get()) { throw new RenException(String.format("保存小组通知,当前操作人员不是群组长,小组Id->", formDTO.getGroupId())); } //3.文字、图片安全校验 List wordList = new ArrayList<>(); - wordList.add(formDTO.getTitle());wordList.add(formDTO.getContent()); + wordList.add(formDTO.getTitle()); + wordList.add(formDTO.getContent()); List imageList = formDTO.getImageList().stream().map(FileDTO::getUrl).collect(Collectors.toList()); safetyCheck(wordList, imageList); //4.保存小组通知基础数据 //4-1.获取小组信息 ResiGroupEntity groupEntity = resiGroupDao.selectById(formDTO.getGroupId()); - if(null == groupEntity){ + if (null == groupEntity) { throw new RenException(String.format("保存小组通知,获取小组数据失败,小组Id->", tokenDto.getUserId())); } //4-2.获取token用户所属组织信息 @@ -207,10 +225,71 @@ public class NoticeServiceImpl extends BaseServiceImpl entity.setChangeTime(new Date()); insert(entity); - //5.组内成员推送站内信 + //5.保存附件数据 + List AttachmentEntityList = new ArrayList<>(); + if (CollectionUtils.isNotEmpty(formDTO.getImageList())) { + AtomicInteger sort = new AtomicInteger(); + formDTO.getImageList().forEach(img -> { + NoticeAttachmentEntity attachment = new NoticeAttachmentEntity(); + attachment.setCustomerId(resultDTO.getCustomerId()); + attachment.setNoticeId(entity.getId()); + attachment.setFileName(img.getName()); + attachment.setAttachmentName(""); + attachment.setAttachmentSize(img.getSize()); + attachment.setAttachmentFormat(img.getFormat()); + attachment.setAttachmentType(img.getType()); + attachment.setAttachmentUrl(img.getUrl()); + attachment.setSort(sort.get()); + attachment.setDuration(img.getDuration()); + sort.getAndIncrement(); + AttachmentEntityList.add(attachment); + + }); + } + if (CollectionUtils.isNotEmpty(formDTO.getDocList())) { + AtomicInteger i = new AtomicInteger(); + formDTO.getDocList().forEach(doc -> { + NoticeAttachmentEntity attachment = new NoticeAttachmentEntity(); + attachment.setCustomerId(resultDTO.getCustomerId()); + attachment.setNoticeId(entity.getId()); + attachment.setFileName(doc.getName()); + attachment.setAttachmentName(""); + attachment.setAttachmentSize(doc.getSize()); + attachment.setAttachmentFormat(doc.getFormat()); + attachment.setAttachmentType(doc.getType()); + attachment.setAttachmentUrl(doc.getUrl()); + attachment.setSort(i.get()); + attachment.setDuration(doc.getDuration()); + i.getAndIncrement(); + AttachmentEntityList.add(attachment); + }); + } + if (AttachmentEntityList.size() > NumConstant.ZERO) { + noticeAttachmentService.insertBatch(AttachmentEntityList); + } + + //6.通知已读未读表初始数据 + List reafdRecordList = new ArrayList<>(); + memberList.forEach(m -> { + if (!"".equals(m.getGroupLeaderFlag())) { + NoticeReafdRecordEntity reafdRecord = new NoticeReafdRecordEntity(); + reafdRecord.setCustomerId(resultDTO.getCustomerId()); + reafdRecord.setGridId(groupEntity.getGridId()); + reafdRecord.setGroupId(formDTO.getGroupId()); + reafdRecord.setNoticeId(entity.getId()); + reafdRecord.setUserId(m.getCustomerUserId()); + reafdRecord.setReadFlag(ReadFlagConstant.UN_READ); + reafdRecordList.add(reafdRecord); + } + }); + if (reafdRecordList.size() > NumConstant.ZERO) { + noticeReafdRecordService.insertBatch(reafdRecordList); + } + + //7.组内成员推送站内信 List userMessageFormDTOS = new ArrayList<>(); - memberList.forEach(m->{ - if(!"".equals(m.getGroupLeaderFlag())){ + memberList.forEach(m -> { + if (!"".equals(m.getGroupLeaderFlag())) { UserMessageFormDTO userMessageFormDTO = new UserMessageFormDTO(); userMessageFormDTO.setCustomerId(resultDTO.getCustomerId()); userMessageFormDTO.setUserId(m.getCustomerUserId()); @@ -229,13 +308,137 @@ public class NoticeServiceImpl extends BaseServiceImpl } + /** + * @param formDTO + * @return + * @Author sun + * @Description 小组通知变更 + **/ + @Override + public void edit(TokenDto tokenDto, EditNoticeFormDTO formDTO) { + //1.查询通知是否存在 + NoticeEntity entity = baseDao.selectById(formDTO.getNoticeId()); + if(null == entity){ + throw new RenException(String.format("小组通知变更,获取通知数据失败,通知Id->", formDTO.getNoticeId())); + } + //2.文字、图片安全校验 + List wordList = new ArrayList<>(); + wordList.add(formDTO.getTitle()); + wordList.add(formDTO.getContent()); + List imageList = formDTO.getImageList().stream().map(FileDTO::getUrl).collect(Collectors.toList()); + safetyCheck(wordList, imageList); + + //3.查询组成员列表数据 + List memberList = resiGroupMemberDao.getMemberList(entity.getGroupId()); + if (CollUtil.isEmpty(memberList)) { + throw new RenException(String.format("保存小组通知,获取组内成员列表失败,小组Id->", entity.getGroupId())); + } + + //4.通知基础数据修改 + entity.setTitle(formDTO.getTitle()); + entity.setContent(formDTO.getContent()); + entity.setIsChange("yes"); + entity.setChangeTime(new Date()); + baseDao.updateById(entity); + + //5.通知附件表数据先删后增 + noticeAttachmentDao.delByNoticeId(formDTO.getNoticeId()); + //保存附件数据 + List AttachmentEntityList = new ArrayList<>(); + if (CollectionUtils.isNotEmpty(formDTO.getImageList())) { + AtomicInteger sort = new AtomicInteger(); + formDTO.getImageList().forEach(img -> { + NoticeAttachmentEntity attachment = new NoticeAttachmentEntity(); + attachment.setCustomerId(entity.getCustomerId()); + attachment.setNoticeId(entity.getId()); + attachment.setFileName(img.getName()); + attachment.setAttachmentName(""); + attachment.setAttachmentSize(img.getSize()); + attachment.setAttachmentFormat(img.getFormat()); + attachment.setAttachmentType(img.getType()); + attachment.setAttachmentUrl(img.getUrl()); + attachment.setSort(sort.get()); + attachment.setDuration(img.getDuration()); + sort.getAndIncrement(); + AttachmentEntityList.add(attachment); + + }); + } + if (CollectionUtils.isNotEmpty(formDTO.getDocList())) { + AtomicInteger i = new AtomicInteger(); + formDTO.getDocList().forEach(doc -> { + NoticeAttachmentEntity attachment = new NoticeAttachmentEntity(); + attachment.setCustomerId(entity.getCustomerId()); + attachment.setNoticeId(entity.getId()); + attachment.setFileName(doc.getName()); + attachment.setAttachmentName(""); + attachment.setAttachmentSize(doc.getSize()); + attachment.setAttachmentFormat(doc.getFormat()); + attachment.setAttachmentType(doc.getType()); + attachment.setAttachmentUrl(doc.getUrl()); + attachment.setSort(i.get()); + attachment.setDuration(doc.getDuration()); + i.getAndIncrement(); + AttachmentEntityList.add(attachment); + }); + } + if (AttachmentEntityList.size() > NumConstant.ZERO) { + noticeAttachmentService.insertBatch(AttachmentEntityList); + } + + //6.通知已读未读消息表数据先删后增 + noticeReafdRecordDao.delByNoticeId(formDTO.getNoticeId()); + List reafdRecordList = new ArrayList<>(); + memberList.forEach(m -> { + if (!"".equals(m.getGroupLeaderFlag())) { + NoticeReafdRecordEntity reafdRecord = new NoticeReafdRecordEntity(); + reafdRecord.setCustomerId(entity.getCustomerId()); + reafdRecord.setGridId(entity.getGridId()); + reafdRecord.setGroupId(entity.getGroupId()); + reafdRecord.setNoticeId(entity.getId()); + reafdRecord.setUserId(m.getCustomerUserId()); + reafdRecord.setReadFlag(ReadFlagConstant.UN_READ); + reafdRecordList.add(reafdRecord); + } + }); + if (reafdRecordList.size() > NumConstant.ZERO) { + noticeReafdRecordService.insertBatch(reafdRecordList); + } + + //7.推送站内信 + //7-1.获取小组信息 + ResiGroupEntity groupEntity = resiGroupDao.selectById(entity.getGroupId()); + if (null == groupEntity) { + throw new RenException(String.format("保存小组通知,获取小组数据失败,小组Id->", tokenDto.getUserId())); + } + //7-2.推送站内信信息 + List userMessageFormDTOS = new ArrayList<>(); + memberList.forEach(m -> { + if (!"".equals(m.getGroupLeaderFlag())) { + UserMessageFormDTO userMessageFormDTO = new UserMessageFormDTO(); + userMessageFormDTO.setCustomerId(entity.getCustomerId()); + userMessageFormDTO.setUserId(m.getCustomerUserId()); + userMessageFormDTO.setGridId(entity.getGridId()); + userMessageFormDTO.setApp(AppClientConstant.APP_RESI); + userMessageFormDTO.setTitle(UserMessageConstant.GROUP_TITLE); + userMessageFormDTO.setReadFlag(ReadFlagConstant.UN_READ); + userMessageFormDTO.setMessageContent(String.format(UserMessageConstant.GROUP_NOTICE_EDIT, groupEntity.getGroupName(), formDTO.getTitle())); + userMessageFormDTOS.add(userMessageFormDTO); + } + }); + Result sendMessageRes = epmetMessageOpenFeignClient.saveUserMessageList(userMessageFormDTOS); + if (!sendMessageRes.success()) { + logger.warn("小组通知,给组内成员推送站内信失败。"); + } + } + /** * @Author sun * @Description 文字、图片安全校验 **/ - private void safetyCheck(List wordList, List imageList){ - if (imageList.size() != NumConstant.ZERO){ - wordList.forEach(word->{ + private void safetyCheck(List wordList, List imageList) { + if (imageList.size() != NumConstant.ZERO) { + wordList.forEach(word -> { //创建话题内容审核 TextScanParamDTO textScanParamDTO = new TextScanParamDTO(); TextTaskDTO taskDTO = new TextTaskDTO(); @@ -254,7 +457,7 @@ public class NoticeServiceImpl extends BaseServiceImpl }); } //创建话题图片审核 - if (imageList.size() != NumConstant.ZERO){ + if (imageList.size() != NumConstant.ZERO) { ImgScanParamDTO imgScanParamDTO = new ImgScanParamDTO(); imageList.forEach(url -> { ImgTaskDTO task = new ImgTaskDTO(); @@ -263,7 +466,7 @@ public class NoticeServiceImpl extends BaseServiceImpl imgScanParamDTO.getTasks().add(task); }); Result imgScanResult = ScanContentUtils.imgSyncScan(scanApiUrl.concat(imgSyncScanMethod), imgScanParamDTO); - if (!imgScanResult.success()){ + if (!imgScanResult.success()) { throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); } else { if (!imgScanResult.getData().isAllPass()) { diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/notice/NoticeAttachmentDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/notice/NoticeAttachmentDao.xml index 0fda19e6bf..6ee12ce2e0 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/notice/NoticeAttachmentDao.xml +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/notice/NoticeAttachmentDao.xml @@ -3,5 +3,12 @@ + + DELETE + FROM + notice_attachment + WHERE + notice_id = #{noticeId} + \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/notice/NoticeReafdRecordDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/notice/NoticeReafdRecordDao.xml index c726525ef0..95935efdd0 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/notice/NoticeReafdRecordDao.xml +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/notice/NoticeReafdRecordDao.xml @@ -3,5 +3,12 @@ + + DELETE + FROM + notice_reafd_record + WHERE + notice_id = #{noticeId} + \ No newline at end of file From a36e5444ef4921e3b9cef7c820c687aab4ceae74 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 19 Apr 2021 16:10:53 +0800 Subject: [PATCH 013/202] =?UTF-8?q?=E6=A5=BC=E9=99=A2=E5=B0=8F=E7=BB=84?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=94=99=E8=AF=AF=E7=BC=96=E7=A0=81=EF=BC=8C?= =?UTF-8?q?8903=E3=80=818904?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/commons/tools/exception/EpmetErrorCode.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java index df2336eec5..fced248711 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java @@ -161,8 +161,11 @@ public enum EpmetErrorCode { OPEN_API_REQUEST_REPEAT(10107, "请求重复"), //楼院小组89 - GROUP_ACT_CANCELED(8901,"活动已取消,不能编辑"), - GROUP_ACT_CLOSED(8902,"活动已关闭,不能编辑"); + GROUP_ACT_CANCELED_CAN_NOT_EDIT(8901,"活动已取消,不能编辑"), + GROUP_ACT_CLOSED_CAN_NOT_EDIT(8902,"活动已关闭,不能编辑"), + PLEASE_INPUT_ACT_CONTENT(8903,"请输入活动内容,或添加图片"), + GROUP_ACT_CONTENT_MAX(8904,"活动内容至多输入1000字"); + private int code; private String msg; From 40ce017e748ab78d65df3658e38c97f147348745 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 19 Apr 2021 16:43:16 +0800 Subject: [PATCH 014/202] =?UTF-8?q?8905=E9=94=99=E8=AF=AF=E7=BC=96?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/commons/tools/exception/EpmetErrorCode.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java index fced248711..caecc92e1e 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java @@ -164,7 +164,8 @@ public enum EpmetErrorCode { GROUP_ACT_CANCELED_CAN_NOT_EDIT(8901,"活动已取消,不能编辑"), GROUP_ACT_CLOSED_CAN_NOT_EDIT(8902,"活动已关闭,不能编辑"), PLEASE_INPUT_ACT_CONTENT(8903,"请输入活动内容,或添加图片"), - GROUP_ACT_CONTENT_MAX(8904,"活动内容至多输入1000字"); + GROUP_ACT_CONTENT_MAX(8904,"活动内容至多输入1000字"), + GROUP_ACT_IMG_MAX(8905,"最多可添加3张图片"); private int code; From 2dd616a6197e6f775ba73dace6e4dc82301bfa94 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Mon, 19 Apr 2021 16:44:09 +0800 Subject: [PATCH 015/202] =?UTF-8?q?=E5=B0=8F=E7=BB=84=E9=80=9A=E7=9F=A5?= =?UTF-8?q?=E3=80=81=E6=B4=BB=E5=8A=A8=E5=88=86=E4=BA=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/invitation/form/ShareFormDTO.java | 31 ++++++++++ .../dto/invitation/result/ShareResultDTO.java | 19 +++++++ .../InvitationRecordController.java | 21 +++++++ .../service/InvitationRecordService.java | 9 +++ .../impl/InvitationRecordServiceImpl.java | 56 +++++++++++++++++++ 5 files changed, 136 insertions(+) create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/invitation/form/ShareFormDTO.java create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/invitation/result/ShareResultDTO.java diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/invitation/form/ShareFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/invitation/form/ShareFormDTO.java new file mode 100644 index 0000000000..879ac465ac --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/invitation/form/ShareFormDTO.java @@ -0,0 +1,31 @@ +package com.epmet.resi.group.dto.invitation.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Author sun + * @Description 小组通知、活动分享-接口入参 + */ +@Data +public class ShareFormDTO implements Serializable { + private static final long serialVersionUID = 7069116393380944951L; + /** + * 通知或活动Id + */ + @NotBlank(message="通知或活动Id不能为空",groups = {ShareFormDTO.Add.class}) + private String id; + /** + * 类型(notice:通知 act:活动) + */ + @NotBlank(message = "类型(notice:通知 act:活动)不能为空",groups = {ShareFormDTO.Add.class}) + private String type; + /** + * token中用户Id + */ + private String userId; + + public interface Add{} +} diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/invitation/result/ShareResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/invitation/result/ShareResultDTO.java new file mode 100644 index 0000000000..ba9e30931b --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/invitation/result/ShareResultDTO.java @@ -0,0 +1,19 @@ +package com.epmet.resi.group.dto.invitation.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author sun + * @Description 小组通知、活动分享-接口返参 + */ +@Data +public class ShareResultDTO implements Serializable { + private static final long serialVersionUID = 6136787210623326830L; + + /** + * 分享Id + */ + private String invitationRecordId; +} diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/controller/InvitationRecordController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/controller/InvitationRecordController.java index 71e713a734..c6d6cc9392 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/controller/InvitationRecordController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/controller/InvitationRecordController.java @@ -17,8 +17,16 @@ package com.epmet.modules.invitation.controller; +import com.epmet.commons.tools.annotation.LoginUser; +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.invitation.service.InvitationRecordService; +import com.epmet.resi.group.dto.invitation.form.ShareFormDTO; +import com.epmet.resi.group.dto.invitation.result.ShareResultDTO; 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; @@ -37,4 +45,17 @@ public class InvitationRecordController { private InvitationRecordService invitationRecordService; + /** + * @param formDTO + * @return + * @Author sun + * @Description 小组通知、活动分享 + **/ + @PostMapping(value = "share") + public Result share(@LoginUser TokenDto tokenDto, @RequestBody ShareFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, ShareFormDTO.Add.class); + formDTO.setUserId(tokenDto.getUserId()); + return new Result().ok(invitationRecordService.share(formDTO)); + } + } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/service/InvitationRecordService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/service/InvitationRecordService.java index ebddafaa7f..4373554965 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/service/InvitationRecordService.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/service/InvitationRecordService.java @@ -19,6 +19,8 @@ package com.epmet.modules.invitation.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.modules.invitation.entity.InvitationRecordEntity; +import com.epmet.resi.group.dto.invitation.form.ShareFormDTO; +import com.epmet.resi.group.dto.invitation.result.ShareResultDTO; /** * 分享记录(话题、通知...后续支持增加) @@ -28,4 +30,11 @@ import com.epmet.modules.invitation.entity.InvitationRecordEntity; */ public interface InvitationRecordService extends BaseService { + /** + * @param formDTO + * @return + * @Author sun + * @Description 小组通知、活动分享 + **/ + ShareResultDTO share(ShareFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/service/impl/InvitationRecordServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/service/impl/InvitationRecordServiceImpl.java index 4d873bba21..f8a24b172d 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/service/impl/InvitationRecordServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/service/impl/InvitationRecordServiceImpl.java @@ -18,9 +18,18 @@ package com.epmet.modules.invitation.service.impl; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.modules.act.dao.GroupActInfoDao; +import com.epmet.modules.act.entity.GroupActInfoEntity; import com.epmet.modules.invitation.dao.InvitationRecordDao; import com.epmet.modules.invitation.entity.InvitationRecordEntity; import com.epmet.modules.invitation.service.InvitationRecordService; +import com.epmet.modules.notice.dao.NoticeDao; +import com.epmet.modules.notice.dao.NoticeReafdRecordDao; +import com.epmet.modules.notice.entity.NoticeEntity; +import com.epmet.resi.group.dto.invitation.form.ShareFormDTO; +import com.epmet.resi.group.dto.invitation.result.ShareResultDTO; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; /** @@ -32,5 +41,52 @@ import org.springframework.stereotype.Service; @Service public class InvitationRecordServiceImpl extends BaseServiceImpl implements InvitationRecordService { + @Autowired + private NoticeDao noticeDao; + @Autowired + private GroupActInfoDao groupActInfoDao; + + /** + * @param formDTO + * @return + * @Author sun + * @Description 小组通知、活动分享 + **/ + @Override + public ShareResultDTO share(ShareFormDTO formDTO) { + ShareResultDTO resultDTO = new ShareResultDTO(); + //1.按类型查询通知或活动数据 + InvitationRecordEntity entity = new InvitationRecordEntity(); + NoticeEntity notice = null; + GroupActInfoEntity act = null; + if ("notice".equals(formDTO.getType())) { + notice = noticeDao.selectById(formDTO.getId()); + if (null == notice) { + throw new RenException(String.format("通知分享,根据通知Id查询通知数据失败,通知Id->", formDTO.getId())); + } + entity.setCustomerId(notice.getCustomerId()); + entity.setGridId(notice.getGridId()); + entity.setGroupId(notice.getGroupId()); + entity.setSourceId(formDTO.getId()); + entity.setSourceType(formDTO.getType()); + entity.setShareUserId(formDTO.getUserId()); + } else if ("act".equals(formDTO.getType())) { + act = groupActInfoDao.selectById(formDTO.getId()); + if (null == act) { + throw new RenException(String.format("活动分享,根据活动Id查询活动数据失败,活动Id->", formDTO.getId())); + } + entity.setCustomerId(act.getCustomerId()); + entity.setGridId(act.getGridId()); + entity.setGroupId(act.getGroupId()); + entity.setSourceId(formDTO.getId()); + entity.setSourceType(formDTO.getType()); + entity.setShareUserId(formDTO.getUserId()); + } + //2.新增分享数据,生成分享Id + baseDao.insert(entity); + resultDTO.setInvitationRecordId(entity.getId()); + + return resultDTO; + } } \ No newline at end of file From 525764588c5a82bf205a36b6a9bdd5b86a5a9d37 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 19 Apr 2021 17:07:56 +0800 Subject: [PATCH 016/202] =?UTF-8?q?=E5=88=9B=E5=BB=BA=E5=B0=8F=E7=BB=84?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=8D=E6=98=AF=E5=85=9A=E5=91=98=E4=B8=8D?= =?UTF-8?q?=E8=83=BD=E5=88=9B=E5=BB=BA=E6=94=AF=E9=83=A8=E5=B0=8F=E7=BB=84?= =?UTF-8?q?=EF=BC=8C=20=E5=BE=85=E5=AE=A1=E6=A0=B8=E7=9A=84=E5=B0=8F?= =?UTF-8?q?=E7=BB=84=E5=88=97=E8=A1=A8=E5=8F=8D=E5=8F=82=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?groupType?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../commons/tools/exception/EpmetErrorCode.java | 3 ++- .../dto/group/result/ApplyingGroupResultDTO.java | 5 ++++- .../group/service/impl/ResiGroupServiceImpl.java | 14 ++++++++++++++ .../com/epmet/modules/utils/ModuleConstant.java | 7 +++++++ .../main/resources/mapper/group/ResiGroupDao.xml | 1 + .../epmet/feign/EpmetUserOpenFeignClient.java | 9 +++++++++ .../EpmetUserOpenFeignClientFallback.java | 5 +++++ .../com/epmet/controller/UserRoleController.java | 11 +++++++++++ .../src/main/java/com/epmet/dao/UserRoleDao.java | 8 ++++++++ .../java/com/epmet/service/UserRoleService.java | 8 ++++++++ .../epmet/service/impl/UserRoleServiceImpl.java | 16 ++++++++++++++++ .../src/main/resources/mapper/UserRoleDao.xml | 12 ++++++++++++ 12 files changed, 97 insertions(+), 2 deletions(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java index caecc92e1e..b54663f866 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java @@ -165,7 +165,8 @@ public enum EpmetErrorCode { GROUP_ACT_CLOSED_CAN_NOT_EDIT(8902,"活动已关闭,不能编辑"), PLEASE_INPUT_ACT_CONTENT(8903,"请输入活动内容,或添加图片"), GROUP_ACT_CONTENT_MAX(8904,"活动内容至多输入1000字"), - GROUP_ACT_IMG_MAX(8905,"最多可添加3张图片"); + GROUP_ACT_IMG_MAX(8905,"最多可添加3张图片"), + PARTY_MEMBER_CREATE_BRANCH_GROUP(8906,"您不是党员,不能创建支部小组"); private int code; diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/ApplyingGroupResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/ApplyingGroupResultDTO.java index 3683f760c5..91a3ecd478 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/ApplyingGroupResultDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/ApplyingGroupResultDTO.java @@ -45,6 +45,9 @@ public class ApplyingGroupResultDTO implements Serializable{ * */ private String messageText; - + /** + * 小组类型(ordinary:楼院小组 branch:支部小组) + */ + private String groupType; } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java index a2876cf267..1479a45456 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java @@ -40,6 +40,7 @@ import com.epmet.dto.form.*; import com.epmet.dto.result.UserResiInfoResultDTO; import com.epmet.dto.result.UserRoleResultDTO; import com.epmet.feign.EpmetMessageOpenFeignClient; +import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.modules.constant.UserMessageConstant; import com.epmet.modules.feign.EpmetMessageFeignClient; import com.epmet.modules.feign.EpmetUserFeignClient; @@ -147,6 +148,9 @@ public class ResiGroupServiceImpl extends BaseServiceImpl booleanResult = epmetUserOpenFeignClient.selectIsPartyMemberByUserId(applyCreateGroupFormDTO.getUserId()); + if (!booleanResult.success()){ + throw new RenException(ModuleConstant.IS_PARTY_MEMBER_ERR); + } + if (!booleanResult.getData()){ + throw new RenException(EpmetErrorCode.PARTY_MEMBER_CREATE_BRANCH_GROUP.getCode()); + } + } //1、校验是否同名 List resiGroupEntityList = this.getResiGroupEntityList(applyCreateGroupFormDTO); if (null != resiGroupEntityList && resiGroupEntityList.size() > 0) { 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 37f1a3b290..1d77920606 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 @@ -380,4 +380,11 @@ public interface ModuleConstant extends Constant { * 通过议题分享链接进组 */ String ENTER_GROUP_TYPE_ISSUE_LINK = "issue_share_link"; + + /** + * 小组类型:支部小组 + */ + String GROUP_TYPE_BRANCH = "branch"; + + String IS_PARTY_MEMBER_ERR = "查询此人是不是党员失败了"; } 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 3a451a9342..7d1ea0a898 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 @@ -245,6 +245,7 @@ + + + From 386001d9264b557a0c02a897c972d20ad42bf9b3 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Mon, 19 Apr 2021 18:00:08 +0800 Subject: [PATCH 017/202] =?UTF-8?q?=E9=80=9A=E7=9F=A5=E5=B7=B2=E8=AF=BB?= =?UTF-8?q?=E6=9C=AA=E8=AF=BB=E5=88=97=E8=A1=A8=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../form/AddNoticeFormDTO.java | 3 +- .../form/EditNoticeFormDTO.java | 3 +- .../notice/form/NoticeReadListFormDTO.java | 21 ++++++ .../result/NoticeReadListResultDTO.java | 51 ++++++++++++++ .../notice/controller/NoticeController.java | 4 +- .../NoticeReafdRecordController.java | 16 +++++ .../notice/dao/NoticeReafdRecordDao.java | 9 +++ .../service/NoticeReafdRecordService.java | 11 ++++ .../modules/notice/service/NoticeService.java | 4 +- .../impl/NoticeReafdRecordServiceImpl.java | 66 +++++++++++++++++++ .../service/impl/NoticeServiceImpl.java | 4 +- .../mapper/notice/NoticeReafdRecordDao.xml | 10 +++ 12 files changed, 194 insertions(+), 8 deletions(-) rename epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/{topic => notice}/form/AddNoticeFormDTO.java (91%) rename epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/{topic => notice}/form/EditNoticeFormDTO.java (89%) create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/NoticeReadListFormDTO.java create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/result/NoticeReadListResultDTO.java diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/AddNoticeFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/AddNoticeFormDTO.java similarity index 91% rename from epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/AddNoticeFormDTO.java rename to epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/AddNoticeFormDTO.java index 767bb639ca..f83f802c6c 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/AddNoticeFormDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/AddNoticeFormDTO.java @@ -1,5 +1,6 @@ -package com.epmet.resi.group.dto.topic.form; +package com.epmet.resi.group.dto.notice.form; +import com.epmet.resi.group.dto.topic.form.FileDTO; import lombok.Data; import org.hibernate.validator.constraints.Length; diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/EditNoticeFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/EditNoticeFormDTO.java similarity index 89% rename from epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/EditNoticeFormDTO.java rename to epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/EditNoticeFormDTO.java index effa23bc47..79dd421f7f 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/EditNoticeFormDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/EditNoticeFormDTO.java @@ -1,5 +1,6 @@ -package com.epmet.resi.group.dto.topic.form; +package com.epmet.resi.group.dto.notice.form; +import com.epmet.resi.group.dto.topic.form.FileDTO; import lombok.Data; import org.hibernate.validator.constraints.Length; diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/NoticeReadListFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/NoticeReadListFormDTO.java new file mode 100644 index 0000000000..d7f8a6ac86 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/NoticeReadListFormDTO.java @@ -0,0 +1,21 @@ +package com.epmet.resi.group.dto.notice.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; + +/** + * @Author sun + * @Description 通知已读未读列表查询-接口入参 + */ +@Data +public class NoticeReadListFormDTO { + + /** + * 通知Id + */ + @NotBlank(message = "通知Id不能为空",groups = {NoticeReadListFormDTO.List.class}) + private String noticeId; + + public interface List{} +} diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/result/NoticeReadListResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/result/NoticeReadListResultDTO.java new file mode 100644 index 0000000000..3a6660aac2 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/result/NoticeReadListResultDTO.java @@ -0,0 +1,51 @@ +package com.epmet.resi.group.dto.notice.result; + +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +/** + * @Author sun + * @Description 通知已读未读列表查询-接口返参 + */ +@Data +public class NoticeReadListResultDTO implements Serializable { + private static final long serialVersionUID = 6136787210623326830L; + + /** + * 已读人员数 + */ + private Integer readCount; + /** + * 未读人员数 + */ + private Integer unReadCount; + /** + * 已读列表 + */ + private List readList = new ArrayList<>(); + /** + * 未读列表 + */ + private List unReadList = new ArrayList<>(); + + @NoArgsConstructor + @Data + public static class NoticeReafdRecord { + /** + * 用户Id + */ + private String userId; + /** + * 用户姓名(真实姓名) + */ + private String userName; + /** + * 用户头像 + */ + private String userHeadPhoto; + } +} diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeController.java index 81504025c2..1ebaf78bad 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeController.java @@ -30,8 +30,8 @@ import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.modules.notice.excel.NoticeExcel; import com.epmet.modules.notice.service.NoticeService; import com.epmet.resi.group.dto.notice.NoticeDTO; -import com.epmet.resi.group.dto.topic.form.AddNoticeFormDTO; -import com.epmet.resi.group.dto.topic.form.EditNoticeFormDTO; +import com.epmet.resi.group.dto.notice.form.AddNoticeFormDTO; +import com.epmet.resi.group.dto.notice.form.EditNoticeFormDTO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeReafdRecordController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeReafdRecordController.java index 79c38a852b..902615a92b 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeReafdRecordController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeReafdRecordController.java @@ -17,7 +17,9 @@ package com.epmet.modules.notice.controller; +import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.AssertUtils; @@ -28,6 +30,8 @@ import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.modules.notice.excel.NoticeReafdRecordExcel; import com.epmet.modules.notice.service.NoticeReafdRecordService; import com.epmet.resi.group.dto.notice.NoticeReafdRecordDTO; +import com.epmet.resi.group.dto.notice.form.NoticeReadListFormDTO; +import com.epmet.resi.group.dto.notice.result.NoticeReadListResultDTO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -91,4 +95,16 @@ public class NoticeReafdRecordController { ExcelUtils.exportExcelToTarget(response, null, list, NoticeReafdRecordExcel.class); } + /** + * @param formDTO + * @return + * @Author sun + * @Description 通知已读未读列表查询 + **/ + @PostMapping(value = "noticereadlist") + public Result noticeReadList(@LoginUser TokenDto tokenDto, @RequestBody NoticeReadListFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, NoticeReadListFormDTO.List.class); + return new Result().ok(noticeReafdRecordService.noticeReadList(tokenDto, formDTO)); + } + } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/dao/NoticeReafdRecordDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/dao/NoticeReafdRecordDao.java index bc16f1881b..9e767ed133 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/dao/NoticeReafdRecordDao.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/dao/NoticeReafdRecordDao.java @@ -19,9 +19,12 @@ package com.epmet.modules.notice.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.modules.notice.entity.NoticeReafdRecordEntity; +import com.epmet.resi.group.dto.notice.NoticeReafdRecordDTO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; +import java.util.List; + /** * 小组通知组成员阅读记录表 * @@ -36,4 +39,10 @@ public interface NoticeReafdRecordDao extends BaseDao { * @Description 删除通知已读未读数据-物理删除 **/ void delByNoticeId(@Param("noticeId") String noticeId); + + /** + * @Author sun + * @Description 根据通知Id查询组成员已读未读数据 + **/ + List getByNoticeId(@Param("noticeId") String noticeId); } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeReafdRecordService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeReafdRecordService.java index b5c470dd8a..c142fefcdc 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeReafdRecordService.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeReafdRecordService.java @@ -19,8 +19,11 @@ package com.epmet.modules.notice.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.modules.notice.entity.NoticeReafdRecordEntity; import com.epmet.resi.group.dto.notice.NoticeReafdRecordDTO; +import com.epmet.resi.group.dto.notice.form.NoticeReadListFormDTO; +import com.epmet.resi.group.dto.notice.result.NoticeReadListResultDTO; import java.util.List; import java.util.Map; @@ -92,4 +95,12 @@ public interface NoticeReafdRecordService extends BaseService page(Map params) { @@ -101,4 +113,58 @@ public class NoticeReafdRecordServiceImpl extends BaseServiceImpl readList = new ArrayList<>(); + List unReadList = new ArrayList<>(); + //1.根据通知Id查询组成员已读未读数据 + List list = baseDao.getByNoticeId(formDTO.getNoticeId()); + + //2.调用user服务,查询人员基础数据 + List userIdList = list.stream().map(NoticeReafdRecordDTO::getUserId).collect(Collectors.toList()); + Result> result = epmetUserOpenFeignClient.queryUserBaseInfo(userIdList); + if (!result.success()){ + throw new RenException("调用user服务,获取用户基础数据失败"); + } + List resultDTOList = result.getData(); + + //3.遍历封装数据并返回 + list.forEach(l->{ + StringBuffer name = new StringBuffer(); + StringBuffer url = new StringBuffer(); + resultDTOList.forEach(user->{ + if(l.getUserId().equals(user.getUserId())){ + name.append(user.getSurname()).append(user.getName()); + url.append(user.getHeadImgUrl()); + } + }); + if("read".equals(l.getReadFlag())){ + NoticeReadListResultDTO.NoticeReafdRecord read = new NoticeReadListResultDTO.NoticeReafdRecord(); + read.setUserId(l.getUserId()); + read.setUserName(name.toString()); + read.setUserHeadPhoto(url.toString()); + readList.add(read); + }else{ + NoticeReadListResultDTO.NoticeReafdRecord unRead = new NoticeReadListResultDTO.NoticeReafdRecord(); + unRead.setUserId(l.getUserId()); + unRead.setUserName(name.toString()); + unRead.setUserHeadPhoto(url.toString()); + unReadList.add(unRead); + } + }); + resultDTO.setReadCount(readList.size()); + resultDTO.setUnReadCount(unReadList.size()); + resultDTO.setReadList(readList); + resultDTO.setUnReadList(unReadList); + + return resultDTO; + } + } \ No newline at end of file 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 b87d78f76e..78f6812f2e 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 @@ -59,8 +59,8 @@ import com.epmet.modules.notice.service.NoticeService; import com.epmet.resi.group.constant.TopicConstant; import com.epmet.resi.group.dto.member.ResiGroupMemberDTO; import com.epmet.resi.group.dto.notice.NoticeDTO; -import com.epmet.resi.group.dto.topic.form.AddNoticeFormDTO; -import com.epmet.resi.group.dto.topic.form.EditNoticeFormDTO; +import com.epmet.resi.group.dto.notice.form.AddNoticeFormDTO; +import com.epmet.resi.group.dto.notice.form.EditNoticeFormDTO; import com.epmet.resi.group.dto.topic.form.FileDTO; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/notice/NoticeReafdRecordDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/notice/NoticeReafdRecordDao.xml index 95935efdd0..2d0a934811 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/notice/NoticeReafdRecordDao.xml +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/notice/NoticeReafdRecordDao.xml @@ -3,6 +3,16 @@ + + DELETE FROM From 3f5e6521472fb0c6c87bbf15f6c2a12d92673abf Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 19 Apr 2021 19:27:44 +0800 Subject: [PATCH 018/202] =?UTF-8?q?=E5=8F=91=E5=B8=83/=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E6=B4=BB=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/result/GridInfoResultDTO.java | 5 + .../service/impl/CustomerGridServiceImpl.java | 1 + .../resi/group/dto/act/GroupActIdDTO.java | 17 + .../group/dto/act/form/ActDetailFormDTO.java | 27 ++ .../dto/act/form/PublishGroupActFormDTO.java | 104 ++++++ .../dto/act/result/ActDetailResultDTO.java | 10 + .../controller/GroupActInfoController.java | 41 +++ .../modules/act/dao/ActCategoryDictDao.java | 4 + .../modules/act/dao/ActReadRecordDao.java | 3 +- .../modules/act/dao/GroupActContentDao.java | 4 +- .../act/service/ActCategoryDictService.java | 9 + .../act/service/GroupActInfoService.java | 19 + .../impl/ActCategoryDictServiceImpl.java | 34 ++ .../service/impl/GroupActInfoServiceImpl.java | 331 ++++++++++++++++++ .../modules/constant/GroupActConstant.java | 25 ++ .../service/ResiGroupMemberService.java | 18 + .../impl/ResiGroupMemberServiceImpl.java | 10 + .../mapper/act/ActCategoryDictDao.xml | 22 +- .../resources/mapper/act/ActReadRecordDao.xml | 4 +- .../mapper/act/GroupActContentDao.xml | 9 +- 20 files changed, 692 insertions(+), 5 deletions(-) create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/GroupActIdDTO.java create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/ActDetailFormDTO.java create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/PublishGroupActFormDTO.java create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/ActDetailResultDTO.java diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GridInfoResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GridInfoResultDTO.java index 83bf82bfbf..e723142dee 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GridInfoResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GridInfoResultDTO.java @@ -87,5 +87,10 @@ public class GridInfoResultDTO implements Serializable { * 网格所属机关名称 */ private String parentAgencyName; + + /** + * 网格的所有上级组织 + */ + private String pids; } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java index 8302b1252f..46a8248104 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java @@ -481,6 +481,7 @@ public class CustomerGridServiceImpl extends BaseServiceImpl textList; + + /** + * 图片列表,最多3张 + */ + private List imgList; + + private String gridId; +} diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/ActDetailResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/ActDetailResultDTO.java new file mode 100644 index 0000000000..7b019f904d --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/ActDetailResultDTO.java @@ -0,0 +1,10 @@ +package com.epmet.resi.group.dto.act.result; + +/** + * 描述一下 + * + * @author yinzuomei@elink-cn.com + * @date 2021/4/19 19:24 + */ +public class ActDetailResultDTO { +} diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java index dfd248aad9..e063637bca 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java @@ -17,8 +17,18 @@ package com.epmet.modules.act.controller; +import com.epmet.commons.tools.annotation.LoginUser; +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.act.service.GroupActInfoService; +import com.epmet.resi.group.dto.act.GroupActIdDTO; +import com.epmet.resi.group.dto.act.form.ActDetailFormDTO; +import com.epmet.resi.group.dto.act.form.PublishGroupActFormDTO; +import com.epmet.resi.group.dto.act.result.ActDetailResultDTO; 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; @@ -36,4 +46,35 @@ public class GroupActInfoController { @Autowired private GroupActInfoService groupActInfoService; + /** + * @return com.epmet.commons.tools.utils.Result + * @param tokenDto + * @param formDTO + * @author yinzuomei + * @description 003、发布(编辑)组织活动 + * @Date 2021/4/19 15:16 + **/ + @PostMapping("publish") + public Result publishGroupAct(@LoginUser TokenDto tokenDto, @RequestBody PublishGroupActFormDTO formDTO){ + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setPublishUserId(tokenDto.getUserId()); + ValidatorUtils.validateEntity(formDTO,PublishGroupActFormDTO.AddUserShowGroup.class,PublishGroupActFormDTO.AddUserInternalGroup.class); + return new Result().ok(groupActInfoService.publishGroupAct(formDTO)); + } + + /** + * @return com.epmet.commons.tools.utils.Result + * @param tokenDto + * @param actDetailFormDTO + * @author yinzuomei + * @description 004、活动详情 + * @Date 2021/4/19 19:25 + **/ + @PostMapping("actdetail") + public Result queryActDetail(@LoginUser TokenDto tokenDto, @RequestBody ActDetailFormDTO actDetailFormDTO){ + actDetailFormDTO.setUserId(tokenDto.getUserId()); + ValidatorUtils.validateEntity(actDetailFormDTO,ActDetailFormDTO.AddUserInternalGroup.class); + return new Result().ok(groupActInfoService.queryActDetail(actDetailFormDTO)); + } + } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActCategoryDictDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActCategoryDictDao.java index c1bfafed16..1ac8020020 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActCategoryDictDao.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActCategoryDictDao.java @@ -52,4 +52,8 @@ public interface ActCategoryDictDao extends BaseDao { */ List selectCategoryList(@Param("parentCode") String parentCode, @Param("customerId") String customerId); + + int selectCountByCustomerId(String customerId); + + ActCategoryDictEntity selectByCode(@Param("categoryCode")String categoryCode, @Param("customerId")String customerId); } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActReadRecordDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActReadRecordDao.java index 7627bf30d3..139c075655 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActReadRecordDao.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActReadRecordDao.java @@ -29,5 +29,6 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface ActReadRecordDao extends BaseDao { - + + int deleteByActId(String groupActId); } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/GroupActContentDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/GroupActContentDao.java index 7f3b3129ee..14402fbe3d 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/GroupActContentDao.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/GroupActContentDao.java @@ -20,6 +20,7 @@ package com.epmet.modules.act.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.modules.act.entity.GroupActContentEntity; import org.apache.ibatis.annotations.Mapper; +import org.springframework.data.repository.query.Param; /** * 组织活动内容 @@ -29,5 +30,6 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface GroupActContentDao extends BaseDao { - + + int updateToDel(@Param("groupActId") String groupActId, @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/act/service/ActCategoryDictService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActCategoryDictService.java index 5fe3d02360..e9f0aec7c6 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActCategoryDictService.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActCategoryDictService.java @@ -49,4 +49,13 @@ public interface ActCategoryDictService extends BaseService queryCategoryList(ActCategoryFormDTO formDTO); + + /** + * 查询类别编码的全路径名称 + * + * @param categoryCode + * @param customerId + * @return 支部建设-三会一课 + */ + String queryAllCategoryName(String categoryCode,String customerId); } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/GroupActInfoService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/GroupActInfoService.java index 1a13bac8e8..6bad0862fa 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/GroupActInfoService.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/GroupActInfoService.java @@ -19,6 +19,10 @@ package com.epmet.modules.act.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.modules.act.entity.GroupActInfoEntity; +import com.epmet.resi.group.dto.act.GroupActIdDTO; +import com.epmet.resi.group.dto.act.form.ActDetailFormDTO; +import com.epmet.resi.group.dto.act.form.PublishGroupActFormDTO; +import com.epmet.resi.group.dto.act.result.ActDetailResultDTO; /** * 组织活动信息 @@ -28,4 +32,19 @@ import com.epmet.modules.act.entity.GroupActInfoEntity; */ public interface GroupActInfoService extends BaseService { + /** + * 003、发布(编辑)组织活动 + * + * @param formDTO + * @return com.epmet.resi.group.dto.act.GroupActIdDTO + */ + GroupActIdDTO publishGroupAct(PublishGroupActFormDTO formDTO); + + /** + * 004、活动详情 + * + * @param actDetailFormDTO + * @return com.epmet.resi.group.dto.act.result.ActDetailResultDTO + */ + ActDetailResultDTO queryActDetail(ActDetailFormDTO actDetailFormDTO); } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActCategoryDictServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActCategoryDictServiceImpl.java index 96f034b305..c0f5582203 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActCategoryDictServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActCategoryDictServiceImpl.java @@ -18,6 +18,8 @@ package com.epmet.modules.act.service.impl; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.constant.StrConstant; import com.epmet.modules.act.dao.ActCategoryDictDao; import com.epmet.modules.act.entity.ActCategoryDictEntity; import com.epmet.modules.act.service.ActCategoryDictService; @@ -30,9 +32,11 @@ import com.epmet.resi.group.dto.act.result.CategoryCodeResultDTO; import com.epmet.resi.group.dto.act.result.CategoryDTO; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.util.ArrayList; import java.util.List; /** @@ -81,4 +85,34 @@ public class ActCategoryDictServiceImpl extends BaseServiceImpl nameList = new ArrayList<>(); + for (int i = NumConstant.ONE; i <= entity.getLevel(); i++) { + int length = i * NumConstant.THREE; + String categoryCodeStr = categoryCode.substring(NumConstant.ZERO, length); + ActCategoryDictEntity actCategoryDictEntity = baseDao.selectByCode(categoryCodeStr, customerId); + nameList.add(actCategoryDictEntity.getCategoryName()); + } + String allCategoryName = StringUtils.strip(nameList.toString(), "[]").replace(", ", StrConstant.HYPHEN); + String.format("categoryCode:%s,allCategoryName:%s", categoryCode, allCategoryName); + return allCategoryName; + } + } \ No newline at end of file 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 12b2186419..6db5b3551d 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 @@ -17,11 +17,54 @@ package com.epmet.modules.act.service.impl; +import com.alibaba.fastjson.JSON; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.Constant; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.scan.param.ImgScanParamDTO; +import com.epmet.commons.tools.scan.param.ImgTaskDTO; +import com.epmet.commons.tools.scan.param.TextScanParamDTO; +import com.epmet.commons.tools.scan.param.TextTaskDTO; +import com.epmet.commons.tools.scan.result.SyncScanResult; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.utils.ScanContentUtils; +import com.epmet.dto.result.GridInfoResultDTO; +import com.epmet.feign.GovOrgOpenFeignClient; +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.ActOperationRecordEntity; +import com.epmet.modules.act.entity.ActReadRecordEntity; +import com.epmet.modules.act.entity.GroupActContentEntity; import com.epmet.modules.act.entity.GroupActInfoEntity; +import com.epmet.modules.act.service.ActCategoryDictService; import com.epmet.modules.act.service.GroupActInfoService; +import com.epmet.modules.constant.GroupActConstant; +import com.epmet.modules.group.service.ResiGroupService; +import com.epmet.modules.member.service.ResiGroupMemberService; +import com.epmet.resi.group.dto.act.GroupActIdDTO; +import com.epmet.resi.group.dto.act.form.ActDetailFormDTO; +import com.epmet.resi.group.dto.act.form.PublishGroupActFormDTO; +import com.epmet.resi.group.dto.act.result.ActDetailResultDTO; +import com.epmet.resi.group.dto.group.ResiGroupDTO; +import com.epmet.resi.group.dto.member.ResiGroupMemberDTO; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.UUID; /** * 组织活动信息 @@ -29,8 +72,296 @@ import org.springframework.stereotype.Service; * @author generator generator@elink-cn.com * @since v1.0.0 2021-04-16 */ +@Slf4j @Service public class GroupActInfoServiceImpl extends BaseServiceImpl implements GroupActInfoService { + @Autowired + private ResiGroupMemberService resiGroupMemberService; + @Autowired + private ResiGroupService resiGroupService; + @Value("${openapi.scan.server.url}") + private String scanApiUrl; + @Value("${openapi.scan.method.textSyncScan}") + private String textSyncScanMethod; + @Value("${openapi.scan.method.imgSyncScan}") + private String imgSyncScanMethod; + @Autowired + private ActOperationRecordDao actOperationRecordDao; + @Autowired + private ActCategoryDictService actCategoryDictService; + @Autowired + private GovOrgOpenFeignClient govOrgOpenFeignClient; + @Autowired + private GroupActContentDao groupActContentDao; + @Autowired + private ActReadRecordDao actReadRecordDao; + + /** + * 003、发布(编辑)组织活动 + * + * @param formDTO + * @return com.epmet.resi.group.dto.act.GroupActIdDTO + */ + @Transactional(rollbackFor = Exception.class) + @Override + public GroupActIdDTO publishGroupAct(PublishGroupActFormDTO formDTO) { + + ResiGroupDTO groupDTO = resiGroupService.get(formDTO.getGroupId()); + formDTO.setGridId(groupDTO.getGridId()); + //参数校验 + this.checkPublishGroupActFormDTO(formDTO); + //内容审核 + this.scanActContent(formDTO.getTitle(), formDTO.getTextList(), formDTO.getImgList()); + + //返参 + GroupActIdDTO result=new GroupActIdDTO(); + + //组织活动信息 + GroupActInfoEntity groupActInfoEntity = constructGroupActInfoEntity(formDTO); + //1、插入活修改活动信息表 + if (StringUtils.isNotBlank(groupActInfoEntity.getId())) { + //删除group_act_content、删除act_read_record + groupActContentDao.updateToDel(groupActInfoEntity.getId(), formDTO.getPublishUserId()); + actReadRecordDao.deleteByActId(groupActInfoEntity.getId()); + baseDao.updateById(groupActInfoEntity); + } else { + baseDao.insert(groupActInfoEntity); + } + //要放在插入或者更新之后,才能拿到插入的主键 + //构造操作日志 + ActOperationRecordEntity operRecEntity = constructOperRec(groupActInfoEntity.getId(), formDTO); + //构造活动内容表 + List contentList = constructText(groupActInfoEntity.getId(), formDTO.getCustomerId(), formDTO.getTextList()); + List imgList = constructImg(groupActInfoEntity.getId(), formDTO.getCustomerId(), formDTO.getImgList()); + List readRecordEntityList=constructReadRec(groupActInfoEntity.getId(), + formDTO.getCustomerId(), + formDTO.getGroupId(), + formDTO.getPublishUserId()); + //2、插入活动内容 + contentList.forEach(textContentEntity->{ + groupActContentDao.insert(textContentEntity); + }); + imgList.forEach(imgContent->{ + groupActContentDao.insert(imgContent); + }); + //3、插入操作日志 + actOperationRecordDao.insert(operRecEntity); + //4、插入应读记录表 + readRecordEntityList.forEach(readRecordEntity->{ + actReadRecordDao.insert(readRecordEntity); + }); + + result.setGroupActId(groupActInfoEntity.getId()); + return result; + } + + private List constructReadRec(String groupActId, String customerId, String groupId,String publishUserId) { + List list=new ArrayList<>(); + List memberDTOList=resiGroupMemberService.getMemberList(groupId); + memberDTOList.forEach(memberDTO->{ + ActReadRecordEntity actReadRecordEntity=new ActReadRecordEntity(); + actReadRecordEntity.setCustomerId(customerId); + actReadRecordEntity.setGroupActId(groupActId); + if(publishUserId.equals(memberDTO.getCustomerUserId())){ + //发布人默认是已读 + actReadRecordEntity.setRead(GroupActConstant.READ); + }else{ + actReadRecordEntity.setRead(GroupActConstant.UN_READ); + } + actReadRecordEntity.setUserId(memberDTO.getCustomerUserId()); + actReadRecordEntity.setShouldBeRead(Constant.YES); + list.add(actReadRecordEntity); + }); + return list; + } + + private GroupActInfoEntity constructGroupActInfoEntity(PublishGroupActFormDTO formDTO) { + GroupActInfoEntity entity = ConvertUtils.sourceToTarget(formDTO, GroupActInfoEntity.class); + entity.setId(formDTO.getGroupActId()); + entity.setAllCategoryName(actCategoryDictService.queryAllCategoryName(formDTO.getCategoryCode(), formDTO.getCustomerId())); + String startTimeStr = formDTO.getStartTime().concat(":00"); + entity.setStartTime(DateUtils.parse(startTimeStr, DateUtils.DATE_TIME_PATTERN)); + + if (StringUtils.isNotBlank(formDTO.getGroupActId())) { + entity.setStatus(GroupActConstant.CHANGED); + entity.setChangedTime(new Date()); + GroupActInfoEntity orginalEntity=baseDao.selectById(formDTO.getGroupActId()); + entity.setSignInStartTime(orginalEntity.getSignInStartTime()); + entity.setSignInEndTime(orginalEntity.getSignInEndTime()); + entity.setSummaryFlag(orginalEntity.getSummaryFlag()); + entity.setSignedInNum(orginalEntity.getSignedInNum()); + } else { + //发布新活动 + entity.setStatus(GroupActConstant.PUBLISHED); + entity.setChangedTime(new Date()); + entity.setSummaryFlag(NumConstant.ZERO); + entity.setSignedInNum(NumConstant.ZERO); + } + + Result gridInfoRes = govOrgOpenFeignClient.queryGridInfo(formDTO.getGridId()); + if (!gridInfoRes.success() || null == gridInfoRes.getData()) { + throw new RenException("网格信息查询失败,griId="+formDTO.getGridId()); + } + entity.setAgencyId(gridInfoRes.getData().getParentAgencyId()); + entity.setGridPids(gridInfoRes.getData().getPids()); + return entity; + } + + + private void checkPublishGroupActFormDTO(PublishGroupActFormDTO formDTO) { + //只有组长才能发布、编辑活动 + ResiGroupMemberDTO groupMemberDTO = resiGroupMemberService.getLeaderMember(formDTO.getGroupId()); + if (!formDTO.getPublishUserId().equals(groupMemberDTO.getCustomerUserId())) { + throw new RenException(EpmetErrorCode.GROUP_LEADER_CAN_EDIT_GROUP_INFO.getCode(), EpmetErrorCode.GROUP_LEADER_CAN_EDIT_GROUP_INFO.getMsg()); + } + if (StringUtils.isNotBlank(formDTO.getGroupActId())) { + //已取消或者已关闭的活动不允许修改 + GroupActInfoEntity originalAct = baseDao.selectById(formDTO.getGroupActId()); + if (null == originalAct) { + throw new RenException(String.format("活动已删除,group_act_info.id=%s", formDTO.getGroupActId())); + } + if (GroupActConstant.CANCELED.equals(originalAct.getStatus())) { + throw new RenException(EpmetErrorCode.GROUP_ACT_CANCELED_CAN_NOT_EDIT.getCode(), EpmetErrorCode.GROUP_ACT_CANCELED_CAN_NOT_EDIT.getMsg()); + } + if (GroupActConstant.CLOSED.equals(originalAct.getStatus())) { + throw new RenException(EpmetErrorCode.GROUP_ACT_CLOSED_CAN_NOT_EDIT.getCode(), EpmetErrorCode.GROUP_ACT_CLOSED_CAN_NOT_EDIT.getMsg()); + } + } + //文本内容、图片列表至少选择一个 + if (CollectionUtils.isEmpty(formDTO.getTextList()) && CollectionUtils.isEmpty(formDTO.getImgList())) { + throw new RenException(EpmetErrorCode.PLEASE_INPUT_ACT_CONTENT.getCode(), EpmetErrorCode.PLEASE_INPUT_ACT_CONTENT.getMsg()); + } + if (!CollectionUtils.isEmpty(formDTO.getTextList())) { + //活动文本内容,目前只有一段,限制1000字 + if (formDTO.getTextList().get(NumConstant.ZERO).length() > 1000) { + throw new RenException(EpmetErrorCode.GROUP_ACT_CONTENT_MAX.getCode(), EpmetErrorCode.GROUP_ACT_CONTENT_MAX.getMsg()); + } + } + if (!CollectionUtils.isEmpty(formDTO.getImgList())) { + //最多选择3张图片 + if (formDTO.getTextList().get(NumConstant.ZERO).length() > NumConstant.THREE) { + throw new RenException(EpmetErrorCode.GROUP_ACT_IMG_MAX.getCode(), EpmetErrorCode.GROUP_ACT_IMG_MAX.getMsg()); + } + } + } + + /** + * @param title 活动标题 + * @param textList 活动内容列表 + * @param imgList 活动图片列表 + * @return void + * @author yinzuomei + * @description + * @Date 2021/4/19 16:39 + **/ + private void scanActContent(String title, List textList, List imgList) { + //活动标题 + if (StringUtils.isNotBlank(title)) { + //创建话题内容审核 + TextScanParamDTO textScanParamDTO = new TextScanParamDTO(); + TextTaskDTO taskDTO = new TextTaskDTO(); + taskDTO.setContent(title); + taskDTO.setDataId(UUID.randomUUID().toString().replace("-", "")); + textScanParamDTO.getTasks().add(taskDTO); + Result textSyncScanResult = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScanParamDTO); + if (!textSyncScanResult.success()) { + throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); + } else { + if (!textSyncScanResult.getData().isAllPass()) { + log.warn(String.format("活动标题审核失败【%s】", title)); + throw new RenException(EpmetErrorCode.TEXT_SCAN_FAILED.getCode(), EpmetErrorCode.TEXT_SCAN_FAILED.getMsg()); + } + } + } + //活动内容 + if (!CollectionUtils.isEmpty(textList)) { + TextScanParamDTO textScanParamDTO = new TextScanParamDTO(); + textList.forEach(content -> { + TextTaskDTO taskDTO = new TextTaskDTO(); + taskDTO.setContent(content); + taskDTO.setDataId(UUID.randomUUID().toString().replace("-", "")); + textScanParamDTO.getTasks().add(taskDTO); + }); + Result textSyncScanResult = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScanParamDTO); + if (!textSyncScanResult.success()) { + throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); + } else { + if (!textSyncScanResult.getData().isAllPass()) { + log.warn(String.format("活动内容审核失败【%s】", JSON.toJSONString(textList))); + throw new RenException(EpmetErrorCode.TEXT_SCAN_FAILED.getCode(), EpmetErrorCode.TEXT_SCAN_FAILED.getMsg()); + } + } + } + //活动图片 + if (!CollectionUtils.isEmpty(imgList)) { + ImgScanParamDTO imgScanParamDTO = new ImgScanParamDTO(); + imgList.forEach(url -> { + ImgTaskDTO task = new ImgTaskDTO(); + task.setDataId(UUID.randomUUID().toString().replace("-", "")); + task.setUrl(url); + imgScanParamDTO.getTasks().add(task); + }); + Result imgScanResult = ScanContentUtils.imgSyncScan(scanApiUrl.concat(imgSyncScanMethod), imgScanParamDTO); + if (!imgScanResult.success()) { + throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); + } else { + if (!imgScanResult.getData().isAllPass()) { + log.warn("活动图片审核失败"); + throw new RenException(EpmetErrorCode.IMG_SCAN_FAILED.getCode(), EpmetErrorCode.IMG_SCAN_FAILED.getMsg()); + } + } + } + } + + private ActOperationRecordEntity constructOperRec(String groupActId, PublishGroupActFormDTO formDTO) { + ActOperationRecordEntity actOperationRecordEntity = new ActOperationRecordEntity(); + actOperationRecordEntity.setCustomerId(formDTO.getCustomerId()); + actOperationRecordEntity.setOperateUserId(formDTO.getPublishUserId()); + actOperationRecordEntity.setGroupActId(groupActId); + actOperationRecordEntity.setOperationType(StringUtils.isNotBlank(formDTO.getGroupActId()) ? GroupActConstant.CHANGE : GroupActConstant.PUBLISH); + return actOperationRecordEntity; + } + + private List constructImg(String groupActId, String customerId, List imgList) { + List list = new ArrayList<>(); + int imgSort = NumConstant.ONE; + for (String img : imgList) { + GroupActContentEntity entity = new GroupActContentEntity(); + entity.setGroupActId(groupActId); + entity.setContent(img); + entity.setContentType(GroupActConstant.IMG); + entity.setCustomerId(customerId); + entity.setSort(imgSort); + imgSort++; + } + return list; + } + + private List constructText(String groupActId, String customerId, List textList) { + List list = new ArrayList<>(); + int textSort = NumConstant.ONE; + for (String text : textList) { + GroupActContentEntity entity = new GroupActContentEntity(); + entity.setGroupActId(groupActId); + entity.setContent(text); + entity.setContentType(GroupActConstant.TEXT); + entity.setCustomerId(customerId); + entity.setSort(textSort); + textSort++; + } + return list; + } + /** + * 004、活动详情 + * + * @param actDetailFormDTO + * @return com.epmet.resi.group.dto.act.result.ActDetailResultDTO + */ + @Override + public ActDetailResultDTO queryActDetail(ActDetailFormDTO actDetailFormDTO) { + //todo + return null; + } } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/constant/GroupActConstant.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/constant/GroupActConstant.java index 5fa2e8cd79..f53850141e 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/constant/GroupActConstant.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/constant/GroupActConstant.java @@ -8,4 +8,29 @@ package com.epmet.modules.constant; */ public interface GroupActConstant { String DEFAULT_CUSTOMER_ID = "default"; + + // 活动状态:已发布:published;已取消:canceled;已变更:changed;已关闭:closed + String PUBLISHED="published"; + String CANCELED="canceled"; + String CHANGED="changed"; + String CLOSED="closed"; + + /** + * 操作类型:发布:publish; + 取消:cancel; + 变更:change; + 关闭:close + */ + String PUBLISH="publish"; + String CANCEL="cancel"; + String CHANGE="change"; + String CLOSE="close"; + + // 内容类型: 文字:text;图片:img + String TEXT="text"; + String IMG="img"; + + // 已读: read未读:un_read + String READ="read"; + String UN_READ="un_read"; } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/ResiGroupMemberService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/ResiGroupMemberService.java index 276ec73387..2a0c0d9316 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/ResiGroupMemberService.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/ResiGroupMemberService.java @@ -234,4 +234,22 @@ public interface ResiGroupMemberService extends BaseService + * @param groupId + * @author yinzuomei + * @description 查询组内有效人员列表 + * @Date 2021/4/19 19:14 + **/ + List getMemberList(String groupId); } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/ResiGroupMemberServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/ResiGroupMemberServiceImpl.java index 489467de93..9fbc039d40 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/ResiGroupMemberServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/ResiGroupMemberServiceImpl.java @@ -351,6 +351,16 @@ public class ResiGroupMemberServiceImpl extends BaseServiceImpl getMemberList(String groupId) { + return baseDao.getMemberList(groupId); + } + /** * @param groupMemberListFormDTO * @return com.epmet.commons.tools.utils.Result diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActCategoryDictDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActCategoryDictDao.xml index d6c4f45d4b..440ed9f9f3 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActCategoryDictDao.xml +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActCategoryDictDao.xml @@ -37,10 +37,30 @@ FROM act_category_dict acd WHERE - acd.PARENT_CODE = #{parentCode} + acd.DEL_FLAG = '0' + and acd.PARENT_CODE = #{parentCode} AND acd.CUSTOMER_ID = #{customerId} ORDER BY ACD.SORT ASC + + \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActReadRecordDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActReadRecordDao.xml index 2410bc9793..9f55748033 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActReadRecordDao.xml +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActReadRecordDao.xml @@ -2,7 +2,9 @@ - + + delete from act_read_record where GROUP_ACT_ID=#{groupActId} + \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/GroupActContentDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/GroupActContentDao.xml index ccb7d49437..7152cf67eb 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/GroupActContentDao.xml +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/GroupActContentDao.xml @@ -3,6 +3,13 @@ - + + UPDATE group_act_content + SET DEL_FLAG = '1', + UPDATED_BY = #{userId}, + UPDATED_TIME = now() + WHERE + GROUP_ACT_ID = #{groupActId} + \ No newline at end of file From ebf745bf6bc3474ead3fd8545e72e52fd17f7a0a Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 20 Apr 2021 09:36:35 +0800 Subject: [PATCH 019/202] =?UTF-8?q?=E5=B0=8F=E7=BB=84=E9=80=9A=E7=9F=A5?= =?UTF-8?q?=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/notice/form/NoticeDetailFormDTO.java | 21 ++++++ .../notice/result/NoticeDetailResultDTO.java | 71 +++++++++++++++++++ .../notice/controller/NoticeController.java | 14 ++++ .../notice/dao/NoticeAttachmentDao.java | 9 +++ .../modules/notice/service/NoticeService.java | 10 +++ .../service/impl/NoticeServiceImpl.java | 64 ++++++++++++++++- .../mapper/notice/NoticeAttachmentDao.xml | 17 +++++ 7 files changed, 205 insertions(+), 1 deletion(-) create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/NoticeDetailFormDTO.java create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/result/NoticeDetailResultDTO.java diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/NoticeDetailFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/NoticeDetailFormDTO.java new file mode 100644 index 0000000000..c9a57033b1 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/NoticeDetailFormDTO.java @@ -0,0 +1,21 @@ +package com.epmet.resi.group.dto.notice.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; + +/** + * @Author sun + * @Description 小组通知详情-接口入参 + */ +@Data +public class NoticeDetailFormDTO { + + /** + * 通知Id + */ + @NotBlank(message = "通知Id不能为空",groups = {NoticeDetailFormDTO.Detail.class}) + private String noticeId; + + public interface Detail{} +} diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/result/NoticeDetailResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/result/NoticeDetailResultDTO.java new file mode 100644 index 0000000000..eec820ee53 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/result/NoticeDetailResultDTO.java @@ -0,0 +1,71 @@ +package com.epmet.resi.group.dto.notice.result; + +import com.epmet.resi.group.dto.notice.form.AddNoticeFormDTO; +import com.epmet.resi.group.dto.topic.form.FileDTO; +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.Data; +import lombok.NoArgsConstructor; +import org.hibernate.validator.constraints.Length; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +/** + * @Author sun + * @Description 小组通知详情-接口返参 + */ +@Data +public class NoticeDetailResultDTO implements Serializable { + private static final long serialVersionUID = 6136787210623326830L; + + /** + * 通知Id + */ + private String noticeId; + /** + * 通知标题 + */ + private String title; + /** + * 通知内容 + */ + private String content; + /** + * 是否变更过(是:yes 否:no) + */ + private String isChange; + /** + * 发布时间yyyy-MM-dd HH:mm + */ + private String releaseTime; + /** + * 发布人头像 + */ + private String releaseUserHeadPhoto; + /** + * 发布人名称 + */ + private String releaseUserName; + /** + * 图片附件集合 + */ + private List imageList; + /** + * 文件附件url集合 + */ + private List docList; + + + @NoArgsConstructor + @Data + public static class File { + private String name; + private String url; + private String type; + private String format; + private Integer size; + private Integer duration; + } +} diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeController.java index 1ebaf78bad..339fd1e04a 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeController.java @@ -32,6 +32,8 @@ import com.epmet.modules.notice.service.NoticeService; import com.epmet.resi.group.dto.notice.NoticeDTO; import com.epmet.resi.group.dto.notice.form.AddNoticeFormDTO; import com.epmet.resi.group.dto.notice.form.EditNoticeFormDTO; +import com.epmet.resi.group.dto.notice.form.NoticeDetailFormDTO; +import com.epmet.resi.group.dto.notice.result.NoticeDetailResultDTO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -121,4 +123,16 @@ public class NoticeController { return new Result(); } + /** + * @param formDTO + * @return + * @Author sun + * @Description 小组通知详情 + **/ + @PostMapping(value = "noticedetail") + public Result noticeDetail(@LoginUser TokenDto tokenDto, @RequestBody NoticeDetailFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, NoticeDetailFormDTO.Detail.class); + return new Result().ok(noticeService.noticeDetail(tokenDto, formDTO)); + } + } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/dao/NoticeAttachmentDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/dao/NoticeAttachmentDao.java index 34aef12db5..5442f7d806 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/dao/NoticeAttachmentDao.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/dao/NoticeAttachmentDao.java @@ -19,9 +19,12 @@ package com.epmet.modules.notice.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.modules.notice.entity.NoticeAttachmentEntity; +import com.epmet.resi.group.dto.notice.result.NoticeDetailResultDTO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; +import java.util.List; + /** * 小组通知附件表 * @@ -36,4 +39,10 @@ public interface NoticeAttachmentDao extends BaseDao { * @Description 删除通知附件-物理删除 **/ void delByNoticeId(@Param("noticeId") String noticeId); + + /** + * @Author sun + * @Description 查询通知附件数据 + **/ + List selectListByNoticeId(@Param("noticeId") String noticeId); } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeService.java index 2c09205f37..a10a82fb07 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeService.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeService.java @@ -24,6 +24,8 @@ import com.epmet.modules.notice.entity.NoticeEntity; import com.epmet.resi.group.dto.notice.NoticeDTO; import com.epmet.resi.group.dto.notice.form.AddNoticeFormDTO; import com.epmet.resi.group.dto.notice.form.EditNoticeFormDTO; +import com.epmet.resi.group.dto.notice.form.NoticeDetailFormDTO; +import com.epmet.resi.group.dto.notice.result.NoticeDetailResultDTO; import java.util.List; import java.util.Map; @@ -111,4 +113,12 @@ public interface NoticeService extends BaseService { * @Description 小组通知变更 **/ void edit(TokenDto tokenDto, EditNoticeFormDTO formDTO); + + /** + * @param formDTO + * @return + * @Author sun + * @Description 小组通知详情 + **/ + NoticeDetailResultDTO noticeDetail(TokenDto tokenDto, NoticeDetailFormDTO formDTO); } \ No newline at end of file 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 78f6812f2e..8ef6c3dcc4 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 @@ -40,6 +40,7 @@ import com.epmet.constant.ReadFlagConstant; import com.epmet.dto.form.LoginUserDetailsFormDTO; import com.epmet.dto.form.UserMessageFormDTO; import com.epmet.dto.result.LoginUserDetailsResultDTO; +import com.epmet.dto.result.UserBaseInfoResultDTO; import com.epmet.feign.EpmetMessageOpenFeignClient; import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.modules.constant.UserMessageConstant; @@ -59,8 +60,11 @@ import com.epmet.modules.notice.service.NoticeService; import com.epmet.resi.group.constant.TopicConstant; import com.epmet.resi.group.dto.member.ResiGroupMemberDTO; import com.epmet.resi.group.dto.notice.NoticeDTO; +import com.epmet.resi.group.dto.notice.NoticeReafdRecordDTO; import com.epmet.resi.group.dto.notice.form.AddNoticeFormDTO; import com.epmet.resi.group.dto.notice.form.EditNoticeFormDTO; +import com.epmet.resi.group.dto.notice.form.NoticeDetailFormDTO; +import com.epmet.resi.group.dto.notice.result.NoticeDetailResultDTO; import com.epmet.resi.group.dto.topic.form.FileDTO; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; @@ -318,7 +322,7 @@ public class NoticeServiceImpl extends BaseServiceImpl public void edit(TokenDto tokenDto, EditNoticeFormDTO formDTO) { //1.查询通知是否存在 NoticeEntity entity = baseDao.selectById(formDTO.getNoticeId()); - if(null == entity){ + if (null == entity) { throw new RenException(String.format("小组通知变更,获取通知数据失败,通知Id->", formDTO.getNoticeId())); } //2.文字、图片安全校验 @@ -432,6 +436,64 @@ public class NoticeServiceImpl extends BaseServiceImpl } } + /** + * @param formDTO + * @return + * @Author sun + * @Description 小组通知详情 + **/ + @Override + public NoticeDetailResultDTO noticeDetail(TokenDto tokenDto, NoticeDetailFormDTO formDTO) { + NoticeDetailResultDTO resultDTO = new NoticeDetailResultDTO(); + List imageList = new ArrayList<>(); + List docList = new ArrayList<>(); + //1.查询通知基础信息 + NoticeEntity entity = baseDao.selectById(formDTO.getNoticeId()); + if (null == entity) { + return resultDTO; + } + + //2.查询通知附件数据 + List fileList = noticeAttachmentDao.selectListByNoticeId(formDTO.getNoticeId()); + + //3.调用user服务,查询通知发起人基本信息 + List userIdList = new ArrayList<>(); + userIdList.add(entity.getCreatedBy()); + Result> result = epmetUserOpenFeignClient.queryUserBaseInfo(userIdList); + if (!result.success()) { + throw new RenException("调用user服务,获取用户基础数据失败"); + } + List resultDTOList = result.getData(); + + //4.封装数据并返回 + resultDTO.setNoticeId(entity.getId()); + resultDTO.setTitle(entity.getTitle()); + resultDTO.setContent(entity.getContent()); + resultDTO.setIsChange(entity.getIsChange()); + resultDTO.setReleaseTime(entity.getChangeTime().toString()); + StringBuffer name = new StringBuffer(); + StringBuffer url = new StringBuffer(); + resultDTOList.forEach(user -> { + if (entity.getCreatedBy().equals(user.getUserId())) { + name.append(user.getSurname()).append(user.getName()); + url.append(user.getHeadImgUrl()); + } + }); + resultDTO.setReleaseUserName(name.toString()); + resultDTO.setReleaseUserHeadPhoto(url.toString()); + fileList.forEach(f -> { + if ("image".equals(f.getType())) { + imageList.add(f); + } else if ("doc".equals(f.getType())) { + docList.add(f); + } + }); + resultDTO.setImageList(imageList); + resultDTO.setDocList(docList); + + return resultDTO; + } + /** * @Author sun * @Description 文字、图片安全校验 diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/notice/NoticeAttachmentDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/notice/NoticeAttachmentDao.xml index 6ee12ce2e0..5423a4620a 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/notice/NoticeAttachmentDao.xml +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/notice/NoticeAttachmentDao.xml @@ -3,6 +3,23 @@ + + DELETE FROM From 6df41196821df140916c6d75f25f3582c6223961 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 20 Apr 2021 09:43:25 +0800 Subject: [PATCH 020/202] =?UTF-8?q?=E5=AE=A1=E6=A0=B8=E9=80=9A=E8=BF=87?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E6=B7=BB=E5=8A=A0=E5=B0=8F=E7=BB=84=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/resi/group/dto/group/ResiGroupDTO.java | 4 ++++ .../epmet/resi/group/dto/group/ResiGroupInfoRedisDTO.java | 5 +++++ .../resi/group/dto/group/result/GroupsInGridResultDTO.java | 5 +++++ .../modules/group/service/impl/ResiGroupServiceImpl.java | 7 +++++++ .../resources/mapper/group/GroupEditSubmitRecordDao.xml | 1 + 5 files changed, 22 insertions(+) diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/ResiGroupDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/ResiGroupDTO.java index b2d57ecc1d..eb83fd5162 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/ResiGroupDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/ResiGroupDTO.java @@ -115,4 +115,8 @@ Ps: 如果一个小组被拒绝,当前小组的状态将永久停留在“审 */ private Date updatedTime; + /** + * 小组类型(ordinary:楼院小组 branch:支部小组) + */ + private String groupType; } diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/ResiGroupInfoRedisDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/ResiGroupInfoRedisDTO.java index f2c52f6804..88fa69ac31 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/ResiGroupInfoRedisDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/ResiGroupInfoRedisDTO.java @@ -56,6 +56,11 @@ public class ResiGroupInfoRedisDTO implements Serializable{ * */ private String latestTopicPublishDate; + /** + * 小组类型(ordinary:楼院小组 branch:支部小组) + */ + private String groupType; + /** * 组统计信息 * */ diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/GroupsInGridResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/GroupsInGridResultDTO.java index fa4d22740a..b936405627 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/GroupsInGridResultDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/GroupsInGridResultDTO.java @@ -38,4 +38,9 @@ public class GroupsInGridResultDTO implements Serializable { * 当前状态审核通过 - approved 、 审核中 - under_auditting、 审核未通过 - rejected 、 已屏蔽 - hidden、 已关闭 - closed */ private String status; + + /** + * 小组类型(ordinary:楼院小组 branch:支部小组) + */ + private String groupType; } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java index 1479a45456..a3770a028c 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java @@ -802,6 +802,7 @@ public class ResiGroupServiceImpl extends BaseServiceImpl Date: Tue, 20 Apr 2021 10:01:11 +0800 Subject: [PATCH 021/202] =?UTF-8?q?=E5=8F=91=E5=B8=83=E9=80=9A=E7=9F=A5?= =?UTF-8?q?=E8=AF=84=E8=AE=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/notice/form/NoticeCommentFormDTO.java | 28 +++++ .../controller/NoticeCommentController.java | 16 +++ .../notice/service/NoticeCommentService.java | 10 ++ .../impl/NoticeCommentServiceImpl.java | 101 +++++++++++++++++- 4 files changed, 152 insertions(+), 3 deletions(-) create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/NoticeCommentFormDTO.java diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/NoticeCommentFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/NoticeCommentFormDTO.java new file mode 100644 index 0000000000..b2f91f22f9 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/NoticeCommentFormDTO.java @@ -0,0 +1,28 @@ +package com.epmet.resi.group.dto.notice.form; + +import lombok.Data; +import org.hibernate.validator.constraints.Length; + +import javax.validation.constraints.NotBlank; + +/** + * @Author sun + * @Description 小组通知编辑-接口入参 + */ +@Data +public class NoticeCommentFormDTO { + + /** + * 通知Id + */ + @NotBlank(message = "通知Id不能为空",groups = {NoticeCommentFormDTO.Comment.class}) + private String noticeId; + /** + * 评论内容300 + */ + @NotBlank(message = "评论内容不能为空",groups = {NoticeCommentFormDTO.Comment.class}) + @Length(max = 20, message = "评论内容不能超过300个字符") + private String commentContent; + + public interface Comment{} +} diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeCommentController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeCommentController.java index a7114f3834..4d85bbe530 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeCommentController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeCommentController.java @@ -17,7 +17,9 @@ package com.epmet.modules.notice.controller; +import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.AssertUtils; @@ -28,6 +30,7 @@ import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.modules.notice.excel.NoticeCommentExcel; import com.epmet.modules.notice.service.NoticeCommentService; import com.epmet.resi.group.dto.notice.NoticeCommentDTO; +import com.epmet.resi.group.dto.notice.form.NoticeCommentFormDTO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -91,4 +94,17 @@ public class NoticeCommentController { ExcelUtils.exportExcelToTarget(response, null, list, NoticeCommentExcel.class); } + /** + * @param formDTO + * @return + * @Author sun + * @Description 发布通知评论 + **/ + @PostMapping(value = "noticecomment") + public Result noticeComment(@LoginUser TokenDto tokenDto, @RequestBody NoticeCommentFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, NoticeCommentFormDTO.Comment.class); + noticeCommentService.noticeComment(tokenDto, formDTO); + return new Result(); + } + } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeCommentService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeCommentService.java index 0204df5cc9..c0cadd139f 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeCommentService.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeCommentService.java @@ -19,8 +19,10 @@ package com.epmet.modules.notice.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.modules.notice.entity.NoticeCommentEntity; import com.epmet.resi.group.dto.notice.NoticeCommentDTO; +import com.epmet.resi.group.dto.notice.form.NoticeCommentFormDTO; import java.util.List; import java.util.Map; @@ -92,4 +94,12 @@ public interface NoticeCommentService extends BaseService { * @date 2021-04-19 */ void delete(String[] ids); + + /** + * @param formDTO + * @return + * @Author sun + * @Description 发布通知评论 + **/ + void noticeComment(TokenDto tokenDto, NoticeCommentFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeCommentServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeCommentServiceImpl.java index 81ed00809a..c4847f0581 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeCommentServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeCommentServiceImpl.java @@ -21,21 +21,44 @@ 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.scan.param.TextScanParamDTO; +import com.epmet.commons.tools.scan.param.TextTaskDTO; +import com.epmet.commons.tools.scan.result.SyncScanResult; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.utils.ScanContentUtils; +import com.epmet.modules.member.service.ResiGroupMemberService; import com.epmet.modules.notice.dao.NoticeCommentDao; import com.epmet.modules.notice.entity.NoticeCommentEntity; +import com.epmet.modules.notice.entity.NoticeEntity; import com.epmet.modules.notice.redis.NoticeCommentRedis; import com.epmet.modules.notice.service.NoticeCommentService; +import com.epmet.modules.notice.service.NoticeService; +import com.epmet.modules.topic.service.ResiTopicService; +import com.epmet.modules.utils.ModuleConstant; +import com.epmet.resi.group.constant.MemberStateConstant; +import com.epmet.resi.group.constant.TopicConstant; +import com.epmet.resi.group.dto.member.ResiGroupMemberDTO; import com.epmet.resi.group.dto.notice.NoticeCommentDTO; +import com.epmet.resi.group.dto.notice.NoticeDTO; +import com.epmet.resi.group.dto.notice.form.NoticeCommentFormDTO; +import com.epmet.resi.group.dto.topic.ResiTopicDTO; import org.apache.commons.lang3.StringUtils; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.Arrays; import java.util.List; import java.util.Map; +import java.util.UUID; /** * 小组通知评论表 @@ -45,9 +68,18 @@ import java.util.Map; */ @Service public class NoticeCommentServiceImpl extends BaseServiceImpl implements NoticeCommentService { - + private final Log logger = LogFactory.getLog(getClass()); @Autowired private NoticeCommentRedis noticeCommentRedis; + @Autowired + private NoticeService noticeService; + @Autowired + private ResiGroupMemberService resiGroupMemberService; + @Value("${openapi.scan.server.url}") + private String scanApiUrl; + @Value("${openapi.scan.method.textSyncScan}") + private String textSyncScanMethod; + @Override public PageData page(Map params) { @@ -65,8 +97,8 @@ public class NoticeCommentServiceImpl extends BaseServiceImpl getWrapper(Map params){ - String id = (String)params.get(FieldConstant.ID_HUMP); + 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); @@ -101,4 +133,67 @@ public class NoticeCommentServiceImpl extends BaseServiceImpl textSyncScanResult = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScanParamDTO); + if (!textSyncScanResult.success()) { + throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); + } else { + if (!textSyncScanResult.getData().isAllPass()) { + logger.error(String.format(TopicConstant.REVIEW_TOPIC, commentContent)); + throw new RenException(EpmetErrorCode.TEXT_SCAN_FAILED.getCode()); + } + } + } + + //2.判断当前用户是否被禁言、移除、非本组成员 + NoticeDTO notice = noticeService.get(formDTO.getNoticeId()); + if (null == notice) { + logger.error(ModuleConstant.NO_SUCH_TOPIC); + throw new RenException(ModuleConstant.NO_SUCH_TOPIC); + } + + ResiGroupMemberDTO resiGroupMemberDTO = + resiGroupMemberService.getResiGroupMember(notice.getGroupId(), tokenDto.getUserId()); + //查看当前用户是否被禁言或者被移除 + if (null != resiGroupMemberDTO) { + if (MemberStateConstant.SILENT.equals(resiGroupMemberDTO.getStatus())) { + //当前用户被禁言 + logger.error(ModuleConstant.SLIENT_MEMBER); + throw new RenException(ModuleConstant.SLIENT_MEMBER); + } else if (MemberStateConstant.REMOVED.equals(resiGroupMemberDTO.getStatus())) { + //当前用户已被移出群 + logger.error(ModuleConstant.REMOVED_MEMBER); + throw new RenException(ModuleConstant.REMOVED_MEMBER); + } + } else { + //当前用户非组内成员 + logger.error(ModuleConstant.NOT_BELONG_TO_CURRENT_GROUP); + throw new RenException(ModuleConstant.NOT_BELONG_TO_CURRENT_GROUP); + } + + //3.通知评论表新增数据 + NoticeCommentEntity entity = new NoticeCommentEntity(); + entity.setCustomerId(notice.getCustomerId()); + entity.setNoticeId(formDTO.getNoticeId()); + entity.setCommentContent(formDTO.getCommentContent()); + insert(entity); + } + } \ No newline at end of file From 73531fd1f19007ef6dfc9126c70658b9a3a41112 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 20 Apr 2021 10:43:12 +0800 Subject: [PATCH 022/202] =?UTF-8?q?=E9=80=9A=E7=9F=A5=E8=AF=84=E8=AE=BA?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../comment/result/ResiCommentResultDTO.java | 2 + .../notice/form/NoticeCommentListFormDTO.java | 33 ++++++++++ .../result/NoticeCommentListResultDTO.java | 44 +++++++++++++ .../controller/NoticeCommentController.java | 14 +++++ .../modules/notice/dao/NoticeCommentDao.java | 11 +++- .../notice/service/NoticeCommentService.java | 10 +++ .../impl/NoticeCommentServiceImpl.java | 63 +++++++++++++++---- .../mapper/notice/NoticeCommentDao.xml | 15 +++++ 8 files changed, 180 insertions(+), 12 deletions(-) create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/NoticeCommentListFormDTO.java create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/result/NoticeCommentListResultDTO.java diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/comment/result/ResiCommentResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/comment/result/ResiCommentResultDTO.java index 2a2f287460..c28985e054 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/comment/result/ResiCommentResultDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/comment/result/ResiCommentResultDTO.java @@ -1,6 +1,7 @@ package com.epmet.resi.group.dto.comment.result; import com.alibaba.fastjson.annotation.JSONField; +import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; import java.io.Serializable; @@ -40,6 +41,7 @@ public class ResiCommentResultDTO implements Serializable { /** * 用户Id 评论者Id * */ + @JsonIgnore private String userId; /** diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/NoticeCommentListFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/NoticeCommentListFormDTO.java new file mode 100644 index 0000000000..960ba374e5 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/NoticeCommentListFormDTO.java @@ -0,0 +1,33 @@ +package com.epmet.resi.group.dto.notice.form; + +import lombok.Data; + +import javax.validation.constraints.Min; +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Author sun + * @Description 通知评论列表查询-接口入参 + */ +@Data +public class NoticeCommentListFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + /** + * 通知Id + */ + @NotBlank(message = "通知Id不能为空",groups = {NoticeCommentListFormDTO.CommentList.class}) + private String noticeId; + /** + * 请求页码 + * */ + @Min(1) + private int pageNo; + /** + * 每页多少条数据 + * */ + private int pageSize = 20; + + public interface CommentList{} +} diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/result/NoticeCommentListResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/result/NoticeCommentListResultDTO.java new file mode 100644 index 0000000000..c086df0f94 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/result/NoticeCommentListResultDTO.java @@ -0,0 +1,44 @@ +package com.epmet.resi.group.dto.notice.result; + +import com.alibaba.fastjson.annotation.JSONField; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +/** + * @Author sun + * @Description 通知评论列表查询-接口返参 + */ +@Data +public class NoticeCommentListResultDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 评论Id + * */ + private String noticeCommentId; + /** + * 评论内容 + * */ + private String commentContent; + /** + * 评论者头像 + * */ + private String commentUserHeadPhoto; + /** + * 评论者姓名 + * */ + private String commentUserName; + /** + * 评论时间 yyyy-MM-dd HH:mm + * */ + @JSONField(format="yyyy-MM-dd HH:mm") + private Date commentTime; + /** + * 用户Id 评论者Id + * */ + private String userId; + +} diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeCommentController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeCommentController.java index 4d85bbe530..f3972f4478 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeCommentController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeCommentController.java @@ -31,6 +31,8 @@ import com.epmet.modules.notice.excel.NoticeCommentExcel; import com.epmet.modules.notice.service.NoticeCommentService; import com.epmet.resi.group.dto.notice.NoticeCommentDTO; import com.epmet.resi.group.dto.notice.form.NoticeCommentFormDTO; +import com.epmet.resi.group.dto.notice.form.NoticeCommentListFormDTO; +import com.epmet.resi.group.dto.notice.result.NoticeCommentListResultDTO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -107,4 +109,16 @@ public class NoticeCommentController { return new Result(); } + /** + * @param formDTO + * @return + * @Author sun + * @Description 通知评论列表查询 + **/ + @PostMapping(value = "noticecommentlist") + public Result> noticeCommentList(@LoginUser TokenDto tokenDto, @RequestBody NoticeCommentListFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, NoticeCommentListFormDTO.CommentList.class); + return new Result>().ok(noticeCommentService.noticeCommentList(tokenDto, formDTO)); + } + } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/dao/NoticeCommentDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/dao/NoticeCommentDao.java index db988edb81..308fc3ea0a 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/dao/NoticeCommentDao.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/dao/NoticeCommentDao.java @@ -19,8 +19,12 @@ package com.epmet.modules.notice.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.modules.notice.entity.NoticeCommentEntity; +import com.epmet.resi.group.dto.notice.form.NoticeCommentListFormDTO; +import com.epmet.resi.group.dto.notice.result.NoticeCommentListResultDTO; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + /** * 小组通知评论表 * @@ -29,5 +33,10 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface NoticeCommentDao extends BaseDao { - + + /** + * @Author sun + * @Description 分页查询通知评论列表 + **/ + List getNoticeCommentList(NoticeCommentListFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeCommentService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeCommentService.java index c0cadd139f..50b3beaa9d 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeCommentService.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeCommentService.java @@ -23,6 +23,8 @@ import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.modules.notice.entity.NoticeCommentEntity; import com.epmet.resi.group.dto.notice.NoticeCommentDTO; import com.epmet.resi.group.dto.notice.form.NoticeCommentFormDTO; +import com.epmet.resi.group.dto.notice.form.NoticeCommentListFormDTO; +import com.epmet.resi.group.dto.notice.result.NoticeCommentListResultDTO; import java.util.List; import java.util.Map; @@ -102,4 +104,12 @@ public interface NoticeCommentService extends BaseService { * @Description 发布通知评论 **/ void noticeComment(TokenDto tokenDto, NoticeCommentFormDTO formDTO); + + /** + * @param formDTO + * @return + * @Author sun + * @Description 通知评论列表查询 + **/ + List noticeCommentList(TokenDto tokenDto, NoticeCommentListFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeCommentServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeCommentServiceImpl.java index c4847f0581..f3b2671eb4 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeCommentServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeCommentServiceImpl.java @@ -21,6 +21,7 @@ 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.constant.NumConstant; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; @@ -31,22 +32,24 @@ import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.ScanContentUtils; +import com.epmet.dto.result.UserBaseInfoResultDTO; +import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.modules.member.service.ResiGroupMemberService; import com.epmet.modules.notice.dao.NoticeCommentDao; import com.epmet.modules.notice.entity.NoticeCommentEntity; -import com.epmet.modules.notice.entity.NoticeEntity; import com.epmet.modules.notice.redis.NoticeCommentRedis; import com.epmet.modules.notice.service.NoticeCommentService; import com.epmet.modules.notice.service.NoticeService; -import com.epmet.modules.topic.service.ResiTopicService; import com.epmet.modules.utils.ModuleConstant; import com.epmet.resi.group.constant.MemberStateConstant; import com.epmet.resi.group.constant.TopicConstant; +import com.epmet.resi.group.dto.comment.result.ResiCommentResultDTO; import com.epmet.resi.group.dto.member.ResiGroupMemberDTO; import com.epmet.resi.group.dto.notice.NoticeCommentDTO; import com.epmet.resi.group.dto.notice.NoticeDTO; import com.epmet.resi.group.dto.notice.form.NoticeCommentFormDTO; -import com.epmet.resi.group.dto.topic.ResiTopicDTO; +import com.epmet.resi.group.dto.notice.form.NoticeCommentListFormDTO; +import com.epmet.resi.group.dto.notice.result.NoticeCommentListResultDTO; import org.apache.commons.lang3.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -55,10 +58,8 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.UUID; +import java.util.*; +import java.util.stream.Collectors; /** * 小组通知评论表 @@ -71,14 +72,16 @@ public class NoticeCommentServiceImpl extends BaseServiceImpl noticeCommentList(TokenDto tokenDto, NoticeCommentListFormDTO formDTO) { + //1.分页查询通知评论列表 + formDTO.setPageNo((formDTO.getPageNo() - NumConstant.ONE) * formDTO.getPageSize()); + List resultList = baseDao.getNoticeCommentList(formDTO); + if (resultList.size() < NumConstant.ONE) { + return new ArrayList<>(); + } + + //2.调用user服务,查询评论人员基础信息 + List userIdList = resultList.stream().map(NoticeCommentListResultDTO::getUserId).collect(Collectors.toList()); + Result> result = epmetUserOpenFeignClient.queryUserBaseInfo(userIdList); + if (!result.success()) { + throw new RenException("调用user服务,获取用户基础数据失败"); + } + List resultDTOList = result.getData(); + + //3.封装数据并返回 + resultList.forEach(l -> { + StringBuffer name = new StringBuffer(); + resultDTOList.forEach(user -> { + if (l.getUserId().equals(user.getUserId())) { + name.append(null == user.getSurname() ? "" : user.getSurname()).append(null == user.getName() ? "" : user.getName()); + l.setCommentUserHeadPhoto(user.getHeadImgUrl()); + } + }); + l.setCommentUserName(name.toString()); + }); + + return resultList; + } + } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/notice/NoticeCommentDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/notice/NoticeCommentDao.xml index 90c7baed49..a5612ddcbf 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/notice/NoticeCommentDao.xml +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/notice/NoticeCommentDao.xml @@ -3,5 +3,20 @@ + \ No newline at end of file From cfac35ed5fdc2b52729974c193257ef6e5128f30 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 20 Apr 2021 10:53:06 +0800 Subject: [PATCH 023/202] =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E5=B7=B2=E8=AF=BB?= =?UTF-8?q?=E6=9C=AA=E8=AF=BB=E5=88=97=E8=A1=A8=EF=BC=8C=E6=B4=BB=E5=8A=A8?= =?UTF-8?q?=E8=AF=A6=E6=83=85=20=E6=9A=82=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tools/exception/EpmetErrorCode.java | 4 +- .../dto/act/form/ActReadViewFormDTO.java | 29 ++++ .../dto/act/result/ActDetailResultDTO.java | 143 +++++++++++++++++- .../controller/GroupActInfoController.java | 16 ++ .../act/dao/ActOperationRecordDao.java | 9 +- .../modules/act/dao/ActReadRecordDao.java | 26 ++++ .../modules/act/dao/GroupActContentDao.java | 20 ++- .../act/service/GroupActInfoService.java | 10 ++ .../service/impl/GroupActInfoServiceImpl.java | 119 ++++++++++++++- .../mapper/act/ActOperationRecordDao.xml | 15 +- .../resources/mapper/act/ActReadRecordDao.xml | 24 +++ .../mapper/act/GroupActContentDao.xml | 15 +- 12 files changed, 418 insertions(+), 12 deletions(-) create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/ActReadViewFormDTO.java diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java index b54663f866..7e745709a6 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java @@ -166,8 +166,8 @@ public enum EpmetErrorCode { PLEASE_INPUT_ACT_CONTENT(8903,"请输入活动内容,或添加图片"), GROUP_ACT_CONTENT_MAX(8904,"活动内容至多输入1000字"), GROUP_ACT_IMG_MAX(8905,"最多可添加3张图片"), - PARTY_MEMBER_CREATE_BRANCH_GROUP(8906,"您不是党员,不能创建支部小组"); - + PARTY_MEMBER_CREATE_BRANCH_GROUP(8906,"您不是党员,不能创建支部小组"), + NOT_IN_GROUP_CAN_NOT_VIEW(8907,"当前内容仅允许组内成员查看"); private int code; private String msg; diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/ActReadViewFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/ActReadViewFormDTO.java new file mode 100644 index 0000000000..dacf0fbb27 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/ActReadViewFormDTO.java @@ -0,0 +1,29 @@ +package com.epmet.resi.group.dto.act.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * 016、活动已读未读列表 + * + * @author yinzuomei@elink-cn.com + * @date 2021/4/19 19:36 + */ +@Data +public class ActReadViewFormDTO implements Serializable { + private static final long serialVersionUID = -7382937811770356934L; + + public interface AddUserInternalGroup { + } + @NotBlank(message = "groupActId不能为空", groups = AddUserInternalGroup.class) + private String groupActId; + + /** + * 当前用户id + */ + @NotBlank(message = "tokenDto获取userId为空", groups = AddUserInternalGroup.class) + private String userId; +} + diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/ActDetailResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/ActDetailResultDTO.java index 7b019f904d..37507b4009 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/ActDetailResultDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/ActDetailResultDTO.java @@ -1,10 +1,149 @@ package com.epmet.resi.group.dto.act.result; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; +import java.util.List; + /** - * 描述一下 + * 004、活动详情 返参 * * @author yinzuomei@elink-cn.com * @date 2021/4/19 19:24 */ -public class ActDetailResultDTO { +@Data +public class ActDetailResultDTO implements Serializable { + private static final long serialVersionUID = 8912162789028312892L; + + + private String groupActId; + + /** + * 小组id + */ + private String groupId; + + /** + * 活动标题; + */ + private String title; + + /** + * 活动时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") + private Date startTime; + + /** + * 活动所属类别编码 + */ + private String categoryCode; + + /** + * 上级类别编码 + */ + private String parentCode; + + /** + * 活动类别名称;eg:支部建设-三会一课 + */ + private String allCategoryName; + + /** + * 活动地点 + */ + private String address; + + /** + * 活动地点-经度 + */ + private BigDecimal longitude; + + /** + * 活动地点-纬度 + */ + private BigDecimal latitude; + + /** + * 应参加人数组长填入;此列也是应签到人数; + */ + private Integer shouldAttend; + + /** + * 活动状态:已发布:published;已取消:canceled;已变更:changed;已关闭:closed + */ + private String status; + + /** + * 签到开始时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date signInStartTime; + + /** + * 签到截止时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date signInEndTime; + /** + * 是否填写总结?1:已填写;0:未填写 + */ + private Integer summaryFlag; + + /** + * 取消时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") + private Date canceledTime; + + /** + * 关闭时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") + private Date closedTime; + + /** + * 活动发布人用户id + */ + private String publishUserId; + + /** + * 内容列表 + */ + private List textList; + + /** + * 图片列表 + */ + private List imgList; + + //以下字段需要单独赋值 + /** + * 取消原因 + */ + private String canceledReason; + + /** + * blank: 不显示; display:显示 + */ + private String signInButton; + + /** + * 未签到时的描述,可能是签到时间未开始,可能是签到时间已经过 + */ + private String signInDesc; + + /** + * member成员,leader群主 + */ + private String userRole; + + /** + * 有签到后不可以修改活动时间:true可以修改,false不可以, + */ + private Boolean startTimeEditFlag; + } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java index e063637bca..5bf98dc5a4 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java @@ -24,8 +24,10 @@ import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.modules.act.service.GroupActInfoService; import com.epmet.resi.group.dto.act.GroupActIdDTO; import com.epmet.resi.group.dto.act.form.ActDetailFormDTO; +import com.epmet.resi.group.dto.act.form.ActReadViewFormDTO; import com.epmet.resi.group.dto.act.form.PublishGroupActFormDTO; import com.epmet.resi.group.dto.act.result.ActDetailResultDTO; +import com.epmet.resi.group.dto.notice.result.NoticeReadListResultDTO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -77,4 +79,18 @@ public class GroupActInfoController { return new Result().ok(groupActInfoService.queryActDetail(actDetailFormDTO)); } + /** + * @return com.epmet.commons.tools.utils.Result + * @param tokenDto + * @param actReadViewFormDTO + * @author yinzuomei + * @description 016、活动已读未读列表 + * @Date 2021/4/19 19:37 + **/ + @PostMapping("readlist") + public Result queryReadList(@RequestBody @LoginUser TokenDto tokenDto, @RequestBody ActReadViewFormDTO actReadViewFormDTO){ + actReadViewFormDTO.setUserId(tokenDto.getUserId()); + ValidatorUtils.validateEntity(actReadViewFormDTO,ActReadViewFormDTO.AddUserInternalGroup.class); + return new Result().ok(groupActInfoService.queryReadList(actReadViewFormDTO)); + } } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActOperationRecordDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActOperationRecordDao.java index aa37d62b60..8c05a11e0f 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActOperationRecordDao.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActOperationRecordDao.java @@ -29,5 +29,12 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface ActOperationRecordDao extends BaseDao { - + + /** + * 查询活动取消的原因 + * + * @param groupActId + * @return int + */ + String selectCanceledReason(String groupActId); } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActReadRecordDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActReadRecordDao.java index 139c075655..1f41006683 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActReadRecordDao.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActReadRecordDao.java @@ -20,6 +20,9 @@ package com.epmet.modules.act.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.modules.act.entity.ActReadRecordEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 活动已读记录 @@ -30,5 +33,28 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface ActReadRecordDao extends BaseDao { + /** + * 重新发布活动,删除原来的已读未读记录,重新插入应读记录 + * + * @param groupActId + * @return int + */ int deleteByActId(String groupActId); + + /** + * 查询当前活动,应读人员列表 + * + * @param groupActId + * @return com.epmet.modules.act.entity.ActReadRecordEntity + */ + List selectByGroupActId(String groupActId); + + /** + * 查询用户是否阅读过此活动 + * + * @param groupActId + * @param userId + * @return com.epmet.modules.act.entity.ActReadRecordEntity + */ + ActReadRecordEntity selectUserRec(@Param("groupActId") String groupActId, @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/act/dao/GroupActContentDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/GroupActContentDao.java index 14402fbe3d..fbbb87774d 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/GroupActContentDao.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/GroupActContentDao.java @@ -20,7 +20,9 @@ package com.epmet.modules.act.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.modules.act.entity.GroupActContentEntity; import org.apache.ibatis.annotations.Mapper; -import org.springframework.data.repository.query.Param; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 组织活动内容 @@ -31,5 +33,21 @@ import org.springframework.data.repository.query.Param; @Mapper public interface GroupActContentDao extends BaseDao { + /** + * 重新编辑活动提交,将原来的内容置为已删除 + * + * @param groupActId 活动id + * @param userId 更新人 + * @return int + */ int updateToDel(@Param("groupActId") String groupActId, @Param("userId") String userId); + + /** + * 活动内容,升序返回 + * + * @param groupActId 活动id + * @param contentType 内容类型: 文字:text;图片:img + * @return String + */ + List selectContentList(@Param("groupActId")String groupActId, @Param("contentType") String contentType); } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/GroupActInfoService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/GroupActInfoService.java index 6bad0862fa..f7645bce4e 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/GroupActInfoService.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/GroupActInfoService.java @@ -21,8 +21,10 @@ import com.epmet.commons.mybatis.service.BaseService; import com.epmet.modules.act.entity.GroupActInfoEntity; import com.epmet.resi.group.dto.act.GroupActIdDTO; import com.epmet.resi.group.dto.act.form.ActDetailFormDTO; +import com.epmet.resi.group.dto.act.form.ActReadViewFormDTO; import com.epmet.resi.group.dto.act.form.PublishGroupActFormDTO; import com.epmet.resi.group.dto.act.result.ActDetailResultDTO; +import com.epmet.resi.group.dto.notice.result.NoticeReadListResultDTO; /** * 组织活动信息 @@ -47,4 +49,12 @@ public interface GroupActInfoService extends BaseService { * @return com.epmet.resi.group.dto.act.result.ActDetailResultDTO */ ActDetailResultDTO queryActDetail(ActDetailFormDTO actDetailFormDTO); + + /** + * 016、活动已读未读列表 + * + * @param actReadViewFormDTO + * @return com.epmet.resi.group.dto.act.result.ActDetailResultDTO + */ + NoticeReadListResultDTO queryReadList(ActReadViewFormDTO actReadViewFormDTO); } \ No newline at end of file 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 6db5b3551d..80fde8f3cb 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 @@ -21,6 +21,7 @@ import com.alibaba.fastjson.JSON; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.Constant; import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.scan.param.ImgScanParamDTO; @@ -33,6 +34,8 @@ import com.epmet.commons.tools.utils.DateUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.ScanContentUtils; import com.epmet.dto.result.GridInfoResultDTO; +import com.epmet.dto.result.UserBaseInfoResultDTO; +import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.modules.act.dao.ActOperationRecordDao; import com.epmet.modules.act.dao.ActReadRecordDao; @@ -49,10 +52,12 @@ import com.epmet.modules.group.service.ResiGroupService; import com.epmet.modules.member.service.ResiGroupMemberService; import com.epmet.resi.group.dto.act.GroupActIdDTO; import com.epmet.resi.group.dto.act.form.ActDetailFormDTO; +import com.epmet.resi.group.dto.act.form.ActReadViewFormDTO; import com.epmet.resi.group.dto.act.form.PublishGroupActFormDTO; import com.epmet.resi.group.dto.act.result.ActDetailResultDTO; import com.epmet.resi.group.dto.group.ResiGroupDTO; import com.epmet.resi.group.dto.member.ResiGroupMemberDTO; +import com.epmet.resi.group.dto.notice.result.NoticeReadListResultDTO; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -65,6 +70,7 @@ import java.util.ArrayList; import java.util.Date; import java.util.List; import java.util.UUID; +import java.util.stream.Collectors; /** * 组织活动信息 @@ -95,7 +101,8 @@ public class GroupActInfoServiceImpl extends BaseServiceImplNumConstant.ZERO?false:true); + //返回详情,并且已读状态 + ActReadRecordEntity actReadRecordEntity=actReadRecordDao.selectUserRec(formDTO.getGroupActId(),formDTO.getUserId()); + if(null== actReadRecordEntity){ + //插入 + ActReadRecordEntity insertEntity=new ActReadRecordEntity(); + insertEntity.setCustomerId(groupActInfoEntity.getCustomerId()); + insertEntity.setGroupActId(formDTO.getGroupActId()); + insertEntity.setRead(GroupActConstant.READ); + insertEntity.setShouldBeRead(Constant.NO); + insertEntity.setUserId(formDTO.getUserId()); + actReadRecordDao.insert(insertEntity); + }else{ + if(GroupActConstant.UN_READ.equals(actReadRecordEntity.getRead())){ + //未读->已读 + actReadRecordEntity.setRead(GroupActConstant.READ); + actReadRecordDao.updateById(actReadRecordEntity); + } + } + return resultDTO; + } + + private void handleSignInDesc(ActDetailResultDTO resultDTO) { //todo - return null; + //blank: 不显示; display:显示 + //在签到时间范围内,并且未签到的,显示签到按钮 + resultDTO.setSignInButton("todo"); + // 1、签到成功显示已签到 + // 2、未到签到时间显示距离签到时间还有多久 + // 3、在签到时间范围内,并且未签到的,显示签到按钮,描述显示空字符串 + // 4、签到时间已过且未签到的,显示“当前时间已超过签到时间” + resultDTO.setSignInDesc("todo"); + } + + /** + * 016、活动已读未读列表 + * + * @param actReadViewFormDTO + * @return com.epmet.resi.group.dto.act.result.ActDetailResultDTO + */ + @Override + public NoticeReadListResultDTO queryReadList(ActReadViewFormDTO actReadViewFormDTO) { + NoticeReadListResultDTO resultDTO = new NoticeReadListResultDTO(); + List readList = new ArrayList<>(); + List unReadList = new ArrayList<>(); + //1.根据活动id,查询应读人员列表 + List list = actReadRecordDao.selectByGroupActId(actReadViewFormDTO.getGroupActId()); + + //2.调用user服务,查询人员基础数据 + List userIdList = list.stream().map(ActReadRecordEntity::getUserId).collect(Collectors.toList()); + Result> result = epmetUserOpenFeignClient.queryUserBaseInfo(userIdList); + if (!result.success()) { + throw new RenException("调用user服务,获取用户基础数据失败"); + } + List resultDTOList = result.getData(); + if (!CollectionUtils.isEmpty(resultDTOList)) { + //3.遍历封装数据并返回 + list.forEach(l -> { + StringBuffer name = new StringBuffer(); + StringBuffer url = new StringBuffer(); + resultDTOList.forEach(user -> { + if (l.getUserId().equals(user.getUserId())) { + name.append(user.getSurname()).append(user.getName()); + url.append(user.getHeadImgUrl()); + } + }); + if (GroupActConstant.READ.equals(l.getRead())) { + //已读 + NoticeReadListResultDTO.NoticeReafdRecord read = new NoticeReadListResultDTO.NoticeReafdRecord(); + read.setUserId(l.getUserId()); + read.setUserName(name.toString()); + read.setUserHeadPhoto(url.toString()); + readList.add(read); + } else { + //未读 + NoticeReadListResultDTO.NoticeReafdRecord unRead = new NoticeReadListResultDTO.NoticeReafdRecord(); + unRead.setUserId(l.getUserId()); + unRead.setUserName(name.toString()); + unRead.setUserHeadPhoto(url.toString()); + unReadList.add(unRead); + } + }); + + } + //已读人数 + resultDTO.setReadCount(readList.size()); + //未读人数 + resultDTO.setUnReadCount(unReadList.size()); + //已读列表 + resultDTO.setReadList(readList); + //未读列表 + resultDTO.setUnReadList(unReadList); + return resultDTO; } } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActOperationRecordDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActOperationRecordDao.xml index aa2a3e7679..46f3194d11 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActOperationRecordDao.xml +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActOperationRecordDao.xml @@ -3,6 +3,19 @@ - + + \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActReadRecordDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActReadRecordDao.xml index 9f55748033..2e1b70570d 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActReadRecordDao.xml +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActReadRecordDao.xml @@ -2,9 +2,33 @@ + + delete from act_read_record where GROUP_ACT_ID=#{groupActId} + + + + \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/GroupActContentDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/GroupActContentDao.xml index 7152cf67eb..b835f36889 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/GroupActContentDao.xml +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/GroupActContentDao.xml @@ -2,7 +2,7 @@ - + UPDATE group_act_content SET DEL_FLAG = '1', @@ -12,4 +12,17 @@ GROUP_ACT_ID = #{groupActId} + + \ No newline at end of file From 5f2cadbd9522c7eeba49f3d6e0811d931a509d73 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 20 Apr 2021 11:10:25 +0800 Subject: [PATCH 024/202] =?UTF-8?q?8098ErrorCode=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/commons/tools/exception/EpmetErrorCode.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java index 7e745709a6..034a61bad6 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java @@ -167,7 +167,8 @@ public enum EpmetErrorCode { GROUP_ACT_CONTENT_MAX(8904,"活动内容至多输入1000字"), GROUP_ACT_IMG_MAX(8905,"最多可添加3张图片"), PARTY_MEMBER_CREATE_BRANCH_GROUP(8906,"您不是党员,不能创建支部小组"), - NOT_IN_GROUP_CAN_NOT_VIEW(8907,"当前内容仅允许组内成员查看"); + NOT_IN_GROUP_CAN_NOT_VIEW(8907,"当前内容仅允许组内成员查看"), + PARTY_MEMBER_JOIN_BRANCH_GROUP(8908,"您不是党员,不能加入支部小组"); private int code; private String msg; From 44667fad07b9c1990b17c96729ffa9c22505dae3 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 20 Apr 2021 12:29:38 +0800 Subject: [PATCH 025/202] =?UTF-8?q?=E5=8F=96=E6=B6=88=E6=B4=BB=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tools/exception/EpmetErrorCode.java | 4 +- .../resi/group/dto/act/GroupActIdDTO.java | 2 +- .../group/dto/act/form/CancelActFormDTO.java | 38 ++++++ .../controller/GroupActInfoController.java | 15 +++ .../modules/act/dao/ActSignInRecordDao.java | 11 +- .../act/service/ActSignInRecordService.java | 8 ++ .../act/service/GroupActInfoService.java | 9 ++ .../impl/ActSignInRecordServiceImpl.java | 15 ++- .../service/impl/GroupActInfoServiceImpl.java | 117 ++++++++++++++++-- .../modules/constant/GroupActConstant.java | 4 + .../mapper/act/ActSignInRecordDao.xml | 12 +- 11 files changed, 220 insertions(+), 15 deletions(-) create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/CancelActFormDTO.java diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java index 7e745709a6..28f06e19be 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java @@ -167,7 +167,9 @@ public enum EpmetErrorCode { GROUP_ACT_CONTENT_MAX(8904,"活动内容至多输入1000字"), GROUP_ACT_IMG_MAX(8905,"最多可添加3张图片"), PARTY_MEMBER_CREATE_BRANCH_GROUP(8906,"您不是党员,不能创建支部小组"), - NOT_IN_GROUP_CAN_NOT_VIEW(8907,"当前内容仅允许组内成员查看"); + NOT_IN_GROUP_CAN_NOT_VIEW(8907,"当前内容仅允许组内成员查看"), + CAN_NOT_CANCEL(8908,"活动%s,不能取消"); + private int code; private String msg; diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/GroupActIdDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/GroupActIdDTO.java index c898920da1..a558bdc265 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/GroupActIdDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/GroupActIdDTO.java @@ -5,7 +5,7 @@ import lombok.Data; import java.io.Serializable; /** - * 描述一下 + * 组织活动id * * @author yinzuomei@elink-cn.com * @date 2021/4/19 15:11 diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/CancelActFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/CancelActFormDTO.java new file mode 100644 index 0000000000..39283ef63a --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/CancelActFormDTO.java @@ -0,0 +1,38 @@ +package com.epmet.resi.group.dto.act.form; + +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import lombok.Data; +import org.hibernate.validator.constraints.Length; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * 011、取消活动 + * + * @author yinzuomei@elink-cn.com + * @date 2021/4/20 12:04 + */ +@Data +public class CancelActFormDTO implements Serializable { + private static final long serialVersionUID = 6126854423030661426L; + + public interface AddUserInternalGroup { + } + + public interface AddUserShowGroup extends CustomerClientShowGroup { + } + + @NotBlank(message = "groupActId不能为空", groups = AddUserInternalGroup.class) + private String groupActId; + + @NotBlank(message = "取消原因不能为空", groups = AddUserShowGroup.class) + @Length(max = 300, message = "取消原因最多输入300字", groups = AddUserShowGroup.class) + private String reason; + + /** + * 当前用户id + */ + @NotBlank(message = "tokenDto获取userId为空", groups = AddUserInternalGroup.class) + private String userId; +} diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java index 5bf98dc5a4..da9107f7c2 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java @@ -25,6 +25,7 @@ import com.epmet.modules.act.service.GroupActInfoService; import com.epmet.resi.group.dto.act.GroupActIdDTO; import com.epmet.resi.group.dto.act.form.ActDetailFormDTO; import com.epmet.resi.group.dto.act.form.ActReadViewFormDTO; +import com.epmet.resi.group.dto.act.form.CancelActFormDTO; import com.epmet.resi.group.dto.act.form.PublishGroupActFormDTO; import com.epmet.resi.group.dto.act.result.ActDetailResultDTO; import com.epmet.resi.group.dto.notice.result.NoticeReadListResultDTO; @@ -93,4 +94,18 @@ public class GroupActInfoController { ValidatorUtils.validateEntity(actReadViewFormDTO,ActReadViewFormDTO.AddUserInternalGroup.class); return new Result().ok(groupActInfoService.queryReadList(actReadViewFormDTO)); } + + /** + * @return + * @param formDTO + * @author yinzuomei + * @description 011、取消活动 + * @Date 2021/4/20 12:09 + **/ + @PostMapping("cancel") + public Result cancelAct(@LoginUser TokenDto tokenDto,@RequestBody CancelActFormDTO formDTO){ + formDTO.setUserId(tokenDto.getUserId()); + ValidatorUtils.validateEntity(formDTO,CancelActFormDTO.AddUserShowGroup.class,CancelActFormDTO.AddUserInternalGroup.class); + return new Result().ok(groupActInfoService.cancelAct(formDTO)); + } } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActSignInRecordDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActSignInRecordDao.java index 788ed87051..1d103db768 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActSignInRecordDao.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActSignInRecordDao.java @@ -20,6 +20,7 @@ package com.epmet.modules.act.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.modules.act.entity.ActSignInRecordEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; /** * 组织活动签到记录 @@ -29,5 +30,13 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface ActSignInRecordDao extends BaseDao { - + + /** + * 查询当前用户是否签到 + * + * @param groupActId + * @param signUserId + * @return int + */ + int selectCountUserRec(@Param("groupActId")String groupActId, @Param("signUserId")String signUserId); } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSignInRecordService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSignInRecordService.java index 279a72fd3a..b3ea3f44fe 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSignInRecordService.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSignInRecordService.java @@ -28,4 +28,12 @@ import com.epmet.modules.act.entity.ActSignInRecordEntity; */ public interface ActSignInRecordService extends BaseService { + /** + * 查询当前用户是否签到 + * + * @param groupActId + * @param currentUserId + * @return boolean + */ + boolean queryUserSignInRec(String groupActId, String currentUserId); } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/GroupActInfoService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/GroupActInfoService.java index f7645bce4e..a6ea5dd94d 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/GroupActInfoService.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/GroupActInfoService.java @@ -22,6 +22,7 @@ import com.epmet.modules.act.entity.GroupActInfoEntity; import com.epmet.resi.group.dto.act.GroupActIdDTO; import com.epmet.resi.group.dto.act.form.ActDetailFormDTO; import com.epmet.resi.group.dto.act.form.ActReadViewFormDTO; +import com.epmet.resi.group.dto.act.form.CancelActFormDTO; import com.epmet.resi.group.dto.act.form.PublishGroupActFormDTO; import com.epmet.resi.group.dto.act.result.ActDetailResultDTO; import com.epmet.resi.group.dto.notice.result.NoticeReadListResultDTO; @@ -57,4 +58,12 @@ public interface GroupActInfoService extends BaseService { * @return com.epmet.resi.group.dto.act.result.ActDetailResultDTO */ NoticeReadListResultDTO queryReadList(ActReadViewFormDTO actReadViewFormDTO); + + /** + * 011、取消活动 + * + * @param formDTO + * @return com.epmet.resi.group.dto.act.GroupActIdDTO + */ + GroupActIdDTO cancelAct(CancelActFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSignInRecordServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSignInRecordServiceImpl.java index 3dd6e6e8e1..393f355f1c 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSignInRecordServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSignInRecordServiceImpl.java @@ -32,5 +32,18 @@ import org.springframework.stereotype.Service; @Service public class ActSignInRecordServiceImpl extends BaseServiceImpl implements ActSignInRecordService { - + /** + * 查询当前用户是否签到 + * + * @param groupActId + * @param signUserId + * @return boolean + */ + @Override + public boolean queryUserSignInRec(String groupActId, String signUserId) { + if (baseDao.selectCountUserRec(groupActId, signUserId) > 0) { + return true; + } + return false; + } } \ No newline at end of file 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 80fde8f3cb..62e3816594 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 @@ -46,6 +46,7 @@ import com.epmet.modules.act.entity.ActReadRecordEntity; import com.epmet.modules.act.entity.GroupActContentEntity; import com.epmet.modules.act.entity.GroupActInfoEntity; import com.epmet.modules.act.service.ActCategoryDictService; +import com.epmet.modules.act.service.ActSignInRecordService; import com.epmet.modules.act.service.GroupActInfoService; import com.epmet.modules.constant.GroupActConstant; import com.epmet.modules.group.service.ResiGroupService; @@ -53,6 +54,7 @@ import com.epmet.modules.member.service.ResiGroupMemberService; import com.epmet.resi.group.dto.act.GroupActIdDTO; import com.epmet.resi.group.dto.act.form.ActDetailFormDTO; import com.epmet.resi.group.dto.act.form.ActReadViewFormDTO; +import com.epmet.resi.group.dto.act.form.CancelActFormDTO; import com.epmet.resi.group.dto.act.form.PublishGroupActFormDTO; import com.epmet.resi.group.dto.act.result.ActDetailResultDTO; import com.epmet.resi.group.dto.group.ResiGroupDTO; @@ -103,6 +105,8 @@ public class GroupActInfoServiceImpl extends BaseServiceImplNumConstant.ZERO?false:true); @@ -397,24 +401,76 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl已读 actReadRecordEntity.setRead(GroupActConstant.READ); + actReadRecordEntity.setUpdatedTime(new Date()); actReadRecordDao.updateById(actReadRecordEntity); } } return resultDTO; } - private void handleSignInDesc(ActDetailResultDTO resultDTO) { - //todo - //blank: 不显示; display:显示 - //在签到时间范围内,并且未签到的,显示签到按钮 - resultDTO.setSignInButton("todo"); + private void handleSignInDesc(ActDetailResultDTO resultDTO,String currentUserId) { + if(GroupActConstant.CANCELED.equals(resultDTO.getStatus()) + ||GroupActConstant.CLOSED.equals(resultDTO.getStatus())){ + //活动已取消或者已关闭,不显示签到按钮,也不显示描述 + resultDTO.setSignInButton(GroupActConstant.BLANK); + resultDTO.setSignInDesc(StrConstant.EPMETY_STR); + return; + } + if (null == resultDTO.getSignInStartTime() || null == resultDTO.getSignInEndTime()) { + //未设置签到开始、截止时间,默认不显示签到按钮,也不显示描述 + resultDTO.setSignInButton(GroupActConstant.BLANK); + resultDTO.setSignInDesc(StrConstant.EPMETY_STR); + return; + } + //查询当前用户是否签到 + boolean signedInFlag=actSignInRecordService.queryUserSignInRec(resultDTO.getGroupActId(),currentUserId); // 1、签到成功显示已签到 - // 2、未到签到时间显示距离签到时间还有多久 - // 3、在签到时间范围内,并且未签到的,显示签到按钮,描述显示空字符串 - // 4、签到时间已过且未签到的,显示“当前时间已超过签到时间” - resultDTO.setSignInDesc("todo"); + if(signedInFlag){ + resultDTO.setSignInButton(GroupActConstant.BLANK); + resultDTO.setSignInDesc("已签到"); + return; + } + Date nowDate=new Date(); + long nowTime=nowDate.getTime(); + long signInStartTime=resultDTO.getSignInStartTime().getTime(); + long signInEndTime=resultDTO.getSignInEndTime().getTime(); + if (nowTime < signInStartTime) { + resultDTO.setSignInButton(GroupActConstant.DISPLAY); + // 2、未到签到时间显示距离签到时间还有多久 + //距离签到开始还有XX天4小时32分钟 + String remainStr=getDatePoor(resultDTO.getSignInStartTime(),nowDate); + resultDTO.setSignInDesc(String.format("距离签到开始还有%s",remainStr)); + return; + } else if (signInStartTime <= nowTime && nowTime <= signInEndTime) { + // 3、在签到时间范围内,并且未签到的,显示签到按钮,描述显示空字符串 + resultDTO.setSignInButton(GroupActConstant.DISPLAY); + resultDTO.setSignInDesc(StrConstant.EPMETY_STR); + return; + } else if (nowTime > signInEndTime) { + // 4、签到时间已过且未签到的,显示“当前时间已超过签到时间” + resultDTO.setSignInButton(GroupActConstant.BLANK); + resultDTO.setSignInDesc("当前时间已超过签到时间"); + } } + public static String getDatePoor(Date endDate, Date nowDate) { + + long nd = 1000 * 24 * 60 * 60; + long nh = 1000 * 60 * 60; + long nm = 1000 * 60; + // long ns = 1000; + // 获得两个时间的毫秒时间差异 + long diff = endDate.getTime() - nowDate.getTime(); + // 计算差多少天 + long day = diff / nd; + // 计算差多少小时 + long hour = diff % nd / nh; + // 计算差多少分钟 + long min = diff % nd % nh / nm; + // 计算差多少秒//输出结果 + // long sec = diff % nd % nh % nm / ns; + return day + "天" + hour + "小时" + min + "分钟"; + } /** * 016、活动已读未读列表 * @@ -475,4 +531,45 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl - + + \ No newline at end of file From 67c18b268535ca76e7be415a9694f5501226e9ff Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 20 Apr 2021 13:13:11 +0800 Subject: [PATCH 026/202] =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E8=AF=84=E8=AE=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tools/exception/EpmetErrorCode.java | 5 +- .../group/dto/act/form/CommentFormDTO.java | 39 +++++++ .../dto/act/form/CommentQueryFormDTO.java | 25 ++++ .../dto/act/result/CommentResultDTO.java | 30 +++++ .../act/controller/ActCommentController.java | 40 +++++++ .../epmet/modules/act/dao/ActCommentDao.java | 6 +- .../act/service/ActCommentService.java | 20 ++++ .../act/service/GroupActInfoService.java | 9 ++ .../service/impl/ActCommentServiceImpl.java | 107 ++++++++++++++++++ .../service/impl/GroupActInfoServiceImpl.java | 35 +++++- .../resources/mapper/act/ActCommentDao.xml | 16 ++- 11 files changed, 323 insertions(+), 9 deletions(-) create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/CommentFormDTO.java create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/CommentQueryFormDTO.java create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/CommentResultDTO.java diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java index 27936afa85..49514ffd1b 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java @@ -169,8 +169,9 @@ public enum EpmetErrorCode { PARTY_MEMBER_CREATE_BRANCH_GROUP(8906,"您不是党员,不能创建支部小组"), NOT_IN_GROUP_CAN_NOT_VIEW(8907,"当前内容仅允许组内成员查看"), PARTY_MEMBER_JOIN_BRANCH_GROUP(8908,"您不是党员,不能加入支部小组"), - CAN_NOT_CANCEL(8909,"活动%s,不能取消"); - + GROUP_ACT_CAN_NOT_CANCEL(8909,"活动%s,不能取消"), + //8910的msg动态赋值 + GROUP_ACT_CAN_NOT_COMMENT(8910,"当前活动,不能评论"); private int code; private String msg; diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/CommentFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/CommentFormDTO.java new file mode 100644 index 0000000000..92fce732ae --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/CommentFormDTO.java @@ -0,0 +1,39 @@ +package com.epmet.resi.group.dto.act.form; + +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import lombok.Data; +import org.hibernate.validator.constraints.Length; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * 005、评论活动 + * + * @author yinzuomei@elink-cn.com + * @date 2021/4/20 12:35 + */ +@Data +public class CommentFormDTO implements Serializable { + public interface AddUserInternalGroup { + } + + public interface AddUserShowGroup extends CustomerClientShowGroup { + } + + @NotBlank(message = "groupActId不能为空", groups = AddUserInternalGroup.class) + private String groupActId; + + @NotBlank(message = "评论内容不能为空", groups = AddUserShowGroup.class) + @Length(max = 500, message = "评论内容最多输入500字", groups = AddUserShowGroup.class) + private String commentContent; + + /** + * 当前用户id + */ + @NotBlank(message = "tokenDto获取userId为空", groups = AddUserInternalGroup.class) + private String userId; + + @NotBlank(message = "tokenDto获取customerId为空", groups = AddUserInternalGroup.class) + private String customerId; +} diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/CommentQueryFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/CommentQueryFormDTO.java new file mode 100644 index 0000000000..109d6f387a --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/CommentQueryFormDTO.java @@ -0,0 +1,25 @@ +package com.epmet.resi.group.dto.act.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * 006、活动评论列表查询 + * + * @author yinzuomei@elink-cn.com + * @date 2021/4/20 12:55 + */ +@Data +public class CommentQueryFormDTO implements Serializable { + private static final long serialVersionUID = 4013876445914100561L; + + public interface AddUserInternalGroup { + } + + @NotBlank(message = "groupActId不能为空", groups = AddUserInternalGroup.class) + private String groupActId; + private Integer pageNo; + private Integer pageSize; +} diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/CommentResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/CommentResultDTO.java new file mode 100644 index 0000000000..efb8066f28 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/CommentResultDTO.java @@ -0,0 +1,30 @@ +package com.epmet.resi.group.dto.act.result; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +/** + * 006、活动评论列表查询 + * + * @author yinzuomei@elink-cn.com + * @date 2021/4/20 12:58 + */ +@Data +public class CommentResultDTO implements Serializable { + private static final long serialVersionUID = 6487668038520643604L; + private String commentId; + + private String commentContent; + + private String commentUserHeadPhoto; + + private String commentUserName; + + @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") + private Date commentTime; + + private String commentUserId; +} diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/ActCommentController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/ActCommentController.java index 331cf578ce..eff2910608 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/ActCommentController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/ActCommentController.java @@ -17,11 +17,23 @@ package com.epmet.modules.act.controller; +import com.baomidou.mybatisplus.extension.api.R; +import com.epmet.commons.tools.annotation.LoginUser; +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.act.service.ActCommentService; +import com.epmet.resi.group.dto.act.form.CommentFormDTO; +import com.epmet.resi.group.dto.act.form.CommentQueryFormDTO; +import com.epmet.resi.group.dto.act.result.CommentResultDTO; 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; +import java.util.List; + /** * 活动评论表 @@ -36,5 +48,33 @@ public class ActCommentController { @Autowired private ActCommentService actCommentService; + /** + * @param tokenDto + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @author yinzuomei + * @description 005、评论活动 + * @Date 2021/4/20 12:38 + **/ + @PostMapping("submit") + public Result submitComment(@LoginUser TokenDto tokenDto, @RequestBody CommentFormDTO formDTO) { + formDTO.setUserId(tokenDto.getUserId()); + formDTO.setCommentContent(tokenDto.getCustomerId()); + ValidatorUtils.validateEntity(formDTO,CommentFormDTO.AddUserShowGroup.class,CommentFormDTO.AddUserInternalGroup.class); + actCommentService.submitComment(formDTO); + return new Result(); + } + /** + * @return com.epmet.commons.tools.utils.Result> + * @param formDTO + * @author yinzuomei + * @description 006、活动评论列表查询 + * @Date 2021/4/20 13:01 + **/ + @PostMapping("comlist") + public Result> queryCommentList(@RequestBody CommentQueryFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, CommentQueryFormDTO.AddUserInternalGroup.class); + return new Result>().ok(actCommentService.queryCommentList(formDTO)); + } } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActCommentDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActCommentDao.java index 93a72a4913..b70207027a 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActCommentDao.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActCommentDao.java @@ -19,8 +19,11 @@ package com.epmet.modules.act.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.modules.act.entity.ActCommentEntity; +import com.epmet.resi.group.dto.act.result.CommentResultDTO; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + /** * 活动评论表 * @@ -29,5 +32,6 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface ActCommentDao extends BaseDao { - + + List selectCommentList(String groupActId); } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActCommentService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActCommentService.java index e8da2bae21..57e3abf651 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActCommentService.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActCommentService.java @@ -19,6 +19,11 @@ package com.epmet.modules.act.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.modules.act.entity.ActCommentEntity; +import com.epmet.resi.group.dto.act.form.CommentFormDTO; +import com.epmet.resi.group.dto.act.form.CommentQueryFormDTO; +import com.epmet.resi.group.dto.act.result.CommentResultDTO; + +import java.util.List; /** * 活动评论表 @@ -28,4 +33,19 @@ import com.epmet.modules.act.entity.ActCommentEntity; */ public interface ActCommentService extends BaseService { + /** + * 005、评论活动 + * + * @param formDTO + * @return + */ + void submitComment(CommentFormDTO formDTO); + + /** + * 006、活动评论列表查询 + * + * @param formDTO + * @return com.epmet.resi.group.dto.act.result.CommentResultDTO + */ + List queryCommentList(CommentQueryFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/GroupActInfoService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/GroupActInfoService.java index a6ea5dd94d..9c066628bf 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/GroupActInfoService.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/GroupActInfoService.java @@ -20,6 +20,7 @@ package com.epmet.modules.act.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.modules.act.entity.GroupActInfoEntity; import com.epmet.resi.group.dto.act.GroupActIdDTO; +import com.epmet.resi.group.dto.act.GroupActInfoDTO; import com.epmet.resi.group.dto.act.form.ActDetailFormDTO; import com.epmet.resi.group.dto.act.form.ActReadViewFormDTO; import com.epmet.resi.group.dto.act.form.CancelActFormDTO; @@ -66,4 +67,12 @@ public interface GroupActInfoService extends BaseService { * @return com.epmet.resi.group.dto.act.GroupActIdDTO */ GroupActIdDTO cancelAct(CancelActFormDTO formDTO); + + /** + * 查询活动主信息 + * + * @param groupActId + * @return com.epmet.resi.group.dto.act.GroupActInfoDTO + */ + GroupActInfoDTO getGroupActInfoDTO(String groupActId); } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActCommentServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActCommentServiceImpl.java index 6f4ea05296..c249c4ec28 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActCommentServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActCommentServiceImpl.java @@ -18,10 +18,34 @@ package com.epmet.modules.act.service.impl; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.scan.param.TextScanParamDTO; +import com.epmet.commons.tools.scan.param.TextTaskDTO; +import com.epmet.commons.tools.scan.result.SyncScanResult; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.utils.ScanContentUtils; +import com.epmet.dto.result.UserBaseInfoResultDTO; +import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.modules.act.dao.ActCommentDao; import com.epmet.modules.act.entity.ActCommentEntity; import com.epmet.modules.act.service.ActCommentService; +import com.epmet.modules.act.service.GroupActInfoService; +import com.epmet.modules.constant.GroupActConstant; +import com.epmet.resi.group.dto.act.GroupActInfoDTO; +import com.epmet.resi.group.dto.act.form.CommentFormDTO; +import com.epmet.resi.group.dto.act.form.CommentQueryFormDTO; +import com.epmet.resi.group.dto.act.result.CommentResultDTO; +import com.github.pagehelper.PageHelper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; + +import java.util.Collections; +import java.util.List; +import java.util.UUID; +import java.util.stream.Collectors; /** * 活动评论表 @@ -32,5 +56,88 @@ import org.springframework.stereotype.Service; @Service public class ActCommentServiceImpl extends BaseServiceImpl implements ActCommentService { + @Value("${openapi.scan.server.url}") + private String scanApiUrl; + @Value("${openapi.scan.method.textSyncScan}") + private String textSyncScanMethod; + + @Autowired + private GroupActInfoService groupActInfoService; + @Autowired + private EpmetUserOpenFeignClient epmetUserOpenFeignClient; + + + /** + * 005、评论活动 + * + * @param formDTO + * @return + */ + @Override + public void submitComment(CommentFormDTO formDTO) { + //1、关闭和已取消不能评论 + GroupActInfoDTO groupActInfoDTO = groupActInfoService.getGroupActInfoDTO(formDTO.getGroupActId()); + if (GroupActConstant.CLOSED.equals(groupActInfoDTO.getStatus())) { + throw new RenException(EpmetErrorCode.GROUP_ACT_CAN_NOT_COMMENT.getCode(), "当前活动已关闭,不能评论"); + } else if (GroupActConstant.CANCELED.equals(groupActInfoDTO.getStatus())) { + throw new RenException(EpmetErrorCode.GROUP_ACT_CAN_NOT_COMMENT.getCode(), "当前活动已取消,不能评论"); + } + //2、评论内容审核 + TextScanParamDTO textScanParamDTO = new TextScanParamDTO(); + TextTaskDTO taskDTO = new TextTaskDTO(); + taskDTO.setContent(formDTO.getCommentContent()); + taskDTO.setDataId(UUID.randomUUID().toString().replace("-", "")); + textScanParamDTO.getTasks().add(taskDTO); + Result textSyncScanResult = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScanParamDTO); + if (!textSyncScanResult.success()) { + throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); + } else { + if (!textSyncScanResult.getData().isAllPass()) { + throw new RenException(EpmetErrorCode.TEXT_SCAN_FAILED.getCode(), EpmetErrorCode.TEXT_SCAN_FAILED.getMsg()); + } + } + //3、插入记录 + ActCommentEntity actCommentEntity = new ActCommentEntity(); + actCommentEntity.setCustomerId(formDTO.getCustomerId()); + actCommentEntity.setCommentContent(formDTO.getCommentContent()); + actCommentEntity.setCommentUserId(formDTO.getUserId()); + actCommentEntity.setGroupActId(formDTO.getGroupActId()); + baseDao.insert(actCommentEntity); + } + + /** + * 006、活动评论列表查询 + * + * @param formDTO + * @return com.epmet.resi.group.dto.act.result.CommentResultDTO + */ + @Override + public List queryCommentList(CommentQueryFormDTO formDTO) { + PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); + List list=baseDao.selectCommentList(formDTO.getGroupActId()); + if(CollectionUtils.isEmpty(list)){ + return Collections.EMPTY_LIST; + } + //2.调用user服务,查询人员基础数据 + List userIdList = list.stream().map(CommentResultDTO::getCommentUserId).collect(Collectors.toList()); + Result> result = epmetUserOpenFeignClient.queryUserBaseInfo(userIdList); + if (!result.success()) { + throw new RenException("调用user服务,获取用户基础数据失败"); + } + if (!CollectionUtils.isEmpty(result.getData())) { + //3.遍历封装数据并返回 + list.forEach(l -> { + result.getData().forEach(user -> { + if (l.getCommentUserId().equals(user.getUserId())) { + l.setCommentUserHeadPhoto(user.getHeadImgUrl()); + l.setCommentUserName(user.getSurname().concat(user.getName())); + } + }); + }); + + } + return list; + } + } \ No newline at end of file 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 62e3816594..e37d8adae6 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 @@ -52,6 +52,7 @@ import com.epmet.modules.constant.GroupActConstant; import com.epmet.modules.group.service.ResiGroupService; import com.epmet.modules.member.service.ResiGroupMemberService; import com.epmet.resi.group.dto.act.GroupActIdDTO; +import com.epmet.resi.group.dto.act.GroupActInfoDTO; import com.epmet.resi.group.dto.act.form.ActDetailFormDTO; import com.epmet.resi.group.dto.act.form.ActReadViewFormDTO; import com.epmet.resi.group.dto.act.form.CancelActFormDTO; @@ -268,7 +269,6 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl textList, List imgList) { //活动标题 if (StringUtils.isNotBlank(title)) { - //创建话题内容审核 TextScanParamDTO textScanParamDTO = new TextScanParamDTO(); TextTaskDTO taskDTO = new TextTaskDTO(); taskDTO.setContent(title); @@ -547,17 +547,31 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl textSyncScanResult = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScanParamDTO); + if (!textSyncScanResult.success()) { + throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); + } else { + if (!textSyncScanResult.getData().isAllPass()) { + throw new RenException(EpmetErrorCode.TEXT_SCAN_FAILED.getCode(), EpmetErrorCode.TEXT_SCAN_FAILED.getMsg()); + } + } + //4、记录取消时间 Date nowDate=new Date(); actInfoEntity.setCanceledTime(nowDate); actInfoEntity.setStatus(GroupActConstant.CANCELED); baseDao.updateById(actInfoEntity); - //4、插入一条操作日志 + //5、插入一条操作日志 ActOperationRecordEntity actOperationRecordEntity = new ActOperationRecordEntity(); actOperationRecordEntity.setCustomerId(actInfoEntity.getCustomerId()); actOperationRecordEntity.setOperateUserId(formDTO.getUserId()); @@ -572,4 +586,15 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl - + \ No newline at end of file From a89fd3c87bc592ac6fb74343a862699f65b8b46f Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 20 Apr 2021 13:49:19 +0800 Subject: [PATCH 027/202] =?UTF-8?q?=E6=89=80=E6=9C=89=E5=B0=8F=E7=BB=84?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/group/form/AllGroupListFormDTO.java | 34 +++++++++++++ .../group/result/AllGroupListResultDTO.java | 51 +++++++++++++++++++ .../group/controller/ResiGroupController.java | 14 +++++ .../epmet/modules/group/dao/ResiGroupDao.java | 7 ++- .../group/service/ResiGroupService.java | 9 ++++ .../service/impl/ResiGroupServiceImpl.java | 46 +++++++++++++++++ .../resources/mapper/group/ResiGroupDao.xml | 23 +++++++++ 7 files changed, 183 insertions(+), 1 deletion(-) create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/form/AllGroupListFormDTO.java create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/AllGroupListResultDTO.java diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/form/AllGroupListFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/form/AllGroupListFormDTO.java new file mode 100644 index 0000000000..32d4164244 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/form/AllGroupListFormDTO.java @@ -0,0 +1,34 @@ +package com.epmet.resi.group.dto.group.form; + +import lombok.Data; + +import javax.validation.constraints.Min; +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Author sun + * @Description 所有小组查询-接口入参 + */ +@Data +public class AllGroupListFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + /** + * 网格Id + */ + @NotBlank(message = "网格Id不能为空", groups = {AllGroupListFormDTO.GroupList.class}) + private String gridId; + /** + * 请求页码 + */ + @Min(1) + private int pageNo; + /** + * 每页多少条数据 + */ + private int pageSize = 20; + + public interface GroupList { + } +} diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/AllGroupListResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/AllGroupListResultDTO.java new file mode 100644 index 0000000000..8ec0a07554 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/AllGroupListResultDTO.java @@ -0,0 +1,51 @@ +package com.epmet.resi.group.dto.group.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description 推荐小组查询返参 + * @Author yinzuomei + * @Date 2020/3/28 17:11 + */ +@Data +public class AllGroupListResultDTO implements Serializable { + + private static final long serialVersionUID = -155229599412911489L; + /** + * 群组id + */ + private String groupId; + + /** + * 群组头像 + */ + private String groupHeadPhoto; + + /** + * 群组名称 + */ + private String groupName; + + /** + * 成员总数 + */ + private Integer totalMember; + + /** + * 党员总数 + */ + private Integer totalPartyMember; + + /** + * under_auditting审核中、rejected已拒绝的前端显示加入 + */ + private String status=""; + + /** + * 小组类型(ordinary:楼院小组 branch:支部小组) + */ + private String groupType; + +} diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/ResiGroupController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/ResiGroupController.java index 23ffab9d29..1d77fc28b9 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/ResiGroupController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/ResiGroupController.java @@ -31,6 +31,8 @@ import com.epmet.resi.group.dto.group.form.*; import com.epmet.resi.group.dto.group.result.*; import com.epmet.resi.group.dto.member.form.EditAuditSwitchFormDTO; import com.epmet.resi.group.dto.member.form.ResiIdentityFormDTO; +import com.epmet.resi.group.dto.notice.form.NoticeCommentListFormDTO; +import com.epmet.resi.group.dto.notice.result.NoticeCommentListResultDTO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.util.CollectionUtils; import org.springframework.web.bind.annotation.PostMapping; @@ -502,4 +504,16 @@ public class ResiGroupController { return new Result(); } + /** + * @param formDTO + * @return + * @Author sun + * @Description 所有小组查询 + **/ + @PostMapping(value = "allgrouplist") + public Result> allGroupList(@LoginUser TokenDto tokenDto, @RequestBody AllGroupListFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, AllGroupListFormDTO.GroupList.class); + return new Result>().ok(resiGroupService.allGroupList(tokenDto, formDTO)); + } + } 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 9a11aa39c2..b15f08293f 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 @@ -27,7 +27,6 @@ import com.epmet.resi.group.dto.member.ResiGroupMemberDTO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; - import java.util.List; /** @@ -236,4 +235,10 @@ public interface ResiGroupDao extends BaseDao { * @Date 2020/12/25 13:18 **/ List queryGroupProcessingCount(@Param("gridIdList") List gridIdList); + + /** + * @Author sun + * @Description 分页查询网格下所有小组列表 + **/ + List selectAllGroupList(AllGroupListFormDTO formDTO); } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/ResiGroupService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/ResiGroupService.java index b4bccf14e9..a27d726fc8 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/ResiGroupService.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/ResiGroupService.java @@ -20,6 +20,7 @@ package com.epmet.modules.group.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; import com.epmet.modules.group.entity.ResiGroupEntity; import com.epmet.resi.group.dto.UserRoleDTO; @@ -370,4 +371,12 @@ public interface ResiGroupService extends BaseService { * @return void */ void setVisitSwitch(ManageInitFormDTO formDTO); + + /** + * @param formDTO + * @return + * @Author sun + * @Description 所有小组查询 + **/ + List allGroupList(TokenDto tokenDto, AllGroupListFormDTO formDTO); } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java index a3770a028c..6cc56ca171 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java @@ -30,6 +30,7 @@ import com.epmet.commons.tools.scan.param.ImgTaskDTO; import com.epmet.commons.tools.scan.param.TextScanParamDTO; import com.epmet.commons.tools.scan.param.TextTaskDTO; import com.epmet.commons.tools.scan.result.SyncScanResult; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.security.user.LoginUserUtil; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.DateUtils; @@ -87,6 +88,7 @@ import org.springframework.util.CollectionUtils; import java.text.SimpleDateFormat; import java.util.*; +import java.util.concurrent.atomic.AtomicBoolean; import java.util.function.Function; import java.util.stream.Collectors; @@ -1491,4 +1493,48 @@ public class ResiGroupServiceImpl extends BaseServiceImpl allGroupList(TokenDto tokenDto, AllGroupListFormDTO formDTO) { + //1.分页查询网格下所有小组列表且是审核通过状态的,以组内人员数从多到少排序 + int pageIndex = (formDTO.getPageNo() - NumConstant.ONE) * formDTO.getPageSize(); + formDTO.setPageNo(pageIndex); + List resultList = baseDao.selectAllGroupList(formDTO); + if (null == resultList || resultList.size() == 0) { + return new ArrayList<>(); + } + + //2.查询当前用户居民端角色列表 + AtomicBoolean isPartymember = new AtomicBoolean(false); + Result> resultDTOList = epmetUserOpenFeignClient.getUserRoleInfoByUserId(tokenDto.getUserId()); + if (!resultDTOList.success()) { + throw new RenException("调用user服务,获取用户基础数据失败"); + } + List roleList = resultDTOList.getData(); + roleList.forEach(rl -> { + if ("partymember".equals(rl.getRoleKey())) { + isPartymember.set(true); + } + }); + + //3.调用已有方法赋值当前人员是否可以入组值 + for (AllGroupListResultDTO dto : resultList) { + //非党员角色不允许加入支部小组 + if ("branch".equals(dto.getGroupType()) && !isPartymember.get()) { + dto.setStatus("rejected"); + continue; + } + GroupMemeberOperationDTO operation = groupMemeberOperationService.selectLatestRecord(dto.getGroupId(), tokenDto.getUserId()); + if (null != operation) { + dto.setStatus(operation.getOperateStatus()); + } + } + return resultList; + } + } 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 7d1ea0a898..fc8a6280f1 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 @@ -527,4 +527,27 @@ GROUP BY temp.gridId + + + From d3b8fceefc9d96c3095627dc5c137003033cee04 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 20 Apr 2021 14:05:38 +0800 Subject: [PATCH 028/202] =?UTF-8?q?=E5=85=A5=E7=BB=84=E6=96=B9=E5=BC=8F?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=94=AF=E9=83=A8=E5=B0=8F=E7=BB=84=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/GroupInvitationServiceImpl.java | 17 +++++++++++++++++ .../impl/GroupMemeberOperationServiceImpl.java | 13 +++++++++++++ .../impl/ResiGroupMemberServiceImpl.java | 12 ++++++++++++ 3 files changed, 42 insertions(+) diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/service/impl/GroupInvitationServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/service/impl/GroupInvitationServiceImpl.java index 8e8e064936..93a3d454a6 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/service/impl/GroupInvitationServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/service/impl/GroupInvitationServiceImpl.java @@ -32,6 +32,7 @@ import com.epmet.dto.form.*; import com.epmet.dto.result.UserInfoOnEnterGridResultDTO; import com.epmet.dto.result.UserResiInfoResultDTO; import com.epmet.feign.EpmetMessageOpenFeignClient; +import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.modules.constant.UserMessageConstant; import com.epmet.modules.feign.EpmetUserFeignClient; import com.epmet.modules.feign.ResiGuideFeignClient; @@ -46,6 +47,7 @@ import com.epmet.modules.member.dao.ResiGroupMemberDao; import com.epmet.modules.member.service.GroupMemeberOperationService; import com.epmet.modules.member.service.ResiGroupMemberService; import com.epmet.modules.member.service.impl.ResiGroupMemberServiceImpl; +import com.epmet.modules.utils.ModuleConstant; import com.epmet.resi.group.constant.EnterGroupTypeConstant; import com.epmet.resi.group.constant.GroupStateConstant; import com.epmet.resi.group.constant.LeaderFlagConstant; @@ -106,6 +108,8 @@ public class GroupInvitationServiceImpl extends BaseServiceImpl page(Map params) { @@ -455,6 +459,19 @@ public class GroupInvitationServiceImpl extends BaseServiceImpl booleanResult = epmetUserOpenFeignClient.selectIsPartyMemberByUserId(formDTO.getUserId()); + if (!booleanResult.success()){ + throw new RenException(ModuleConstant.IS_PARTY_MEMBER_ERR); + } + // 不是党员直接抛出 + if (!booleanResult.getData()){ + throw new RenException(EpmetErrorCode.PARTY_MEMBER_JOIN_BRANCH_GROUP.getCode()); + } + } + //2020.11.26 sun start //先判断用户是否有在审核的入组申请,有的话直接给提示 GroupMemeberOperationDTO groupMemeberOperationDTO = groupMemeberOperationService.selectLatestRecord(groupInvitationDTO.getResiGroupId(), formDTO.getUserId()); diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/GroupMemeberOperationServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/GroupMemeberOperationServiceImpl.java index 11760b07b3..6813b2edbc 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/GroupMemeberOperationServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/GroupMemeberOperationServiceImpl.java @@ -27,6 +27,7 @@ import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.dto.form.mq.MqBaseMsgDTO; import com.epmet.commons.tools.dto.form.mq.eventmsg.BasePointEventMsg; import com.epmet.commons.tools.enums.EventEnum; +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; @@ -247,6 +248,18 @@ public class GroupMemeberOperationServiceImpl extends BaseServiceImpl booleanResult = userClient.selectIsPartyMemberByUserId(param.getUserId()); + if (!booleanResult.success()){ + throw new RenException(ModuleConstant.IS_PARTY_MEMBER_ERR); + } + // 不是党员直接抛出 + if (!booleanResult.getData()){ + throw new RenException(EpmetErrorCode.PARTY_MEMBER_JOIN_BRANCH_GROUP.getCode()); + } + } //先判断用户是否有在审核的入组申请,有的话直接给提示 GroupMemeberOperationDTO groupMemeberOperationDTO = operationDao.selectLatestRecord(groupId, param.getUserId()); diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/ResiGroupMemberServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/ResiGroupMemberServiceImpl.java index 9fbc039d40..5f7cd2eb5b 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/ResiGroupMemberServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/ResiGroupMemberServiceImpl.java @@ -218,6 +218,18 @@ public class ResiGroupMemberServiceImpl extends BaseServiceImpl booleanResult = userOpenFeignClient.selectIsPartyMemberByUserId(applyJoinGroupFormDTO.getUserId()); + if (!booleanResult.success()){ + throw new RenException(ModuleConstant.IS_PARTY_MEMBER_ERR); + } + // 不是党员直接抛出 + if (!booleanResult.getData()){ + throw new RenException(EpmetErrorCode.PARTY_MEMBER_JOIN_BRANCH_GROUP.getCode()); + } + } + UserRoleDTO userRoleDTO = resiGroupService.checkPartyMemberOrWarmHeated(applyJoinGroupFormDTO.getApp(), applyJoinGroupFormDTO.getUserId(), resiGroupDTO.getCustomerId(), From d362e9c756713ffeaba2d3d7257da19ef12fa516 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 20 Apr 2021 14:54:00 +0800 Subject: [PATCH 029/202] =?UTF-8?q?=E8=AE=BE=E7=BD=AE=EF=BC=88=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=EF=BC=89=E7=AD=BE=E5=88=B0=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/act/form/SetSignTimeFormDTO.java | 39 ++++++++++ .../dto/act/result/SetSignTimeResultDTO.java | 22 ++++++ .../controller/ActSignInRecordController.java | 23 ++++++ .../modules/act/dao/ActSignInCodeDao.java | 9 ++- .../act/service/ActSignInCodeService.java | 8 ++ .../act/service/ActSignInRecordService.java | 10 +++ .../impl/ActSignInCodeServiceImpl.java | 11 +++ .../impl/ActSignInRecordServiceImpl.java | 75 ++++++++++++++++++- .../service/impl/GroupActInfoServiceImpl.java | 5 +- .../resources/mapper/act/ActSignInCodeDao.xml | 9 ++- 10 files changed, 206 insertions(+), 5 deletions(-) create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/SetSignTimeFormDTO.java create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/SetSignTimeResultDTO.java diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/SetSignTimeFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/SetSignTimeFormDTO.java new file mode 100644 index 0000000000..d4a04f82f1 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/SetSignTimeFormDTO.java @@ -0,0 +1,39 @@ +package com.epmet.resi.group.dto.act.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * 010、设置(修改)签到时间,生成签到码 + * + * @author yinzuomei@elink-cn.com + * @date 2021/4/20 13:34 + */ +@Data +public class SetSignTimeFormDTO implements Serializable { + private static final long serialVersionUID = 4134192208518833623L; + public interface AddUserInternalGroup { + } + /** + * 小组活动id + */ + @NotBlank(message = "groupActId不能为空",groups = AddUserInternalGroup.class) + private String groupActId; + + /** + * 签到开始时间:yyyy-MM-dd HH:mm + */ + @NotBlank(message = "开始时间不能为空",groups = AddUserInternalGroup.class) + private String signInStartTime; + + /** + * 签到截止时间:yyyy-MM-dd HH:mm + */ + @NotBlank(message = "截止时间不能为空",groups = AddUserInternalGroup.class) + private String signInEndTime; + + @NotBlank(message = "tokenDto获取userId为空", groups = AddUserInternalGroup.class) + private String userId; +} diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/SetSignTimeResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/SetSignTimeResultDTO.java new file mode 100644 index 0000000000..08e190e3da --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/SetSignTimeResultDTO.java @@ -0,0 +1,22 @@ +package com.epmet.resi.group.dto.act.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +/** + * 010、设置(修改)签到时间,生成签到码 + * + * @author yinzuomei@elink-cn.com + * @date 2021/4/20 13:46 + */ +@Data +public class SetSignTimeResultDTO implements Serializable { + private static final long serialVersionUID = -7444245554430563944L; + + private String groupActId; + private Date signInStartTime; + private Date signInEndTime; + private String signInCodeUrl; +} diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/ActSignInRecordController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/ActSignInRecordController.java index f315d843b5..7bece885f4 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/ActSignInRecordController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/ActSignInRecordController.java @@ -17,8 +17,16 @@ package com.epmet.modules.act.controller; +import com.epmet.commons.tools.annotation.LoginUser; +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.act.service.ActSignInRecordService; +import com.epmet.resi.group.dto.act.form.SetSignTimeFormDTO; +import com.epmet.resi.group.dto.act.result.SetSignTimeResultDTO; 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; @@ -36,4 +44,19 @@ public class ActSignInRecordController { @Autowired private ActSignInRecordService actSignInRecordService; + + /** + * @param tokenDto + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @author yinzuomei + * @description 010、设置(修改)签到时间,生成签到码 + * @Date 2021/4/20 13:50 + **/ + @PostMapping("setsigntime") + public Result setSignTime(@LoginUser TokenDto tokenDto, @RequestBody SetSignTimeFormDTO formDTO) { + formDTO.setUserId(tokenDto.getUserId()); + ValidatorUtils.validateEntity(formDTO, SetSignTimeFormDTO.AddUserInternalGroup.class); + return new Result().ok(actSignInRecordService.setSignTime(formDTO)); + } } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActSignInCodeDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActSignInCodeDao.java index cc918ba292..3c50862d57 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActSignInCodeDao.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActSignInCodeDao.java @@ -19,6 +19,7 @@ package com.epmet.modules.act.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.modules.act.entity.ActSignInCodeEntity; +import com.epmet.resi.group.dto.act.ActSignInCodeDTO; import org.apache.ibatis.annotations.Mapper; /** @@ -29,5 +30,11 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface ActSignInCodeDao extends BaseDao { - + /** + * 获取最后一次生成的签到码 + * + * @param groupActId + * @return com.epmet.resi.group.dto.act.ActSignInCodeDTO + */ + ActSignInCodeDTO selectLastRec(String groupActId); } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSignInCodeService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSignInCodeService.java index a5d713dcb2..78bff472cd 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSignInCodeService.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSignInCodeService.java @@ -19,6 +19,7 @@ package com.epmet.modules.act.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.modules.act.entity.ActSignInCodeEntity; +import com.epmet.resi.group.dto.act.ActSignInCodeDTO; /** * 组织活动签到码 @@ -28,4 +29,11 @@ import com.epmet.modules.act.entity.ActSignInCodeEntity; */ public interface ActSignInCodeService extends BaseService { + /** + * 获取最后一次生成的签到码 + * + * @param groupActId + * @return com.epmet.resi.group.dto.act.ActSignInCodeDTO + */ + ActSignInCodeDTO selectLastRec(String groupActId); } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSignInRecordService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSignInRecordService.java index b3ea3f44fe..eb62f8d39a 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSignInRecordService.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSignInRecordService.java @@ -19,6 +19,8 @@ package com.epmet.modules.act.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.modules.act.entity.ActSignInRecordEntity; +import com.epmet.resi.group.dto.act.form.SetSignTimeFormDTO; +import com.epmet.resi.group.dto.act.result.SetSignTimeResultDTO; /** * 组织活动签到记录 @@ -36,4 +38,12 @@ public interface ActSignInRecordService extends BaseService implements ActSignInCodeService { + /** + * 获取最后一次生成的签到码 + * + * @param groupActId + * @return com.epmet.resi.group.dto.act.ActSignInCodeDTO + */ + @Override + public ActSignInCodeDTO selectLastRec(String groupActId) { + return baseDao.selectLastRec(groupActId); + } } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSignInRecordServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSignInRecordServiceImpl.java index 393f355f1c..eb44cd3fbc 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSignInRecordServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSignInRecordServiceImpl.java @@ -18,10 +18,27 @@ package com.epmet.modules.act.service.impl; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.DateUtils; import com.epmet.modules.act.dao.ActSignInRecordDao; +import com.epmet.modules.act.dao.GroupActInfoDao; import com.epmet.modules.act.entity.ActSignInRecordEntity; +import com.epmet.modules.act.entity.GroupActInfoEntity; +import com.epmet.modules.act.service.ActSignInCodeService; import com.epmet.modules.act.service.ActSignInRecordService; +import com.epmet.modules.act.service.GroupActInfoService; +import com.epmet.modules.member.service.ResiGroupMemberService; +import com.epmet.resi.group.dto.act.ActSignInCodeDTO; +import com.epmet.resi.group.dto.act.GroupActInfoDTO; +import com.epmet.resi.group.dto.act.form.SetSignTimeFormDTO; +import com.epmet.resi.group.dto.act.result.SetSignTimeResultDTO; +import com.epmet.resi.group.dto.member.ResiGroupMemberDTO; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; /** * 组织活动签到记录 @@ -29,9 +46,17 @@ import org.springframework.stereotype.Service; * @author generator generator@elink-cn.com * @since v1.0.0 2021-04-16 */ +@Slf4j @Service public class ActSignInRecordServiceImpl extends BaseServiceImpl implements ActSignInRecordService { - + @Autowired + private GroupActInfoService groupActInfoService; + @Autowired + private ResiGroupMemberService resiGroupMemberService; + @Autowired + private GroupActInfoDao groupActInfoDao; + @Autowired + private ActSignInCodeService actSignInCodeService; /** * 查询当前用户是否签到 * @@ -46,4 +71,52 @@ public class ActSignInRecordServiceImpl extends BaseServiceImpl - + \ No newline at end of file From 9329921568abccb3ed0540421c9c25cba632b0c1 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 20 Apr 2021 15:25:22 +0800 Subject: [PATCH 030/202] =?UTF-8?q?=E5=B7=B2=E8=AF=BB=E6=9C=AA=E8=AF=BB?= =?UTF-8?q?=E6=B6=88=E6=81=AF=E6=96=B0=E5=A2=9E=E6=B7=BB=E5=8A=A0=E7=BB=84?= =?UTF-8?q?=E9=95=BF=E5=B7=B2=E8=AF=BB=E8=AE=B0=E5=BD=95=EF=BC=8C=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E5=88=97=E8=A1=A8=E4=B8=8D=E6=9F=A5=E8=AF=A2=E7=BB=84?= =?UTF-8?q?=E9=95=BF=E5=B7=B2=E8=AF=BB=E6=9C=AA=E8=AF=BB=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/modules/notice/dao/NoticeDao.java | 8 ++++- .../impl/NoticeReafdRecordServiceImpl.java | 6 ++++ .../service/impl/NoticeServiceImpl.java | 36 ++++++++++--------- .../resources/mapper/notice/NoticeDao.xml | 14 ++++++++ 4 files changed, 47 insertions(+), 17 deletions(-) diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/dao/NoticeDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/dao/NoticeDao.java index 2cab9440db..4ee6056a2b 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/dao/NoticeDao.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/dao/NoticeDao.java @@ -20,6 +20,7 @@ package com.epmet.modules.notice.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.modules.notice.entity.NoticeEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; /** * 小组通知表 @@ -29,5 +30,10 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface NoticeDao extends BaseDao { - + + /** + * @Author sun + * @Description 查询通知对应的小组的组长Id + **/ + String selectNoticeGroupLeader(@Param("noticeId") String noticeId); } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeReafdRecordServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeReafdRecordServiceImpl.java index 11507e85ba..e45a250a0d 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeReafdRecordServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeReafdRecordServiceImpl.java @@ -28,6 +28,7 @@ import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.result.UserBaseInfoResultDTO; import com.epmet.feign.EpmetUserOpenFeignClient; +import com.epmet.modules.notice.dao.NoticeDao; import com.epmet.modules.notice.dao.NoticeReafdRecordDao; import com.epmet.modules.notice.entity.NoticeReafdRecordEntity; import com.epmet.modules.notice.redis.NoticeReafdRecordRedis; @@ -60,6 +61,8 @@ public class NoticeReafdRecordServiceImpl extends BaseServiceImpl page(Map params) { @@ -124,6 +127,9 @@ public class NoticeReafdRecordServiceImpl extends BaseServiceImpl readList = new ArrayList<>(); List unReadList = new ArrayList<>(); + //0.查询通知对应的小组的组长Id + String leaderId = noticeDao.selectNoticeGroupLeader(formDTO.getNoticeId()); + //1.根据通知Id查询组成员已读未读数据 List list = baseDao.getByNoticeId(formDTO.getNoticeId()); 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 8ef6c3dcc4..5b7cd69be3 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 @@ -275,16 +275,18 @@ public class NoticeServiceImpl extends BaseServiceImpl //6.通知已读未读表初始数据 List reafdRecordList = new ArrayList<>(); memberList.forEach(m -> { - if (!"".equals(m.getGroupLeaderFlag())) { - NoticeReafdRecordEntity reafdRecord = new NoticeReafdRecordEntity(); - reafdRecord.setCustomerId(resultDTO.getCustomerId()); - reafdRecord.setGridId(groupEntity.getGridId()); - reafdRecord.setGroupId(formDTO.getGroupId()); - reafdRecord.setNoticeId(entity.getId()); - reafdRecord.setUserId(m.getCustomerUserId()); + NoticeReafdRecordEntity reafdRecord = new NoticeReafdRecordEntity(); + reafdRecord.setCustomerId(resultDTO.getCustomerId()); + reafdRecord.setGridId(groupEntity.getGridId()); + reafdRecord.setGroupId(formDTO.getGroupId()); + reafdRecord.setNoticeId(entity.getId()); + reafdRecord.setUserId(m.getCustomerUserId()); + if ("leader".equals(m.getGroupLeaderFlag())) { + reafdRecord.setReadFlag(ReadFlagConstant.READ); + }else { reafdRecord.setReadFlag(ReadFlagConstant.UN_READ); - reafdRecordList.add(reafdRecord); } + reafdRecordList.add(reafdRecord); }); if (reafdRecordList.size() > NumConstant.ZERO) { noticeReafdRecordService.insertBatch(reafdRecordList); @@ -394,16 +396,18 @@ public class NoticeServiceImpl extends BaseServiceImpl noticeReafdRecordDao.delByNoticeId(formDTO.getNoticeId()); List reafdRecordList = new ArrayList<>(); memberList.forEach(m -> { - if (!"".equals(m.getGroupLeaderFlag())) { - NoticeReafdRecordEntity reafdRecord = new NoticeReafdRecordEntity(); - reafdRecord.setCustomerId(entity.getCustomerId()); - reafdRecord.setGridId(entity.getGridId()); - reafdRecord.setGroupId(entity.getGroupId()); - reafdRecord.setNoticeId(entity.getId()); - reafdRecord.setUserId(m.getCustomerUserId()); + NoticeReafdRecordEntity reafdRecord = new NoticeReafdRecordEntity(); + reafdRecord.setCustomerId(entity.getCustomerId()); + reafdRecord.setGridId(entity.getGridId()); + reafdRecord.setGroupId(entity.getGroupId()); + reafdRecord.setNoticeId(entity.getId()); + reafdRecord.setUserId(m.getCustomerUserId()); + if ("leader".equals(m.getGroupLeaderFlag())) { + reafdRecord.setReadFlag(ReadFlagConstant.READ); + }else { reafdRecord.setReadFlag(ReadFlagConstant.UN_READ); - reafdRecordList.add(reafdRecord); } + reafdRecordList.add(reafdRecord); }); if (reafdRecordList.size() > NumConstant.ZERO) { noticeReafdRecordService.insertBatch(reafdRecordList); diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/notice/NoticeDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/notice/NoticeDao.xml index 7f7dc8e127..332dfa0b5c 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/notice/NoticeDao.xml +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/notice/NoticeDao.xml @@ -3,5 +3,19 @@ + \ No newline at end of file From 2d93f0693626a9b93fe2c33a05d1d7fd1ed1ec95 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 20 Apr 2021 15:57:34 +0800 Subject: [PATCH 031/202] =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E7=BB=84=E5=86=85?= =?UTF-8?q?=E8=BF=91=E5=8D=81=E6=9D=A1=E6=95=B0=E6=8D=AE=E6=A1=86=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/topic/form/GetLatestV2FormDTO.java | 24 ++++ .../topic/result/GetLatestV2ResultDTO.java | 47 ++++++++ .../dto/topic/result/LatestTenResultDTO.java | 104 ++++++++++++++++++ .../topic/controller/ResiTopicController.java | 14 +++ .../topic/service/ResiTopicService.java | 9 ++ .../service/impl/ResiTopicServiceImpl.java | 12 ++ 6 files changed, 210 insertions(+) create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/GetLatestV2FormDTO.java create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/GetLatestV2ResultDTO.java create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/LatestTenResultDTO.java diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/GetLatestV2FormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/GetLatestV2FormDTO.java new file mode 100644 index 0000000000..19406e5a62 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/GetLatestV2FormDTO.java @@ -0,0 +1,24 @@ +package com.epmet.resi.group.dto.topic.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2021/4/20 下午2:23 + * @DESC + */ +@Data +public class GetLatestV2FormDTO implements Serializable { + + private static final long serialVersionUID = -5212709032157867124L; + + public interface GetLatestV2Form{} + + @NotBlank(message = "小组ID不能为空",groups = GetLatestV2Form.class) + private String groupId; + + private String userId; +} diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/GetLatestV2ResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/GetLatestV2ResultDTO.java new file mode 100644 index 0000000000..ee37afd1bf --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/GetLatestV2ResultDTO.java @@ -0,0 +1,47 @@ +package com.epmet.resi.group.dto.topic.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2021/4/20 下午2:34 + * @DESC + */ +@Data +public class GetLatestV2ResultDTO implements Serializable { + + private static final long serialVersionUID = 1386600583326358070L; + + /** + * 当前人员组内角色(member成员,leader群主) + */ + private String userRole; + + /** + * 小组类型(ordinary:楼院小组 branch:支部小组) + */ + private String groupType; + + /** + * 是否显示通知按钮 + */ + private String noticeBut; + + /** + * 是否显示活动按钮 + */ + private String actBut; + + /** + * 是否存在未读消息 + */ + private Boolean unReadNews; + + /** + * 近十条数据 + */ + private List list; +} diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/LatestTenResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/LatestTenResultDTO.java new file mode 100644 index 0000000000..0f8d7c3222 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/LatestTenResultDTO.java @@ -0,0 +1,104 @@ +package com.epmet.resi.group.dto.topic.result; + +import com.epmet.commons.tools.constant.NumConstant; +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2021/4/20 下午2:45 + * @DESC + */ +@Data +public class LatestTenResultDTO implements Serializable { + + private static final long serialVersionUID = -8447212650446365613L; + + /** + * 话题、通知、活动Id + */ + private String id; + + /** + * 话题、通知、活动Id发布人的id + */ + private String userId; + + /** + * 发布者的全称(街道-姓氏先生/女士)【专项组显示真实名】 + */ + private String releaseUserName; + + /** + * 话题发布者的头像Url + */ + private String releaseUserHeadPhoto; + + /** + * 发布时间yyyy-MM-dd HH:mm + */ + private String releaseTimed; + + /** + * 内容 + */ + private String content; + + /** + * 话题状态(discussing进行中、closed已关闭) + */ + private String status; + + /** + * 是否本人 + */ + private String releaseUserFlag; + + /** + * 如果有图片,后台只返回第一张,没有图片此列为空 + */ + private String firstPhoto; + + /** + * 议题id + */ + private String issueId; + + /** + * 是否被转为议题true,false + */ + private Boolean shiftIssueFlag; + + /** + * 数据类型(topic:话题 notice:通知 act:活动) + */ + private String contentType; + + /** + * 本人已读未读状态(read已读 unread未读) + */ + private String readOrUnRead; + + /** + * 通知或活动未读人员数 + */ + private Integer unReadCount; + + public LatestTenResultDTO() { + this.id = ""; + this.userId = ""; + this.releaseUserName = ""; + this.releaseUserHeadPhoto = ""; + this.releaseTimed = ""; + this.content = ""; + this.status = ""; + this.releaseUserFlag = ""; + this.firstPhoto = ""; + this.issueId = ""; + this.shiftIssueFlag = false; + this.contentType = ""; + this.readOrUnRead = ""; + this.unReadCount = NumConstant.ZERO; + } +} diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/controller/ResiTopicController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/controller/ResiTopicController.java index 419f927f83..4e824c18ef 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/controller/ResiTopicController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/controller/ResiTopicController.java @@ -441,4 +441,18 @@ public class ResiTopicController { } return new Result<>(); } + + /** + * @Description 查询组内近十条数据 + * @Param tokenDto + * @Param formDTO + * @author zxc + * @date 2021/4/20 下午2:34 + */ + @PostMapping("getlatestv2") + public Result getLatestV2(@LoginUser TokenDto tokenDto,@RequestBody GetLatestV2FormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, GetLatestV2FormDTO.GetLatestV2Form.class); + formDTO.setUserId(tokenDto.getUserId()); + return new Result().ok(topicService.getLatestV2(formDTO)); + } } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/ResiTopicService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/ResiTopicService.java index 20f234d9aa..48ba5166e5 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/ResiTopicService.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/ResiTopicService.java @@ -352,4 +352,13 @@ public interface ResiTopicService extends BaseService { void sendTopicPointEventByEventType(TopicEventFormDTO param); ResiTopicDTO queryTopicInfoByIssueId(String issueId); + + /** + * @Description 查询组内近十条数据 + * @Param tokenDto + * @Param formDTO + * @author zxc + * @date 2021/4/20 下午2:34 + */ + GetLatestV2ResultDTO getLatestV2(GetLatestV2FormDTO formDTO); } 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 36199596a1..f3a4bb6f71 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 @@ -2181,6 +2181,18 @@ public class ResiTopicServiceImpl extends BaseServiceImpl Date: Tue, 20 Apr 2021 15:59:21 +0800 Subject: [PATCH 032/202] =?UTF-8?q?=E7=AD=BE=E5=88=B0=E3=80=81=E7=AD=BE?= =?UTF-8?q?=E5=88=B0=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tools/exception/EpmetErrorCode.java | 4 +- .../group/dto/act/form/SignInFormDTO.java | 47 ++++++++ .../group/dto/act/form/SignInRecFormDTO.java | 25 ++++ .../dto/act/result/SignInRecResultDTO.java | 31 +++++ .../controller/ActSignInRecordController.java | 33 ++++++ .../modules/act/dao/ActSignInRecordDao.java | 10 ++ .../act/service/ActSignInRecordService.java | 19 ++++ .../impl/ActSignInRecordServiceImpl.java | 107 ++++++++++++++++++ .../service/impl/GroupActInfoServiceImpl.java | 11 +- .../mapper/act/ActSignInRecordDao.xml | 11 ++ 10 files changed, 290 insertions(+), 8 deletions(-) create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/SignInFormDTO.java create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/SignInRecFormDTO.java create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/SignInRecResultDTO.java diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java index 49514ffd1b..90ed153985 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java @@ -171,7 +171,9 @@ public enum EpmetErrorCode { PARTY_MEMBER_JOIN_BRANCH_GROUP(8908,"您不是党员,不能加入支部小组"), GROUP_ACT_CAN_NOT_CANCEL(8909,"活动%s,不能取消"), //8910的msg动态赋值 - GROUP_ACT_CAN_NOT_COMMENT(8910,"当前活动,不能评论"); + GROUP_ACT_CAN_NOT_COMMENT(8910,"当前活动,不能评论"), + SIGN_IN_TIME_NOT_START(8911,"未到签到时间,不允许签到"), + SIGN_IN_TIME_PASSED(8912,"当前时间已超过签到时间"); private int code; private String msg; diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/SignInFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/SignInFormDTO.java new file mode 100644 index 0000000000..af00808a0f --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/SignInFormDTO.java @@ -0,0 +1,47 @@ +package com.epmet.resi.group.dto.act.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * 007、签到 + * + * @author yinzuomei@elink-cn.com + * @date 2021/4/20 15:14 + */ +@Data +public class SignInFormDTO implements Serializable { + private static final long serialVersionUID = 3632452994910057034L; + + public interface AddUserInternalGroup { + } + + @NotBlank(message = "活动id不能为空",groups = AddUserInternalGroup.class) + private String groupActId; + + /** + * 签到地址 + */ + @NotBlank(message = "签到地址不能为空",groups = AddUserInternalGroup.class) + private String signInAddress; + /** + * 签到地点-经度 + */ + private BigDecimal longitude; + + /** + * 签到地点-纬度 + */ + private BigDecimal latitude; + + @NotBlank(message = "tokenDto获取userId为空", groups = AddUserInternalGroup.class) + private String userId; + + @NotBlank(message = "tokenDto获取customerId为空", groups = AddUserInternalGroup.class) + private String customerId; + +} + diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/SignInRecFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/SignInRecFormDTO.java new file mode 100644 index 0000000000..95af7d5f77 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/SignInRecFormDTO.java @@ -0,0 +1,25 @@ +package com.epmet.resi.group.dto.act.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * 009、签到记录列表 + * + * @author yinzuomei@elink-cn.com + * @date 2021/4/20 15:42 + */ +@Data +public class SignInRecFormDTO implements Serializable { + private static final long serialVersionUID = -144395799437468448L; + + public interface AddUserInternalGroup { + } + + @NotBlank(message = "groupActId不能为空", groups = AddUserInternalGroup.class) + private String groupActId; + private Integer pageNo; + private Integer pageSize; +} diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/SignInRecResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/SignInRecResultDTO.java new file mode 100644 index 0000000000..0bdb2b17d0 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/SignInRecResultDTO.java @@ -0,0 +1,31 @@ +package com.epmet.resi.group.dto.act.result; + +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; +import java.util.Date; +import java.util.List; + +/** + * 009、签到记录列表 + * + * @author yinzuomei@elink-cn.com + * @date 2021/4/20 15:43 + */ +@Data +public class SignInRecResultDTO implements Serializable { + private static final long serialVersionUID = -2847848186325667663L; + private Integer signedInNum; + private Integer shouldAttend; + private List list; + + @NoArgsConstructor + @Data + public static class SignInDetail { + private String signUserId; + private String signUserName; + private Date signInTime; + private String signInAddress; + } +} diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/ActSignInRecordController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/ActSignInRecordController.java index 7bece885f4..3e8883dbd6 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/ActSignInRecordController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/ActSignInRecordController.java @@ -23,7 +23,10 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.modules.act.service.ActSignInRecordService; import com.epmet.resi.group.dto.act.form.SetSignTimeFormDTO; +import com.epmet.resi.group.dto.act.form.SignInFormDTO; +import com.epmet.resi.group.dto.act.form.SignInRecFormDTO; import com.epmet.resi.group.dto.act.result.SetSignTimeResultDTO; +import com.epmet.resi.group.dto.act.result.SignInRecResultDTO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -59,4 +62,34 @@ public class ActSignInRecordController { ValidatorUtils.validateEntity(formDTO, SetSignTimeFormDTO.AddUserInternalGroup.class); return new Result().ok(actSignInRecordService.setSignTime(formDTO)); } + + /** + * @return com.epmet.commons.tools.utils.Result + * @param tokenDto + * @param formDTO + * @author yinzuomei + * @description 007、签到 + * @Date 2021/4/20 15:19 + **/ + @PostMapping("signin") + public Result signIn(@LoginUser TokenDto tokenDto, @RequestBody SignInFormDTO formDTO){ + formDTO.setUserId(tokenDto.getUserId()); + formDTO.setCustomerId(tokenDto.getCustomerId()); + ValidatorUtils.validateEntity(formDTO,SignInFormDTO.AddUserInternalGroup.class); + actSignInRecordService.signIn(formDTO); + return new Result(); + } + + /** + * @return com.epmet.commons.tools.utils.Result + * @param formDTO + * @author yinzuomei + * @description 009、签到记录列表 + * @Date 2021/4/20 15:46 + **/ + @PostMapping("reclist") + public Result querySignRecList(@RequestBody SignInRecFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO,SignInRecFormDTO.AddUserInternalGroup.class); + return new Result().ok(actSignInRecordService.querySignRecList(formDTO)); + } } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActSignInRecordDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActSignInRecordDao.java index 1d103db768..6e53fe6bef 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActSignInRecordDao.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActSignInRecordDao.java @@ -22,6 +22,8 @@ import com.epmet.modules.act.entity.ActSignInRecordEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; +import java.util.List; + /** * 组织活动签到记录 * @@ -39,4 +41,12 @@ public interface ActSignInRecordDao extends BaseDao { * @return int */ int selectCountUserRec(@Param("groupActId")String groupActId, @Param("signUserId")String signUserId); + + /** + * 查询活动的签到记录 + * + * @param groupActId + * @return int + */ + List selectListByGroupActId(String groupActId); } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSignInRecordService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSignInRecordService.java index eb62f8d39a..da979840b0 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSignInRecordService.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSignInRecordService.java @@ -20,7 +20,10 @@ package com.epmet.modules.act.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.modules.act.entity.ActSignInRecordEntity; import com.epmet.resi.group.dto.act.form.SetSignTimeFormDTO; +import com.epmet.resi.group.dto.act.form.SignInFormDTO; +import com.epmet.resi.group.dto.act.form.SignInRecFormDTO; import com.epmet.resi.group.dto.act.result.SetSignTimeResultDTO; +import com.epmet.resi.group.dto.act.result.SignInRecResultDTO; /** * 组织活动签到记录 @@ -46,4 +49,20 @@ public interface ActSignInRecordService extends BaseService signInEndTime) { + //未签到、已经超过了签到时间 + throw new RenException(EpmetErrorCode.SIGN_IN_TIME_PASSED.getCode(),EpmetErrorCode.SIGN_IN_TIME_PASSED.getMsg()); + } + + //未签到、在签到时间范围内的,可以签到 + GroupActInfoEntity groupActInfoEntity = ConvertUtils.sourceToTarget(originalActInfo, GroupActInfoEntity.class); + groupActInfoEntity.setSignedInNum(originalActInfo.getSignedInNum() + NumConstant.ONE); + groupActInfoDao.updateById(groupActInfoEntity); + + ActSignInRecordEntity insertEntity=new ActSignInRecordEntity(); + insertEntity.setCustomerId(formDTO.getCustomerId()); + insertEntity.setGroupActId(formDTO.getGroupActId()); + insertEntity.setSignUserId(formDTO.getUserId()); + insertEntity.setSignInAddress(formDTO.getSignInAddress()); + insertEntity.setLatitude(formDTO.getLatitude()); + insertEntity.setLongitude(formDTO.getLongitude()); + baseDao.insert(insertEntity); + } + + /** + * 009、签到记录列表 + * + * @param formDTO + * @return com.epmet.resi.group.dto.act.result.SignInRecResultDTO + */ + @Override + public SignInRecResultDTO querySignRecList(SignInRecFormDTO formDTO) { + GroupActInfoDTO originalActInfo = groupActInfoService.getGroupActInfoDTO(formDTO.getGroupActId()); + SignInRecResultDTO resultDTO = new SignInRecResultDTO(); + resultDTO.setSignedInNum(originalActInfo.getSignedInNum()); + resultDTO.setShouldAttend(originalActInfo.getShouldAttend()); + List list = baseDao.selectListByGroupActId(formDTO.getGroupActId()); + if (!CollectionUtils.isEmpty(list)) { + //2.调用user服务,查询人员基础数据 + List userIdList = list.stream().map(ActSignInRecordEntity::getSignUserId).collect(Collectors.toList()); + Result> result = epmetUserOpenFeignClient.queryUserBaseInfo(userIdList); + if (!result.success()) { + throw new RenException("调用user服务,获取用户基础数据失败"); + } + if (!CollectionUtils.isEmpty(result.getData())) { + List signInDetailList = new ArrayList<>(); + //3.遍历封装数据并返回 + list.forEach(l -> { + result.getData().forEach(user -> { + if (l.getSignUserId().equals(user.getUserId())) { + SignInRecResultDTO.SignInDetail signInDetail = new SignInRecResultDTO.SignInDetail(); + signInDetail.setSignInAddress(l.getSignInAddress()); + signInDetail.setSignInTime(l.getCreatedTime()); + signInDetail.setSignUserId(l.getSignUserId()); + signInDetail.setSignUserName(user.getSurname().concat(user.getName())); + } + }); + }); + resultDTO.setList(signInDetailList); + } + } + return resultDTO; + } } \ No newline at end of file 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 9a5ebaf733..ecf6f045df 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 @@ -174,15 +174,12 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl + + + \ No newline at end of file From d1a125765b4750a59cd75a95b0773986a389f83a Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 20 Apr 2021 16:36:56 +0800 Subject: [PATCH 033/202] =?UTF-8?q?=E5=B0=8F=E7=BB=84=E9=80=9A=E7=9F=A5?= =?UTF-8?q?=E9=98=85=E8=AF=BB=E7=8A=B6=E6=80=81=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/notice/form/ReadTypeFormDTO.java | 21 ++++++++++ .../NoticeReafdRecordController.java | 14 +++++++ .../notice/dao/NoticeReafdRecordDao.java | 6 +++ .../service/NoticeReafdRecordService.java | 9 +++++ .../impl/NoticeReafdRecordServiceImpl.java | 39 ++++++++++++++++++- .../mapper/notice/NoticeReafdRecordDao.xml | 11 ++++++ 6 files changed, 99 insertions(+), 1 deletion(-) create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/ReadTypeFormDTO.java diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/ReadTypeFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/ReadTypeFormDTO.java new file mode 100644 index 0000000000..f3170ebc9b --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/ReadTypeFormDTO.java @@ -0,0 +1,21 @@ +package com.epmet.resi.group.dto.notice.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; + +/** + * @Author sun + * @Description 通知已读未读列表查询-接口入参 + */ +@Data +public class ReadTypeFormDTO { + + /** + * 通知Id + */ + @NotBlank(message = "通知Id不能为空",groups = {ReadTypeFormDTO.Read.class}) + private String noticeId; + + public interface Read{} +} diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeReafdRecordController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeReafdRecordController.java index 902615a92b..d9881363e3 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeReafdRecordController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeReafdRecordController.java @@ -31,6 +31,7 @@ import com.epmet.modules.notice.excel.NoticeReafdRecordExcel; import com.epmet.modules.notice.service.NoticeReafdRecordService; import com.epmet.resi.group.dto.notice.NoticeReafdRecordDTO; import com.epmet.resi.group.dto.notice.form.NoticeReadListFormDTO; +import com.epmet.resi.group.dto.notice.form.ReadTypeFormDTO; import com.epmet.resi.group.dto.notice.result.NoticeReadListResultDTO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -107,4 +108,17 @@ public class NoticeReafdRecordController { return new Result().ok(noticeReafdRecordService.noticeReadList(tokenDto, formDTO)); } + /** + * @param formDTO + * @return + * @Author sun + * @Description 小组通知阅读状态修改 + **/ + @PostMapping(value = "readtype") + public Result readType(@LoginUser TokenDto tokenDto, @RequestBody ReadTypeFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, ReadTypeFormDTO.Read.class); + noticeReafdRecordService.readType(tokenDto, formDTO); + return new Result(); + } + } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/dao/NoticeReafdRecordDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/dao/NoticeReafdRecordDao.java index 9e767ed133..8bf123949f 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/dao/NoticeReafdRecordDao.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/dao/NoticeReafdRecordDao.java @@ -45,4 +45,10 @@ public interface NoticeReafdRecordDao extends BaseDao { * @Description 根据通知Id查询组成员已读未读数据 **/ List getByNoticeId(@Param("noticeId") String noticeId); + + /** + * @Author sun + * @Description 查询当前人员是否存在对通知已读未读数据 + **/ + NoticeReafdRecordEntity selectByNoticeId(@Param("noticeId") String noticeId, @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/notice/service/NoticeReafdRecordService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeReafdRecordService.java index c142fefcdc..77e2ca9419 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeReafdRecordService.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeReafdRecordService.java @@ -23,6 +23,7 @@ import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.modules.notice.entity.NoticeReafdRecordEntity; import com.epmet.resi.group.dto.notice.NoticeReafdRecordDTO; import com.epmet.resi.group.dto.notice.form.NoticeReadListFormDTO; +import com.epmet.resi.group.dto.notice.form.ReadTypeFormDTO; import com.epmet.resi.group.dto.notice.result.NoticeReadListResultDTO; import java.util.List; @@ -103,4 +104,12 @@ public interface NoticeReafdRecordService extends BaseService + + DELETE FROM From effacacffa1316d339bbd0d3d58e184ec8d044ed Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 20 Apr 2021 17:12:17 +0800 Subject: [PATCH 034/202] =?UTF-8?q?act=5Fread=5Frecord=E6=96=B0=E5=A2=9Egr?= =?UTF-8?q?id=5Fid=E3=80=81group=5Fid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/resi/group/dto/act/ActReadRecordDTO.java | 13 ++++++++++++- .../modules/act/entity/ActReadRecordEntity.java | 10 ++++++++++ .../act/service/impl/GroupActInfoServiceImpl.java | 9 +++++++-- 3 files changed, 29 insertions(+), 3 deletions(-) diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActReadRecordDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActReadRecordDTO.java index 78bbec055c..b1040693b0 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActReadRecordDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActReadRecordDTO.java @@ -17,9 +17,10 @@ package com.epmet.resi.group.dto.act; +import lombok.Data; + import java.io.Serializable; import java.util.Date; -import lombok.Data; /** @@ -43,6 +44,16 @@ public class ActReadRecordDTO implements Serializable { */ private String customerId; + /** + * 小组所属网格id + */ + private String gridId; + + /** + * 小组id + */ + private String groupId; + /** * group_act_info.id */ diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActReadRecordEntity.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActReadRecordEntity.java index ad7809400d..561a3d760a 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActReadRecordEntity.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActReadRecordEntity.java @@ -40,6 +40,16 @@ public class ActReadRecordEntity extends BaseEpmetEntity { */ private String customerId; + /** + * 小组所属网格id + */ + private String gridId; + + /** + * 小组id + */ + private String groupId; + /** * group_act_info.id */ 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 ecf6f045df..a62da74ca6 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 @@ -148,7 +148,8 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl readRecordEntityList=constructReadRec(groupActInfoEntity.getId(), formDTO.getCustomerId(), formDTO.getGroupId(), - formDTO.getPublishUserId()); + formDTO.getPublishUserId(), + groupDTO.getGridId()); //2、插入活动内容 contentList.forEach(textContentEntity->{ groupActContentDao.insert(textContentEntity); @@ -167,7 +168,7 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl constructReadRec(String groupActId, String customerId, String groupId,String publishUserId) { + private List constructReadRec(String groupActId, String customerId, String groupId,String publishUserId,String gridId) { List list=new ArrayList<>(); List memberDTOList=resiGroupMemberService.getMemberList(groupId); memberDTOList.forEach(memberDTO->{ @@ -177,6 +178,8 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl Date: Tue, 20 Apr 2021 17:24:51 +0800 Subject: [PATCH 035/202] =?UTF-8?q?=E5=8F=91=E5=B8=83=E6=B4=BB=E5=8A=A8?= =?UTF-8?q?=EF=BC=8C=E8=87=B3=E5=A4=9A3=E5=BC=A0=E5=9B=BE=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/modules/act/service/impl/GroupActInfoServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 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 a62da74ca6..6276e1ab89 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 @@ -251,7 +251,7 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl NumConstant.THREE) { + if (formDTO.getImgList().size() > NumConstant.THREE) { throw new RenException(EpmetErrorCode.GROUP_ACT_IMG_MAX.getCode(), EpmetErrorCode.GROUP_ACT_IMG_MAX.getMsg()); } } From 4b8096b76392d5203913f55411a9719f3dc9c1e9 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 20 Apr 2021 17:30:52 +0800 Subject: [PATCH 036/202] =?UTF-8?q?=E5=BB=BA=E7=BB=84=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../group/dto/group/ResiGroupSetupDTO.java | 101 ++++++++++++++++++ ...ecordDTO.java => NoticeReadRecordDTO.java} | 2 +- .../controller/ResiGroupSetupController.java | 40 +++++++ .../modules/group/dao/ResiGroupSetupDao.java | 33 ++++++ .../group/entity/ResiGroupSetupEntity.java | 71 ++++++++++++ .../group/redis/ResiGroupSetupRedis.java | 47 ++++++++ .../group/service/ResiGroupSetupService.java | 31 ++++++ .../impl/ResiGroupSetupServiceImpl.java | 40 +++++++ .../impl/InvitationRecordServiceImpl.java | 1 - ...r.java => NoticeReadRecordController.java} | 30 +++--- ...ecordDao.java => NoticeReadRecordDao.java} | 10 +- ...ntity.java => NoticeReadRecordEntity.java} | 2 +- ...dExcel.java => NoticeReadRecordExcel.java} | 2 +- ...dRedis.java => NoticeReadRecordRedis.java} | 2 +- ...vice.java => NoticeReadRecordService.java} | 16 +-- ....java => NoticeReadRecordServiceImpl.java} | 52 ++++----- .../service/impl/NoticeServiceImpl.java | 19 ++-- .../mapper/group/ResiGroupSetupDao.xml | 7 ++ ...dRecordDao.xml => NoticeReadRecordDao.xml} | 6 +- 19 files changed, 440 insertions(+), 72 deletions(-) create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/ResiGroupSetupDTO.java rename epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/{NoticeReafdRecordDTO.java => NoticeReadRecordDTO.java} (96%) create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/ResiGroupSetupController.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/dao/ResiGroupSetupDao.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/entity/ResiGroupSetupEntity.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/redis/ResiGroupSetupRedis.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/ResiGroupSetupService.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupSetupServiceImpl.java rename epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/{NoticeReafdRecordController.java => NoticeReadRecordController.java} (79%) rename epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/dao/{NoticeReafdRecordDao.java => NoticeReadRecordDao.java} (78%) rename epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/entity/{NoticeReafdRecordEntity.java => NoticeReadRecordEntity.java} (96%) rename epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/excel/{NoticeReafdRecordExcel.java => NoticeReadRecordExcel.java} (97%) rename epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/redis/{NoticeReafdRecordRedis.java => NoticeReadRecordRedis.java} (96%) rename epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/{NoticeReafdRecordService.java => NoticeReadRecordService.java} (84%) rename epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/{NoticeReafdRecordServiceImpl.java => NoticeReadRecordServiceImpl.java} (77%) create mode 100644 epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupSetupDao.xml rename epmet-module/resi-group/resi-group-server/src/main/resources/mapper/notice/{NoticeReafdRecordDao.xml => NoticeReadRecordDao.xml} (83%) diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/ResiGroupSetupDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/ResiGroupSetupDTO.java new file mode 100644 index 0000000000..9cad3f3f9a --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/ResiGroupSetupDTO.java @@ -0,0 +1,101 @@ +/** + * 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 java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 建组设置 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-20 + */ +@Data +public class ResiGroupSetupDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户ID,初始默认为default + */ + private String customerId; + + /** + * 默认小组头像 + */ + private String logo; + + /** + * 小组名称 + */ + private String name; + + /** + * 小组简介 + */ + private String describe; + + /** + * 小组类型(ordinary:楼院小组 branch:支部小组) + */ + private String groupType; + + /** + * 专用:dedicated;常用:common_used + */ + private String category; + + /** + * 删除标记 0:未删除,1:已删除 + */ + 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-client/src/main/java/com/epmet/resi/group/dto/notice/NoticeReafdRecordDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/NoticeReadRecordDTO.java similarity index 96% rename from epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/NoticeReafdRecordDTO.java rename to epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/NoticeReadRecordDTO.java index 8574f2deb2..a93531c096 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/NoticeReafdRecordDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/NoticeReadRecordDTO.java @@ -29,7 +29,7 @@ import lombok.Data; * @since v1.0.0 2021-04-19 */ @Data -public class NoticeReafdRecordDTO implements Serializable { +public class NoticeReadRecordDTO implements Serializable { private static final long serialVersionUID = 1L; diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/ResiGroupSetupController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/ResiGroupSetupController.java new file mode 100644 index 0000000000..6f21b623e3 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/ResiGroupSetupController.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.group.controller; + +import com.epmet.modules.group.service.ResiGroupSetupService; +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-04-20 + */ +@RestController +@RequestMapping("resigroupsetup") +public class ResiGroupSetupController { + + @Autowired + private ResiGroupSetupService resiGroupSetupService; + + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/dao/ResiGroupSetupDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/dao/ResiGroupSetupDao.java new file mode 100644 index 0000000000..1efca98aa2 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/dao/ResiGroupSetupDao.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.ResiGroupSetupEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 建组设置 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-20 + */ +@Mapper +public interface ResiGroupSetupDao 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/ResiGroupSetupEntity.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/entity/ResiGroupSetupEntity.java new file mode 100644 index 0000000000..77727f9fa3 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/entity/ResiGroupSetupEntity.java @@ -0,0 +1,71 @@ +/** + * 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; + +import java.util.Date; + +/** + * 建组设置 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-20 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("resi_group_setup") +public class ResiGroupSetupEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID,初始默认为default + */ + private String customerId; + + /** + * 默认小组头像 + */ + private String logo; + + /** + * 小组名称 + */ + private String name; + + /** + * 小组简介 + */ + private String describe; + + /** + * 小组类型(ordinary:楼院小组 branch:支部小组) + */ + private String groupType; + + /** + * 专用:dedicated;常用:common_used + */ + private String category; + +} diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/redis/ResiGroupSetupRedis.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/redis/ResiGroupSetupRedis.java new file mode 100644 index 0000000000..fac89893ba --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/redis/ResiGroupSetupRedis.java @@ -0,0 +1,47 @@ +/** + * 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.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 建组设置 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-20 + */ +@Component +public class ResiGroupSetupRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/ResiGroupSetupService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/ResiGroupSetupService.java new file mode 100644 index 0000000000..180466d9ea --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/ResiGroupSetupService.java @@ -0,0 +1,31 @@ +/** + * 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.modules.group.entity.ResiGroupSetupEntity; + +/** + * 建组设置 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-20 + */ +public interface ResiGroupSetupService extends BaseService { + +} \ 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/ResiGroupSetupServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupSetupServiceImpl.java new file mode 100644 index 0000000000..79ca65f419 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupSetupServiceImpl.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.group.service.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.modules.group.dao.ResiGroupSetupDao; +import com.epmet.modules.group.entity.ResiGroupSetupEntity; +import com.epmet.modules.group.redis.ResiGroupSetupRedis; +import com.epmet.modules.group.service.ResiGroupSetupService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +/** + * 建组设置 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-20 + */ +@Service +public class ResiGroupSetupServiceImpl extends BaseServiceImpl implements ResiGroupSetupService { + + @Autowired + private ResiGroupSetupRedis resiGroupSetupRedis; + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/service/impl/InvitationRecordServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/service/impl/InvitationRecordServiceImpl.java index f8a24b172d..2a7648e63d 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/service/impl/InvitationRecordServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/service/impl/InvitationRecordServiceImpl.java @@ -25,7 +25,6 @@ import com.epmet.modules.invitation.dao.InvitationRecordDao; import com.epmet.modules.invitation.entity.InvitationRecordEntity; import com.epmet.modules.invitation.service.InvitationRecordService; import com.epmet.modules.notice.dao.NoticeDao; -import com.epmet.modules.notice.dao.NoticeReafdRecordDao; import com.epmet.modules.notice.entity.NoticeEntity; import com.epmet.resi.group.dto.invitation.form.ShareFormDTO; import com.epmet.resi.group.dto.invitation.result.ShareResultDTO; diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeReafdRecordController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeReadRecordController.java similarity index 79% rename from epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeReafdRecordController.java rename to epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeReadRecordController.java index d9881363e3..dd865bfdf8 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeReafdRecordController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeReadRecordController.java @@ -27,9 +27,9 @@ import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; -import com.epmet.modules.notice.excel.NoticeReafdRecordExcel; -import com.epmet.modules.notice.service.NoticeReafdRecordService; -import com.epmet.resi.group.dto.notice.NoticeReafdRecordDTO; +import com.epmet.modules.notice.excel.NoticeReadRecordExcel; +import com.epmet.modules.notice.service.NoticeReadRecordService; +import com.epmet.resi.group.dto.notice.NoticeReadRecordDTO; import com.epmet.resi.group.dto.notice.form.NoticeReadListFormDTO; import com.epmet.resi.group.dto.notice.form.ReadTypeFormDTO; import com.epmet.resi.group.dto.notice.result.NoticeReadListResultDTO; @@ -49,25 +49,25 @@ import java.util.Map; */ @RestController @RequestMapping("noticereafdrecord") -public class NoticeReafdRecordController { +public class NoticeReadRecordController { @Autowired - private NoticeReafdRecordService noticeReafdRecordService; + private NoticeReadRecordService noticeReafdRecordService; @GetMapping("page") - public Result> page(@RequestParam Map params){ - PageData page = noticeReafdRecordService.page(params); - return new Result>().ok(page); + public Result> page(@RequestParam Map params){ + PageData page = noticeReafdRecordService.page(params); + return new Result>().ok(page); } @GetMapping("{id}") - public Result get(@PathVariable("id") String id){ - NoticeReafdRecordDTO data = noticeReafdRecordService.get(id); - return new Result().ok(data); + public Result get(@PathVariable("id") String id){ + NoticeReadRecordDTO data = noticeReafdRecordService.get(id); + return new Result().ok(data); } @PostMapping - public Result save(@RequestBody NoticeReafdRecordDTO dto){ + public Result save(@RequestBody NoticeReadRecordDTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); noticeReafdRecordService.save(dto); @@ -75,7 +75,7 @@ public class NoticeReafdRecordController { } @PutMapping - public Result update(@RequestBody NoticeReafdRecordDTO dto){ + public Result update(@RequestBody NoticeReadRecordDTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); noticeReafdRecordService.update(dto); @@ -92,8 +92,8 @@ public class NoticeReafdRecordController { @GetMapping("export") public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { - List list = noticeReafdRecordService.list(params); - ExcelUtils.exportExcelToTarget(response, null, list, NoticeReafdRecordExcel.class); + List list = noticeReafdRecordService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, NoticeReadRecordExcel.class); } /** diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/dao/NoticeReafdRecordDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/dao/NoticeReadRecordDao.java similarity index 78% rename from epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/dao/NoticeReafdRecordDao.java rename to epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/dao/NoticeReadRecordDao.java index 8bf123949f..2375b63db6 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/dao/NoticeReafdRecordDao.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/dao/NoticeReadRecordDao.java @@ -18,8 +18,8 @@ package com.epmet.modules.notice.dao; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.modules.notice.entity.NoticeReafdRecordEntity; -import com.epmet.resi.group.dto.notice.NoticeReafdRecordDTO; +import com.epmet.modules.notice.entity.NoticeReadRecordEntity; +import com.epmet.resi.group.dto.notice.NoticeReadRecordDTO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -32,7 +32,7 @@ import java.util.List; * @since v1.0.0 2021-04-19 */ @Mapper -public interface NoticeReafdRecordDao extends BaseDao { +public interface NoticeReadRecordDao extends BaseDao { /** * @Author sun @@ -44,11 +44,11 @@ public interface NoticeReafdRecordDao extends BaseDao { * @Author sun * @Description 根据通知Id查询组成员已读未读数据 **/ - List getByNoticeId(@Param("noticeId") String noticeId); + List getByNoticeId(@Param("noticeId") String noticeId); /** * @Author sun * @Description 查询当前人员是否存在对通知已读未读数据 **/ - NoticeReafdRecordEntity selectByNoticeId(@Param("noticeId") String noticeId, @Param("userId") String userId); + NoticeReadRecordEntity selectByNoticeId(@Param("noticeId") String noticeId, @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/notice/entity/NoticeReafdRecordEntity.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/entity/NoticeReadRecordEntity.java similarity index 96% rename from epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/entity/NoticeReafdRecordEntity.java rename to epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/entity/NoticeReadRecordEntity.java index e9a63804a1..0f1498b243 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/entity/NoticeReafdRecordEntity.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/entity/NoticeReadRecordEntity.java @@ -34,7 +34,7 @@ import java.util.Date; @Data @EqualsAndHashCode(callSuper=false) @TableName("notice_reafd_record") -public class NoticeReafdRecordEntity extends BaseEpmetEntity { +public class NoticeReadRecordEntity extends BaseEpmetEntity { private static final long serialVersionUID = 1L; diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/excel/NoticeReafdRecordExcel.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/excel/NoticeReadRecordExcel.java similarity index 97% rename from epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/excel/NoticeReafdRecordExcel.java rename to epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/excel/NoticeReadRecordExcel.java index 8f005770cd..3f58dbdef8 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/excel/NoticeReafdRecordExcel.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/excel/NoticeReadRecordExcel.java @@ -29,7 +29,7 @@ import java.util.Date; * @since v1.0.0 2021-04-19 */ @Data -public class NoticeReafdRecordExcel { +public class NoticeReadRecordExcel { @Excel(name = "主键") private String id; diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/redis/NoticeReafdRecordRedis.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/redis/NoticeReadRecordRedis.java similarity index 96% rename from epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/redis/NoticeReafdRecordRedis.java rename to epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/redis/NoticeReadRecordRedis.java index dc20469216..c45eff7e15 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/redis/NoticeReafdRecordRedis.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/redis/NoticeReadRecordRedis.java @@ -28,7 +28,7 @@ import org.springframework.stereotype.Component; * @since v1.0.0 2021-04-19 */ @Component -public class NoticeReafdRecordRedis { +public class NoticeReadRecordRedis { @Autowired private RedisUtils redisUtils; diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeReafdRecordService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeReadRecordService.java similarity index 84% rename from epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeReafdRecordService.java rename to epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeReadRecordService.java index 77e2ca9419..f4d048055f 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeReafdRecordService.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeReadRecordService.java @@ -20,8 +20,8 @@ package com.epmet.modules.notice.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; -import com.epmet.modules.notice.entity.NoticeReafdRecordEntity; -import com.epmet.resi.group.dto.notice.NoticeReafdRecordDTO; +import com.epmet.modules.notice.entity.NoticeReadRecordEntity; +import com.epmet.resi.group.dto.notice.NoticeReadRecordDTO; import com.epmet.resi.group.dto.notice.form.NoticeReadListFormDTO; import com.epmet.resi.group.dto.notice.form.ReadTypeFormDTO; import com.epmet.resi.group.dto.notice.result.NoticeReadListResultDTO; @@ -35,7 +35,7 @@ import java.util.Map; * @author generator generator@elink-cn.com * @since v1.0.0 2021-04-19 */ -public interface NoticeReafdRecordService extends BaseService { +public interface NoticeReadRecordService extends BaseService { /** * 默认分页 @@ -45,7 +45,7 @@ public interface NoticeReafdRecordService extends BaseService page(Map params); + PageData page(Map params); /** * 默认查询 @@ -55,7 +55,7 @@ public interface NoticeReafdRecordService extends BaseService list(Map params); + List list(Map params); /** * 单条查询 @@ -65,7 +65,7 @@ public interface NoticeReafdRecordService extends BaseService implements NoticeReafdRecordService { +public class NoticeReadRecordServiceImpl extends BaseServiceImpl implements NoticeReadRecordService { @Autowired - private NoticeReafdRecordRedis noticeReafdRecordRedis; + private NoticeReadRecordRedis noticeReafdRecordRedis; @Autowired private EpmetUserOpenFeignClient epmetUserOpenFeignClient; @Autowired private NoticeDao noticeDao; @Override - public PageData page(Map params) { - IPage page = baseDao.selectPage( + public PageData page(Map params) { + IPage page = baseDao.selectPage( getPage(params, FieldConstant.CREATED_TIME, false), getWrapper(params) ); - return getPageData(page, NoticeReafdRecordDTO.class); + return getPageData(page, NoticeReadRecordDTO.class); } @Override - public List list(Map params) { - List entityList = baseDao.selectList(getWrapper(params)); + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); - return ConvertUtils.sourceToTarget(entityList, NoticeReafdRecordDTO.class); + return ConvertUtils.sourceToTarget(entityList, NoticeReadRecordDTO.class); } - private QueryWrapper getWrapper(Map params){ + private QueryWrapper getWrapper(Map params){ String id = (String)params.get(FieldConstant.ID_HUMP); - QueryWrapper wrapper = new QueryWrapper<>(); + QueryWrapper wrapper = new QueryWrapper<>(); wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); return wrapper; } @Override - public NoticeReafdRecordDTO get(String id) { - NoticeReafdRecordEntity entity = baseDao.selectById(id); - return ConvertUtils.sourceToTarget(entity, NoticeReafdRecordDTO.class); + public NoticeReadRecordDTO get(String id) { + NoticeReadRecordEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, NoticeReadRecordDTO.class); } @Override @Transactional(rollbackFor = Exception.class) - public void save(NoticeReafdRecordDTO dto) { - NoticeReafdRecordEntity entity = ConvertUtils.sourceToTarget(dto, NoticeReafdRecordEntity.class); + public void save(NoticeReadRecordDTO dto) { + NoticeReadRecordEntity entity = ConvertUtils.sourceToTarget(dto, NoticeReadRecordEntity.class); insert(entity); } @Override @Transactional(rollbackFor = Exception.class) - public void update(NoticeReafdRecordDTO dto) { - NoticeReafdRecordEntity entity = ConvertUtils.sourceToTarget(dto, NoticeReafdRecordEntity.class); + public void update(NoticeReadRecordDTO dto) { + NoticeReadRecordEntity entity = ConvertUtils.sourceToTarget(dto, NoticeReadRecordEntity.class); updateById(entity); } @@ -133,10 +133,10 @@ public class NoticeReafdRecordServiceImpl extends BaseServiceImpl list = baseDao.getByNoticeId(formDTO.getNoticeId()); + List list = baseDao.getByNoticeId(formDTO.getNoticeId()); //2.调用user服务,查询人员基础数据 - List userIdList = list.stream().map(NoticeReafdRecordDTO::getUserId).collect(Collectors.toList()); + List userIdList = list.stream().map(NoticeReadRecordDTO::getUserId).collect(Collectors.toList()); Result> result = epmetUserOpenFeignClient.queryUserBaseInfo(userIdList); if (!result.success()){ throw new RenException("调用user服务,获取用户基础数据失败"); @@ -185,14 +185,14 @@ public class NoticeReafdRecordServiceImpl extends BaseServiceImpl @Autowired private NoticeAttachmentDao noticeAttachmentDao; @Autowired - private NoticeReafdRecordService noticeReafdRecordService; + private NoticeReadRecordService noticeReafdRecordService; @Autowired - private NoticeReafdRecordDao noticeReafdRecordDao; + private NoticeReadRecordDao noticeReafdRecordDao; @Override @@ -273,9 +272,9 @@ public class NoticeServiceImpl extends BaseServiceImpl } //6.通知已读未读表初始数据 - List reafdRecordList = new ArrayList<>(); + List reafdRecordList = new ArrayList<>(); memberList.forEach(m -> { - NoticeReafdRecordEntity reafdRecord = new NoticeReafdRecordEntity(); + NoticeReadRecordEntity reafdRecord = new NoticeReadRecordEntity(); reafdRecord.setCustomerId(resultDTO.getCustomerId()); reafdRecord.setGridId(groupEntity.getGridId()); reafdRecord.setGroupId(formDTO.getGroupId()); @@ -394,9 +393,9 @@ public class NoticeServiceImpl extends BaseServiceImpl //6.通知已读未读消息表数据先删后增 noticeReafdRecordDao.delByNoticeId(formDTO.getNoticeId()); - List reafdRecordList = new ArrayList<>(); + List reafdRecordList = new ArrayList<>(); memberList.forEach(m -> { - NoticeReafdRecordEntity reafdRecord = new NoticeReafdRecordEntity(); + NoticeReadRecordEntity reafdRecord = new NoticeReadRecordEntity(); reafdRecord.setCustomerId(entity.getCustomerId()); reafdRecord.setGridId(entity.getGridId()); reafdRecord.setGroupId(entity.getGroupId()); diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupSetupDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupSetupDao.xml new file mode 100644 index 0000000000..0c883e6bff --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupSetupDao.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/notice/NoticeReafdRecordDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/notice/NoticeReadRecordDao.xml similarity index 83% rename from epmet-module/resi-group/resi-group-server/src/main/resources/mapper/notice/NoticeReafdRecordDao.xml rename to epmet-module/resi-group/resi-group-server/src/main/resources/mapper/notice/NoticeReadRecordDao.xml index 935db4d0a8..74b99c2e1b 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/notice/NoticeReafdRecordDao.xml +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/notice/NoticeReadRecordDao.xml @@ -1,9 +1,9 @@ - + - SELECT * FROM @@ -13,7 +13,7 @@ AND notice_id = #{noticeId} - SELECT * FROM From 3e6edb6b9663daf68e280d67b30f4b0c6b2862e8 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 20 Apr 2021 17:45:19 +0800 Subject: [PATCH 037/202] act_read_record:read=>read_flag --- .../epmet/resi/group/dto/act/ActReadRecordDTO.java | 2 +- .../modules/act/entity/ActReadRecordEntity.java | 2 +- .../act/service/impl/GroupActInfoServiceImpl.java | 12 +++++++----- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActReadRecordDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActReadRecordDTO.java index b1040693b0..c9350d4716 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActReadRecordDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActReadRecordDTO.java @@ -62,7 +62,7 @@ public class ActReadRecordDTO implements Serializable { /** * 已读: read未读:un_read;查看活动详情后修改此表,或者插入一条新的已读记录 */ - private String read; + private String readFlag; /** * 用户id diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActReadRecordEntity.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActReadRecordEntity.java index 561a3d760a..4ffe1d4c5f 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActReadRecordEntity.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActReadRecordEntity.java @@ -58,7 +58,7 @@ public class ActReadRecordEntity extends BaseEpmetEntity { /** * 已读: read未读:un_read;查看活动详情后修改此表,或者插入一条新的已读记录 */ - private String read; + private String readFlag; /** * 用户id 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 6276e1ab89..8fa5bfecd6 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 @@ -175,7 +175,7 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl已读 - actReadRecordEntity.setRead(GroupActConstant.READ); + actReadRecordEntity.setReadFlag(GroupActConstant.READ); actReadRecordEntity.setUpdatedTime(new Date()); actReadRecordDao.updateById(actReadRecordEntity); } @@ -505,7 +506,7 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl Date: Tue, 20 Apr 2021 17:56:07 +0800 Subject: [PATCH 038/202] =?UTF-8?q?=E5=88=9B=E5=BB=BA=E5=B0=8F=E7=BB=84?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E7=BB=84=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../group/result/GroupTypeListResultDTO.java | 40 +++++++++++++++++++ .../controller/ResiGroupSetupController.java | 18 +++++++++ .../modules/group/dao/ResiGroupSetupDao.java | 11 ++++- .../group/service/ResiGroupSetupService.java | 7 ++++ .../impl/ResiGroupSetupServiceImpl.java | 30 ++++++++++++++ .../mapper/group/ResiGroupSetupDao.xml | 14 ++++++- 6 files changed, 118 insertions(+), 2 deletions(-) create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/GroupTypeListResultDTO.java diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/GroupTypeListResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/GroupTypeListResultDTO.java new file mode 100644 index 0000000000..89eeabd549 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/GroupTypeListResultDTO.java @@ -0,0 +1,40 @@ +package com.epmet.resi.group.dto.group.result; + +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.List; + +@Data +public class GroupTypeListResultDTO { + + /** + * 专用小组 + */ + private List dedicatedGroup; + /** + * 常用小组 + */ + private List commonUsedGroup; + + @NoArgsConstructor + @Data + public static class SetUp { + /** + * 小组类型(ordinary:楼院小组 branch:支部小组) + */ + private String groupType; + /** + * 默认头像地址 + */ + private String defaultGroupHead; + /** + * 小组介绍 + */ + private String introduction; + /** + * 小组名称 + */ + private String groupTypeName; + } +} diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/ResiGroupSetupController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/ResiGroupSetupController.java index 6f21b623e3..c50cc57817 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/ResiGroupSetupController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/ResiGroupSetupController.java @@ -17,8 +17,17 @@ package com.epmet.modules.group.controller; +import com.epmet.commons.tools.annotation.LoginUser; +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.ResiGroupSetupService; +import com.epmet.resi.group.dto.group.result.GroupTypeListResultDTO; +import com.epmet.resi.group.dto.notice.form.NoticeDetailFormDTO; +import com.epmet.resi.group.dto.notice.result.NoticeDetailResultDTO; 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; @@ -37,4 +46,13 @@ public class ResiGroupSetupController { private ResiGroupSetupService resiGroupSetupService; + /** + * @Author sun + * @Description 创建小组选择组类型 + **/ + @PostMapping(value = "grouptypelist") + public Result groupTypeList(@LoginUser TokenDto tokenDto){ + return new Result().ok(resiGroupSetupService.groupTypeList()); + } + } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/dao/ResiGroupSetupDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/dao/ResiGroupSetupDao.java index 1efca98aa2..02ac20d1e8 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/dao/ResiGroupSetupDao.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/dao/ResiGroupSetupDao.java @@ -19,7 +19,11 @@ package com.epmet.modules.group.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.modules.group.entity.ResiGroupSetupEntity; +import com.epmet.resi.group.dto.group.result.GroupTypeListResultDTO; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 建组设置 @@ -29,5 +33,10 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface ResiGroupSetupDao extends BaseDao { - + + /** + * @Author sun + * @Description 创建小组选择组类型 + **/ + List selectGroupList(@Param("customerId") String customerId); } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/ResiGroupSetupService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/ResiGroupSetupService.java index 180466d9ea..ac384d3ec0 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/ResiGroupSetupService.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/ResiGroupSetupService.java @@ -19,6 +19,7 @@ package com.epmet.modules.group.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.modules.group.entity.ResiGroupSetupEntity; +import com.epmet.resi.group.dto.group.result.GroupTypeListResultDTO; /** * 建组设置 @@ -28,4 +29,10 @@ import com.epmet.modules.group.entity.ResiGroupSetupEntity; */ public interface ResiGroupSetupService extends BaseService { + + /** + * @Author sun + * @Description 创建小组选择组类型 + **/ + GroupTypeListResultDTO groupTypeList(); } \ 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/ResiGroupSetupServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupSetupServiceImpl.java index 79ca65f419..b614daf3db 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupSetupServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupSetupServiceImpl.java @@ -22,9 +22,13 @@ import com.epmet.modules.group.dao.ResiGroupSetupDao; import com.epmet.modules.group.entity.ResiGroupSetupEntity; import com.epmet.modules.group.redis.ResiGroupSetupRedis; import com.epmet.modules.group.service.ResiGroupSetupService; +import com.epmet.resi.group.dto.group.result.GroupTypeListResultDTO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.util.ArrayList; +import java.util.List; + /** * 建组设置 * @@ -37,4 +41,30 @@ public class ResiGroupSetupServiceImpl extends BaseServiceImpl dedicatedGroup = new ArrayList<>(); + List commonUsedGroup = new ArrayList<>(); + + //初期所有客户共用一套建组设置,客户Id为default,后边可以根据token用户所属客户查询 + List list = baseDao.selectGroupList("default"); + list.forEach(l -> { + if ("ordinary".equals(l.getGroupType())) { + commonUsedGroup.add(l); + } else if ("branch".equals(l.getGroupType())) { + dedicatedGroup.add(l); + } + }); + + resultDTO.setCommonUsedGroup(commonUsedGroup); + resultDTO.setDedicatedGroup(dedicatedGroup); + + return resultDTO; + } } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupSetupDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupSetupDao.xml index 0c883e6bff..edbedc2b35 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupSetupDao.xml +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupSetupDao.xml @@ -1,7 +1,19 @@ - + + \ No newline at end of file From 652918b778f10ee4636b1de294b73c312e652f5b Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 20 Apr 2021 21:54:15 +0800 Subject: [PATCH 039/202] =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E8=AF=84=E8=AE=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/act/controller/ActCommentController.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/ActCommentController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/ActCommentController.java index eff2910608..95d7d16a99 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/ActCommentController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/ActCommentController.java @@ -17,7 +17,6 @@ package com.epmet.modules.act.controller; -import com.baomidou.mybatisplus.extension.api.R; import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; @@ -27,10 +26,7 @@ import com.epmet.resi.group.dto.act.form.CommentFormDTO; import com.epmet.resi.group.dto.act.form.CommentQueryFormDTO; import com.epmet.resi.group.dto.act.result.CommentResultDTO; 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; +import org.springframework.web.bind.annotation.*; import java.util.List; @@ -59,7 +55,7 @@ public class ActCommentController { @PostMapping("submit") public Result submitComment(@LoginUser TokenDto tokenDto, @RequestBody CommentFormDTO formDTO) { formDTO.setUserId(tokenDto.getUserId()); - formDTO.setCommentContent(tokenDto.getCustomerId()); + formDTO.setCustomerId(tokenDto.getCustomerId()); ValidatorUtils.validateEntity(formDTO,CommentFormDTO.AddUserShowGroup.class,CommentFormDTO.AddUserInternalGroup.class); actCommentService.submitComment(formDTO); return new Result(); From ef7552f624c0bf17c481c37036d80481424ae5b1 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 20 Apr 2021 22:22:32 +0800 Subject: [PATCH 040/202] =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E7=AD=BE=E5=88=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/ActSignInRecordServiceImpl.java | 31 +++++++++++++------ 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSignInRecordServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSignInRecordServiceImpl.java index 0794f097c4..af9d938dfd 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSignInRecordServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSignInRecordServiceImpl.java @@ -154,22 +154,33 @@ public class ActSignInRecordServiceImpl extends BaseServiceImpl signInEndTime) { - //未签到、已经超过了签到时间 - throw new RenException(EpmetErrorCode.SIGN_IN_TIME_PASSED.getCode(),EpmetErrorCode.SIGN_IN_TIME_PASSED.getMsg()); + + if (null == originalActInfo.getSignInStartTime() || null == originalActInfo.getSignInEndTime()) { + log.warn("并未设置签到开始、截止时间"); + throw new RenException(EpmetErrorCode.SIGN_IN_TIME_NOT_START.getCode(), EpmetErrorCode.SIGN_IN_TIME_NOT_START.getMsg()); + } + + if (null != originalActInfo.getSignInStartTime() && null != originalActInfo.getSignInEndTime()) { + Date nowDate=new Date(); + long nowTime=nowDate.getTime(); + long signInStartTime=originalActInfo.getSignInStartTime().getTime(); + long signInEndTime=originalActInfo.getSignInEndTime().getTime(); + if (nowTime < signInStartTime) { + //未到签到时间 + throw new RenException(EpmetErrorCode.SIGN_IN_TIME_NOT_START.getCode(),EpmetErrorCode.SIGN_IN_TIME_NOT_START.getMsg()); + } else if (nowTime > signInEndTime) { + //未签到、已经超过了签到时间 + throw new RenException(EpmetErrorCode.SIGN_IN_TIME_PASSED.getCode(),EpmetErrorCode.SIGN_IN_TIME_PASSED.getMsg()); + } } //未签到、在签到时间范围内的,可以签到 From 08116413d8ee920bd019308732bfa121e1d9b8d3 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 20 Apr 2021 22:33:46 +0800 Subject: [PATCH 041/202] setSignTime --- .../modules/act/service/impl/ActSignInRecordServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSignInRecordServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSignInRecordServiceImpl.java index af9d938dfd..e9487dfd6f 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSignInRecordServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSignInRecordServiceImpl.java @@ -109,7 +109,7 @@ public class ActSignInRecordServiceImpl extends BaseServiceImpl Date: Tue, 20 Apr 2021 22:38:22 +0800 Subject: [PATCH 042/202] querySignRecList --- .../modules/act/service/impl/ActSignInRecordServiceImpl.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSignInRecordServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSignInRecordServiceImpl.java index e9487dfd6f..3d6beb6863 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSignInRecordServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSignInRecordServiceImpl.java @@ -210,6 +210,7 @@ public class ActSignInRecordServiceImpl extends BaseServiceImpl()); List list = baseDao.selectListByGroupActId(formDTO.getGroupActId()); if (!CollectionUtils.isEmpty(list)) { //2.调用user服务,查询人员基础数据 @@ -229,6 +230,7 @@ public class ActSignInRecordServiceImpl extends BaseServiceImpl Date: Tue, 20 Apr 2021 22:51:19 +0800 Subject: [PATCH 043/202] signIn --- .../com/epmet/modules/act/dao/ActSignInRecordDao.java | 9 +++++++++ .../act/service/impl/ActSignInRecordServiceImpl.java | 5 ++++- .../main/resources/mapper/act/ActSignInRecordDao.xml | 11 +++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActSignInRecordDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActSignInRecordDao.java index 6e53fe6bef..bbc4f5fd8d 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActSignInRecordDao.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActSignInRecordDao.java @@ -49,4 +49,13 @@ public interface ActSignInRecordDao extends BaseDao { * @return int */ List selectListByGroupActId(String groupActId); + + /** + * 查询当前用户签到记录 + * + * @param groupActId + * @param signUserId + * @return com.epmet.modules.act.entity.ActSignInRecordEntity + */ + ActSignInRecordEntity queryActSignInRecord(@Param("groupActId") String groupActId, @Param("signUserId")String signUserId); } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSignInRecordServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSignInRecordServiceImpl.java index 3d6beb6863..956fbe0162 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSignInRecordServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSignInRecordServiceImpl.java @@ -149,8 +149,11 @@ public class ActSignInRecordServiceImpl extends BaseServiceImpl + + \ No newline at end of file From 40d7f3932cc6a108cc036e06503a9e8c67d7215c Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 20 Apr 2021 22:53:01 +0800 Subject: [PATCH 044/202] =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E8=BF=94=E5=8F=82=E5=A2=9E=E5=8A=A0signedInNum?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/resi/group/dto/act/result/ActDetailResultDTO.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/ActDetailResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/ActDetailResultDTO.java index 37507b4009..f75226e850 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/ActDetailResultDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/ActDetailResultDTO.java @@ -146,4 +146,8 @@ public class ActDetailResultDTO implements Serializable { */ private Boolean startTimeEditFlag; + /** + * 已签到人数(有人签到自动+1) + */ + private Integer signedInNum; } From 7561788e377b8e67ad35c5efd3201e8d1bee083b Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 20 Apr 2021 22:54:56 +0800 Subject: [PATCH 045/202] =?UTF-8?q?=E5=8F=91=E5=B8=83=E6=B4=BB=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/modules/act/service/impl/GroupActInfoServiceImpl.java | 2 ++ 1 file changed, 2 insertions(+) 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 8fa5bfecd6..87629fc787 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 @@ -343,6 +343,7 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl Date: Tue, 20 Apr 2021 23:04:51 +0800 Subject: [PATCH 046/202] =?UTF-8?q?=E5=8F=96=E6=B6=88=E6=B4=BB=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/modules/act/service/impl/GroupActInfoServiceImpl.java | 1 + 1 file changed, 1 insertion(+) 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 87629fc787..af698fe6ec 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 @@ -586,6 +586,7 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl Date: Tue, 20 Apr 2021 23:16:25 +0800 Subject: [PATCH 047/202] =?UTF-8?q?=E4=BF=AE=E6=94=B98909=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E7=A0=81=E6=8F=8F=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/commons/tools/exception/EpmetErrorCode.java | 2 +- .../modules/act/service/impl/ActSignInRecordServiceImpl.java | 4 ++-- .../modules/act/service/impl/GroupActInfoServiceImpl.java | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java index 90ed153985..58b2520023 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java @@ -169,7 +169,7 @@ public enum EpmetErrorCode { PARTY_MEMBER_CREATE_BRANCH_GROUP(8906,"您不是党员,不能创建支部小组"), NOT_IN_GROUP_CAN_NOT_VIEW(8907,"当前内容仅允许组内成员查看"), PARTY_MEMBER_JOIN_BRANCH_GROUP(8908,"您不是党员,不能加入支部小组"), - GROUP_ACT_CAN_NOT_CANCEL(8909,"活动%s,不能取消"), + GROUP_ACT_CAN_NOT_CANCEL(8909,"当前活动已关闭或已取消"), //8910的msg动态赋值 GROUP_ACT_CAN_NOT_COMMENT(8910,"当前活动,不能评论"), SIGN_IN_TIME_NOT_START(8911,"未到签到时间,不允许签到"), diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSignInRecordServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSignInRecordServiceImpl.java index 956fbe0162..e1576ce255 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSignInRecordServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSignInRecordServiceImpl.java @@ -162,9 +162,9 @@ public class ActSignInRecordServiceImpl extends BaseServiceImpl Date: Wed, 21 Apr 2021 09:29:50 +0800 Subject: [PATCH 048/202] =?UTF-8?q?=E9=80=9A=E7=9F=A5=20READ=5FFLAG?= =?UTF-8?q?=E6=9C=AA=E8=AF=BB=E7=8A=B6=E6=80=81=20=E7=94=B1unread=20?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=20un=5Fread?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/resi/group/dto/notice/NoticeReadRecordDTO.java | 2 +- .../epmet/modules/notice/entity/NoticeReadRecordEntity.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/NoticeReadRecordDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/NoticeReadRecordDTO.java index a93531c096..45924b2e41 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/NoticeReadRecordDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/NoticeReadRecordDTO.java @@ -64,7 +64,7 @@ public class NoticeReadRecordDTO implements Serializable { private String userId; /** - * read已读、unread未读 + * read已读、un_read未读 */ private String readFlag; diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/entity/NoticeReadRecordEntity.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/entity/NoticeReadRecordEntity.java index 0f1498b243..b22a06c2cc 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/entity/NoticeReadRecordEntity.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/entity/NoticeReadRecordEntity.java @@ -33,7 +33,7 @@ import java.util.Date; */ @Data @EqualsAndHashCode(callSuper=false) -@TableName("notice_reafd_record") +@TableName("notice_read_record") public class NoticeReadRecordEntity extends BaseEpmetEntity { private static final long serialVersionUID = 1L; @@ -64,7 +64,7 @@ public class NoticeReadRecordEntity extends BaseEpmetEntity { private String userId; /** - * read已读、unread未读 + * read已读、un_read未读 */ private String readFlag; From f56b653318db65f981c071c0c86cfc33ef9001fc Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 21 Apr 2021 09:53:17 +0800 Subject: [PATCH 049/202] =?UTF-8?q?=E9=80=9A=E7=9F=A5=E3=80=81=E6=B4=BB?= =?UTF-8?q?=E5=8A=A8=E5=88=86=E4=BA=ABId=E6=9F=A5=E8=AF=A2=E6=95=B0?= =?UTF-8?q?=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../invitation/form/GetInvitationFormDTO.java | 21 ++++++++++ .../result/GetInvitationResultDTO.java | 40 +++++++++++++++++++ .../InvitationRecordController.java | 14 +++++++ .../service/InvitationRecordService.java | 10 +++++ .../impl/InvitationRecordServiceImpl.java | 22 ++++++++++ 5 files changed, 107 insertions(+) create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/invitation/form/GetInvitationFormDTO.java create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/invitation/result/GetInvitationResultDTO.java diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/invitation/form/GetInvitationFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/invitation/form/GetInvitationFormDTO.java new file mode 100644 index 0000000000..7b6975eb89 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/invitation/form/GetInvitationFormDTO.java @@ -0,0 +1,21 @@ +package com.epmet.resi.group.dto.invitation.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; + +/** + * @Author sun + * @Description 通知、活动分享Id查询数据-接口入参 + */ +@Data +public class GetInvitationFormDTO { + + /** + * 分享Id + */ + @NotBlank(message = "分享Id不能为空",groups = {GetInvitationFormDTO.Invitation.class}) + private String invitationRecordId; + + public interface Invitation{} +} diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/invitation/result/GetInvitationResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/invitation/result/GetInvitationResultDTO.java new file mode 100644 index 0000000000..24f2a708f2 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/invitation/result/GetInvitationResultDTO.java @@ -0,0 +1,40 @@ +package com.epmet.resi.group.dto.invitation.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author sun + * @Description 通知、活动分享Id查询数据-接口返参 + */ +@Data +public class GetInvitationResultDTO implements Serializable { + private static final long serialVersionUID = 6136787210623326830L; + + /** + * 客户Id + */ + private String customerId; + /** + * 网格Id + */ + private String gridId; + /** + * 小组Id + */ + private String groupId; + /** + * 通知或活动Id + */ + private String sourceId; + /** + * notice:通知 act:活动 + */ + private String sourceType; + /** + * notice:通知 act:活动 + */ + private String shareUserId; + +} diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/controller/InvitationRecordController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/controller/InvitationRecordController.java index c6d6cc9392..73579acfaf 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/controller/InvitationRecordController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/controller/InvitationRecordController.java @@ -24,6 +24,8 @@ import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.modules.invitation.service.InvitationRecordService; import com.epmet.resi.group.dto.invitation.form.ShareFormDTO; import com.epmet.resi.group.dto.invitation.result.ShareResultDTO; +import com.epmet.resi.group.dto.invitation.form.GetInvitationFormDTO; +import com.epmet.resi.group.dto.invitation.result.GetInvitationResultDTO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -58,4 +60,16 @@ public class InvitationRecordController { return new Result().ok(invitationRecordService.share(formDTO)); } + /** + * @param formDTO + * @return + * @Author sun + * @Description 通知、活动分享Id查询数据 + **/ + @PostMapping(value = "getinvitation") + public Result getInvitation(@RequestBody GetInvitationFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, GetInvitationFormDTO.Invitation.class); + return new Result().ok(invitationRecordService.getInvitation(formDTO)); + } + } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/service/InvitationRecordService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/service/InvitationRecordService.java index 4373554965..21ccf3580a 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/service/InvitationRecordService.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/service/InvitationRecordService.java @@ -19,7 +19,9 @@ package com.epmet.modules.invitation.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.modules.invitation.entity.InvitationRecordEntity; +import com.epmet.resi.group.dto.invitation.form.GetInvitationFormDTO; import com.epmet.resi.group.dto.invitation.form.ShareFormDTO; +import com.epmet.resi.group.dto.invitation.result.GetInvitationResultDTO; import com.epmet.resi.group.dto.invitation.result.ShareResultDTO; /** @@ -37,4 +39,12 @@ public interface InvitationRecordService extends BaseService", formDTO.getInvitationRecordId())); + } + GetInvitationResultDTO resultDTO = ConvertUtils.sourceToTarget(entity, GetInvitationResultDTO.class); + return resultDTO; + } } \ No newline at end of file From ee8ade4700bb033c570cb280db1b701b945933e8 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 21 Apr 2021 10:12:24 +0800 Subject: [PATCH 050/202] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/invitation/form/ShareFormDTO.java | 4 +- .../dto/notice/form/AddNoticeFormDTO.java | 10 ++-- .../dto/notice/form/EditNoticeFormDTO.java | 6 +- .../dto/notice/form/NoticeCommentFormDTO.java | 6 +- .../InvitationRecordController.java | 2 +- .../controller/NoticeCommentController.java | 43 +------------ .../notice/controller/NoticeController.java | 40 +------------ .../NoticeReadRecordController.java | 42 ------------- .../notice/service/NoticeCommentService.java | 60 ------------------- .../service/NoticeReadRecordService.java | 60 ------------------- .../modules/notice/service/NoticeService.java | 50 ---------------- .../impl/NoticeCommentServiceImpl.java | 52 ---------------- .../impl/NoticeReadRecordServiceImpl.java | 51 ---------------- .../service/impl/NoticeServiceImpl.java | 46 -------------- 14 files changed, 21 insertions(+), 451 deletions(-) diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/invitation/form/ShareFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/invitation/form/ShareFormDTO.java index 879ac465ac..efb075a0b0 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/invitation/form/ShareFormDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/invitation/form/ShareFormDTO.java @@ -1,5 +1,6 @@ package com.epmet.resi.group.dto.invitation.form; +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; import lombok.Data; import javax.validation.constraints.NotBlank; @@ -20,7 +21,7 @@ public class ShareFormDTO implements Serializable { /** * 类型(notice:通知 act:活动) */ - @NotBlank(message = "类型(notice:通知 act:活动)不能为空",groups = {ShareFormDTO.Add.class}) + @NotBlank(message = "类型(notice:通知 act:活动)不能为空",groups = {ShareFormDTO.UserShow.class}) private String type; /** * token中用户Id @@ -28,4 +29,5 @@ public class ShareFormDTO implements Serializable { private String userId; public interface Add{} + public interface UserShow extends CustomerClientShowGroup {} } diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/AddNoticeFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/AddNoticeFormDTO.java index f83f802c6c..d9345790fe 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/AddNoticeFormDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/AddNoticeFormDTO.java @@ -1,5 +1,6 @@ package com.epmet.resi.group.dto.notice.form; +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; import com.epmet.resi.group.dto.topic.form.FileDTO; import lombok.Data; import org.hibernate.validator.constraints.Length; @@ -22,14 +23,14 @@ public class AddNoticeFormDTO { /** * 通知标题 */ - @NotBlank(message = "通知标题不能为空",groups = {AddNoticeFormDTO.Add.class}) - @Length(max = 20, message = "通知标题不能超过20个字符") + @NotBlank(message = "通知标题不能为空",groups = {AddNoticeFormDTO.AddUserShow.class}) + @Length(max = 20, message = "通知标题不能超过20个字符",groups = {AddNoticeFormDTO.AddUserShow.class}) private String title; /** * 通知内容 */ - @NotBlank(message = "通知内容不能为空",groups = {AddNoticeFormDTO.Add.class}) - @Length(max = 1000, message = "通知内容不能超过1000个字符") + @NotBlank(message = "通知内容不能为空",groups = {AddNoticeFormDTO.AddUserShow.class}) + @Length(max = 1000, message = "通知内容不能超过1000个字符",groups = {AddNoticeFormDTO.AddUserShow.class}) private String content; /** * 图片附件集合 @@ -41,4 +42,5 @@ public class AddNoticeFormDTO { private List docList; public interface Add{} + public interface AddUserShow extends CustomerClientShowGroup {} } diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/EditNoticeFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/EditNoticeFormDTO.java index 79dd421f7f..08573cae19 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/EditNoticeFormDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/EditNoticeFormDTO.java @@ -1,5 +1,6 @@ package com.epmet.resi.group.dto.notice.form; +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; import com.epmet.resi.group.dto.topic.form.FileDTO; import lombok.Data; import org.hibernate.validator.constraints.Length; @@ -22,12 +23,12 @@ public class EditNoticeFormDTO { /** * 通知标题 */ - @Length(max = 20, message = "通知标题不能超过20个字符") + @Length(max = 20, message = "通知标题不能超过20个字符",groups = {EditNoticeFormDTO.EditUserShow.class}) private String title; /** * 通知内容 */ - @Length(max = 1000, message = "通知内容不能超过1000个字符") + @Length(max = 1000, message = "通知内容不能超过1000个字符",groups = {EditNoticeFormDTO.EditUserShow.class}) private String content; /** * 图片附件集合 @@ -39,4 +40,5 @@ public class EditNoticeFormDTO { private List docList; public interface Edit{} + public interface EditUserShow extends CustomerClientShowGroup {} } diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/NoticeCommentFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/NoticeCommentFormDTO.java index b2f91f22f9..5fc28f52ef 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/NoticeCommentFormDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/NoticeCommentFormDTO.java @@ -1,5 +1,6 @@ package com.epmet.resi.group.dto.notice.form; +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; import lombok.Data; import org.hibernate.validator.constraints.Length; @@ -20,9 +21,10 @@ public class NoticeCommentFormDTO { /** * 评论内容300 */ - @NotBlank(message = "评论内容不能为空",groups = {NoticeCommentFormDTO.Comment.class}) - @Length(max = 20, message = "评论内容不能超过300个字符") + @NotBlank(message = "评论内容不能为空",groups = {NoticeCommentFormDTO.UserShow.class}) + @Length(max = 20, message = "评论内容不能超过300个字符",groups = {NoticeCommentFormDTO.UserShow.class}) private String commentContent; public interface Comment{} + public interface UserShow extends CustomerClientShowGroup {} } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/controller/InvitationRecordController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/controller/InvitationRecordController.java index 73579acfaf..05cd2d035a 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/controller/InvitationRecordController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/controller/InvitationRecordController.java @@ -55,7 +55,7 @@ public class InvitationRecordController { **/ @PostMapping(value = "share") public Result share(@LoginUser TokenDto tokenDto, @RequestBody ShareFormDTO formDTO){ - ValidatorUtils.validateEntity(formDTO, ShareFormDTO.Add.class); + ValidatorUtils.validateEntity(formDTO, ShareFormDTO.Add.class, ShareFormDTO.UserShow.class); formDTO.setUserId(tokenDto.getUserId()); return new Result().ok(invitationRecordService.share(formDTO)); } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeCommentController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeCommentController.java index f3972f4478..854f3c26a6 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeCommentController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeCommentController.java @@ -54,47 +54,6 @@ public class NoticeCommentController { @Autowired private NoticeCommentService noticeCommentService; - @GetMapping("page") - public Result> page(@RequestParam Map params){ - PageData page = noticeCommentService.page(params); - return new Result>().ok(page); - } - - @GetMapping("{id}") - public Result get(@PathVariable("id") String id){ - NoticeCommentDTO data = noticeCommentService.get(id); - return new Result().ok(data); - } - - @PostMapping - public Result save(@RequestBody NoticeCommentDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); - noticeCommentService.save(dto); - return new Result(); - } - - @PutMapping - public Result update(@RequestBody NoticeCommentDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); - noticeCommentService.update(dto); - return new Result(); - } - - @DeleteMapping - public Result delete(@RequestBody String[] ids){ - //效验数据 - AssertUtils.isArrayEmpty(ids, "id"); - noticeCommentService.delete(ids); - return new Result(); - } - - @GetMapping("export") - public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { - List list = noticeCommentService.list(params); - ExcelUtils.exportExcelToTarget(response, null, list, NoticeCommentExcel.class); - } /** * @param formDTO @@ -104,7 +63,7 @@ public class NoticeCommentController { **/ @PostMapping(value = "noticecomment") public Result noticeComment(@LoginUser TokenDto tokenDto, @RequestBody NoticeCommentFormDTO formDTO){ - ValidatorUtils.validateEntity(formDTO, NoticeCommentFormDTO.Comment.class); + ValidatorUtils.validateEntity(formDTO, NoticeCommentFormDTO.Comment.class, NoticeCommentFormDTO.UserShow.class); noticeCommentService.noticeComment(tokenDto, formDTO); return new Result(); } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeController.java index 339fd1e04a..02d6bf79ec 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeController.java @@ -55,48 +55,12 @@ public class NoticeController { @Autowired private NoticeService noticeService; - @GetMapping("page") - public Result> page(@RequestParam Map params){ - PageData page = noticeService.page(params); - return new Result>().ok(page); - } - @GetMapping("{id}") public Result get(@PathVariable("id") String id){ NoticeDTO data = noticeService.get(id); return new Result().ok(data); } - @PostMapping - public Result save(@RequestBody NoticeDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); - noticeService.save(dto); - return new Result(); - } - - @PutMapping - public Result update(@RequestBody NoticeDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); - noticeService.update(dto); - return new Result(); - } - - @DeleteMapping - public Result delete(@RequestBody String[] ids){ - //效验数据 - AssertUtils.isArrayEmpty(ids, "id"); - noticeService.delete(ids); - return new Result(); - } - - @GetMapping("export") - public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { - List list = noticeService.list(params); - ExcelUtils.exportExcelToTarget(response, null, list, NoticeExcel.class); - } - /** * @param formDTO * @return @@ -105,7 +69,7 @@ public class NoticeController { **/ @PostMapping(value = "add") public Result add(@LoginUser TokenDto tokenDto, @RequestBody AddNoticeFormDTO formDTO){ - ValidatorUtils.validateEntity(formDTO, AddNoticeFormDTO.Add.class); + ValidatorUtils.validateEntity(formDTO, AddNoticeFormDTO.Add.class, AddNoticeFormDTO.AddUserShow.class); noticeService.add(tokenDto, formDTO); return new Result(); } @@ -118,7 +82,7 @@ public class NoticeController { **/ @PostMapping(value = "edit") public Result edit(@LoginUser TokenDto tokenDto, @RequestBody EditNoticeFormDTO formDTO){ - ValidatorUtils.validateEntity(formDTO, EditNoticeFormDTO.Edit.class); + ValidatorUtils.validateEntity(formDTO, EditNoticeFormDTO.Edit.class, EditNoticeFormDTO.EditUserShow.class); noticeService.edit(tokenDto, formDTO); return new Result(); } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeReadRecordController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeReadRecordController.java index dd865bfdf8..ca1dcf86b2 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeReadRecordController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeReadRecordController.java @@ -54,48 +54,6 @@ public class NoticeReadRecordController { @Autowired private NoticeReadRecordService noticeReafdRecordService; - @GetMapping("page") - public Result> page(@RequestParam Map params){ - PageData page = noticeReafdRecordService.page(params); - return new Result>().ok(page); - } - - @GetMapping("{id}") - public Result get(@PathVariable("id") String id){ - NoticeReadRecordDTO data = noticeReafdRecordService.get(id); - return new Result().ok(data); - } - - @PostMapping - public Result save(@RequestBody NoticeReadRecordDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); - noticeReafdRecordService.save(dto); - return new Result(); - } - - @PutMapping - public Result update(@RequestBody NoticeReadRecordDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); - noticeReafdRecordService.update(dto); - return new Result(); - } - - @DeleteMapping - public Result delete(@RequestBody String[] ids){ - //效验数据 - AssertUtils.isArrayEmpty(ids, "id"); - noticeReafdRecordService.delete(ids); - return new Result(); - } - - @GetMapping("export") - public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { - List list = noticeReafdRecordService.list(params); - ExcelUtils.exportExcelToTarget(response, null, list, NoticeReadRecordExcel.class); - } - /** * @param formDTO * @return diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeCommentService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeCommentService.java index 50b3beaa9d..6e3a82690d 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeCommentService.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeCommentService.java @@ -37,66 +37,6 @@ import java.util.Map; */ public interface NoticeCommentService extends BaseService { - /** - * 默认分页 - * - * @param params - * @return PageData - * @author generator - * @date 2021-04-19 - */ - PageData page(Map params); - - /** - * 默认查询 - * - * @param params - * @return java.util.List - * @author generator - * @date 2021-04-19 - */ - List list(Map params); - - /** - * 单条查询 - * - * @param id - * @return NoticeCommentDTO - * @author generator - * @date 2021-04-19 - */ - NoticeCommentDTO get(String id); - - /** - * 默认保存 - * - * @param dto - * @return void - * @author generator - * @date 2021-04-19 - */ - void save(NoticeCommentDTO dto); - - /** - * 默认更新 - * - * @param dto - * @return void - * @author generator - * @date 2021-04-19 - */ - void update(NoticeCommentDTO dto); - - /** - * 批量删除 - * - * @param ids - * @return void - * @author generator - * @date 2021-04-19 - */ - void delete(String[] ids); - /** * @param formDTO * @return diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeReadRecordService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeReadRecordService.java index f4d048055f..17d41252c0 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeReadRecordService.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeReadRecordService.java @@ -37,66 +37,6 @@ import java.util.Map; */ public interface NoticeReadRecordService extends BaseService { - /** - * 默认分页 - * - * @param params - * @return PageData - * @author generator - * @date 2021-04-19 - */ - PageData page(Map params); - - /** - * 默认查询 - * - * @param params - * @return java.util.List - * @author generator - * @date 2021-04-19 - */ - List list(Map params); - - /** - * 单条查询 - * - * @param id - * @return NoticeReafdRecordDTO - * @author generator - * @date 2021-04-19 - */ - NoticeReadRecordDTO get(String id); - - /** - * 默认保存 - * - * @param dto - * @return void - * @author generator - * @date 2021-04-19 - */ - void save(NoticeReadRecordDTO dto); - - /** - * 默认更新 - * - * @param dto - * @return void - * @author generator - * @date 2021-04-19 - */ - void update(NoticeReadRecordDTO dto); - - /** - * 批量删除 - * - * @param ids - * @return void - * @author generator - * @date 2021-04-19 - */ - void delete(String[] ids); - /** * @param formDTO * @return diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeService.java index a10a82fb07..48db1b92d3 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeService.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeService.java @@ -38,26 +38,6 @@ import java.util.Map; */ public interface NoticeService extends BaseService { - /** - * 默认分页 - * - * @param params - * @return PageData - * @author generator - * @date 2021-04-19 - */ - PageData page(Map params); - - /** - * 默认查询 - * - * @param params - * @return java.util.List - * @author generator - * @date 2021-04-19 - */ - List list(Map params); - /** * 单条查询 * @@ -68,36 +48,6 @@ public interface NoticeService extends BaseService { */ NoticeDTO get(String id); - /** - * 默认保存 - * - * @param dto - * @return void - * @author generator - * @date 2021-04-19 - */ - void save(NoticeDTO dto); - - /** - * 默认更新 - * - * @param dto - * @return void - * @author generator - * @date 2021-04-19 - */ - void update(NoticeDTO dto); - - /** - * 批量删除 - * - * @param ids - * @return void - * @author generator - * @date 2021-04-19 - */ - void delete(String[] ids); - /** * @param formDTO * @return diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeCommentServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeCommentServiceImpl.java index f3b2671eb4..4bd79318c2 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeCommentServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeCommentServiceImpl.java @@ -84,58 +84,6 @@ public class NoticeCommentServiceImpl extends BaseServiceImpl page(Map params) { - IPage page = baseDao.selectPage( - getPage(params, FieldConstant.CREATED_TIME, false), - getWrapper(params) - ); - return getPageData(page, NoticeCommentDTO.class); - } - - @Override - public List list(Map params) { - List entityList = baseDao.selectList(getWrapper(params)); - - return ConvertUtils.sourceToTarget(entityList, NoticeCommentDTO.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 NoticeCommentDTO get(String id) { - NoticeCommentEntity entity = baseDao.selectById(id); - return ConvertUtils.sourceToTarget(entity, NoticeCommentDTO.class); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void save(NoticeCommentDTO dto) { - NoticeCommentEntity entity = ConvertUtils.sourceToTarget(dto, NoticeCommentEntity.class); - insert(entity); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void update(NoticeCommentDTO dto) { - NoticeCommentEntity entity = ConvertUtils.sourceToTarget(dto, NoticeCommentEntity.class); - updateById(entity); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void delete(String[] ids) { - // 逻辑删除(@TableLogic 注解) - baseDao.deleteBatchIds(Arrays.asList(ids)); - } - /** * @param formDTO * @return diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeReadRecordServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeReadRecordServiceImpl.java index ab5182fbbb..ad26bc805e 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeReadRecordServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeReadRecordServiceImpl.java @@ -66,57 +66,6 @@ public class NoticeReadRecordServiceImpl extends BaseServiceImpl page(Map params) { - IPage page = baseDao.selectPage( - getPage(params, FieldConstant.CREATED_TIME, false), - getWrapper(params) - ); - return getPageData(page, NoticeReadRecordDTO.class); - } - - @Override - public List list(Map params) { - List entityList = baseDao.selectList(getWrapper(params)); - - return ConvertUtils.sourceToTarget(entityList, NoticeReadRecordDTO.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 NoticeReadRecordDTO get(String id) { - NoticeReadRecordEntity entity = baseDao.selectById(id); - return ConvertUtils.sourceToTarget(entity, NoticeReadRecordDTO.class); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void save(NoticeReadRecordDTO dto) { - NoticeReadRecordEntity entity = ConvertUtils.sourceToTarget(dto, NoticeReadRecordEntity.class); - insert(entity); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void update(NoticeReadRecordDTO dto) { - NoticeReadRecordEntity entity = ConvertUtils.sourceToTarget(dto, NoticeReadRecordEntity.class); - updateById(entity); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void delete(String[] ids) { - // 逻辑删除(@TableLogic 注解) - baseDao.deleteBatchIds(Arrays.asList(ids)); - } /** * @param formDTO 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 50a2ef85a5..97ec4132f1 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 @@ -114,58 +114,12 @@ public class NoticeServiceImpl extends BaseServiceImpl private NoticeReadRecordDao noticeReafdRecordDao; - @Override - public PageData page(Map params) { - IPage page = baseDao.selectPage( - getPage(params, FieldConstant.CREATED_TIME, false), - getWrapper(params) - ); - return getPageData(page, NoticeDTO.class); - } - - @Override - public List list(Map params) { - List entityList = baseDao.selectList(getWrapper(params)); - - return ConvertUtils.sourceToTarget(entityList, NoticeDTO.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 NoticeDTO get(String id) { NoticeEntity entity = baseDao.selectById(id); return ConvertUtils.sourceToTarget(entity, NoticeDTO.class); } - @Override - @Transactional(rollbackFor = Exception.class) - public void save(NoticeDTO dto) { - NoticeEntity entity = ConvertUtils.sourceToTarget(dto, NoticeEntity.class); - insert(entity); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void update(NoticeDTO dto) { - NoticeEntity entity = ConvertUtils.sourceToTarget(dto, NoticeEntity.class); - updateById(entity); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void delete(String[] ids) { - // 逻辑删除(@TableLogic 注解) - baseDao.deleteBatchIds(Arrays.asList(ids)); - } - /** * @param formDTO * @return From cd107ec163f2728c95c980751005fc6caa7313b3 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 21 Apr 2021 11:12:27 +0800 Subject: [PATCH 051/202] =?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=E6=B4=BB=E5=8A=A8=EF=BC=8C?= =?UTF-8?q?=E5=8F=91=E9=80=81=E7=AB=99=E5=86=85=E4=BF=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/GroupActInfoServiceImpl.java | 76 ++++++++++++++++++- .../modules/constant/UserMessageConstant.java | 12 +++ 2 files changed, 84 insertions(+), 4 deletions(-) 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 1faac0e6ba..603fab0f8f 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 @@ -19,6 +19,7 @@ package com.epmet.modules.act.service.impl; import com.alibaba.fastjson.JSON; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.AppClientConstant; import com.epmet.commons.tools.constant.Constant; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.StrConstant; @@ -33,8 +34,11 @@ import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.DateUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.ScanContentUtils; +import com.epmet.constant.ReadFlagConstant; +import com.epmet.dto.form.UserMessageFormDTO; import com.epmet.dto.result.GridInfoResultDTO; 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.ActOperationRecordDao; @@ -49,6 +53,7 @@ import com.epmet.modules.act.service.ActCategoryDictService; import com.epmet.modules.act.service.ActSignInRecordService; 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.ResiGroupService; import com.epmet.modules.member.service.ResiGroupMemberService; import com.epmet.resi.group.dto.act.GroupActIdDTO; @@ -108,6 +113,9 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl contentList = constructText(groupActInfoEntity.getId(), formDTO.getCustomerId(), formDTO.getTextList()); List imgList = constructImg(groupActInfoEntity.getId(), formDTO.getCustomerId(), formDTO.getImgList()); + List memberDTOList=resiGroupMemberService.getMemberList(formDTO.getGroupId()); List readRecordEntityList=constructReadRec(groupActInfoEntity.getId(), formDTO.getCustomerId(), formDTO.getGroupId(), formDTO.getPublishUserId(), - groupDTO.getGridId()); + groupDTO.getGridId(), + memberDTOList); //2、插入活动内容 contentList.forEach(textContentEntity->{ groupActContentDao.insert(textContentEntity); @@ -163,14 +173,44 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl{ actReadRecordDao.insert(readRecordEntity); }); + //5、发送站内信 + sendMessage(memberDTOList,formDTO,groupActInfoEntity,groupDTO); result.setGroupActId(groupActInfoEntity.getId()); return result; } - private List constructReadRec(String groupActId, String customerId, String groupId,String publishUserId,String gridId) { + private void sendMessage(List memberDTOList, PublishGroupActFormDTO formDTO, GroupActInfoEntity groupActInfoEntity,ResiGroupDTO resiGroupDTO) { + + List list = new ArrayList<>(); + memberDTOList.forEach(memberDTO -> { + //不需要给当前操作人发送 + if (!formDTO.getPublishUserId().equals(memberDTO.getCustomerUserId())) { + UserMessageFormDTO userMessageFormDTO = new UserMessageFormDTO(); + userMessageFormDTO.setCustomerId(formDTO.getCustomerId()); + userMessageFormDTO.setUserId(memberDTO.getCustomerUserId()); + userMessageFormDTO.setGridId(resiGroupDTO.getGridId()); + userMessageFormDTO.setApp(AppClientConstant.APP_RESI); + userMessageFormDTO.setTitle(UserMessageConstant.GROUP_TITLE); + userMessageFormDTO.setReadFlag(ReadFlagConstant.UN_READ); + if(StringUtils.isNotBlank(formDTO.getGroupActId())){ + // 活动修改后,站内信通知全组成员“您有一条小组消息 【某某小组】更新了********活动详情,请查看。 + userMessageFormDTO.setMessageContent(String.format(UserMessageConstant.CHANGED_GROUP_ACT, resiGroupDTO.getGroupName(), groupActInfoEntity.getTitle())); + }else{ + // 活动发布,站内信通知全组成员“您有一条小组消息 【某某小组】发布了*******活动,请查看。 + userMessageFormDTO.setMessageContent(String.format(UserMessageConstant.PUBLISH_GROUP_ACT, resiGroupDTO.getGroupName(), groupActInfoEntity.getTitle())); + } + list.add(userMessageFormDTO); + } + }); + Result sendMessageRes = epmetMessageOpenFeignClient.saveUserMessageList(list); + if (!sendMessageRes.success()) { + log.warn("发布(编辑)组织活动,发送站内信异常"); + } + } + + private List constructReadRec(String groupActId, String customerId, String groupId,String publishUserId,String gridId,List memberDTOList) { List list=new ArrayList<>(); - List memberDTOList=resiGroupMemberService.getMemberList(groupId); memberDTOList.forEach(memberDTO->{ ActReadRecordEntity actReadRecordEntity=new ActReadRecordEntity(); actReadRecordEntity.setCustomerId(customerId); @@ -589,12 +629,40 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl memberDTOList = resiGroupMemberService.getMemberList(actInfoEntity.getGroupId()); + List list = new ArrayList<>(); + memberDTOList.forEach(memberDTO -> { + //不需要给当前操作人发送 + if (!currentUserId.equals(memberDTO.getCustomerUserId())) { + UserMessageFormDTO userMessageFormDTO = new UserMessageFormDTO(); + userMessageFormDTO.setCustomerId(actInfoEntity.getCustomerId()); + userMessageFormDTO.setUserId(memberDTO.getCustomerUserId()); + userMessageFormDTO.setGridId(actInfoEntity.getGridId()); + userMessageFormDTO.setApp(AppClientConstant.APP_RESI); + userMessageFormDTO.setTitle(UserMessageConstant.GROUP_TITLE); + userMessageFormDTO.setReadFlag(ReadFlagConstant.UN_READ); + userMessageFormDTO.setMessageContent(String.format(UserMessageConstant.CANCEL_GROUP_ACT, resiGroupDTO.getGroupName(), actInfoEntity.getTitle())); + list.add(userMessageFormDTO); + } + }); + Result sendMessageRes = epmetMessageOpenFeignClient.saveUserMessageList(list); + if (!sendMessageRes.success()) { + log.warn("发布(编辑)组织活动,发送站内信异常"); + } + } + } + /** * 查询活动主信息 * diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/constant/UserMessageConstant.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/constant/UserMessageConstant.java index 374e056117..86cb1a6ff2 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/constant/UserMessageConstant.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/constant/UserMessageConstant.java @@ -108,4 +108,16 @@ public interface UserMessageConstant { * 小组通知变更 * */ String GROUP_NOTICE_EDIT = "【%s】变更了%s通知,请查看。"; + + /** + * 【某某小组】更新了********活动详情,请查看。 + * */ + String CHANGED_GROUP_ACT="【%s】更新了%s活动详情,请查看。"; + + /** + * 【某某小组】发布了*******活动,请查看。 + * */ + String PUBLISH_GROUP_ACT="【%s】发布了%s活动,请查看。"; + + String CANCEL_GROUP_ACT="【%s】的%s活动已取消,请查看。"; } From e7eb348678c59e1f2268e5a2453fc6fdf0325d2d Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 21 Apr 2021 11:50:25 +0800 Subject: [PATCH 052/202] =?UTF-8?q?=E7=82=B9=E5=87=BB=E5=88=86=E4=BA=AB?= =?UTF-8?q?=E9=93=BE=E6=8E=A5=EF=BC=8C=E6=9F=A5=E7=9C=8B=E6=B4=BB=E5=8A=A8?= =?UTF-8?q?=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tools/exception/EpmetErrorCode.java | 4 +- .../dto/act/form/ActDetailByLinkFormDTO.java | 28 ++++++++++++++ .../act/result/ActDetailByLinkResultDTO.java | 14 +++++++ .../controller/GroupActInfoController.java | 22 +++++++++-- .../act/service/GroupActInfoService.java | 14 +++++-- .../service/impl/GroupActInfoServiceImpl.java | 38 +++++++++++++++++-- .../service/InvitationRecordService.java | 9 +++++ .../impl/InvitationRecordServiceImpl.java | 14 ++++++- 8 files changed, 128 insertions(+), 15 deletions(-) create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/ActDetailByLinkFormDTO.java create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/ActDetailByLinkResultDTO.java diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java index 58b2520023..b4787ed727 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java @@ -173,7 +173,9 @@ public enum EpmetErrorCode { //8910的msg动态赋值 GROUP_ACT_CAN_NOT_COMMENT(8910,"当前活动,不能评论"), SIGN_IN_TIME_NOT_START(8911,"未到签到时间,不允许签到"), - SIGN_IN_TIME_PASSED(8912,"当前时间已超过签到时间"); + SIGN_IN_TIME_PASSED(8912,"当前时间已超过签到时间"), + INVITATION_NOT_EXIST(8913,"链接不存在"); + private int code; private String msg; diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/ActDetailByLinkFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/ActDetailByLinkFormDTO.java new file mode 100644 index 0000000000..f3107d21ee --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/ActDetailByLinkFormDTO.java @@ -0,0 +1,28 @@ +package com.epmet.resi.group.dto.act.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * 015、点击分享链接,查看活动详情 + * + * @author yinzuomei@elink-cn.com + * @date 2021/4/21 11:14 + */ +@Data +public class ActDetailByLinkFormDTO implements Serializable { + private static final long serialVersionUID = 287086994875005175L; + + public interface AddUserInternalGroup { + } + @NotBlank(message = "invitationRecordId不能为空", groups = AddUserInternalGroup.class) + private String invitationRecordId; + + /** + * 当前用户id + */ + @NotBlank(message = "tokenDto获取userId为空", groups = AddUserInternalGroup.class) + private String userId; +} diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/ActDetailByLinkResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/ActDetailByLinkResultDTO.java new file mode 100644 index 0000000000..8ee28cadb6 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/ActDetailByLinkResultDTO.java @@ -0,0 +1,14 @@ +package com.epmet.resi.group.dto.act.result; + +import lombok.Data; + +/** + * 015、点击分享链接,查看活动详情 + * + * @author yinzuomei@elink-cn.com + * @date 2021/4/21 11:16 + */ +@Data +public class ActDetailByLinkResultDTO extends ActDetailResultDTO{ + private String invitationRecordId; +} diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java index da9107f7c2..e69121c2d2 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java @@ -23,10 +23,8 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.modules.act.service.GroupActInfoService; import com.epmet.resi.group.dto.act.GroupActIdDTO; -import com.epmet.resi.group.dto.act.form.ActDetailFormDTO; -import com.epmet.resi.group.dto.act.form.ActReadViewFormDTO; -import com.epmet.resi.group.dto.act.form.CancelActFormDTO; -import com.epmet.resi.group.dto.act.form.PublishGroupActFormDTO; +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.notice.result.NoticeReadListResultDTO; import org.springframework.beans.factory.annotation.Autowired; @@ -108,4 +106,20 @@ public class GroupActInfoController { ValidatorUtils.validateEntity(formDTO,CancelActFormDTO.AddUserShowGroup.class,CancelActFormDTO.AddUserInternalGroup.class); return new Result().ok(groupActInfoService.cancelAct(formDTO)); } + + + /** + * @return com.epmet.commons.tools.utils.Result + * @param tokenDto + * @param formDTO + * @author yinzuomei + * @description 015、点击分享链接,查看活动详情 + * @Date 2021/4/21 11:17 + **/ + @PostMapping("actdetailbylink") + public Result queryActDetailByLink(@LoginUser TokenDto tokenDto, @RequestBody ActDetailByLinkFormDTO formDTO){ + formDTO.setUserId(tokenDto.getUserId()); + ValidatorUtils.validateEntity(formDTO,ActDetailByLinkFormDTO.AddUserInternalGroup.class); + return new Result().ok(groupActInfoService.queryActDetailByLink(formDTO)); + } } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/GroupActInfoService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/GroupActInfoService.java index 9c066628bf..d108c976e5 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/GroupActInfoService.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/GroupActInfoService.java @@ -21,10 +21,8 @@ import com.epmet.commons.mybatis.service.BaseService; import com.epmet.modules.act.entity.GroupActInfoEntity; import com.epmet.resi.group.dto.act.GroupActIdDTO; import com.epmet.resi.group.dto.act.GroupActInfoDTO; -import com.epmet.resi.group.dto.act.form.ActDetailFormDTO; -import com.epmet.resi.group.dto.act.form.ActReadViewFormDTO; -import com.epmet.resi.group.dto.act.form.CancelActFormDTO; -import com.epmet.resi.group.dto.act.form.PublishGroupActFormDTO; +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.notice.result.NoticeReadListResultDTO; @@ -75,4 +73,12 @@ public interface GroupActInfoService extends BaseService { * @return com.epmet.resi.group.dto.act.GroupActInfoDTO */ GroupActInfoDTO getGroupActInfoDTO(String groupActId); + + /** + * 015、点击分享链接,查看活动详情 + * + * @param formDTO + * @return com.epmet.resi.group.dto.act.result.ActDetailByLinkResultDTO + */ + ActDetailByLinkResultDTO queryActDetailByLink(ActDetailByLinkFormDTO formDTO); } \ No newline at end of file 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 603fab0f8f..27f57f5cc7 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 @@ -55,15 +55,15 @@ 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.ResiGroupService; +import com.epmet.modules.invitation.service.InvitationRecordService; import com.epmet.modules.member.service.ResiGroupMemberService; import com.epmet.resi.group.dto.act.GroupActIdDTO; import com.epmet.resi.group.dto.act.GroupActInfoDTO; -import com.epmet.resi.group.dto.act.form.ActDetailFormDTO; -import com.epmet.resi.group.dto.act.form.ActReadViewFormDTO; -import com.epmet.resi.group.dto.act.form.CancelActFormDTO; -import com.epmet.resi.group.dto.act.form.PublishGroupActFormDTO; +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.ResiGroupDTO; +import com.epmet.resi.group.dto.invitation.InvitationRecordDTO; import com.epmet.resi.group.dto.member.ResiGroupMemberDTO; import com.epmet.resi.group.dto.notice.result.NoticeReadListResultDTO; import lombok.extern.slf4j.Slf4j; @@ -115,6 +115,8 @@ public class GroupActInfoServiceImpl extends BaseServiceImplNumConstant.ZERO?false:true); @@ -673,4 +681,26 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl textList; + private List imgList; + private Integer summaryFlag; + private List signedInUserIds; +} diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/ActSummaryController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/ActSummaryController.java index c9a9568799..0504bac3d6 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/ActSummaryController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/ActSummaryController.java @@ -17,8 +17,14 @@ package com.epmet.modules.act.controller; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.modules.act.service.ActSummaryService; +import com.epmet.resi.group.dto.act.form.InitTemplateFormDTO; +import com.epmet.resi.group.dto.act.result.ActSummaryTemplateResultDTO; 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; @@ -32,9 +38,20 @@ import org.springframework.web.bind.annotation.RestController; @RestController @RequestMapping("actsummary") public class ActSummaryController { - + @Autowired private ActSummaryService actSummaryService; - + /** + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @author yinzuomei + * @description 012、初始化活动总结模板 + * @Date 2021/4/21 12:30 + **/ + @PostMapping("inittem") + public Result initTemplate(@RequestBody InitTemplateFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, InitTemplateFormDTO.class); + return new Result().ok(actSummaryService.initTemplate(formDTO)); + } } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActSignInRecordDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActSignInRecordDao.java index bbc4f5fd8d..7ad9df69a4 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActSignInRecordDao.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActSignInRecordDao.java @@ -58,4 +58,12 @@ public interface ActSignInRecordDao extends BaseDao { * @return com.epmet.modules.act.entity.ActSignInRecordEntity */ ActSignInRecordEntity queryActSignInRecord(@Param("groupActId") String groupActId, @Param("signUserId")String signUserId); + + /** + * 查询已签到人员id + * + * @param groupActId + * @return String + */ + List selectUserIds(String groupActId); } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSummaryService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSummaryService.java index d3c987bed7..e2665a6a8a 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSummaryService.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSummaryService.java @@ -19,6 +19,8 @@ package com.epmet.modules.act.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.modules.act.entity.ActSummaryEntity; +import com.epmet.resi.group.dto.act.form.InitTemplateFormDTO; +import com.epmet.resi.group.dto.act.result.ActSummaryTemplateResultDTO; /** * 活动总结 @@ -27,4 +29,12 @@ import com.epmet.modules.act.entity.ActSummaryEntity; * @since v1.0.0 2021-04-16 */ public interface ActSummaryService extends BaseService { + + /** + * 012、初始化活动总结模板 + * + * @param formDTO + * @return com.epmet.resi.group.dto.act.result.ActSummaryTemplateResultDTO + */ + ActSummaryTemplateResultDTO initTemplate(InitTemplateFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSummaryServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSummaryServiceImpl.java index 6cd4a741d8..ab3ee238d0 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSummaryServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSummaryServiceImpl.java @@ -18,18 +18,77 @@ package com.epmet.modules.act.service.impl; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.StrConstant; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.result.UserBaseInfoResultDTO; +import com.epmet.feign.EpmetUserOpenFeignClient; +import com.epmet.modules.act.dao.ActSignInRecordDao; import com.epmet.modules.act.dao.ActSummaryDao; +import com.epmet.modules.act.dao.GroupActContentDao; +import com.epmet.modules.act.dao.GroupActInfoDao; import com.epmet.modules.act.entity.ActSummaryEntity; +import com.epmet.modules.act.entity.GroupActInfoEntity; import com.epmet.modules.act.service.ActSummaryService; +import com.epmet.modules.constant.GroupActConstant; +import com.epmet.resi.group.dto.act.form.InitTemplateFormDTO; +import com.epmet.resi.group.dto.act.result.ActSummaryTemplateResultDTO; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.CollectionUtils; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.util.ArrayList; +import java.util.List; + /** * 活动总结 * * @author generator generator@elink-cn.com * @since v1.0.0 2021-04-16 */ +@Slf4j @Service public class ActSummaryServiceImpl extends BaseServiceImpl implements ActSummaryService { + @Autowired + private GroupActInfoDao groupActInfoDao; + @Autowired + private GroupActContentDao groupActContentDao; + @Autowired + private ActSignInRecordDao actSignInRecordDao; + @Autowired + private EpmetUserOpenFeignClient epmetUserOpenFeignClient; + /** + * 012、初始化活动总结模板 + * + * @param formDTO + * @return com.epmet.resi.group.dto.act.result.ActSummaryTemplateResultDTO + */ + @Override + public ActSummaryTemplateResultDTO initTemplate(InitTemplateFormDTO formDTO) { + GroupActInfoEntity groupActInfoEntity=groupActInfoDao.selectById(formDTO.getGroupActId()); + if(null==groupActInfoEntity){ + throw new RenException(String.format("根据groupActId:%s,查询活动信息为null",formDTO.getGroupActId())); + } + ActSummaryTemplateResultDTO resultDTO= ConvertUtils.sourceToTarget(groupActInfoEntity,ActSummaryTemplateResultDTO.class); + resultDTO.setTextList(groupActContentDao.selectContentList(formDTO.getGroupActId(), GroupActConstant.TEXT)); + resultDTO.setImgList(groupActContentDao.selectContentList(formDTO.getGroupActId(),GroupActConstant.IMG)); + List signedInUserIds=actSignInRecordDao.selectUserIds(formDTO.getGroupActId()); + resultDTO.setSignedInUserIds(signedInUserIds); + if(CollectionUtils.isNotEmpty(signedInUserIds)){ + Result> result = epmetUserOpenFeignClient.queryUserBaseInfo(signedInUserIds); + if (!result.success()) { + throw new RenException("调用user服务,获取用户基础数据失败"); + } + result.getData().forEach(userBaseInfo->{ + resultDTO.setSignedInUsers(userBaseInfo.getSurname().concat(userBaseInfo.getName())); + }); + }else{ + resultDTO.setSignedInUserIds(new ArrayList<>()); + resultDTO.setSignedInUsers(StrConstant.EPMETY_STR); + } + return resultDTO; + } } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActSignInRecordDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActSignInRecordDao.xml index f542750348..ec3207549b 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActSignInRecordDao.xml +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActSignInRecordDao.xml @@ -37,4 +37,16 @@ AND acr.GROUP_ACT_ID = #{groupActId} AND acr.SIGN_USER_ID =#{signUserId} + + + \ No newline at end of file From 04cfb172669d2244034421bcced7a6b715fd00f1 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 21 Apr 2021 12:57:21 +0800 Subject: [PATCH 055/202] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E6=B4=BB?= =?UTF-8?q?=E5=8A=A8=E6=80=BB=E7=BB=93=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/modules/act/controller/ActSummaryController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/ActSummaryController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/ActSummaryController.java index 0504bac3d6..01bcde1ed5 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/ActSummaryController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/ActSummaryController.java @@ -51,7 +51,7 @@ public class ActSummaryController { **/ @PostMapping("inittem") public Result initTemplate(@RequestBody InitTemplateFormDTO formDTO) { - ValidatorUtils.validateEntity(formDTO, InitTemplateFormDTO.class); + ValidatorUtils.validateEntity(formDTO, InitTemplateFormDTO.AddUserInternalGroup.class); return new Result().ok(actSummaryService.initTemplate(formDTO)); } } \ No newline at end of file From 8bee2f9c9cf7b016cebb2a99867fd9d9ed9d1af1 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 21 Apr 2021 14:20:11 +0800 Subject: [PATCH 056/202] =?UTF-8?q?=E8=BF=9110=E6=9D=A1=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../group/result/UserReadFlagResultDTO.java | 28 ++++ .../dto/group/result/UserUnReadResultDTO.java | 26 +++ .../topic/result/GetLatestV2ResultDTO.java | 10 +- .../dto/topic/result/LatestTenResultDTO.java | 4 +- .../epmet/modules/group/dao/ResiGroupDao.java | 36 +++++ .../member/dao/ResiGroupMemberDao.java | 9 ++ .../service/impl/ResiTopicServiceImpl.java | 106 +++++++++++- .../epmet/modules/utils/ModuleConstant.java | 5 + .../resources/mapper/group/ResiGroupDao.xml | 153 ++++++++++++++++++ .../mapper/member/ResiGroupMemberDao.xml | 11 ++ .../epmet/dto/result/UserInfoResultDTO.java | 28 ++++ 11 files changed, 408 insertions(+), 8 deletions(-) create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/UserReadFlagResultDTO.java create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/UserUnReadResultDTO.java create mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/UserInfoResultDTO.java diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/UserReadFlagResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/UserReadFlagResultDTO.java new file mode 100644 index 0000000000..aec2c9f63f --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/UserReadFlagResultDTO.java @@ -0,0 +1,28 @@ +package com.epmet.resi.group.dto.group.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2021/4/21 上午9:43 + * @DESC + */ +@Data +public class UserReadFlagResultDTO implements Serializable { + + private static final long serialVersionUID = -5727870985731706332L; + + /** + * 活动,通知 ID + */ + private String id; + + private String userId; + + /** + * 阅读状态,read:已读,un_read:未读 + */ + private String readFlag; +} diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/UserUnReadResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/UserUnReadResultDTO.java new file mode 100644 index 0000000000..cf602385ea --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/UserUnReadResultDTO.java @@ -0,0 +1,26 @@ +package com.epmet.resi.group.dto.group.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2021/4/21 上午9:43 + * @DESC + */ +@Data +public class UserUnReadResultDTO implements Serializable { + + private static final long serialVersionUID = -5727870085731706332L; + + /** + * 活动,通知 ID + */ + private String id; + + /** + * 未读数量 + */ + private Integer unRead; +} diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/GetLatestV2ResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/GetLatestV2ResultDTO.java index ee37afd1bf..5a5e707f73 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/GetLatestV2ResultDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/GetLatestV2ResultDTO.java @@ -26,19 +26,19 @@ public class GetLatestV2ResultDTO implements Serializable { private String groupType; /** - * 是否显示通知按钮 + * 是否显示通知按钮(当前人员是否为组长) */ - private String noticeBut; + private Boolean noticeBut = false; /** - * 是否显示活动按钮 + * 是否显示活动按钮(当前组为支部组且当前人是组长) */ - private String actBut; + private Boolean actBut = false; /** * 是否存在未读消息 */ - private Boolean unReadNews; + private Boolean unReadNews = false; /** * 近十条数据 diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/LatestTenResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/LatestTenResultDTO.java index 0f8d7c3222..8efe0feebe 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/LatestTenResultDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/LatestTenResultDTO.java @@ -53,7 +53,7 @@ public class LatestTenResultDTO implements Serializable { /** * 是否本人 */ - private String releaseUserFlag; + private Boolean releaseUserFlag; /** * 如果有图片,后台只返回第一张,没有图片此列为空 @@ -93,7 +93,7 @@ public class LatestTenResultDTO implements Serializable { this.releaseTimed = ""; this.content = ""; this.status = ""; - this.releaseUserFlag = ""; + this.releaseUserFlag = false; this.firstPhoto = ""; this.issueId = ""; this.shiftIssueFlag = false; 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 b15f08293f..59e959b97f 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 @@ -24,6 +24,7 @@ import com.epmet.resi.group.dto.group.ResiGroupDTO; 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.topic.result.LatestTenResultDTO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -241,4 +242,39 @@ public interface ResiGroupDao extends BaseDao { * @Description 分页查询网格下所有小组列表 **/ List selectAllGroupList(AllGroupListFormDTO formDTO); + + /** + * @Description 查询 话题、通知、活动最近10条数据 + * @Param groupId + * @author zxc + * @date 2021/4/20 下午4:14 + */ + List selectLatestTen(@Param("groupId")String groupId); + + /** + * @Description 查询此人在小组内未读数量 + * @Param groupId + * @Param userId + * @author zxc + * @date 2021/4/20 下午5:23 + */ + Integer selectUserUnRead(@Param("groupId")String groupId,@Param("userId")String userId); + + /** + * @Description 查询阅读状态 + * @Param groupId + * @Param userId + * @author zxc + * @date 2021/4/21 上午9:45 + */ + List selectUserReadFlag(@Param("groupId")String groupId,@Param("userIds")List userIds,@Param("ids")List ids); + + /** + * @Description 根据 活动或通知查询 未读人数 + * @Param groupId + * @Param ids + * @author zxc + * @date 2021/4/21 上午10:22 + */ + List selectUserUnReadById(@Param("groupId")String groupId,@Param("ids")List ids); } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/dao/ResiGroupMemberDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/dao/ResiGroupMemberDao.java index 6c6618cc9a..4205eb483d 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/dao/ResiGroupMemberDao.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/dao/ResiGroupMemberDao.java @@ -159,4 +159,13 @@ public interface ResiGroupMemberDao extends BaseDao { * @Date 2021/4/19 13:54 **/ Integer selectCountMember(String groupId); + + /** + * @Description 查询此人组内身份 + * @Param groupId + * @Param userId + * @author zxc + * @date 2021/4/20 下午4:03 + */ + String selectUserRole(@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/service/impl/ResiTopicServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java index f3a4bb6f71..ed1a9c2aaa 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 @@ -82,6 +82,8 @@ import com.epmet.resi.group.dto.comment.form.ResiQueryCommentFormDTO; import com.epmet.resi.group.dto.comment.result.ResiCommentResultDTO; import com.epmet.resi.group.dto.group.ResiGroupInfoRedisDTO; import com.epmet.resi.group.dto.group.ResiGroupStatisticalInfoRedisDTO; +import com.epmet.resi.group.dto.group.result.UserReadFlagResultDTO; +import com.epmet.resi.group.dto.group.result.UserUnReadResultDTO; import com.epmet.resi.group.dto.member.ResiGroupMemberDTO; import com.epmet.resi.group.dto.member.ResiGroupMemberInfoRedisDTO; import com.epmet.resi.group.dto.member.form.RemoveMemberFormDTO; @@ -109,6 +111,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; +import javax.validation.constraints.NotBlank; import java.text.SimpleDateFormat; import java.util.*; import java.util.stream.Collectors; @@ -2190,7 +2193,108 @@ public class ResiTopicServiceImpl extends BaseServiceImpl NumConstant.ZERO){ + // 存在未读消息 + result.setUnReadNews(true); + } + // 查询 话题、通知、活动最近10条记录 + List latestTenData = resiGroupDao.selectLatestTen(groupId); + if (CollectionUtils.isEmpty(latestTenData)){ + result.setList(new ArrayList<>()); + return result; + } + // 活动、通知、话题 创建者ID集合 + List userIds = latestTenData.stream().map(m -> m.getUserId()).collect(Collectors.toList()); + // 活动、通知、话题 ID集合 + List ids = latestTenData.stream().map(m -> m.getId()).collect(Collectors.toList()); + List userInfos = disPoseUserInfo(result.getGroupType(), userIds); + // 查询用户的 活动或通知的 阅读状态 + List userReadFlag = resiGroupDao.selectUserReadFlag(groupId, userIds, ids); + // 查询小组下的 通知或活动 未读人数 + List userUnReadCount = resiGroupDao.selectUserUnReadById(groupId, ids); + latestTenData.forEach(l -> { + // 是否转议题,true:是,false:不是 + l.setShiftIssueFlag(StringUtils.isNotEmpty(l.getIssueId())); + // 是不是本人,true:是,false:不是 + l.setReleaseUserFlag(userId.equals(l.getUserId())); + // 用户的名字,头像赋值 + if (!CollectionUtils.isEmpty(userIds)){ + userInfos.forEach(u -> { + if (l.getUserId().equals(u.getUserId())){ + l.setReleaseUserName(u.getReleaseUserName()); + l.setReleaseUserHeadPhoto(u.getReleaseUserHeadPhoto()); + } + }); + } + // 用户已读,未读 + if (!CollectionUtils.isEmpty(userReadFlag)){ + userReadFlag.forEach(u -> { + if (l.getUserId().equals(u.getUserId()) && l.getId().equals(u.getId())){ + l.setReadOrUnRead(u.getReadFlag()); + } + }); + } + // 活动,通知未读人数 + if (!CollectionUtils.isEmpty(userUnReadCount)){ + userUnReadCount.forEach(u -> { + if (l.getId().equals(u.getId())){ + l.setUnReadCount(u.getUnRead()); + } + }); + } + }); + return result; + } + + /** + * @Description 查询用户信息【头像,名字】 + * @Param groupType + * @Param userIds + * @author zxc + * @date 2021/4/20 下午5:54 + */ + public List disPoseUserInfo(String groupType,List userIds){ + List result = new ArrayList<>(); + Result> userInfo = userOpenFeignClient.queryUserBaseInfo(userIds); + if (!userInfo.success()){ + throw new RenException(ModuleConstant.GET_USER_INFO_ERR); + } + List userInfos = userInfo.getData(); + if (CollectionUtils.isEmpty(userInfos)){ + return new ArrayList<>(); + } + userInfos.forEach(u -> { + UserInfoResultDTO ui = new UserInfoResultDTO(); + ui.setUserId(u.getUserId()); + ui.setReleaseUserHeadPhoto(u.getHeadImgUrl()); + if (groupType.equals(ModuleConstant.GROUP_TYPE_BRANCH)){ + ui.setReleaseUserName(u.getRealName()); + }else { + ui.setReleaseUserName(u.getShowName()); + } + result.add(ui); + }); + if (CollectionUtils.isEmpty(result)){ + return new ArrayList<>(); + } + return result; } } 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 1d77920606..15334f14e9 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 @@ -387,4 +387,9 @@ public interface ModuleConstant extends Constant { String GROUP_TYPE_BRANCH = "branch"; String IS_PARTY_MEMBER_ERR = "查询此人是不是党员失败了"; + + String GROUP_MEMBER_FLAG = "leader"; + + String GET_USER_INFO_ERR = "查询用户信息失败了"; + } 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 fc8a6280f1..c077e284ac 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 @@ -550,4 +550,157 @@ #{pageNo}, #{pageSize} + + + + + + + + + + + + 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 ac0217c6fe..7cf0ffb00a 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 @@ -215,4 +215,15 @@ rgm.RESI_GROUP_ID = #{groupId} AND rgm.DEL_FLAG = '0' + + + diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/UserInfoResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/UserInfoResultDTO.java new file mode 100644 index 0000000000..cccc7c04ce --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/UserInfoResultDTO.java @@ -0,0 +1,28 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2021/4/20 下午5:51 + * @DESC + */ +@Data +public class UserInfoResultDTO implements Serializable { + + private static final long serialVersionUID = 6003815400792121273L; + + private String userId; + + /** + * 发布者的全称(街道-姓氏先生/女士)【专项组显示真实名】 + */ + private String releaseUserName; + + /** + * 话题发布者的头像Url + */ + private String releaseUserHeadPhoto; +} From b665709ee0f6de90f2b61007bc18fb391afad859 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 21 Apr 2021 14:52:53 +0800 Subject: [PATCH 057/202] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/group/form/AllGroupListFormDTO.java | 7 ++- .../dto/notice/form/AddNoticeFormDTO.java | 12 +++- .../dto/notice/form/EditNoticeFormDTO.java | 13 ++++- .../dto/notice/form/NoticeCommentFormDTO.java | 5 ++ .../notice/form/NoticeCommentListFormDTO.java | 2 +- .../group/dto/notice/form/NoticeFileDTO.java | 23 ++++++++ .../dto/notice/form/ReadTypeFormDTO.java | 5 ++ .../group/controller/ResiGroupController.java | 9 +-- .../group/service/ResiGroupService.java | 3 +- .../service/impl/ResiGroupServiceImpl.java | 7 +-- .../controller/NoticeCommentController.java | 22 +++---- .../notice/controller/NoticeController.java | 21 ++----- .../NoticeReadRecordController.java | 24 +++----- .../notice/dao/NoticeReadRecordDao.java | 4 +- .../notice/service/NoticeCommentService.java | 8 +-- .../service/NoticeReadRecordService.java | 10 +--- .../modules/notice/service/NoticeService.java | 11 +--- .../impl/NoticeCommentServiceImpl.java | 22 +++---- .../impl/NoticeReadRecordServiceImpl.java | 19 ++---- .../service/impl/NoticeServiceImpl.java | 58 +++++++++---------- .../mapper/notice/NoticeReadRecordDao.xml | 7 ++- 21 files changed, 140 insertions(+), 152 deletions(-) create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/NoticeFileDTO.java diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/form/AllGroupListFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/form/AllGroupListFormDTO.java index 32d4164244..232d6b647e 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/form/AllGroupListFormDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/form/AllGroupListFormDTO.java @@ -23,12 +23,17 @@ public class AllGroupListFormDTO implements Serializable { * 请求页码 */ @Min(1) - private int pageNo; + private int pageNo = 1; /** * 每页多少条数据 */ private int pageSize = 20; + /** + * token中用户Id + */ + private String userId; + public interface GroupList { } } diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/AddNoticeFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/AddNoticeFormDTO.java index d9345790fe..2344e94898 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/AddNoticeFormDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/AddNoticeFormDTO.java @@ -1,7 +1,6 @@ package com.epmet.resi.group.dto.notice.form; import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; -import com.epmet.resi.group.dto.topic.form.FileDTO; import lombok.Data; import org.hibernate.validator.constraints.Length; @@ -35,12 +34,19 @@ public class AddNoticeFormDTO { /** * 图片附件集合 */ - private List imageList; + private List imageList; /** * 文件附件url集合 */ - private List docList; + private List docList; + + /** + * token中用户Id + */ + private String userId; public interface Add{} public interface AddUserShow extends CustomerClientShowGroup {} + + } diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/EditNoticeFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/EditNoticeFormDTO.java index 08573cae19..940077459f 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/EditNoticeFormDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/EditNoticeFormDTO.java @@ -1,7 +1,6 @@ package com.epmet.resi.group.dto.notice.form; import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; -import com.epmet.resi.group.dto.topic.form.FileDTO; import lombok.Data; import org.hibernate.validator.constraints.Length; @@ -23,22 +22,30 @@ public class EditNoticeFormDTO { /** * 通知标题 */ + @NotBlank(message = "通知标题不能为空",groups = {EditNoticeFormDTO.EditUserShow.class}) @Length(max = 20, message = "通知标题不能超过20个字符",groups = {EditNoticeFormDTO.EditUserShow.class}) private String title; /** * 通知内容 */ + @NotBlank(message = "通知内容不能为空",groups = {EditNoticeFormDTO.EditUserShow.class}) @Length(max = 1000, message = "通知内容不能超过1000个字符",groups = {EditNoticeFormDTO.EditUserShow.class}) private String content; /** * 图片附件集合 */ - private List imageList; + private List imageList; /** * 文件附件url集合 */ - private List docList; + private List docList; + + /** + * token中用户Id + */ + private String userId; public interface Edit{} public interface EditUserShow extends CustomerClientShowGroup {} + } diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/NoticeCommentFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/NoticeCommentFormDTO.java index 5fc28f52ef..c543bf7222 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/NoticeCommentFormDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/NoticeCommentFormDTO.java @@ -25,6 +25,11 @@ public class NoticeCommentFormDTO { @Length(max = 20, message = "评论内容不能超过300个字符",groups = {NoticeCommentFormDTO.UserShow.class}) private String commentContent; + /** + * token中用户Id + */ + private String userId; + public interface Comment{} public interface UserShow extends CustomerClientShowGroup {} } diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/NoticeCommentListFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/NoticeCommentListFormDTO.java index 960ba374e5..8d9ad97476 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/NoticeCommentListFormDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/NoticeCommentListFormDTO.java @@ -23,7 +23,7 @@ public class NoticeCommentListFormDTO implements Serializable { * 请求页码 * */ @Min(1) - private int pageNo; + private int pageNo = 1; /** * 每页多少条数据 * */ diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/NoticeFileDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/NoticeFileDTO.java new file mode 100644 index 0000000000..a71ac3d509 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/NoticeFileDTO.java @@ -0,0 +1,23 @@ +package com.epmet.resi.group.dto.notice.form; + +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * @Author sun + * @Description 小组通知保存、变更-接口入参 + */ +@NoArgsConstructor +@Data +public class NoticeFileDTO implements Serializable { + + private static final long serialVersionUID = -3930520724652521552L; + private String name; + private String url; + private String type; + private String format; + private Integer size; + private Integer duration; +} diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/ReadTypeFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/ReadTypeFormDTO.java index f3170ebc9b..6477c87fb8 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/ReadTypeFormDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/ReadTypeFormDTO.java @@ -17,5 +17,10 @@ public class ReadTypeFormDTO { @NotBlank(message = "通知Id不能为空",groups = {ReadTypeFormDTO.Read.class}) private String noticeId; + /** + * token中用户Id + */ + private String userId; + public interface Read{} } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/ResiGroupController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/ResiGroupController.java index 1d77fc28b9..f9f38417d8 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/ResiGroupController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/ResiGroupController.java @@ -31,18 +31,12 @@ import com.epmet.resi.group.dto.group.form.*; import com.epmet.resi.group.dto.group.result.*; import com.epmet.resi.group.dto.member.form.EditAuditSwitchFormDTO; import com.epmet.resi.group.dto.member.form.ResiIdentityFormDTO; -import com.epmet.resi.group.dto.notice.form.NoticeCommentListFormDTO; -import com.epmet.resi.group.dto.notice.result.NoticeCommentListResultDTO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.util.CollectionUtils; 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; -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; import java.util.HashMap; import java.util.List; @@ -513,7 +507,8 @@ public class ResiGroupController { @PostMapping(value = "allgrouplist") public Result> allGroupList(@LoginUser TokenDto tokenDto, @RequestBody AllGroupListFormDTO formDTO){ ValidatorUtils.validateEntity(formDTO, AllGroupListFormDTO.GroupList.class); - return new Result>().ok(resiGroupService.allGroupList(tokenDto, formDTO)); + formDTO.setUserId(tokenDto.getUserId()); + return new Result>().ok(resiGroupService.allGroupList(formDTO)); } } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/ResiGroupService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/ResiGroupService.java index a27d726fc8..c2073a7952 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/ResiGroupService.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/ResiGroupService.java @@ -20,7 +20,6 @@ package com.epmet.modules.group.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; -import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; import com.epmet.modules.group.entity.ResiGroupEntity; import com.epmet.resi.group.dto.UserRoleDTO; @@ -378,5 +377,5 @@ public interface ResiGroupService extends BaseService { * @Author sun * @Description 所有小组查询 **/ - List allGroupList(TokenDto tokenDto, AllGroupListFormDTO formDTO); + List allGroupList(AllGroupListFormDTO formDTO); } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java index 6cc56ca171..5a54c45f06 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java @@ -30,7 +30,6 @@ import com.epmet.commons.tools.scan.param.ImgTaskDTO; import com.epmet.commons.tools.scan.param.TextScanParamDTO; import com.epmet.commons.tools.scan.param.TextTaskDTO; import com.epmet.commons.tools.scan.result.SyncScanResult; -import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.security.user.LoginUserUtil; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.DateUtils; @@ -1500,7 +1499,7 @@ public class ResiGroupServiceImpl extends BaseServiceImpl allGroupList(TokenDto tokenDto, AllGroupListFormDTO formDTO) { + public List allGroupList(AllGroupListFormDTO formDTO) { //1.分页查询网格下所有小组列表且是审核通过状态的,以组内人员数从多到少排序 int pageIndex = (formDTO.getPageNo() - NumConstant.ONE) * formDTO.getPageSize(); formDTO.setPageNo(pageIndex); @@ -1511,7 +1510,7 @@ public class ResiGroupServiceImpl extends BaseServiceImpl> resultDTOList = epmetUserOpenFeignClient.getUserRoleInfoByUserId(tokenDto.getUserId()); + Result> resultDTOList = epmetUserOpenFeignClient.getUserRoleInfoByUserId(formDTO.getUserId()); if (!resultDTOList.success()) { throw new RenException("调用user服务,获取用户基础数据失败"); } @@ -1529,7 +1528,7 @@ public class ResiGroupServiceImpl extends BaseServiceImpl> noticeCommentList(@LoginUser TokenDto tokenDto, @RequestBody NoticeCommentListFormDTO formDTO){ + public Result> noticeCommentList(@RequestBody NoticeCommentListFormDTO formDTO){ ValidatorUtils.validateEntity(formDTO, NoticeCommentListFormDTO.CommentList.class); - return new Result>().ok(noticeCommentService.noticeCommentList(tokenDto, formDTO)); + return new Result>().ok(noticeCommentService.noticeCommentList(formDTO)); } } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeController.java index 02d6bf79ec..ad2a0dd9dc 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeController.java @@ -18,16 +18,9 @@ package com.epmet.modules.notice.controller; import com.epmet.commons.tools.annotation.LoginUser; -import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; -import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; -import com.epmet.commons.tools.validator.AssertUtils; import com.epmet.commons.tools.validator.ValidatorUtils; -import com.epmet.commons.tools.validator.group.AddGroup; -import com.epmet.commons.tools.validator.group.DefaultGroup; -import com.epmet.commons.tools.validator.group.UpdateGroup; -import com.epmet.modules.notice.excel.NoticeExcel; import com.epmet.modules.notice.service.NoticeService; import com.epmet.resi.group.dto.notice.NoticeDTO; import com.epmet.resi.group.dto.notice.form.AddNoticeFormDTO; @@ -37,10 +30,6 @@ import com.epmet.resi.group.dto.notice.result.NoticeDetailResultDTO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; -import javax.servlet.http.HttpServletResponse; -import java.util.List; -import java.util.Map; - /** * 小组通知表 @@ -70,7 +59,8 @@ public class NoticeController { @PostMapping(value = "add") public Result add(@LoginUser TokenDto tokenDto, @RequestBody AddNoticeFormDTO formDTO){ ValidatorUtils.validateEntity(formDTO, AddNoticeFormDTO.Add.class, AddNoticeFormDTO.AddUserShow.class); - noticeService.add(tokenDto, formDTO); + formDTO.setUserId(tokenDto.getUserId()); + noticeService.add(formDTO); return new Result(); } @@ -83,7 +73,8 @@ public class NoticeController { @PostMapping(value = "edit") public Result edit(@LoginUser TokenDto tokenDto, @RequestBody EditNoticeFormDTO formDTO){ ValidatorUtils.validateEntity(formDTO, EditNoticeFormDTO.Edit.class, EditNoticeFormDTO.EditUserShow.class); - noticeService.edit(tokenDto, formDTO); + formDTO.setUserId(tokenDto.getUserId()); + noticeService.edit(formDTO); return new Result(); } @@ -94,9 +85,9 @@ public class NoticeController { * @Description 小组通知详情 **/ @PostMapping(value = "noticedetail") - public Result noticeDetail(@LoginUser TokenDto tokenDto, @RequestBody NoticeDetailFormDTO formDTO){ + public Result noticeDetail(@RequestBody NoticeDetailFormDTO formDTO){ ValidatorUtils.validateEntity(formDTO, NoticeDetailFormDTO.Detail.class); - return new Result().ok(noticeService.noticeDetail(tokenDto, formDTO)); + return new Result().ok(noticeService.noticeDetail(formDTO)); } } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeReadRecordController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeReadRecordController.java index ca1dcf86b2..a4b992fd0f 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeReadRecordController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeReadRecordController.java @@ -18,27 +18,18 @@ package com.epmet.modules.notice.controller; import com.epmet.commons.tools.annotation.LoginUser; -import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; -import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; -import com.epmet.commons.tools.validator.AssertUtils; import com.epmet.commons.tools.validator.ValidatorUtils; -import com.epmet.commons.tools.validator.group.AddGroup; -import com.epmet.commons.tools.validator.group.DefaultGroup; -import com.epmet.commons.tools.validator.group.UpdateGroup; -import com.epmet.modules.notice.excel.NoticeReadRecordExcel; import com.epmet.modules.notice.service.NoticeReadRecordService; -import com.epmet.resi.group.dto.notice.NoticeReadRecordDTO; import com.epmet.resi.group.dto.notice.form.NoticeReadListFormDTO; import com.epmet.resi.group.dto.notice.form.ReadTypeFormDTO; import com.epmet.resi.group.dto.notice.result.NoticeReadListResultDTO; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -import javax.servlet.http.HttpServletResponse; -import java.util.List; -import java.util.Map; +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; /** @@ -61,9 +52,9 @@ public class NoticeReadRecordController { * @Description 通知已读未读列表查询 **/ @PostMapping(value = "noticereadlist") - public Result noticeReadList(@LoginUser TokenDto tokenDto, @RequestBody NoticeReadListFormDTO formDTO){ + public Result noticeReadList(@RequestBody NoticeReadListFormDTO formDTO){ ValidatorUtils.validateEntity(formDTO, NoticeReadListFormDTO.List.class); - return new Result().ok(noticeReafdRecordService.noticeReadList(tokenDto, formDTO)); + return new Result().ok(noticeReafdRecordService.noticeReadList(formDTO)); } /** @@ -75,7 +66,8 @@ public class NoticeReadRecordController { @PostMapping(value = "readtype") public Result readType(@LoginUser TokenDto tokenDto, @RequestBody ReadTypeFormDTO formDTO){ ValidatorUtils.validateEntity(formDTO, ReadTypeFormDTO.Read.class); - noticeReafdRecordService.readType(tokenDto, formDTO); + formDTO.setUserId(tokenDto.getUserId()); + noticeReafdRecordService.readType(formDTO); return new Result(); } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/dao/NoticeReadRecordDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/dao/NoticeReadRecordDao.java index 2375b63db6..3842c4fd98 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/dao/NoticeReadRecordDao.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/dao/NoticeReadRecordDao.java @@ -42,9 +42,9 @@ public interface NoticeReadRecordDao extends BaseDao { /** * @Author sun - * @Description 根据通知Id查询组成员已读未读数据 + * @Description 根据通知Id查询组成员已读未读数据,抛去组长数据 **/ - List getByNoticeId(@Param("noticeId") String noticeId); + List getByNoticeId(@Param("noticeId") String noticeId, @Param("leaderId") String leaderId); /** * @Author sun diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeCommentService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeCommentService.java index 6e3a82690d..0ac50c21e7 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeCommentService.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeCommentService.java @@ -18,16 +18,12 @@ package com.epmet.modules.notice.service; import com.epmet.commons.mybatis.service.BaseService; -import com.epmet.commons.tools.page.PageData; -import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.modules.notice.entity.NoticeCommentEntity; -import com.epmet.resi.group.dto.notice.NoticeCommentDTO; import com.epmet.resi.group.dto.notice.form.NoticeCommentFormDTO; import com.epmet.resi.group.dto.notice.form.NoticeCommentListFormDTO; import com.epmet.resi.group.dto.notice.result.NoticeCommentListResultDTO; import java.util.List; -import java.util.Map; /** * 小组通知评论表 @@ -43,7 +39,7 @@ public interface NoticeCommentService extends BaseService { * @Author sun * @Description 发布通知评论 **/ - void noticeComment(TokenDto tokenDto, NoticeCommentFormDTO formDTO); + void noticeComment(NoticeCommentFormDTO formDTO); /** * @param formDTO @@ -51,5 +47,5 @@ public interface NoticeCommentService extends BaseService { * @Author sun * @Description 通知评论列表查询 **/ - List noticeCommentList(TokenDto tokenDto, NoticeCommentListFormDTO formDTO); + List noticeCommentList(NoticeCommentListFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeReadRecordService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeReadRecordService.java index 17d41252c0..fd4a4d6d4b 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeReadRecordService.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeReadRecordService.java @@ -18,17 +18,11 @@ package com.epmet.modules.notice.service; import com.epmet.commons.mybatis.service.BaseService; -import com.epmet.commons.tools.page.PageData; -import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.modules.notice.entity.NoticeReadRecordEntity; -import com.epmet.resi.group.dto.notice.NoticeReadRecordDTO; import com.epmet.resi.group.dto.notice.form.NoticeReadListFormDTO; import com.epmet.resi.group.dto.notice.form.ReadTypeFormDTO; import com.epmet.resi.group.dto.notice.result.NoticeReadListResultDTO; -import java.util.List; -import java.util.Map; - /** * 小组通知组成员阅读记录表 * @@ -43,7 +37,7 @@ public interface NoticeReadRecordService extends BaseService { * @Author sun * @Description 小组通知保存 **/ - void add(TokenDto tokenDto, AddNoticeFormDTO formDTO); + void add(AddNoticeFormDTO formDTO); /** * @param formDTO @@ -62,7 +57,7 @@ public interface NoticeService extends BaseService { * @Author sun * @Description 小组通知变更 **/ - void edit(TokenDto tokenDto, EditNoticeFormDTO formDTO); + void edit(EditNoticeFormDTO formDTO); /** * @param formDTO @@ -70,5 +65,5 @@ public interface NoticeService extends BaseService { * @Author sun * @Description 小组通知详情 **/ - NoticeDetailResultDTO noticeDetail(TokenDto tokenDto, NoticeDetailFormDTO formDTO); + NoticeDetailResultDTO noticeDetail(NoticeDetailFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeCommentServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeCommentServiceImpl.java index 4bd79318c2..b4ee53de76 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeCommentServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeCommentServiceImpl.java @@ -17,19 +17,13 @@ package com.epmet.modules.notice.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.constant.NumConstant; 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.scan.param.TextScanParamDTO; import com.epmet.commons.tools.scan.param.TextTaskDTO; import com.epmet.commons.tools.scan.result.SyncScanResult; -import com.epmet.commons.tools.security.dto.TokenDto; -import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.ScanContentUtils; import com.epmet.dto.result.UserBaseInfoResultDTO; @@ -43,9 +37,7 @@ import com.epmet.modules.notice.service.NoticeService; import com.epmet.modules.utils.ModuleConstant; import com.epmet.resi.group.constant.MemberStateConstant; import com.epmet.resi.group.constant.TopicConstant; -import com.epmet.resi.group.dto.comment.result.ResiCommentResultDTO; import com.epmet.resi.group.dto.member.ResiGroupMemberDTO; -import com.epmet.resi.group.dto.notice.NoticeCommentDTO; import com.epmet.resi.group.dto.notice.NoticeDTO; import com.epmet.resi.group.dto.notice.form.NoticeCommentFormDTO; import com.epmet.resi.group.dto.notice.form.NoticeCommentListFormDTO; @@ -58,7 +50,9 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import java.util.*; +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; import java.util.stream.Collectors; /** @@ -92,7 +86,7 @@ public class NoticeCommentServiceImpl extends BaseServiceImpl", formDTO.getNoticeId())); } ResiGroupMemberDTO resiGroupMemberDTO = - resiGroupMemberService.getResiGroupMember(notice.getGroupId(), tokenDto.getUserId()); + resiGroupMemberService.getResiGroupMember(notice.getGroupId(), formDTO.getUserId()); //查看当前用户是否被禁言或者被移除 if (null != resiGroupMemberDTO) { if (MemberStateConstant.SILENT.equals(resiGroupMemberDTO.getStatus())) { @@ -154,7 +148,7 @@ public class NoticeCommentServiceImpl extends BaseServiceImpl noticeCommentList(TokenDto tokenDto, NoticeCommentListFormDTO formDTO) { + public List noticeCommentList(NoticeCommentListFormDTO formDTO) { //1.分页查询通知评论列表 formDTO.setPageNo((formDTO.getPageNo() - NumConstant.ONE) * formDTO.getPageSize()); List resultList = baseDao.getNoticeCommentList(formDTO); diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeReadRecordServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeReadRecordServiceImpl.java index ad26bc805e..eac1b1b18d 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeReadRecordServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeReadRecordServiceImpl.java @@ -17,14 +17,8 @@ package com.epmet.modules.notice.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.exception.RenException; -import com.epmet.commons.tools.page.PageData; -import com.epmet.commons.tools.security.dto.TokenDto; -import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.constant.ReadFlagConstant; import com.epmet.dto.result.UserBaseInfoResultDTO; @@ -45,9 +39,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; -import java.util.Map; import java.util.stream.Collectors; /** @@ -66,7 +58,6 @@ public class NoticeReadRecordServiceImpl extends BaseServiceImpl readList = new ArrayList<>(); List unReadList = new ArrayList<>(); @@ -82,7 +73,7 @@ public class NoticeReadRecordServiceImpl extends BaseServiceImpl list = baseDao.getByNoticeId(formDTO.getNoticeId()); + List list = baseDao.getByNoticeId(formDTO.getNoticeId(), leaderId); //2.调用user服务,查询人员基础数据 List userIdList = list.stream().map(NoticeReadRecordDTO::getUserId).collect(Collectors.toList()); @@ -132,9 +123,9 @@ public class NoticeReadRecordServiceImpl extends BaseServiceImpl @Autowired private EpmetUserOpenFeignClient epmetUserOpenFeignClient; @Autowired + private GovOrgOpenFeignClient govOrgOpenFeignClient; + @Autowired private EpmetMessageOpenFeignClient epmetMessageOpenFeignClient; @Autowired private NoticeAttachmentService noticeAttachmentService; @@ -111,7 +110,7 @@ public class NoticeServiceImpl extends BaseServiceImpl @Autowired private NoticeReadRecordService noticeReafdRecordService; @Autowired - private NoticeReadRecordDao noticeReafdRecordDao; + private NoticeReadRecordDao noticeReadRecordDao; @Override @@ -128,7 +127,7 @@ public class NoticeServiceImpl extends BaseServiceImpl **/ @Override @Transactional(rollbackFor = Exception.class) - public void add(TokenDto tokenDto, AddNoticeFormDTO formDTO) { + public void add(AddNoticeFormDTO formDTO) { //1.查询组内成员数据 List memberList = resiGroupMemberDao.getMemberList(formDTO.getGroupId()); if (CollUtil.isEmpty(memberList)) { @@ -138,7 +137,7 @@ public class NoticeServiceImpl extends BaseServiceImpl //2.校验当前操作人员是否为组长 AtomicReference bl = new AtomicReference<>(true); memberList.forEach(m -> { - if (m.getCustomerUserId().equals(tokenDto.getUserId()) && "leader".equals(m.getGroupLeaderFlag())) { + if (m.getCustomerUserId().equals(formDTO.getUserId()) && "leader".equals(m.getGroupLeaderFlag())) { bl.set(false); } }); @@ -150,30 +149,27 @@ public class NoticeServiceImpl extends BaseServiceImpl List wordList = new ArrayList<>(); wordList.add(formDTO.getTitle()); wordList.add(formDTO.getContent()); - List imageList = formDTO.getImageList().stream().map(FileDTO::getUrl).collect(Collectors.toList()); + List imageList = formDTO.getImageList().stream().map(NoticeFileDTO::getUrl).collect(Collectors.toList()); safetyCheck(wordList, imageList); //4.保存小组通知基础数据 //4-1.获取小组信息 ResiGroupEntity groupEntity = resiGroupDao.selectById(formDTO.getGroupId()); if (null == groupEntity) { - throw new RenException(String.format("保存小组通知,获取小组数据失败,小组Id->", tokenDto.getUserId())); + throw new RenException(String.format("保存小组通知,获取小组数据失败,小组Id->", formDTO.getUserId())); } //4-2.获取token用户所属组织信息 - LoginUserDetailsFormDTO dto = new LoginUserDetailsFormDTO(); - dto.setApp(tokenDto.getApp()); - dto.setClient(tokenDto.getClient()); - dto.setUserId(tokenDto.getUserId()); - Result result = epmetUserOpenFeignClient.getLoginUserDetails(dto); - if (!result.success() || org.springframework.util.StringUtils.isEmpty(result.getData().getAgencyId())) { - throw new RenException(String.format("调用user服务查询用户数据失败,userId->", tokenDto.getUserId())); + Result result = govOrgOpenFeignClient.queryGridInfo(groupEntity.getGridId()); + if (!result.success() || org.springframework.util.StringUtils.isEmpty(result.getData().getParentAgencyId())) { + throw new RenException(String.format("调用user服务查询用户数据失败,userId->", formDTO.getUserId())); } - LoginUserDetailsResultDTO resultDTO = result.getData(); + GridInfoResultDTO resultDTO = result.getData(); + //4-3.保存通知数据 NoticeEntity entity = new NoticeEntity(); entity.setCustomerId(resultDTO.getCustomerId()); - entity.setAgencyId(resultDTO.getAgencyId()); + entity.setAgencyId(resultDTO.getParentAgencyId()); entity.setGridId(groupEntity.getGridId()); entity.setGroupId(formDTO.getGroupId()); entity.setTitle(formDTO.getTitle()); @@ -237,7 +233,7 @@ public class NoticeServiceImpl extends BaseServiceImpl if ("leader".equals(m.getGroupLeaderFlag())) { reafdRecord.setReadFlag(ReadFlagConstant.READ); }else { - reafdRecord.setReadFlag(ReadFlagConstant.UN_READ); + reafdRecord.setReadFlag("un_read"); } reafdRecordList.add(reafdRecord); }); @@ -274,7 +270,7 @@ public class NoticeServiceImpl extends BaseServiceImpl * @Description 小组通知变更 **/ @Override - public void edit(TokenDto tokenDto, EditNoticeFormDTO formDTO) { + public void edit(EditNoticeFormDTO formDTO) { //1.查询通知是否存在 NoticeEntity entity = baseDao.selectById(formDTO.getNoticeId()); if (null == entity) { @@ -284,7 +280,7 @@ public class NoticeServiceImpl extends BaseServiceImpl List wordList = new ArrayList<>(); wordList.add(formDTO.getTitle()); wordList.add(formDTO.getContent()); - List imageList = formDTO.getImageList().stream().map(FileDTO::getUrl).collect(Collectors.toList()); + List imageList = formDTO.getImageList().stream().map(NoticeFileDTO::getUrl).collect(Collectors.toList()); safetyCheck(wordList, imageList); //3.查询组成员列表数据 @@ -346,7 +342,7 @@ public class NoticeServiceImpl extends BaseServiceImpl } //6.通知已读未读消息表数据先删后增 - noticeReafdRecordDao.delByNoticeId(formDTO.getNoticeId()); + noticeReadRecordDao.delByNoticeId(formDTO.getNoticeId()); List reafdRecordList = new ArrayList<>(); memberList.forEach(m -> { NoticeReadRecordEntity reafdRecord = new NoticeReadRecordEntity(); @@ -358,7 +354,7 @@ public class NoticeServiceImpl extends BaseServiceImpl if ("leader".equals(m.getGroupLeaderFlag())) { reafdRecord.setReadFlag(ReadFlagConstant.READ); }else { - reafdRecord.setReadFlag(ReadFlagConstant.UN_READ); + reafdRecord.setReadFlag("un_read"); } reafdRecordList.add(reafdRecord); }); @@ -370,7 +366,7 @@ public class NoticeServiceImpl extends BaseServiceImpl //7-1.获取小组信息 ResiGroupEntity groupEntity = resiGroupDao.selectById(entity.getGroupId()); if (null == groupEntity) { - throw new RenException(String.format("保存小组通知,获取小组数据失败,小组Id->", tokenDto.getUserId())); + throw new RenException(String.format("保存小组通知,获取小组数据失败,小组Id->", formDTO.getUserId())); } //7-2.推送站内信信息 List userMessageFormDTOS = new ArrayList<>(); @@ -400,7 +396,7 @@ public class NoticeServiceImpl extends BaseServiceImpl * @Description 小组通知详情 **/ @Override - public NoticeDetailResultDTO noticeDetail(TokenDto tokenDto, NoticeDetailFormDTO formDTO) { + public NoticeDetailResultDTO noticeDetail(NoticeDetailFormDTO formDTO) { NoticeDetailResultDTO resultDTO = new NoticeDetailResultDTO(); List imageList = new ArrayList<>(); List docList = new ArrayList<>(); diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/notice/NoticeReadRecordDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/notice/NoticeReadRecordDao.xml index 74b99c2e1b..3848b66959 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/notice/NoticeReadRecordDao.xml +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/notice/NoticeReadRecordDao.xml @@ -7,17 +7,18 @@ SELECT * FROM - notice_reafd_record + notice_read_record WHERE del_flag = '0' AND notice_id = #{noticeId} + AND user_id != #{leaderId} + SELECT + M.CONTENT + FROM + act_summary_content m + WHERE + m.DEL_FLAG = '0' + AND m.GROUP_ACT_ID = #{groupActId} + AND m.act_summary_id = #{actSummaryId} + AND m.CONTENT_TYPE = #{contentType} + ORDER BY + m.SORT ASC + \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActSummaryDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActSummaryDao.xml index 936bc6df1b..3782a2104c 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActSummaryDao.xml +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActSummaryDao.xml @@ -3,6 +3,14 @@ - + \ No newline at end of file From fc6522dc447e763d4f788c834f6e3efa9dc0bdb9 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 21 Apr 2021 15:56:38 +0800 Subject: [PATCH 060/202] =?UTF-8?q?=E5=85=B3=E9=97=AD=E6=B4=BB=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/act/form/CloseGroupActFormDTO.java | 27 +++++++++ .../controller/GroupActInfoController.java | 17 ++++++ .../act/service/ActSummaryService.java | 2 + .../act/service/GroupActInfoService.java | 8 +++ .../service/impl/ActSummaryServiceImpl.java | 5 ++ .../service/impl/GroupActInfoServiceImpl.java | 56 ++++++++++++++++--- 6 files changed, 106 insertions(+), 9 deletions(-) create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/CloseGroupActFormDTO.java diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/CloseGroupActFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/CloseGroupActFormDTO.java new file mode 100644 index 0000000000..17d417376c --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/CloseGroupActFormDTO.java @@ -0,0 +1,27 @@ +package com.epmet.resi.group.dto.act.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * 017、关闭活动 + * + * @author yinzuomei@elink-cn.com + * @date 2021/4/21 15:18 + */ +@Data +public class CloseGroupActFormDTO implements Serializable { + + public interface AddUserInternalGroup { + } + @NotBlank(message = "groupActId不能为空", groups = ActSummaryDetailFormDTO.AddUserInternalGroup.class) + private String groupActId; + + /** + * 当前用户id + */ + @NotBlank(message = "tokenDto获取userId为空", groups = ActReadViewFormDTO.AddUserInternalGroup.class) + private String userId; +} diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java index e69121c2d2..d2231f005b 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java @@ -122,4 +122,21 @@ public class GroupActInfoController { ValidatorUtils.validateEntity(formDTO,ActDetailByLinkFormDTO.AddUserInternalGroup.class); return new Result().ok(groupActInfoService.queryActDetailByLink(formDTO)); } + + /** + * @return com.epmet.commons.tools.utils.Result + * @param tokenDto + * @param formDTO + * @author yinzuomei + * @description 017、关闭活动 + * @Date 2021/4/21 15:22 + **/ + @PostMapping("close") + public Result closeAct(@LoginUser TokenDto tokenDto,@RequestBody CloseGroupActFormDTO formDTO){ + formDTO.setUserId(tokenDto.getUserId()); + ValidatorUtils.validateEntity(formDTO,CloseGroupActFormDTO.AddUserInternalGroup.class); + groupActInfoService.closeAct(formDTO); + return new Result(); + } + } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSummaryService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSummaryService.java index 815ebad816..b56ba655e3 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSummaryService.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSummaryService.java @@ -59,4 +59,6 @@ public interface ActSummaryService extends BaseService { * @return com.epmet.resi.group.dto.act.result.ActSummaryDetailResultDTO */ ActSummaryDetailResultDTO queryActSummaryDetail(ActSummaryDetailFormDTO formDTO); + + ActSummaryEntity queryUserSummary(String groupActId, String userId); } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/GroupActInfoService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/GroupActInfoService.java index d108c976e5..b815bb7358 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/GroupActInfoService.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/GroupActInfoService.java @@ -81,4 +81,12 @@ public interface GroupActInfoService extends BaseService { * @return com.epmet.resi.group.dto.act.result.ActDetailByLinkResultDTO */ ActDetailByLinkResultDTO queryActDetailByLink(ActDetailByLinkFormDTO formDTO); + + /** + * 017、关闭活动 + * + * @param formDTO + * @return + */ + void closeAct(CloseGroupActFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSummaryServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSummaryServiceImpl.java index e5537fe340..e9d2aeba9b 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSummaryServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSummaryServiceImpl.java @@ -296,4 +296,9 @@ public class ActSummaryServiceImpl extends BaseServiceImpl Date: Wed, 21 Apr 2021 16:10:41 +0800 Subject: [PATCH 061/202] =?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=A2V2=20=E6=A1=86=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../topic/form/GetPastTopicListV2FormDTO.java | 36 +++++++++ .../result/GetPastTopicListV2ResultDTO.java | 77 +++++++++++++++++++ .../topic/controller/ResiTopicController.java | 14 ++++ .../topic/service/ResiTopicService.java | 9 +++ .../service/impl/ResiTopicServiceImpl.java | 12 +++ 5 files changed, 148 insertions(+) create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/GetPastTopicListV2FormDTO.java create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/GetPastTopicListV2ResultDTO.java 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 new file mode 100644 index 0000000000..ad41e9bf81 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/GetPastTopicListV2FormDTO.java @@ -0,0 +1,36 @@ +package com.epmet.resi.group.dto.topic.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2021/4/21 下午3:21 + * @DESC + */ +@Data +public class GetPastTopicListV2FormDTO implements Serializable { + + private static final long serialVersionUID = 3746688354140118007L; + + public interface GetPastTopicListV2Form{} + + /** + * null默认查询讨论中、已关闭,dicussing讨论中,closed关闭 + */ + private String status; + + @NotBlank(message = "小组ID不能为空",groups = GetPastTopicListV2Form.class) + private String groupId; + + @NotNull(message = "pageSize不能为空",groups = GetPastTopicListV2Form.class) + private Integer pageSize; + + @NotNull(message = "pageNo不能为空",groups = GetPastTopicListV2Form.class) + private Integer pageNo; + + private String userId; +} 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 new file mode 100644 index 0000000000..fcc28ddec8 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/GetPastTopicListV2ResultDTO.java @@ -0,0 +1,77 @@ +package com.epmet.resi.group.dto.topic.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2021/4/21 下午3:15 + * @DESC + */ +@Data +public class GetPastTopicListV2ResultDTO implements Serializable { + + private static final long serialVersionUID = -8352977778269083843L; + + /** + * 话题、通知、活动Id + */ + private String id; + + /** + * 发布者的全称(街道-姓氏先生/女士)【专项组显示真实名】 + */ + private String releaseUserName; + + /** + * 发布者的头像Url + */ + private String releaseUserHeadPhoto; + + /** + * 发布时间yyyy-MM-dd + */ + private String releaseTime; + + /** + * 内容 + */ + private String content; + + /** + * 话题状态(discussing进行中、closed已关闭) + */ + private String status; + + /** + * 是否本人 + */ + private Boolean releaseUserFlag; + + /** + * 议题id + */ + private String issueId; + + /** + * 是否被转为议题true,false + */ + private Boolean shiftIssueFlag; + + /** + * 数据类型(topic:话题 notice:通知 act:活动) + */ + private String contentType; + + /** + * 本人已读未读状态(read已读 unread未读) + */ + private String readOrUnRead; + + /** + * 徽章Url集合 + */ + private List badgeList; +} diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/controller/ResiTopicController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/controller/ResiTopicController.java index 4e824c18ef..a53708526d 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/controller/ResiTopicController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/controller/ResiTopicController.java @@ -455,4 +455,18 @@ public class ResiTopicController { formDTO.setUserId(tokenDto.getUserId()); return new Result().ok(topicService.getLatestV2(formDTO)); } + + /** + * @Description 小组历史数据查询V2 + * @Param formDTO + * @Param tokenDto + * @author zxc + * @date 2021/4/21 下午4:08 + */ + @PostMapping("getpasttopiclistv2") + public Result> getPastTopicListV2(@RequestBody GetPastTopicListV2FormDTO formDTO,@LoginUser TokenDto tokenDto){ + ValidatorUtils.validateEntity(formDTO, GetPastTopicListV2FormDTO.GetPastTopicListV2Form.class); + formDTO.setUserId(tokenDto.getUserId()); + return new Result>().ok(topicService.getPastTopicListV2(formDTO)); + } } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/ResiTopicService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/ResiTopicService.java index 48ba5166e5..ed79f489ac 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/ResiTopicService.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/ResiTopicService.java @@ -361,4 +361,13 @@ public interface ResiTopicService extends BaseService { * @date 2021/4/20 下午2:34 */ GetLatestV2ResultDTO getLatestV2(GetLatestV2FormDTO formDTO); + + /** + * @Description 小组历史数据查询V2 + * @Param formDTO + * @Param tokenDto + * @author zxc + * @date 2021/4/21 下午4:08 + */ + List getPastTopicListV2(GetPastTopicListV2FormDTO formDTO); } 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 51a5225d52..302ee743b3 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 @@ -2264,6 +2264,18 @@ public class ResiTopicServiceImpl extends BaseServiceImpl getPastTopicListV2(GetPastTopicListV2FormDTO formDTO) { + return null; + } + /** * @Description 查询用户信息【头像,名字】 * @Param groupType From 5138d1724ffadc048db1a45301c6943701c74507 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 21 Apr 2021 18:03:30 +0800 Subject: [PATCH 062/202] =?UTF-8?q?=E5=BD=93=E5=89=8D=E4=BA=BA=E5=91=98?= =?UTF-8?q?=E6=9C=AA=E8=AF=BB(=E9=80=9A=E7=9F=A5=E3=80=81=E6=B4=BB?= =?UTF-8?q?=E5=8A=A8)=E5=88=97=E8=A1=A8=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/notice/form/UnReadListFormDTO.java | 24 +++++++ .../notice/result/UnReadListResultDTO.java | 55 ++++++++++++++++ .../epmet/modules/group/dao/ResiGroupDao.java | 18 ++++++ .../NoticeReadRecordController.java | 18 ++++++ .../service/NoticeReadRecordService.java | 13 ++++ .../impl/NoticeReadRecordServiceImpl.java | 53 +++++++++++++++ .../service/impl/ResiTopicServiceImpl.java | 3 + .../resources/mapper/group/ResiGroupDao.xml | 64 +++++++++++++++++++ 8 files changed, 248 insertions(+) create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/UnReadListFormDTO.java create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/result/UnReadListResultDTO.java diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/UnReadListFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/UnReadListFormDTO.java new file mode 100644 index 0000000000..129e63989f --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/UnReadListFormDTO.java @@ -0,0 +1,24 @@ +package com.epmet.resi.group.dto.notice.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2021/4/21 下午4:17 + * @DESC + */ +@Data +public class UnReadListFormDTO implements Serializable { + + private static final long serialVersionUID = 2312033892813352767L; + + public interface UnReadListForm{} + + @NotBlank(message = "小组ID不能为空",groups = UnReadListForm.class) + private String groupId; + + private String userId; +} diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/result/UnReadListResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/result/UnReadListResultDTO.java new file mode 100644 index 0000000000..404e74a5d8 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/result/UnReadListResultDTO.java @@ -0,0 +1,55 @@ +package com.epmet.resi.group.dto.notice.result; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2021/4/21 下午4:21 + * @DESC + */ +@Data +public class UnReadListResultDTO implements Serializable { + + private static final long serialVersionUID = -2614612434488988741L; + + /** + * 话题、通知、活动Id + */ + private String id; + + /** + * 发布者的全称(街道-姓氏先生/女士)【专项组显示真实名】 + */ + private String releaseUserName; + + /** + * 话题发布者的头像Url + */ + private String releaseUserHeadPhoto; + + /** + * 发布时间yyyy-MM-dd HH:mm + */ + private String releaseTime; + + /** + * 内容 + */ + private String content; + + /** + * 如果有图片,后台只返回第一张,没有图片此列为空 + */ + private String firstPhoto; + + /** + * 数据类型(topic:话题 notice:通知 act:活动) + */ + private String contentType; + + @JsonIgnore + private String userId; +} 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 59e959b97f..928e039190 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 @@ -24,6 +24,7 @@ import com.epmet.resi.group.dto.group.ResiGroupDTO; 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.LatestTenResultDTO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -277,4 +278,21 @@ public interface ResiGroupDao extends BaseDao { * @date 2021/4/21 上午10:22 */ List selectUserUnReadById(@Param("groupId")String groupId,@Param("ids")List ids); + + /** + * @Description 根据用户ID查询小组下未读的 通知、活动 + * @Param groupId + * @Param userId + * @author zxc + * @date 2021/4/21 下午4:39 + */ + List selectUnReadByUserId(@Param("groupId")String groupId,@Param("userId")String userId); + + /** + * @Description 查询未读的通知和活动信息 + * @Param ids + * @author zxc + * @date 2021/4/21 下午5:08 + */ + List selectUnReadInfos(@Param("ids")List ids); } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeReadRecordController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeReadRecordController.java index a4b992fd0f..7be5648a82 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeReadRecordController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeReadRecordController.java @@ -24,13 +24,17 @@ import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.modules.notice.service.NoticeReadRecordService; import com.epmet.resi.group.dto.notice.form.NoticeReadListFormDTO; import com.epmet.resi.group.dto.notice.form.ReadTypeFormDTO; +import com.epmet.resi.group.dto.notice.form.UnReadListFormDTO; import com.epmet.resi.group.dto.notice.result.NoticeReadListResultDTO; +import com.epmet.resi.group.dto.notice.result.UnReadListResultDTO; 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; +import java.util.List; + /** * 小组通知组成员阅读记录表 @@ -71,4 +75,18 @@ public class NoticeReadRecordController { return new Result(); } + /** + * @Description 当前人员未读(通知、活动)列表查询 + * @Param tokenDto + * @Param formDTO + * @author zxc + * @date 2021/4/21 下午4:23 + */ + @PostMapping("unreadlist") + public Result> unReadList(@LoginUser TokenDto tokenDto, @RequestBody UnReadListFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, UnReadListFormDTO.UnReadListForm.class); + formDTO.setUserId(tokenDto.getUserId()); + return new Result>().ok(noticeReafdRecordService.unReadList(formDTO)); + } + } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeReadRecordService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeReadRecordService.java index fd4a4d6d4b..3d1fe6af33 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeReadRecordService.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeReadRecordService.java @@ -21,7 +21,11 @@ import com.epmet.commons.mybatis.service.BaseService; import com.epmet.modules.notice.entity.NoticeReadRecordEntity; import com.epmet.resi.group.dto.notice.form.NoticeReadListFormDTO; import com.epmet.resi.group.dto.notice.form.ReadTypeFormDTO; +import com.epmet.resi.group.dto.notice.form.UnReadListFormDTO; import com.epmet.resi.group.dto.notice.result.NoticeReadListResultDTO; +import com.epmet.resi.group.dto.notice.result.UnReadListResultDTO; + +import java.util.List; /** * 小组通知组成员阅读记录表 @@ -46,4 +50,13 @@ public interface NoticeReadRecordService extends BaseService unReadList(UnReadListFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeReadRecordServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeReadRecordServiceImpl.java index eac1b1b18d..93b728bcfb 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeReadRecordServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeReadRecordServiceImpl.java @@ -22,21 +22,30 @@ import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.utils.Result; import com.epmet.constant.ReadFlagConstant; import com.epmet.dto.result.UserBaseInfoResultDTO; +import com.epmet.dto.result.UserInfoResultDTO; import com.epmet.feign.EpmetUserOpenFeignClient; +import com.epmet.modules.group.dao.ResiGroupDao; +import com.epmet.modules.group.entity.ResiGroupEntity; import com.epmet.modules.notice.dao.NoticeDao; import com.epmet.modules.notice.dao.NoticeReadRecordDao; import com.epmet.modules.notice.entity.NoticeEntity; import com.epmet.modules.notice.entity.NoticeReadRecordEntity; import com.epmet.modules.notice.redis.NoticeReadRecordRedis; import com.epmet.modules.notice.service.NoticeReadRecordService; +import com.epmet.modules.topic.service.impl.ResiTopicServiceImpl; +import com.epmet.resi.group.dto.group.result.UserReadFlagResultDTO; import com.epmet.resi.group.dto.notice.NoticeReadRecordDTO; import com.epmet.resi.group.dto.notice.form.NoticeReadListFormDTO; import com.epmet.resi.group.dto.notice.form.ReadTypeFormDTO; +import com.epmet.resi.group.dto.notice.form.UnReadListFormDTO; import com.epmet.resi.group.dto.notice.result.NoticeReadListResultDTO; +import com.epmet.resi.group.dto.notice.result.UnReadListResultDTO; +import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; 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; @@ -49,6 +58,7 @@ import java.util.stream.Collectors; * @since v1.0.0 2021-04-19 */ @Service +@Slf4j public class NoticeReadRecordServiceImpl extends BaseServiceImpl implements NoticeReadRecordService { @Autowired @@ -57,6 +67,10 @@ public class NoticeReadRecordServiceImpl extends BaseServiceImpl unReadList(UnReadListFormDTO formDTO) { + // 查询用户小组内未读的 通知 和 活动 + List userUnRead = resiGroupDao.selectUnReadByUserId(formDTO.getGroupId(), formDTO.getUserId()); + if (CollectionUtils.isEmpty(userUnRead)){ + return new ArrayList<>(); + } + // 活动 通知ID集合 + List ids = userUnRead.stream().map(m -> m.getId()).collect(Collectors.toList()); + // 查询未读的通知和活动信息 + List result = resiGroupDao.selectUnReadInfos(ids); + if (CollectionUtils.isEmpty(result)){ + log.debug("用户存在未读消息,但是查询未读的通知和活动信息的时候失败了"); + return new ArrayList<>(); + } + // 查询小组信息 + ResiGroupEntity resiGroup = resiGroupDao.selectById(formDTO.getGroupId()); + List userIds = result.stream().map(m -> m.getUserId()).collect(Collectors.toList()); + List userInfos = topicServiceImpl.disPoseUserInfo(resiGroup.getGroupType(), userIds); + if (!CollectionUtils.isEmpty(userInfos)){ + result.forEach(r -> { + userInfos.forEach(u -> { + if (r.getUserId().equals(u.getUserId())){ + r.setReleaseUserName(u.getReleaseUserName()); + r.setReleaseUserHeadPhoto(u.getReleaseUserHeadPhoto()); + } + }); + }); + } + return result; + } + } \ No newline at end of file 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 302ee743b3..e08ae50e7f 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 @@ -2284,6 +2284,9 @@ public class ResiTopicServiceImpl extends BaseServiceImpl disPoseUserInfo(String groupType,List userIds){ + if (CollectionUtils.isEmpty(userIds)){ + return new ArrayList<>(); + } List result = new ArrayList<>(); Result> userInfo = userOpenFeignClient.queryUserBaseInfo(userIds); if (!userInfo.success()){ 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 5847e40ee0..ea0dd3fac9 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 @@ -703,4 +703,68 @@ ) + + + + + + From 59ec40e6cdb321cf22516b88dbd2c8f08b9c305c Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 21 Apr 2021 18:15:10 +0800 Subject: [PATCH 063/202] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E7=AD=BE=E5=88=B0?= =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/act/form/BuildSignInCodeFormDTO.java | 31 ++++++ .../act/form/BuildSignInCodeResultDTO.java | 14 +++ .../dto/act/result/SetSignTimeResultDTO.java | 1 - .../controller/ActSignInRecordController.java | 19 +++- .../act/service/ActSignInCodeService.java | 3 + .../act/service/ActSignInRecordService.java | 12 ++- .../impl/ActSignInCodeServiceImpl.java | 5 + .../impl/ActSignInRecordServiceImpl.java | 98 +++++++++++++++---- .../epmet/modules/utils/ModuleConstant.java | 5 + 9 files changed, 160 insertions(+), 28 deletions(-) create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/BuildSignInCodeFormDTO.java create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/BuildSignInCodeResultDTO.java diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/BuildSignInCodeFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/BuildSignInCodeFormDTO.java new file mode 100644 index 0000000000..655005efec --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/BuildSignInCodeFormDTO.java @@ -0,0 +1,31 @@ +package com.epmet.resi.group.dto.act.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * 018、获取签到码图片 + * + * @author yinzuomei@elink-cn.com + * @date 2021/4/21 18:01 + */ +@Data +public class BuildSignInCodeFormDTO implements Serializable { + private static final long serialVersionUID = -2806512125925383053L; + + public interface AddUserInternalGroup { + } + + @NotBlank(message = "groupActId不能为空", groups = AddUserInternalGroup.class) + private String groupActId; + + /** + * 当前用户id + */ + @NotBlank(message = "tokenDto获取userId为空", groups = AddUserInternalGroup.class) + private String userId; + + private String customerId; +} diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/BuildSignInCodeResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/BuildSignInCodeResultDTO.java new file mode 100644 index 0000000000..77b474470e --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/BuildSignInCodeResultDTO.java @@ -0,0 +1,14 @@ +package com.epmet.resi.group.dto.act.form; + +import lombok.Data; + +/** + * 018、获取签到码图片 + * + * @author yinzuomei@elink-cn.com + * @date 2021/4/21 18:13 + */ +@Data +public class BuildSignInCodeResultDTO { + private String signInCodeUrl; +} diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/SetSignTimeResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/SetSignTimeResultDTO.java index 08e190e3da..028377add9 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/SetSignTimeResultDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/SetSignTimeResultDTO.java @@ -18,5 +18,4 @@ public class SetSignTimeResultDTO implements Serializable { private String groupActId; private Date signInStartTime; private Date signInEndTime; - private String signInCodeUrl; } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/ActSignInRecordController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/ActSignInRecordController.java index 3e8883dbd6..cb2ed021e4 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/ActSignInRecordController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/ActSignInRecordController.java @@ -22,9 +22,7 @@ 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.act.service.ActSignInRecordService; -import com.epmet.resi.group.dto.act.form.SetSignTimeFormDTO; -import com.epmet.resi.group.dto.act.form.SignInFormDTO; -import com.epmet.resi.group.dto.act.form.SignInRecFormDTO; +import com.epmet.resi.group.dto.act.form.*; import com.epmet.resi.group.dto.act.result.SetSignTimeResultDTO; import com.epmet.resi.group.dto.act.result.SignInRecResultDTO; import org.springframework.beans.factory.annotation.Autowired; @@ -92,4 +90,19 @@ public class ActSignInRecordController { ValidatorUtils.validateEntity(formDTO,SignInRecFormDTO.AddUserInternalGroup.class); return new Result().ok(actSignInRecordService.querySignRecList(formDTO)); } + + /** + * @param tokenDto + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @author yinzuomei + * @description 018、获取签到码图片 + * @Date 2021/4/21 18:05 + **/ + @PostMapping("geturl") + public Result getSignInUrl(@LoginUser TokenDto tokenDto, @RequestBody BuildSignInCodeFormDTO formDTO) { + formDTO.setUserId(tokenDto.getUserId()); + ValidatorUtils.validateEntity(formDTO, BuildSignInCodeFormDTO.AddUserInternalGroup.class); + return new Result().ok(actSignInRecordService.getSignInUrl(formDTO)); + } } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSignInCodeService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSignInCodeService.java index 78bff472cd..469aad289d 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSignInCodeService.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSignInCodeService.java @@ -36,4 +36,7 @@ public interface ActSignInCodeService extends BaseService { * @return com.epmet.resi.group.dto.act.ActSignInCodeDTO */ ActSignInCodeDTO selectLastRec(String groupActId); + + + int saveActSignInCodeEntity(ActSignInCodeEntity actSignInCodeEntity); } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSignInRecordService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSignInRecordService.java index da979840b0..26d1d08743 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSignInRecordService.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSignInRecordService.java @@ -19,9 +19,7 @@ package com.epmet.modules.act.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.modules.act.entity.ActSignInRecordEntity; -import com.epmet.resi.group.dto.act.form.SetSignTimeFormDTO; -import com.epmet.resi.group.dto.act.form.SignInFormDTO; -import com.epmet.resi.group.dto.act.form.SignInRecFormDTO; +import com.epmet.resi.group.dto.act.form.*; import com.epmet.resi.group.dto.act.result.SetSignTimeResultDTO; import com.epmet.resi.group.dto.act.result.SignInRecResultDTO; @@ -65,4 +63,12 @@ public interface ActSignInRecordService extends BaseService uploadResult = ossFeignClient.uploadQrCode(qrCodeMultipartFile); + if (!uploadResult.success()) { + throw new RenException("调用oss服务上传活动签到码失败"); + } + //别忘了插入数据库act_sign_in_code + ActSignInCodeEntity actSignInCodeEntity = new ActSignInCodeEntity(); + actSignInCodeEntity.setCustomerId(formDTO.getCustomerId()); + actSignInCodeEntity.setGroupActId(formDTO.getGroupActId()); + actSignInCodeEntity.setUrl(uploadResult.getData().getUrl()); + actSignInCodeService.saveActSignInCodeEntity(actSignInCodeEntity); + resultDTO.setSignInCodeUrl(uploadResult.getData().getUrl()); + } + return resultDTO; + } } \ No newline at end of file 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 15334f14e9..fa0f11c3c1 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 @@ -369,6 +369,11 @@ public interface ModuleConstant extends Constant { */ String CODE_INVITE_PAGE = "pages/group/group/invitation/invitation"; + /** + * 活动扫码签到,对应的跳转到 活动详情页面 + */ + String GROUP_ACT_DETAIL_PAGE = "XXXXXXXXXXXXXXXXXXXXX找莹姐要路径"; + String TOPIC_CONTENT_AND_VOICE_IS_NULL = "请输入话题内容或语音"; /** From 952d5039e64721c95e091d41d50897504c1afc2d Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 21 Apr 2021 18:21:34 +0800 Subject: [PATCH 064/202] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E7=AD=BE=E5=88=B0?= =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/resi/group/dto/act/form/BuildSignInCodeFormDTO.java | 1 + .../epmet/modules/act/controller/ActSignInRecordController.java | 1 + 2 files changed, 2 insertions(+) diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/BuildSignInCodeFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/BuildSignInCodeFormDTO.java index 655005efec..5afd36a07a 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/BuildSignInCodeFormDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/BuildSignInCodeFormDTO.java @@ -27,5 +27,6 @@ public class BuildSignInCodeFormDTO implements Serializable { @NotBlank(message = "tokenDto获取userId为空", groups = AddUserInternalGroup.class) private String userId; + @NotBlank(message = "tokenDto获取customerId为空", groups = AddUserInternalGroup.class) private String customerId; } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/ActSignInRecordController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/ActSignInRecordController.java index cb2ed021e4..fa467a877c 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/ActSignInRecordController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/ActSignInRecordController.java @@ -102,6 +102,7 @@ public class ActSignInRecordController { @PostMapping("geturl") public Result getSignInUrl(@LoginUser TokenDto tokenDto, @RequestBody BuildSignInCodeFormDTO formDTO) { formDTO.setUserId(tokenDto.getUserId()); + formDTO.setCustomerId(tokenDto.getCustomerId()); ValidatorUtils.validateEntity(formDTO, BuildSignInCodeFormDTO.AddUserInternalGroup.class); return new Result().ok(actSignInRecordService.getSignInUrl(formDTO)); } From 1ae66b4f50c59ab375a819aedb1b510aca120f62 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Thu, 22 Apr 2021 09:34:59 +0800 Subject: [PATCH 065/202] =?UTF-8?q?=E5=B0=8F=E7=BB=84=E9=80=9A=E7=9F=A5?= =?UTF-8?q?=E6=B6=89=E5=8F=8A=E7=9B=B8=E5=85=B3db?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../db/migration/V0.0.15__group_notice.sql | 99 +++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 epmet-module/resi-group/resi-group-server/src/main/resources/db/migration/V0.0.15__group_notice.sql diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/db/migration/V0.0.15__group_notice.sql b/epmet-module/resi-group/resi-group-server/src/main/resources/db/migration/V0.0.15__group_notice.sql new file mode 100644 index 0000000000..bd03236ed9 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/db/migration/V0.0.15__group_notice.sql @@ -0,0 +1,99 @@ +ALTER TABLE `resi_group` +ADD COLUMN `GROUP_TYPE` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'ordinary' COMMENT '小组类型(ordinary:楼院小组 branch:支部小组)' AFTER `VISIT_SWITCH`; + + +CREATE TABLE `notice` ( + `ID` varchar(64) NOT NULL COMMENT '主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', + `AGENCY_ID` varchar(64) NOT NULL COMMENT '组织机构Id', + `GRID_ID` varchar(64) NOT NULL COMMENT '小组所属网格id', + `GROUP_ID` varchar(64) NOT NULL COMMENT '小组Id', + `TITLE` varchar(64) DEFAULT NULL COMMENT '通知标题', + `CONTENT` varchar(1024) DEFAULT NULL COMMENT '通知内容', + `IS_CHANGE` varchar(32) NOT NULL COMMENT '是否变更过(是:yes 否:no)', + `CHANGE_TIME` datetime NOT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '通知变更时间,初始值为首次创建时间', + `DEL_FLAG` varchar(1) NOT NULL 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=COMPACT COMMENT='小组通知表'; + + +CREATE TABLE `notice_attachment` ( + `ID` varchar(64) NOT NULL COMMENT '主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', + `NOTICE_ID` varchar(64) NOT NULL COMMENT '通知Id', + `FILE_NAME` varchar(255) DEFAULT NULL COMMENT '文件名', + `ATTACHMENT_NAME` varchar(64) DEFAULT NULL COMMENT '附件名(uuid随机生成)', + `ATTACHMENT_SIZE` int(11) DEFAULT NULL COMMENT '文件大小,单位b', + `ATTACHMENT_FORMAT` varchar(64) DEFAULT NULL COMMENT '文件格式(JPG、PNG、PDF、JPEG、BMP、MP4、WMA、M4A、MP3、DOC、DOCX、XLS)', + `ATTACHMENT_TYPE` varchar(64) DEFAULT NULL COMMENT '附件类型((图片 - image、 视频 - video、 语音 - voice、 文档 - doc))', + `ATTACHMENT_URL` varchar(255) NOT NULL COMMENT '附件地址', + `SORT` int(1) NOT NULL COMMENT '排序字段', + `DURATION` int(11) unsigned zerofill DEFAULT '00000000000' COMMENT '语音或视频时长,秒', + `DEL_FLAG` varchar(1) NOT NULL 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=COMPACT COMMENT='小组通知附件表'; + + +CREATE TABLE `notice_comment` ( + `ID` varchar(64) NOT NULL COMMENT '主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', + `NOTICE_ID` varchar(64) NOT NULL COMMENT '通知Id', + `COMMENT_CONTENT` varchar(300) DEFAULT NULL COMMENT '评论内容(最多300字符)', + `DEL_FLAG` varchar(1) NOT NULL 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=COMPACT COMMENT='小组通知评论表'; + + +CREATE TABLE `notice_read_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', + `NOTICE_ID` varchar(64) NOT NULL COMMENT '通知Id', + `USER_ID` varchar(64) NOT NULL COMMENT '用户id', + `READ_FLAG` varchar(32) NOT NULL DEFAULT 'unread' COMMENT 'read已读、un_read未读', + `DEL_FLAG` varchar(1) NOT NULL DEFAULT '0' COMMENT '删除标识', + `REVISION` int(11) NOT NULL DEFAULT '0' 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='小组通知组成员阅读记录表'; + + +CREATE TABLE `resi_group_setup` ( + `ID` varchar(64) NOT NULL COMMENT '主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID,初始默认为default', + `LOGO` varchar(256) DEFAULT NULL COMMENT '默认小组头像', + `NAME` varchar(64) DEFAULT NULL COMMENT '小组名称', + `DESCRIBE` varchar(500) DEFAULT NULL COMMENT '小组简介', + `GROUP_TYPE` varchar(32) NOT NULL DEFAULT 'ordinary' COMMENT '小组类型(ordinary:楼院小组 branch:支部小组)', + `CATEGORY` varchar(32) NOT NULL COMMENT '专用:dedicated;常用:common_used', + `DEL_FLAG` varchar(1) NOT NULL 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=COMPACT COMMENT='建组设置'; + +INSERT INTO `epmet_resi_group`.`resi_group_setup` (`ID`, `CUSTOMER_ID`, `LOGO`, `NAME`, `DESCRIBE`, `GROUP_TYPE`, `CATEGORY`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('6ffe1249a0b411eba4ebc03fd56f7847', 'default', 'https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet/test/20210421/14a78c5ffe08407586a62dd2a12cc316.jpg', '楼院小组', '党员及热心居民建组,就身边事进行小范围讨论,形成议题,用群众路线解决群众问题,发挥群团带动、居民自治。', 'ordinary', 'common_used', '0', '0', 'APP_USER', '2021-04-19 10:07:37', 'APP_USER', '2021-04-19 10:07:45'); +INSERT INTO `epmet_resi_group`.`resi_group_setup` (`ID`, `CUSTOMER_ID`, `LOGO`, `NAME`, `DESCRIBE`, `GROUP_TYPE`, `CATEGORY`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('849ffc2ea0b411eba4ebc03fd56f7847', 'default', 'https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet/test/20210421/d80dff7d1be54b98949208b63cda2b78.jpg', '支部小组', '组长建议为支部书记、支部组织委员,成员为支部内所有党员。组内组织活动,如:“三会一课”、“联建共建”。', 'branch', 'dedicated', '0', '0', 'APP_USER', '2021-04-19 10:07:37', 'APP_USER', '2021-04-19 10:07:45'); + 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 066/202] =?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 067/202] =?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 068/202] =?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 069/202] =?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 070/202] =?UTF-8?q?group=5Fmessage=E6=96=B0=E5=A2=9Estatus?= =?UTF-8?q?:?= 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 071/202] 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 072/202] 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 073/202] =?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 074/202] =?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 075/202] 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 076/202] 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 077/202] 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 078/202] =?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 079/202] =?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 080/202] =?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 + } /** From 8d8b76f875bc9b1dbc34b776171c1965c04e46d7 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 22 Apr 2021 16:59:25 +0800 Subject: [PATCH 081/202] =?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 | 2 ++ .../result/GetPastTopicListV2ResultDTO.java | 3 +- .../topic/controller/ResiTopicController.java | 1 + .../service/impl/ResiTopicServiceImpl.java | 16 ++++++++++ .../epmet/modules/utils/ModuleConstant.java | 2 ++ .../com/epmet/dto/form/UserBadgesFormDTO.java | 25 +++++++++++++++ .../epmet/dto/result/UserBadgesResultDTO.java | 21 +++++++++++++ .../epmet/feign/EpmetUserOpenFeignClient.java | 9 ++++++ .../EpmetUserOpenFeignClientFallback.java | 5 +++ .../com/epmet/controller/BadgeController.java | 11 +++++++ .../java/com/epmet/service/BadgeService.java | 13 +++++--- .../epmet/service/impl/BadgeServiceImpl.java | 31 +++++++++++++++++++ 12 files changed, 134 insertions(+), 5 deletions(-) create mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/UserBadgesFormDTO.java create mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/UserBadgesResultDTO.java 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 4c66b02c47..8004ff6401 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 @@ -28,4 +28,6 @@ public class GetPastTopicListV2FormDTO implements Serializable { private Integer pageNo; private String userId; + + private String customerId; } 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 d0dbe33963..3885933a78 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 @@ -4,6 +4,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; import java.io.Serializable; +import java.util.ArrayList; import java.util.List; /** @@ -74,7 +75,7 @@ public class GetPastTopicListV2ResultDTO implements Serializable { /** * 徽章Url集合 */ - private List badgeList; + private List badgeList = new ArrayList<>(); @JsonIgnore private String userId; diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/controller/ResiTopicController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/controller/ResiTopicController.java index a53708526d..aa8158ede0 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/controller/ResiTopicController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/controller/ResiTopicController.java @@ -467,6 +467,7 @@ public class ResiTopicController { public Result> getPastTopicListV2(@RequestBody GetPastTopicListV2FormDTO formDTO,@LoginUser TokenDto tokenDto){ ValidatorUtils.validateEntity(formDTO, GetPastTopicListV2FormDTO.GetPastTopicListV2Form.class); formDTO.setUserId(tokenDto.getUserId()); + formDTO.setCustomerId(tokenDto.getCustomerId()); return new Result>().ok(topicService.getPastTopicListV2(formDTO)); } } 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 2d37f62fba..dde0ed3f86 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 @@ -188,6 +188,9 @@ public class ResiTopicServiceImpl extends BaseServiceImpl userIds = infos.stream().map(m -> m.getUserId()).collect(Collectors.toList()); // 用户信息 List userInfos = this.disPoseUserInfo(resiGroup.getGroupType(), userIds); + // 查询用户徽章信息 + Result> badgeResult = epmetUserOpenFeignClient.userBadges(new UserBadgesFormDTO()); + if (!badgeResult.success()){ + throw new RenException(ModuleConstant.GET_BADGE_INFO_ERR); + } // 各字段赋值 infos.forEach(i -> { // 用户头像,姓名赋值 @@ -2338,6 +2346,14 @@ public class ResiTopicServiceImpl extends BaseServiceImpl { + if (i.getUserId().equals(b.getUserId())){ + i.setBadgeList(b.getBadgeIcons()); + } + }); + } }); 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 e22a1b766a..383433761f 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 @@ -402,4 +402,6 @@ public interface ModuleConstant extends Constant { */ String READ_FLAG_YES = "read"; + String GET_BADGE_INFO_ERR = "获取徽章信息失败了"; + } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/UserBadgesFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/UserBadgesFormDTO.java new file mode 100644 index 0000000000..4585b1d080 --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/UserBadgesFormDTO.java @@ -0,0 +1,25 @@ +package com.epmet.dto.form; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2021/4/22 下午4:13 + * @DESC + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +public class UserBadgesFormDTO implements Serializable { + + private static final long serialVersionUID = -5211565974325345262L; + + private String customerId; + + private List userIds; +} diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/UserBadgesResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/UserBadgesResultDTO.java new file mode 100644 index 0000000000..f0230c0772 --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/UserBadgesResultDTO.java @@ -0,0 +1,21 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2021/4/22 下午4:09 + * @DESC + */ +@Data +public class UserBadgesResultDTO implements Serializable { + + private static final long serialVersionUID = -1504387869251002117L; + + private String userId; + + private List badgeIcons; +} diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java index 8a6b4db22a..f85ba6d782 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java @@ -521,4 +521,13 @@ public interface EpmetUserOpenFeignClient { */ @GetMapping(value = "/epmetuser/userrole/ispartymember") Result selectIsPartyMemberByUserId(@RequestParam("userId") String userId); + + /** + * @Description 查询用户徽章 + * @Param formDTO + * @author zxc + * @date 2021/4/22 下午4:17 + */ + @PostMapping("/epmetuser/badge/userbadges") + Result> userBadges(@RequestBody UserBadgesFormDTO formDTO); } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java index 7cb96271ec..518cca9cef 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java @@ -368,4 +368,9 @@ public class EpmetUserOpenFeignClientFallback implements EpmetUserOpenFeignClien public Result selectIsPartyMemberByUserId(String userId) { return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "selectIsPartyMemberByUserId", userId); } + + @Override + public Result> userBadges(UserBadgesFormDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "userBadges", formDTO); + } } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/BadgeController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/BadgeController.java index edf52d1f97..a5d13c581f 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/BadgeController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/BadgeController.java @@ -179,4 +179,15 @@ public class BadgeController { public Result> queryGridAuditingBadgeCount(@RequestBody List gridIdList) { return new Result>().ok(badgeService.queryGridAuditingBadgeCount(gridIdList)); } + + /** + * @Description 查询用户徽章 + * @Param formDTO + * @author zxc + * @date 2021/4/22 下午4:17 + */ + @PostMapping("userbadges") + public Result> userBadges(@RequestBody UserBadgesFormDTO formDTO){ + return new Result>().ok(badgeService.userBadges(formDTO)); + } } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/BadgeService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/BadgeService.java index b409d5709b..f89f180458 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/BadgeService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/BadgeService.java @@ -21,10 +21,7 @@ import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.dto.BadgeDTO; -import com.epmet.dto.form.AddBadgeFormDTO; -import com.epmet.dto.form.BadgeAuditFormDTO; -import com.epmet.dto.form.BadgeFormDTO; -import com.epmet.dto.form.EditBadgeFormDTO; +import com.epmet.dto.form.*; import com.epmet.dto.result.*; import com.epmet.entity.BadgeEntity; @@ -187,4 +184,12 @@ public interface BadgeService extends BaseService { * @Date 2020/11/12 15:56 **/ List queryGridAuditingBadgeCount(List gridIdList); + + /** + * @Description 查询用户徽章 + * @Param formDTO + * @author zxc + * @date 2021/4/22 下午4:17 + */ + List userBadges(UserBadgesFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/BadgeServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/BadgeServiceImpl.java index 3a92a310fb..dcdd39d4f1 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/BadgeServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/BadgeServiceImpl.java @@ -29,6 +29,8 @@ import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.exception.ValidateException; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.redis.RedisKeys; +import com.epmet.commons.tools.redis.RedisUtils; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; @@ -56,6 +58,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.*; +import java.util.stream.Collectors; /** * 徽章 @@ -83,6 +86,8 @@ public class BadgeServiceImpl extends BaseServiceImpl imp private EpmetMessageOpenFeignClient epmetMessageOpenFeignClient; @Autowired private UserBadgeDao userBadgeDao; + @Autowired + private RedisUtils redisUtils; @Override @@ -449,4 +454,30 @@ public class BadgeServiceImpl extends BaseServiceImpl imp return baseDao.queryGridAuditingBadgeCount(gridIdList); } + /** + * @Description 查询用户徽章 + * @Param formDTO + * @author zxc + * @date 2021/4/22 下午4:17 + */ + @Override + public List userBadges(UserBadgesFormDTO formDTO) { + String customerId = formDTO.getCustomerId(); + List userIds = formDTO.getUserIds(); + if (CollectionUtils.isEmpty(userIds)){ + return new ArrayList<>(); + } + List result = new ArrayList<>(); + userIds.forEach(userId -> { + List badges = redisUtils.lrange(RedisKeys.getResiUserBadgeKey(customerId, userId), NumConstant.ZERO, NumConstant.ONE_NEG, UserBadgeUnitFormDTO.class); + if (!CollectionUtils.isEmpty(badges)){ + UserBadgesResultDTO b = new UserBadgesResultDTO(); + b.setUserId(userId); + b.setBadgeIcons(badges.stream().map(m -> m.getBadgeIcon()).collect(Collectors.toList())); + result.add(b); + } + }); + return result; + } + } \ No newline at end of file From f54b83d033bbda4ebe215027fcd0e58abfad5ba3 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 22 Apr 2021 17:46:09 +0800 Subject: [PATCH 082/202] =?UTF-8?q?=E6=9A=82=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/commons/tools/redis/RedisKeys.java | 30 ++++ .../epmet/commons/tools/redis/RedisUtils.java | 20 ++- .../resi/group/dto/act/GroupActInfoDTO.java | 4 + .../group/dto/member/ResiGroupMemberDTO.java | 5 +- .../controller/GroupActInfoController.java | 2 +- .../act/entity/GroupActInfoEntity.java | 6 + .../act/service/GroupActInfoService.java | 1 + .../service/impl/GroupActInfoServiceImpl.java | 130 ++++++++++++++++-- .../modules/constant/GroupActConstant.java | 2 + .../member/entity/ResiGroupMemberEntity.java | 5 +- .../epmet/modules/utils/ModuleConstant.java | 2 +- 11 files changed, 184 insertions(+), 23 deletions(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java index 763ce76d3e..0dfa22915c 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java @@ -8,7 +8,9 @@ package com.epmet.commons.tools.redis; +import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.StrConstant; +import com.epmet.commons.tools.utils.DateUtils; import org.apache.commons.lang3.StringUtils; /** @@ -429,4 +431,32 @@ public class RedisKeys { public static String getThirdPlatformAccessTokenKey(String platformId) { return rootPrefix.concat("thirdplatform:accesstoken:").concat(platformId); } + + /** + * @return 设置组员已读、未读标识 + * @param source :act notice + * @param groupId 小组id + * @param sourceId 活动id,或者通知id + * @author yinzuomei + * @description groupread:202104:act:groupId:actId + * @Date 2021/4/22 16:38 + **/ + public static String getGroupMsgReadKey(String source, String groupId, String sourceId) { + String currentMonth= DateUtils.getBeforeNMonth(NumConstant.ZERO); + return "groupread:".concat(currentMonth).concat(":").concat(source).concat(":").concat(groupId).concat(":").concat(sourceId); + } + + /** + * @return 设置应读人员标识 ,默认全部赋值1 + * @param source :act notice + * @param groupId 小组id + * @param sourceId 活动id,或者通知id + * @author yinzuomei + * @description groupread:user:202104:act:groupId:actId + * @Date 2021/4/22 16:38 + **/ + public static String getGroupMsgShouldReadUser(String source, String groupId, String sourceId) { + String currentMonth= DateUtils.getBeforeNMonth(NumConstant.ZERO); + return "groupread:user:".concat(currentMonth).concat(":").concat(source).concat(":").concat(groupId).concat(":").concat(sourceId); + } } 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 dac7d44896..cbd00c3aeb 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 @@ -13,10 +13,7 @@ import com.epmet.commons.tools.exception.RenException; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory; -import org.springframework.data.redis.core.HashOperations; -import org.springframework.data.redis.core.RedisTemplate; -import org.springframework.data.redis.core.StringRedisTemplate; -import org.springframework.data.redis.core.ZSetOperations; +import org.springframework.data.redis.core.*; import org.springframework.data.redis.support.atomic.RedisAtomicLong; import org.springframework.stereotype.Component; import org.springframework.util.CollectionUtils; @@ -422,4 +419,19 @@ public class RedisUtils { return redisTemplate.hasKey(key); } + public Boolean setBit(String key, long offset, boolean value) { + return redisTemplate.opsForValue().setBit(key, offset, value); + } + + public Boolean getBit(String key, long offset) { + return redisTemplate.opsForValue().getBit(key, offset); + } + + public Long bitCount(String key) { + return redisTemplate.execute((RedisCallback) con -> con.bitCount(key.getBytes())); + } + + public Long bitCount(String key, int start, int end) { + return redisTemplate.execute((RedisCallback) con -> con.bitCount(key.getBytes(), start, end)); + } } diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/GroupActInfoDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/GroupActInfoDTO.java index 5b63bbf6be..66fa6efdfa 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/GroupActInfoDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/GroupActInfoDTO.java @@ -184,4 +184,8 @@ public class GroupActInfoDTO implements Serializable { */ private Date updatedTime; + /** + * 应读人数 + */ + private Integer shouldRead; } \ 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/ResiGroupMemberDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/member/ResiGroupMemberDTO.java index f1832f7958..0f834100fa 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/member/ResiGroupMemberDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/member/ResiGroupMemberDTO.java @@ -17,9 +17,10 @@ package com.epmet.resi.group.dto.member; +import lombok.Data; + import java.io.Serializable; import java.util.Date; -import lombok.Data; /** @@ -102,4 +103,6 @@ public class ResiGroupMemberDTO implements Serializable { * 客户Id * */ private String customerId; + + private Integer tempNum; } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java index d2231f005b..8a91e31808 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java @@ -90,7 +90,7 @@ public class GroupActInfoController { public Result queryReadList(@RequestBody @LoginUser TokenDto tokenDto, @RequestBody ActReadViewFormDTO actReadViewFormDTO){ actReadViewFormDTO.setUserId(tokenDto.getUserId()); ValidatorUtils.validateEntity(actReadViewFormDTO,ActReadViewFormDTO.AddUserInternalGroup.class); - return new Result().ok(groupActInfoService.queryReadList(actReadViewFormDTO)); + return new Result().ok(groupActInfoService.queryReadListV2(actReadViewFormDTO)); } /** diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/GroupActInfoEntity.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/GroupActInfoEntity.java index 5314c9c49f..18939138f8 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/GroupActInfoEntity.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/GroupActInfoEntity.java @@ -153,4 +153,10 @@ public class GroupActInfoEntity extends BaseEpmetEntity { */ private String publishUserId; + /** + * 应读人数 + */ + private Integer shouldRead; + + } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/GroupActInfoService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/GroupActInfoService.java index b815bb7358..9fd25cadf8 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/GroupActInfoService.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/GroupActInfoService.java @@ -58,6 +58,7 @@ public interface GroupActInfoService extends BaseService { */ NoticeReadListResultDTO queryReadList(ActReadViewFormDTO actReadViewFormDTO); + NoticeReadListResultDTO queryReadListV2(ActReadViewFormDTO actReadViewFormDTO); /** * 011、取消活动 * 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 771435fad6..072f75637e 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 @@ -25,6 +25,8 @@ import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.redis.RedisKeys; +import com.epmet.commons.tools.redis.RedisUtils; import com.epmet.commons.tools.scan.param.ImgScanParamDTO; import com.epmet.commons.tools.scan.param.ImgTaskDTO; import com.epmet.commons.tools.scan.param.TextScanParamDTO; @@ -122,6 +124,8 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl contentList = constructText(groupActInfoEntity.getId(), formDTO.getCustomerId(), formDTO.getTextList()); List imgList = constructImg(groupActInfoEntity.getId(), formDTO.getCustomerId(), formDTO.getImgList()); + //包含组长 List memberDTOList=resiGroupMemberService.getMemberList(formDTO.getGroupId()); - List readRecordEntityList=constructReadRec(groupActInfoEntity.getId(), - formDTO.getCustomerId(), - formDTO.getGroupId(), - formDTO.getPublishUserId(), - groupDTO.getGridId(), - memberDTOList); + //应读数减-1,去掉组长 + groupActInfoEntity.setShouldRead(memberDTOList.size()-NumConstant.ONE); + //2、插入活动内容 contentList.forEach(textContentEntity->{ groupActContentDao.insert(textContentEntity); @@ -176,10 +178,9 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl{ - actReadRecordDao.insert(readRecordEntity); - }); + //4、插入应读记录表!!!!! + saveActReadRecord(groupActInfoEntity,memberDTOList); + //5、发送站内信 sendMessage(memberDTOList,formDTO,groupActInfoEntity,groupDTO); @@ -190,6 +191,32 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl memberDTOList) { + String actReadKey= RedisKeys.getGroupMsgReadKey(GroupActConstant.ACT_STR,groupActInfoEntity.getGroupId(),groupActInfoEntity.getId()); + String actShoudReadUserKey=RedisKeys.getGroupMsgShouldReadUser(GroupActConstant.ACT_STR,groupActInfoEntity.getGroupId(),groupActInfoEntity.getId()); + List readRecordEntityList=new ArrayList<>(); + memberDTOList.forEach(memberDTO->{ + ActReadRecordEntity actReadRecordEntity=new ActReadRecordEntity(); + actReadRecordEntity.setCustomerId(groupActInfoEntity.getCustomerId()); + actReadRecordEntity.setGroupActId(groupActInfoEntity.getId()); + actReadRecordEntity.setReadFlag(GroupActConstant.UN_READ); + actReadRecordEntity.setUserId(memberDTO.getCustomerUserId()); + actReadRecordEntity.setShouldBeRead(Constant.YES); + actReadRecordEntity.setGroupId(groupActInfoEntity.getGroupId()); + actReadRecordEntity.setGridId(groupActInfoEntity.getGridId()); + if(!groupActInfoEntity.getPublishUserId().equals(memberDTO.getCustomerUserId())){ + readRecordEntityList.add(actReadRecordEntity); + //默认是未读 + redisUtils.setBit(actReadKey,memberDTO.getTempNum(),false); + //当前所有成员默认应读 + redisUtils.setBit(actShoudReadUserKey,memberDTO.getTempNum(),true); + } + }); + /*readRecordEntityList.forEach(readRecordEntity->{ + actReadRecordDao.insert(readRecordEntity); + });*/ + } + private void saveGroupMessage(GroupActInfoEntity groupActInfoEntity) { GroupMessageDTO groupMessageDTO=groupMessageService.getByMessageId(groupActInfoEntity.getId()); if(null==groupMessageDTO){ @@ -479,8 +506,9 @@ public class GroupActInfoServiceImpl extends BaseServiceImplNumConstant.ZERO?false:true); //返回详情,并且已读状态 ActReadRecordEntity actReadRecordEntity=actReadRecordDao.selectUserRec(formDTO.getGroupActId(),formDTO.getUserId()); + String actReadKey= RedisKeys.getGroupMsgReadKey(GroupActConstant.ACT_STR,groupActInfoEntity.getGroupId(),groupActInfoEntity.getId()); if(null== actReadRecordEntity){ - //插入 + //todo 插入不在应读列表里的是否还记录呢???? ActReadRecordEntity insertEntity=new ActReadRecordEntity(); insertEntity.setCustomerId(groupActInfoEntity.getCustomerId()); insertEntity.setGroupActId(formDTO.getGroupActId()); @@ -489,13 +517,19 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl已读 actReadRecordEntity.setReadFlag(GroupActConstant.READ); actReadRecordEntity.setUpdatedTime(new Date()); - actReadRecordDao.updateById(actReadRecordEntity); + // todo + // actReadRecordDao.updateById(actReadRecordEntity); + + //状态改为已读 + redisUtils.setBit(actReadKey,resiGroupMemberDTO.getTempNum(),true); } } return resultDTO; @@ -625,6 +659,76 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl readList = new ArrayList<>(); + List unReadList = new ArrayList<>(); + //1.根据活动id,查询应读人员列表 + GroupActInfoEntity groupActInfoEntity=baseDao.selectById(actReadViewFormDTO.getGroupActId()); + List memembersList=resiGroupMemberService.getMemberList(groupActInfoEntity.getGroupId()); + //2.调用user服务,查询人员基础数据 + List userIdList = memembersList.stream().map(ResiGroupMemberDTO::getCustomerUserId).collect(Collectors.toList()); + Result> result = epmetUserOpenFeignClient.queryUserBaseInfo(userIdList); + if (!result.success()) { + throw new RenException("调用user服务,获取用户基础数据失败"); + } + + List resultDTOList = result.getData(); + if (!CollectionUtils.isEmpty(resultDTOList)) { + //3.遍历封装数据并返回 + for (ResiGroupMemberDTO memberDTO : memembersList) { + //todo + //1)怎么判断当前组员属于应读人员? + //2)应读人员,是否已读?? + String userActKey = RedisKeys.getGroupMsgReadKey(GroupActConstant.ACT_STR, groupActInfoEntity.getGroupId(), groupActInfoEntity.getId()); + Boolean readFlag = redisUtils.getBit(userActKey, memberDTO.getTempNum()); + if (readFlag) { + //已读 + StringBuffer name = new StringBuffer(); + StringBuffer url = new StringBuffer(); + resultDTOList.forEach(user -> { + if (memberDTO.getCustomerUserId().equals(user.getUserId())) { + name.append(user.getSurname()).append(user.getName()); + url.append(user.getHeadImgUrl()); + } + }); + NoticeReadListResultDTO.NoticeReafdRecord read = new NoticeReadListResultDTO.NoticeReafdRecord(); + read.setUserId(memberDTO.getCustomerUserId()); + read.setUserName(name.toString()); + read.setUserHeadPhoto(url.toString()); + readList.add(read); + } else { + //todo + // 未读人员 ?????? + StringBuffer name = new StringBuffer(); + StringBuffer url = new StringBuffer(); + resultDTOList.forEach(user -> { + if (memberDTO.getCustomerUserId().equals(user.getUserId())) { + name.append(user.getSurname()).append(user.getName()); + url.append(user.getHeadImgUrl()); + } + }); + NoticeReadListResultDTO.NoticeReafdRecord unRead = new NoticeReadListResultDTO.NoticeReafdRecord(); + unRead.setUserId(memberDTO.getCustomerUserId()); + unRead.setUserName(name.toString()); + unRead.setUserHeadPhoto(url.toString()); + unReadList.add(unRead); + } + } + } + //已读人数 + String actReadKey= RedisKeys.getGroupMsgReadKey(GroupActConstant.ACT_STR,groupActInfoEntity.getGroupId(),groupActInfoEntity.getId()); + long readNum=redisUtils.bitCount(actReadKey); + resultDTO.setReadCount((int) readNum); + //未读人数 + resultDTO.setUnReadCount(groupActInfoEntity.getShouldRead()-resultDTO.getReadCount()); + //已读列表 + resultDTO.setReadList(readList); + //未读列表 + resultDTO.setUnReadList(unReadList); + return resultDTO; + } /** * 011、取消活动 * diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/constant/GroupActConstant.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/constant/GroupActConstant.java index 03f127b29c..4eb0ad9dd3 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/constant/GroupActConstant.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/constant/GroupActConstant.java @@ -37,4 +37,6 @@ public interface GroupActConstant { // blank: 不显示; display:显示 String BLANK="blank"; String DISPLAY="display"; + + String ACT_STR="act"; } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/entity/ResiGroupMemberEntity.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/entity/ResiGroupMemberEntity.java index 3d9a9ac553..6f43bf1461 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/entity/ResiGroupMemberEntity.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/entity/ResiGroupMemberEntity.java @@ -20,13 +20,10 @@ package com.epmet.modules.member.entity; import com.baomidou.mybatisplus.annotation.FieldFill; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; -import java.util.Date; - /** * 群组成员关系表 * @@ -76,4 +73,6 @@ public class ResiGroupMemberEntity extends BaseEpmetEntity { @TableField(fill = FieldFill.INSERT) private String customerId; + private Integer tempNum; + } 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 e22a1b766a..915f96fa0b 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 @@ -372,7 +372,7 @@ public interface ModuleConstant extends Constant { /** * 活动扫码签到,对应的跳转到 活动详情页面 */ - String GROUP_ACT_DETAIL_PAGE = "XXXXXXXXXXXXXXXXXXXXX找莹姐要路径"; + String GROUP_ACT_DETAIL_PAGE = "pages/group/activity/detail"; String TOPIC_CONTENT_AND_VOICE_IS_NULL = "请输入话题内容或语音"; From 6b13f7c1313578e63ed44509180b9e29c57c277f Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 22 Apr 2021 23:36:29 +0800 Subject: [PATCH 083/202] back --- .../modules/act/controller/GroupActInfoController.java | 7 +++++++ .../modules/act/service/impl/GroupActInfoServiceImpl.java | 8 ++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java index 8a91e31808..da742b975d 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java @@ -88,6 +88,13 @@ public class GroupActInfoController { **/ @PostMapping("readlist") public Result queryReadList(@RequestBody @LoginUser TokenDto tokenDto, @RequestBody ActReadViewFormDTO actReadViewFormDTO){ + actReadViewFormDTO.setUserId(tokenDto.getUserId()); + ValidatorUtils.validateEntity(actReadViewFormDTO,ActReadViewFormDTO.AddUserInternalGroup.class); + return new Result().ok(groupActInfoService.queryReadList(actReadViewFormDTO)); + } + + @PostMapping("readlistV2") + public Result queryReadListV2(@RequestBody @LoginUser TokenDto tokenDto, @RequestBody ActReadViewFormDTO actReadViewFormDTO){ actReadViewFormDTO.setUserId(tokenDto.getUserId()); ValidatorUtils.validateEntity(actReadViewFormDTO,ActReadViewFormDTO.AddUserInternalGroup.class); return new Result().ok(groupActInfoService.queryReadListV2(actReadViewFormDTO)); 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 072f75637e..1312d7642b 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 @@ -212,9 +212,9 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl{ + readRecordEntityList.forEach(readRecordEntity->{ actReadRecordDao.insert(readRecordEntity); - });*/ + }); } private void saveGroupMessage(GroupActInfoEntity groupActInfoEntity) { @@ -518,7 +518,7 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl Date: Fri, 23 Apr 2021 09:20:17 +0800 Subject: [PATCH 084/202] =?UTF-8?q?group=5Fmessage=20=E5=8E=86=E5=8F=B2?= =?UTF-8?q?=E6=95=B0=E6=8D=AEsql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../db/migration/V0.0.16__group_act.sql | 22 +++++++++++++++++++ 1 file changed, 22 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 819b58e9ee..a80b4f042b 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 @@ -17,6 +17,28 @@ CREATE TABLE `group_message` ( PRIMARY KEY (`ID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='组内消息(话题、通知、活动)记录表'; +INSERT INTO group_message SELECT + md5(uuid()), + rg.customer_id, + rg.grid_id, + rt.group_id, + 'topic', + rt.id, + rt.created_by, + rt.`status`, + rt.created_time, + '0', + '0', + rt.created_by, + NOW(), + rt.UPDATED_BY, + NOW() + FROM + resi_topic rt + INNER JOIN resi_group rg ON rt.group_id = rg.id + WHERE + rt.del_flag = '0' + AND rg.del_flag = '0' /* Navicat Premium Data Transfer From 49c184805889ac5d98d5da1575cd49288bf510a0 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 23 Apr 2021 10:27:07 +0800 Subject: [PATCH 085/202] =?UTF-8?q?=E7=AD=BE=E5=88=B0=E7=A0=81=E7=95=8C?= =?UTF-8?q?=E9=9D=A2=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/modules/utils/ModuleConstant.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 fd2a9310c9..038b0ad745 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 @@ -372,7 +372,7 @@ public interface ModuleConstant extends Constant { /** * 活动扫码签到,对应的跳转到 活动详情页面 */ - String GROUP_ACT_DETAIL_PAGE = "pages/group/activity/detail"; + String GROUP_ACT_DETAIL_PAGE = "subpages/group/pages/group/activity/detail"; String TOPIC_CONTENT_AND_VOICE_IS_NULL = "请输入话题内容或语音"; From db35fa98b1a6101c155a54ff1eb8f0abbc9288de Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Fri, 23 Apr 2021 14:13:25 +0800 Subject: [PATCH 086/202] =?UTF-8?q?=E9=9C=80=E6=B1=82=E5=8F=98=E6=9B=B4?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=80=9A=E7=9F=A5=E8=BF=87=E6=9C=9F=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E5=BC=95=E8=B5=B7=E7=9A=84=E4=BB=A3=E7=A0=81=E5=8F=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/resi/group/dto/notice/NoticeDTO.java | 5 +++++ .../resi/group/dto/notice/form/AddNoticeFormDTO.java | 12 +++++++++++- .../group/dto/notice/form/EditNoticeFormDTO.java | 11 +++++++++++ .../modules/notice/controller/NoticeController.java | 9 +++++++++ .../epmet/modules/notice/entity/NoticeEntity.java | 5 +++++ .../notice/service/impl/NoticeServiceImpl.java | 2 ++ 6 files changed, 43 insertions(+), 1 deletion(-) diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/NoticeDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/NoticeDTO.java index 1ef416538c..d45950bd44 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/NoticeDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/NoticeDTO.java @@ -78,6 +78,11 @@ public class NoticeDTO implements Serializable { */ private Date changeTime; + /** + * 通知过期时间(此时间需大于变更时间) + */ + private Date expirationTime; + /** * 删除标记 0:未删除,1:已删除 */ diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/AddNoticeFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/AddNoticeFormDTO.java index 2344e94898..ad95a99cd4 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/AddNoticeFormDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/AddNoticeFormDTO.java @@ -1,10 +1,14 @@ package com.epmet.resi.group.dto.notice.form; import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import org.hibernate.validator.constraints.Length; +import org.springframework.format.annotation.DateTimeFormat; import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.util.Date; import java.util.List; /** @@ -31,6 +35,13 @@ public class AddNoticeFormDTO { @NotBlank(message = "通知内容不能为空",groups = {AddNoticeFormDTO.AddUserShow.class}) @Length(max = 1000, message = "通知内容不能超过1000个字符",groups = {AddNoticeFormDTO.AddUserShow.class}) private String content; + /** + * 通知过期时间(此时间需大于变更时间) + */ + @NotNull(message = "过期时间不能为空",groups = AddNoticeFormDTO.AddUserShow.class) + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date expirationTime; /** * 图片附件集合 */ @@ -39,7 +50,6 @@ public class AddNoticeFormDTO { * 文件附件url集合 */ private List docList; - /** * token中用户Id */ diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/EditNoticeFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/EditNoticeFormDTO.java index 940077459f..c43f8d0e69 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/EditNoticeFormDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/EditNoticeFormDTO.java @@ -1,10 +1,14 @@ package com.epmet.resi.group.dto.notice.form; import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import org.hibernate.validator.constraints.Length; +import org.springframework.format.annotation.DateTimeFormat; import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.util.Date; import java.util.List; /** @@ -31,6 +35,13 @@ public class EditNoticeFormDTO { @NotBlank(message = "通知内容不能为空",groups = {EditNoticeFormDTO.EditUserShow.class}) @Length(max = 1000, message = "通知内容不能超过1000个字符",groups = {EditNoticeFormDTO.EditUserShow.class}) private String content; + /** + * 通知过期时间(此时间需大于变更时间) + */ + @NotNull(message = "过期时间不能为空",groups = AddNoticeFormDTO.AddUserShow.class) + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date expirationTime; /** * 图片附件集合 */ diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeController.java index ad2a0dd9dc..0736625518 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeController.java @@ -18,6 +18,7 @@ package com.epmet.modules.notice.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; @@ -30,6 +31,8 @@ import com.epmet.resi.group.dto.notice.result.NoticeDetailResultDTO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; +import java.util.Date; + /** * 小组通知表 @@ -59,6 +62,9 @@ public class NoticeController { @PostMapping(value = "add") public Result add(@LoginUser TokenDto tokenDto, @RequestBody AddNoticeFormDTO formDTO){ ValidatorUtils.validateEntity(formDTO, AddNoticeFormDTO.Add.class, AddNoticeFormDTO.AddUserShow.class); + if(formDTO.getExpirationTime().before(new Date())){ + throw new RenException("通知过期时间不能早于当前时间"); + } formDTO.setUserId(tokenDto.getUserId()); noticeService.add(formDTO); return new Result(); @@ -73,6 +79,9 @@ public class NoticeController { @PostMapping(value = "edit") public Result edit(@LoginUser TokenDto tokenDto, @RequestBody EditNoticeFormDTO formDTO){ ValidatorUtils.validateEntity(formDTO, EditNoticeFormDTO.Edit.class, EditNoticeFormDTO.EditUserShow.class); + if(formDTO.getExpirationTime().before(new Date())){ + throw new RenException("通知过期时间不能早于当前时间"); + } formDTO.setUserId(tokenDto.getUserId()); noticeService.edit(formDTO); return new Result(); diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/entity/NoticeEntity.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/entity/NoticeEntity.java index b12dce96ca..46173d1d3a 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/entity/NoticeEntity.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/entity/NoticeEntity.java @@ -78,4 +78,9 @@ public class NoticeEntity extends BaseEpmetEntity { */ private Date changeTime; + /** + * 通知过期时间(此时间需大于变更时间) + */ + private Date expirationTime; + } 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 65a2ecf861..c7f03be409 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 @@ -180,6 +180,7 @@ public class NoticeServiceImpl extends BaseServiceImpl entity.setContent(formDTO.getContent()); entity.setIsChange("no"); entity.setChangeTime(new Date()); + entity.setExpirationTime(formDTO.getExpirationTime()); insert(entity); //5.保存附件数据 @@ -310,6 +311,7 @@ public class NoticeServiceImpl extends BaseServiceImpl entity.setContent(formDTO.getContent()); entity.setIsChange("yes"); entity.setChangeTime(new Date()); + entity.setExpirationTime(formDTO.getExpirationTime()); baseDao.updateById(entity); //5.通知附件表数据先删后增 From 4a0a337583bd9e96274bc199f7b6c09f6f77e660 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Fri, 23 Apr 2021 14:13:46 +0800 Subject: [PATCH 087/202] =?UTF-8?q?=E9=9C=80=E6=B1=82=E5=8F=98=E6=9B=B4?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=80=9A=E7=9F=A5=E8=BF=87=E6=9C=9F=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E5=BC=95=E8=B5=B7=E7=9A=84=E4=BB=A3=E7=A0=81=E5=8F=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/db/migration/V0.0.17__alter_notice.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 epmet-module/resi-group/resi-group-server/src/main/resources/db/migration/V0.0.17__alter_notice.sql diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/db/migration/V0.0.17__alter_notice.sql b/epmet-module/resi-group/resi-group-server/src/main/resources/db/migration/V0.0.17__alter_notice.sql new file mode 100644 index 0000000000..29ef1d8a78 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/db/migration/V0.0.17__alter_notice.sql @@ -0,0 +1,2 @@ +ALTER TABLE `notice` +ADD COLUMN `EXPIRATION_TIME` datetime NOT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '通知过期时间(此时间需大于变更时间)' AFTER `CHANGE_TIME`; From f011fe21c6325f0630bf1827f5dcfcbc93472cfe Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 23 Apr 2021 14:26:43 +0800 Subject: [PATCH 088/202] bug fix --- .../group/dto/member/ResiGroupMemberDTO.java | 1 - .../controller/GroupActInfoController.java | 7 - .../act/service/GroupActInfoService.java | 1 - .../service/impl/GroupActInfoServiceImpl.java | 122 ++++-------------- .../member/entity/ResiGroupMemberEntity.java | 1 - 5 files changed, 22 insertions(+), 110 deletions(-) diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/member/ResiGroupMemberDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/member/ResiGroupMemberDTO.java index 0f834100fa..a64ebdb042 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/member/ResiGroupMemberDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/member/ResiGroupMemberDTO.java @@ -104,5 +104,4 @@ public class ResiGroupMemberDTO implements Serializable { * */ private String customerId; - private Integer tempNum; } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java index da742b975d..d2231f005b 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java @@ -93,13 +93,6 @@ public class GroupActInfoController { return new Result().ok(groupActInfoService.queryReadList(actReadViewFormDTO)); } - @PostMapping("readlistV2") - public Result queryReadListV2(@RequestBody @LoginUser TokenDto tokenDto, @RequestBody ActReadViewFormDTO actReadViewFormDTO){ - actReadViewFormDTO.setUserId(tokenDto.getUserId()); - ValidatorUtils.validateEntity(actReadViewFormDTO,ActReadViewFormDTO.AddUserInternalGroup.class); - return new Result().ok(groupActInfoService.queryReadListV2(actReadViewFormDTO)); - } - /** * @return * @param formDTO diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/GroupActInfoService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/GroupActInfoService.java index 9fd25cadf8..b815bb7358 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/GroupActInfoService.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/GroupActInfoService.java @@ -58,7 +58,6 @@ public interface GroupActInfoService extends BaseService { */ NoticeReadListResultDTO queryReadList(ActReadViewFormDTO actReadViewFormDTO); - NoticeReadListResultDTO queryReadListV2(ActReadViewFormDTO actReadViewFormDTO); /** * 011、取消活动 * 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 1312d7642b..c4b75ca1df 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 @@ -25,8 +25,6 @@ import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; -import com.epmet.commons.tools.redis.RedisKeys; -import com.epmet.commons.tools.redis.RedisUtils; import com.epmet.commons.tools.scan.param.ImgScanParamDTO; import com.epmet.commons.tools.scan.param.ImgTaskDTO; import com.epmet.commons.tools.scan.param.TextScanParamDTO; @@ -124,8 +122,6 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl memberDTOList=resiGroupMemberService.getMemberList(formDTO.getGroupId()); + //应读数减-1,去掉组长 + groupActInfoEntity.setShouldRead(memberDTOList.size()-NumConstant.ONE); + //1、插入活修改活动信息表 if (StringUtils.isNotBlank(groupActInfoEntity.getId())) { //删除group_act_content、删除act_read_record @@ -164,10 +165,6 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl contentList = constructText(groupActInfoEntity.getId(), formDTO.getCustomerId(), formDTO.getTextList()); List imgList = constructImg(groupActInfoEntity.getId(), formDTO.getCustomerId(), formDTO.getImgList()); - //包含组长 - List memberDTOList=resiGroupMemberService.getMemberList(formDTO.getGroupId()); - //应读数减-1,去掉组长 - groupActInfoEntity.setShouldRead(memberDTOList.size()-NumConstant.ONE); //2、插入活动内容 contentList.forEach(textContentEntity->{ @@ -192,8 +189,8 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl memberDTOList) { - String actReadKey= RedisKeys.getGroupMsgReadKey(GroupActConstant.ACT_STR,groupActInfoEntity.getGroupId(),groupActInfoEntity.getId()); - String actShoudReadUserKey=RedisKeys.getGroupMsgShouldReadUser(GroupActConstant.ACT_STR,groupActInfoEntity.getGroupId(),groupActInfoEntity.getId()); + /*String actReadKey= RedisKeys.getGroupMsgReadKey(GroupActConstant.ACT_STR,groupActInfoEntity.getGroupId(),groupActInfoEntity.getId()); + String actShoudReadUserKey=RedisKeys.getGroupMsgShouldReadUser(GroupActConstant.ACT_STR,groupActInfoEntity.getGroupId(),groupActInfoEntity.getId());*/ List readRecordEntityList=new ArrayList<>(); memberDTOList.forEach(memberDTO->{ ActReadRecordEntity actReadRecordEntity=new ActReadRecordEntity(); @@ -206,10 +203,10 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl{ @@ -503,33 +500,28 @@ public class GroupActInfoServiceImpl extends BaseServiceImplNumConstant.ZERO?false:true); + resultDTO.setStartTimeEditFlag(groupActInfoEntity.getSignedInNum() > NumConstant.ZERO ? false : true); //返回详情,并且已读状态 ActReadRecordEntity actReadRecordEntity=actReadRecordDao.selectUserRec(formDTO.getGroupActId(),formDTO.getUserId()); - String actReadKey= RedisKeys.getGroupMsgReadKey(GroupActConstant.ACT_STR,groupActInfoEntity.getGroupId(),groupActInfoEntity.getId()); if(null== actReadRecordEntity){ - //todo 插入不在应读列表里的是否还记录呢???? - ActReadRecordEntity insertEntity=new ActReadRecordEntity(); - insertEntity.setCustomerId(groupActInfoEntity.getCustomerId()); - insertEntity.setGroupActId(formDTO.getGroupActId()); - insertEntity.setReadFlag(GroupActConstant.READ); - insertEntity.setShouldBeRead(Constant.NO); - insertEntity.setUserId(formDTO.getUserId()); - insertEntity.setGridId(groupActInfoEntity.getGridId()); - insertEntity.setGroupId(groupActInfoEntity.getGroupId()); - // todo - actReadRecordDao.insert(insertEntity); - + if(!GroupActConstant.CLOSED.equals(groupActInfoEntity.getStatus())){ + //插入已读记录,默认不属于应读人。 + ActReadRecordEntity insertEntity=new ActReadRecordEntity(); + insertEntity.setCustomerId(groupActInfoEntity.getCustomerId()); + insertEntity.setGroupActId(formDTO.getGroupActId()); + insertEntity.setReadFlag(GroupActConstant.READ); + insertEntity.setShouldBeRead(Constant.NO); + insertEntity.setUserId(formDTO.getUserId()); + insertEntity.setGridId(groupActInfoEntity.getGridId()); + insertEntity.setGroupId(groupActInfoEntity.getGroupId()); + actReadRecordDao.insert(insertEntity); + } }else{ if(GroupActConstant.UN_READ.equals(actReadRecordEntity.getReadFlag())){ //未读->已读 actReadRecordEntity.setReadFlag(GroupActConstant.READ); actReadRecordEntity.setUpdatedTime(new Date()); - // todo actReadRecordDao.updateById(actReadRecordEntity); - - //状态改为已读 - redisUtils.setBit(actReadKey,resiGroupMemberDTO.getTempNum(),true); } } return resultDTO; @@ -659,76 +651,6 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl readList = new ArrayList<>(); - List unReadList = new ArrayList<>(); - //1.根据活动id,查询应读人员列表 - GroupActInfoEntity groupActInfoEntity=baseDao.selectById(actReadViewFormDTO.getGroupActId()); - List memembersList=resiGroupMemberService.getMemberList(groupActInfoEntity.getGroupId()); - //2.调用user服务,查询人员基础数据 - List userIdList = memembersList.stream().map(ResiGroupMemberDTO::getCustomerUserId).collect(Collectors.toList()); - Result> result = epmetUserOpenFeignClient.queryUserBaseInfo(userIdList); - if (!result.success()) { - throw new RenException("调用user服务,获取用户基础数据失败"); - } - - List resultDTOList = result.getData(); - if (!CollectionUtils.isEmpty(resultDTOList)) { - //3.遍历封装数据并返回 - for (ResiGroupMemberDTO memberDTO : memembersList) { - //todo - //1)怎么判断当前组员属于应读人员? - //2)应读人员,是否已读?? - String userActKey = RedisKeys.getGroupMsgReadKey(GroupActConstant.ACT_STR, groupActInfoEntity.getGroupId(), groupActInfoEntity.getId()); - Boolean readFlag = redisUtils.getBit(userActKey, memberDTO.getTempNum()); - if (readFlag) { - //已读 - StringBuffer name = new StringBuffer(); - StringBuffer url = new StringBuffer(); - resultDTOList.forEach(user -> { - if (memberDTO.getCustomerUserId().equals(user.getUserId())) { - name.append(user.getSurname()).append(user.getName()); - url.append(user.getHeadImgUrl()); - } - }); - NoticeReadListResultDTO.NoticeReafdRecord read = new NoticeReadListResultDTO.NoticeReafdRecord(); - read.setUserId(memberDTO.getCustomerUserId()); - read.setUserName(name.toString()); - read.setUserHeadPhoto(url.toString()); - readList.add(read); - } else { - //todo - // 未读人员 ?????? - StringBuffer name = new StringBuffer(); - StringBuffer url = new StringBuffer(); - resultDTOList.forEach(user -> { - if (memberDTO.getCustomerUserId().equals(user.getUserId())) { - name.append(user.getSurname()).append(user.getName()); - url.append(user.getHeadImgUrl()); - } - }); - NoticeReadListResultDTO.NoticeReafdRecord unRead = new NoticeReadListResultDTO.NoticeReafdRecord(); - unRead.setUserId(memberDTO.getCustomerUserId()); - unRead.setUserName(name.toString()); - unRead.setUserHeadPhoto(url.toString()); - unReadList.add(unRead); - } - } - } - //已读人数 - String actReadKey= RedisKeys.getGroupMsgReadKey(GroupActConstant.ACT_STR,groupActInfoEntity.getGroupId(),groupActInfoEntity.getId()); - long readNum=redisUtils.bitCount(actReadKey); - resultDTO.setReadCount((int) readNum); - //未读人数 - resultDTO.setUnReadCount(groupActInfoEntity.getShouldRead()-resultDTO.getReadCount()); - //已读列表 - resultDTO.setReadList(readList); - //未读列表 - resultDTO.setUnReadList(unReadList); - return resultDTO; - } /** * 011、取消活动 * diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/entity/ResiGroupMemberEntity.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/entity/ResiGroupMemberEntity.java index 6f43bf1461..0e21de29db 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/entity/ResiGroupMemberEntity.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/entity/ResiGroupMemberEntity.java @@ -73,6 +73,5 @@ public class ResiGroupMemberEntity extends BaseEpmetEntity { @TableField(fill = FieldFill.INSERT) private String customerId; - private Integer tempNum; } From a773dc09108b2bd69aa36354fa8ed4a2aa62fed3 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 23 Apr 2021 14:34:13 +0800 Subject: [PATCH 089/202] MESSAGE_ID --- .../epmet/modules/act/service/impl/GroupActInfoServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 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 c4b75ca1df..90190cd5e3 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 @@ -228,7 +228,7 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl Date: Fri, 23 Apr 2021 14:43:04 +0800 Subject: [PATCH 090/202] SHOULD_READ --- .../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 a80b4f042b..c1da5b98ef 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 @@ -291,6 +291,7 @@ CREATE TABLE `group_act_info` ( `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 '更新时间', + `SHOULD_READ` int(11) NOT NULL COMMENT '应读人数', PRIMARY KEY (`ID`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '组织活动信息' ROW_FORMAT = Dynamic; From b71e3dab92457d36e4dca85fa1104c1ddf5dae8b Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 23 Apr 2021 14:43:05 +0800 Subject: [PATCH 091/202] =?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=E6=B7=BB=E5=8A=A0=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E8=BF=87=E6=9C=9F=E5=AD=97=E6=AE=B5=20=E8=BF=91?= =?UTF-8?q?=E5=8D=81=E6=9D=A1=E6=95=B0=E6=8D=AE=E6=B7=BB=E5=8A=A0=20?= =?UTF-8?q?=E6=98=AF=E5=90=A6=E8=BF=87=E6=9C=9F=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../result/GetPastTopicListV2ResultDTO.java | 5 +++++ .../dto/topic/result/LatestTenResultDTO.java | 6 ++++++ .../resources/mapper/group/ResiGroupDao.xml | 18 ++++++++++++------ 3 files changed, 23 insertions(+), 6 deletions(-) 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 3885933a78..842e720615 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 @@ -77,6 +77,11 @@ public class GetPastTopicListV2ResultDTO implements Serializable { */ private List badgeList = new ArrayList<>(); + /** + * 通知是否过期(true:是 false:否) + */ + private Boolean isExpirat; + @JsonIgnore private String userId; } diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/LatestTenResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/LatestTenResultDTO.java index e5346ab703..fd5637ba98 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/LatestTenResultDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/LatestTenResultDTO.java @@ -85,6 +85,11 @@ public class LatestTenResultDTO implements Serializable { */ private Integer unReadCount; + /** + * 通知是否过期(true:是 false:否) + */ + private Boolean isExpirat; + public LatestTenResultDTO() { this.id = ""; this.userId = ""; @@ -100,5 +105,6 @@ public class LatestTenResultDTO implements Serializable { this.contentType = ""; this.readOrUnRead = ""; this.unReadCount = NumConstant.ZERO; + this.isExpirat = false; } } 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 d8859c6133..ca54aac3a4 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 @@ -561,7 +561,8 @@ t.`STATUS` AS status, IFNULL(t.ISSUE_ID,'') AS issueId, 'topic' AS contentType, - IFNULL(ta.ATTACHMENT_URL,'') AS firstPhoto + IFNULL(ta.ATTACHMENT_URL,'') AS firstPhoto, + false AS isExpirat FROM resi_topic t LEFT JOIN resi_topic_attachment ta ON ta.TOPIC_ID = t.ID AND ta.ATTACHMENT_TYPE = 'image' AND ta.SORT = 0 WHERE t.DEL_FLAG = '0' @@ -578,7 +579,8 @@ ai.`STATUS` AS status, '' AS issueId, 'act' AS contentType, - IFNULL(ac2.CONTENT,'') AS firstPhoto + IFNULL(ac2.CONTENT,'') AS firstPhoto, + false AS isExpirat FROM group_act_info ai LEFT JOIN group_act_content ac ON ac.GROUP_ACT_ID = ai.ID AND ac.CONTENT_TYPE = 'text' LEFT JOIN group_act_content ac2 ON ac2.GROUP_ACT_ID = ai.ID AND ac2.CONTENT_TYPE = 'img' AND ac2.SORT = 1 @@ -595,7 +597,8 @@ '' AS status, '' AS issueId, 'notice' AS contentType, - IFNULL(na.ATTACHMENT_URL,'') AS firstPhoto + IFNULL(na.ATTACHMENT_URL,'') AS firstPhoto, + (CASE WHEN UNIX_TIMESTAMP(n.EXPIRATION_TIME) UNIX_TIMESTAMP(NOW()) THEN TRUE ELSE FALSE END) AS isExpirat FROM notice n LEFT JOIN notice_attachment na ON na.NOTICE_ID = n.ID AND na.DEL_FLAG = '0' AND na.ATTACHMENT_TYPE = 'image' AND na.SORT = 0 WHERE n.DEL_FLAG = '0' @@ -777,7 +780,8 @@ t.TOPIC_CONTENT AS content, t.`STATUS` AS status, IFNULL(t.ISSUE_ID,'') AS issueId, - 'topic' AS contentType + 'topic' AS contentType, + false AS isExpirat FROM resi_topic t WHERE t.DEL_FLAG = '0' AND t.`STATUS` != 'hidden' @@ -795,7 +799,8 @@ IFNULL(ac.CONTENT,'') AS content, ai.`STATUS` AS status, '' AS issueId, - 'act' AS contentType + 'act' AS contentType, + false AS isExpirat FROM group_act_info ai LEFT JOIN group_act_content ac ON ac.GROUP_ACT_ID = ai.ID AND ac.CONTENT_TYPE = 'text' WHERE ai.DEL_FLAG = '0' @@ -813,7 +818,8 @@ n.CONTENT AS content, '' AS status, '' AS issueId, - 'notice' AS contentType + 'notice' AS contentType, + (CASE WHEN UNIX_TIMESTAMP(n.EXPIRATION_TIME) UNIX_TIMESTAMP(NOW()) THEN TRUE ELSE FALSE END) AS isExpirat FROM notice n WHERE n.DEL_FLAG = '0' AND ( From 820272b7cc895be1ad0ad7ab119b6b5287130eeb Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 23 Apr 2021 15:15:11 +0800 Subject: [PATCH 092/202] selectLatestTen --- .../src/main/resources/mapper/group/ResiGroupDao.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 d8859c6133..6c63ddeec8 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 @@ -556,7 +556,7 @@ ((SELECT t.ID, t.CREATED_BY AS userId, - DATE_FORMAT(t.CREATED_TIME,'%Y-%m-%d %H:%m:%s') AS releaseTime, + DATE_FORMAT(t.CREATED_TIME,'%Y-%m-%d %H:%i:%s') AS releaseTime, t.TOPIC_CONTENT AS content, t.`STATUS` AS status, IFNULL(t.ISSUE_ID,'') AS issueId, @@ -573,7 +573,7 @@ (SELECT ai.ID, ai.CREATED_BY AS userId, - DATE_FORMAT(ai.CREATED_TIME,'%Y-%m-%d %H:%m:%s') AS releaseTime, + DATE_FORMAT(ai.CREATED_TIME,'%Y-%m-%d %H:%i:%s') AS releaseTime, IFNULL(ac.CONTENT,'') AS content, ai.`STATUS` AS status, '' AS issueId, @@ -590,7 +590,7 @@ (SELECT n.ID, n.CREATED_BY AS userId, - DATE_FORMAT(n.CREATED_TIME,'%Y-%m-%d %H:%m:%s') AS releaseTime, + DATE_FORMAT(n.CREATED_TIME,'%Y-%m-%d %H:%i:%s') AS releaseTime, n.CONTENT AS content, '' AS status, '' AS issueId, From 3c1c31a34e22cd0c1439928df2f4e09601b035c8 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 23 Apr 2021 15:22:09 +0800 Subject: [PATCH 093/202] =?UTF-8?q?=E6=97=B6=E9=97=B4=E6=A0=B7=E5=BC=8F=20?= =?UTF-8?q?i?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/group/ResiGroupDao.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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 806d1b9960..b5e21ff6eb 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 @@ -736,7 +736,7 @@ (SELECT ai.ID, ai.CREATED_BY AS userId, - DATE_FORMAT(ai.CREATED_TIME,'%Y-%m-%d %H:%m:%s') AS releaseTime, + DATE_FORMAT(ai.CREATED_TIME,'%Y-%m-%d %H:%i:%s') AS releaseTime, IFNULL(ac.CONTENT,'') AS content, 'act' AS contentType, IFNULL(ac2.CONTENT,'') AS firstPhoto @@ -754,7 +754,7 @@ (SELECT n.ID, n.CREATED_BY AS userId, - DATE_FORMAT(n.CREATED_TIME,'%Y-%m-%d %H:%m:%s') AS releaseTime, + DATE_FORMAT(n.CREATED_TIME,'%Y-%m-%d %H:%i:%s') AS releaseTime, n.CONTENT AS content, 'notice' AS contentType, IFNULL(na.ATTACHMENT_URL,'') AS firstPhoto @@ -776,7 +776,7 @@ ((SELECT t.ID, t.CREATED_BY AS userId, - DATE_FORMAT(t.CREATED_TIME,'%Y-%m-%d %H:%m:%s') AS releaseTime, + DATE_FORMAT(t.CREATED_TIME,'%Y-%m-%d %H:%i:%s') AS releaseTime, t.TOPIC_CONTENT AS content, t.`STATUS` AS status, IFNULL(t.ISSUE_ID,'') AS issueId, @@ -795,7 +795,7 @@ (SELECT ai.ID, ai.CREATED_BY AS userId, - DATE_FORMAT(ai.CREATED_TIME,'%Y-%m-%d %H:%m:%s') AS releaseTime, + DATE_FORMAT(ai.CREATED_TIME,'%Y-%m-%d %H:%i:%s') AS releaseTime, IFNULL(ac.CONTENT,'') AS content, ai.`STATUS` AS status, '' AS issueId, @@ -814,7 +814,7 @@ (SELECT n.ID, n.CREATED_BY AS userId, - DATE_FORMAT(n.CREATED_TIME,'%Y-%m-%d %H:%m:%s') AS releaseTime, + DATE_FORMAT(n.CREATED_TIME,'%Y-%m-%d %H:%i:%s') AS releaseTime, n.CONTENT AS content, '' AS status, '' AS issueId, From 3366200baeb7431eae280823078d4754c73fd96d Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 23 Apr 2021 15:37:50 +0800 Subject: [PATCH 094/202] =?UTF-8?q?=E5=88=9B=E5=BB=BA=E5=B0=8F=E7=BB=84?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../group/form/ApplyCreateGroupFormDTO.java | 1 - .../service/impl/ResiGroupServiceImpl.java | 18 +++++++++++------- .../epmet/modules/utils/ModuleConstant.java | 1 + 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/form/ApplyCreateGroupFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/form/ApplyCreateGroupFormDTO.java index fc14ffd2f5..60550f0c4d 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/form/ApplyCreateGroupFormDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/form/ApplyCreateGroupFormDTO.java @@ -73,6 +73,5 @@ public class ApplyCreateGroupFormDTO implements Serializable { /** * 小组类型(ordinary:楼院小组 branch:支部小组) */ - @NotBlank(message = "小组类型不能为空") private String groupType; } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java index 5a54c45f06..90b12f3dad 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java @@ -371,14 +371,18 @@ public class ResiGroupServiceImpl extends BaseServiceImpl booleanResult = epmetUserOpenFeignClient.selectIsPartyMemberByUserId(applyCreateGroupFormDTO.getUserId()); - if (!booleanResult.success()){ - throw new RenException(ModuleConstant.IS_PARTY_MEMBER_ERR); - } - if (!booleanResult.getData()){ - throw new RenException(EpmetErrorCode.PARTY_MEMBER_CREATE_BRANCH_GROUP.getCode()); + if (StringUtils.isNotEmpty(applyCreateGroupFormDTO.getGroupType())) { + if (applyCreateGroupFormDTO.getGroupType().equals(ModuleConstant.GROUP_TYPE_BRANCH)) { + Result booleanResult = epmetUserOpenFeignClient.selectIsPartyMemberByUserId(applyCreateGroupFormDTO.getUserId()); + if (!booleanResult.success()) { + throw new RenException(ModuleConstant.IS_PARTY_MEMBER_ERR); + } + if (!booleanResult.getData()) { + throw new RenException(EpmetErrorCode.PARTY_MEMBER_CREATE_BRANCH_GROUP.getCode()); + } } + }else { + applyCreateGroupFormDTO.setGroupType(ModuleConstant.GROUP_TYPE_ORDINARY); } //1、校验是否同名 List resiGroupEntityList = this.getResiGroupEntityList(applyCreateGroupFormDTO); 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 038b0ad745..e2a219f6e9 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 @@ -390,6 +390,7 @@ public interface ModuleConstant extends Constant { * 小组类型:支部小组 */ String GROUP_TYPE_BRANCH = "branch"; + String GROUP_TYPE_ORDINARY = "ordinary"; String IS_PARTY_MEMBER_ERR = "查询此人是不是党员失败了"; From 87f8245d50af0703504272f76ae590a9db8b3ffb Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 23 Apr 2021 16:05:36 +0800 Subject: [PATCH 095/202] publish act --- .../epmet/resi/group/dto/act/form/PublishGroupActFormDTO.java | 1 - .../modules/act/service/impl/GroupActInfoServiceImpl.java | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/PublishGroupActFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/PublishGroupActFormDTO.java index 276bcebd0f..0b1c522a91 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/PublishGroupActFormDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/PublishGroupActFormDTO.java @@ -47,7 +47,6 @@ public class PublishGroupActFormDTO implements Serializable { /** * 类别编码 */ - @NotBlank(message = "categoryCode不能为空", groups = AddUserInternalGroup.class) private String categoryCode; /** 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 90190cd5e3..3f2e21e297 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 @@ -135,6 +135,10 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl Date: Fri, 23 Apr 2021 17:00:08 +0800 Subject: [PATCH 096/202] bug fix --- .../epmet/modules/act/controller/GroupActInfoController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java index d2231f005b..6492fe4008 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java @@ -87,7 +87,7 @@ public class GroupActInfoController { * @Date 2021/4/19 19:37 **/ @PostMapping("readlist") - public Result queryReadList(@RequestBody @LoginUser TokenDto tokenDto, @RequestBody ActReadViewFormDTO actReadViewFormDTO){ + public Result queryReadList(@LoginUser TokenDto tokenDto, @RequestBody ActReadViewFormDTO actReadViewFormDTO){ actReadViewFormDTO.setUserId(tokenDto.getUserId()); ValidatorUtils.validateEntity(actReadViewFormDTO,ActReadViewFormDTO.AddUserInternalGroup.class); return new Result().ok(groupActInfoService.queryReadList(actReadViewFormDTO)); From 14927c56ea7a12face7855d32792f9c344908c6b Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Sun, 25 Apr 2021 09:22:46 +0800 Subject: [PATCH 097/202] =?UTF-8?q?=E5=85=B3=E9=97=AD=E4=B9=8B=E5=90=8E?= =?UTF-8?q?=E6=9F=A5=E7=9C=8B=E6=B4=BB=E5=8A=A8=EF=BC=8C=E4=B8=8D=E6=9B=B4?= =?UTF-8?q?=E6=94=B9=E5=B7=B2=E8=AF=BB=E7=8A=B6=E6=80=81=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/GroupActInfoServiceImpl.java | 52 +++++++++---------- 1 file changed, 25 insertions(+), 27 deletions(-) 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 3f2e21e297..60c079d945 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 @@ -193,8 +193,6 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl memberDTOList) { - /*String actReadKey= RedisKeys.getGroupMsgReadKey(GroupActConstant.ACT_STR,groupActInfoEntity.getGroupId(),groupActInfoEntity.getId()); - String actShoudReadUserKey=RedisKeys.getGroupMsgShouldReadUser(GroupActConstant.ACT_STR,groupActInfoEntity.getGroupId(),groupActInfoEntity.getId());*/ List readRecordEntityList=new ArrayList<>(); memberDTOList.forEach(memberDTO->{ ActReadRecordEntity actReadRecordEntity=new ActReadRecordEntity(); @@ -206,11 +204,8 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl{ @@ -505,27 +500,30 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl NumConstant.ZERO ? false : true); - //返回详情,并且已读状态 - ActReadRecordEntity actReadRecordEntity=actReadRecordDao.selectUserRec(formDTO.getGroupActId(),formDTO.getUserId()); - if(null== actReadRecordEntity){ - if(!GroupActConstant.CLOSED.equals(groupActInfoEntity.getStatus())){ - //插入已读记录,默认不属于应读人。 - ActReadRecordEntity insertEntity=new ActReadRecordEntity(); - insertEntity.setCustomerId(groupActInfoEntity.getCustomerId()); - insertEntity.setGroupActId(formDTO.getGroupActId()); - insertEntity.setReadFlag(GroupActConstant.READ); - insertEntity.setShouldBeRead(Constant.NO); - insertEntity.setUserId(formDTO.getUserId()); - insertEntity.setGridId(groupActInfoEntity.getGridId()); - insertEntity.setGroupId(groupActInfoEntity.getGroupId()); - actReadRecordDao.insert(insertEntity); - } - }else{ - if(GroupActConstant.UN_READ.equals(actReadRecordEntity.getReadFlag())){ - //未读->已读 - actReadRecordEntity.setReadFlag(GroupActConstant.READ); - actReadRecordEntity.setUpdatedTime(new Date()); - actReadRecordDao.updateById(actReadRecordEntity); + if (!GroupActConstant.CLOSED.equals(groupActInfoEntity.getStatus())) { + //如果活动关闭,则不更新已读记录 + //非关闭状态下,返回详情,并且已读状态 + ActReadRecordEntity actReadRecordEntity = actReadRecordDao.selectUserRec(formDTO.getGroupActId(), formDTO.getUserId()); + if (null == actReadRecordEntity) { + if (!GroupActConstant.CLOSED.equals(groupActInfoEntity.getStatus())) { + //插入已读记录,默认不属于应读人。 + ActReadRecordEntity insertEntity = new ActReadRecordEntity(); + insertEntity.setCustomerId(groupActInfoEntity.getCustomerId()); + insertEntity.setGroupActId(formDTO.getGroupActId()); + insertEntity.setReadFlag(GroupActConstant.READ); + insertEntity.setShouldBeRead(Constant.NO); + insertEntity.setUserId(formDTO.getUserId()); + insertEntity.setGridId(groupActInfoEntity.getGridId()); + insertEntity.setGroupId(groupActInfoEntity.getGroupId()); + actReadRecordDao.insert(insertEntity); + } + } else { + if (GroupActConstant.UN_READ.equals(actReadRecordEntity.getReadFlag())) { + //未读->已读 + actReadRecordEntity.setReadFlag(GroupActConstant.READ); + actReadRecordEntity.setUpdatedTime(new Date()); + actReadRecordDao.updateById(actReadRecordEntity); + } } } return resultDTO; From 6760e37ec03977fa30e3a76d5c3c474bd31f01ed Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Sun, 25 Apr 2021 09:26:06 +0800 Subject: [PATCH 098/202] =?UTF-8?q?=E9=80=9A=E7=9F=A5=E8=BF=87=E6=9C=9F?= =?UTF-8?q?=E5=90=8E=E4=B8=8D=E5=85=81=E8=AE=B8=E7=BC=96=E8=BE=91=EF=BC=8C?= =?UTF-8?q?=E9=98=85=E8=AF=BB=E4=B9=9F=E4=B8=8D=E5=86=8D=E7=AE=97=E6=98=AF?= =?UTF-8?q?=E5=B7=B2=E8=AF=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../notice/controller/NoticeController.java | 3 --- .../impl/NoticeReadRecordServiceImpl.java | 16 +++++++++++----- .../notice/service/impl/NoticeServiceImpl.java | 8 ++++++++ 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeController.java index 0736625518..fd4328ddaa 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeController.java @@ -79,9 +79,6 @@ public class NoticeController { @PostMapping(value = "edit") public Result edit(@LoginUser TokenDto tokenDto, @RequestBody EditNoticeFormDTO formDTO){ ValidatorUtils.validateEntity(formDTO, EditNoticeFormDTO.Edit.class, EditNoticeFormDTO.EditUserShow.class); - if(formDTO.getExpirationTime().before(new Date())){ - throw new RenException("通知过期时间不能早于当前时间"); - } formDTO.setUserId(tokenDto.getUserId()); noticeService.edit(formDTO); return new Result(); diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeReadRecordServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeReadRecordServiceImpl.java index 93b728bcfb..6d135a0b8c 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeReadRecordServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeReadRecordServiceImpl.java @@ -48,6 +48,7 @@ import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; import java.util.ArrayList; +import java.util.Date; import java.util.List; import java.util.stream.Collectors; @@ -138,13 +139,18 @@ public class NoticeReadRecordServiceImpl extends BaseServiceImpl if (null == entity) { throw new RenException(String.format("小组通知变更,获取通知数据失败,通知Id->", formDTO.getNoticeId())); } + //通知已过期时不允许再次变更 + if(entity.getChangeTime().before(new Date())){ + throw new RenException("通知已过期不允许再次变更"); + } + if(formDTO.getExpirationTime().before(new Date())){ + throw new RenException("通知过期时间不能早于当前时间"); + } + //2.文字、图片安全校验 List wordList = new ArrayList<>(); wordList.add(formDTO.getTitle()); From 7eada58795e51ece84df8efab3371f74584d0370 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Sun, 25 Apr 2021 09:29:46 +0800 Subject: [PATCH 099/202] =?UTF-8?q?=E7=BB=84=E9=95=BF=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E5=B7=B2=E8=AF=BB=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/GroupActInfoServiceImpl.java | 53 ++++++++++--------- 1 file changed, 29 insertions(+), 24 deletions(-) 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 60c079d945..aecf370b48 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 @@ -198,15 +198,17 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl{ actReadRecordDao.insert(readRecordEntity); @@ -616,28 +618,31 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl { - StringBuffer name = new StringBuffer(); - StringBuffer url = new StringBuffer(); - resultDTOList.forEach(user -> { - if (l.getUserId().equals(user.getUserId())) { - name.append(user.getSurname()).append(user.getName()); - url.append(user.getHeadImgUrl()); + //不展示组长的记录 + if (!l.getUserId().equals(actReadViewFormDTO.getUserId())) { + StringBuffer name = new StringBuffer(); + StringBuffer url = new StringBuffer(); + resultDTOList.forEach(user -> { + if (l.getUserId().equals(user.getUserId())) { + name.append(user.getSurname()).append(user.getName()); + url.append(user.getHeadImgUrl()); + } + }); + if (GroupActConstant.READ.equals(l.getReadFlag())) { + //已读 + NoticeReadListResultDTO.NoticeReafdRecord read = new NoticeReadListResultDTO.NoticeReafdRecord(); + read.setUserId(l.getUserId()); + read.setUserName(name.toString()); + read.setUserHeadPhoto(url.toString()); + readList.add(read); + } else { + //未读 + NoticeReadListResultDTO.NoticeReafdRecord unRead = new NoticeReadListResultDTO.NoticeReafdRecord(); + unRead.setUserId(l.getUserId()); + unRead.setUserName(name.toString()); + unRead.setUserHeadPhoto(url.toString()); + unReadList.add(unRead); } - }); - if (GroupActConstant.READ.equals(l.getReadFlag())) { - //已读 - NoticeReadListResultDTO.NoticeReafdRecord read = new NoticeReadListResultDTO.NoticeReafdRecord(); - read.setUserId(l.getUserId()); - read.setUserName(name.toString()); - read.setUserHeadPhoto(url.toString()); - readList.add(read); - } else { - //未读 - NoticeReadListResultDTO.NoticeReafdRecord unRead = new NoticeReadListResultDTO.NoticeReafdRecord(); - unRead.setUserId(l.getUserId()); - unRead.setUserName(name.toString()); - unRead.setUserHeadPhoto(url.toString()); - unReadList.add(unRead); } }); From 66f7328fdf20deea1fa800e0123502afb7ea78e6 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Sun, 25 Apr 2021 09:35:43 +0800 Subject: [PATCH 100/202] =?UTF-8?q?=E7=AD=BE=E5=88=B0=E5=85=A5=E5=8F=82?= =?UTF-8?q?=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/resi/group/dto/act/form/SignInFormDTO.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/SignInFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/SignInFormDTO.java index af00808a0f..f8ad90e67d 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/SignInFormDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/SignInFormDTO.java @@ -3,6 +3,7 @@ package com.epmet.resi.group.dto.act.form; import lombok.Data; import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; import java.io.Serializable; import java.math.BigDecimal; @@ -30,11 +31,13 @@ public class SignInFormDTO implements Serializable { /** * 签到地点-经度 */ + @NotNull(message ="经度不能为空",groups = AddUserInternalGroup.class) private BigDecimal longitude; /** * 签到地点-纬度 */ + @NotNull(message ="纬度不能为空",groups = AddUserInternalGroup.class) private BigDecimal latitude; @NotBlank(message = "tokenDto获取userId为空", groups = AddUserInternalGroup.class) From b750e2c933699a507359e3267755c3291aae644b Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Sun, 25 Apr 2021 09:42:43 +0800 Subject: [PATCH 101/202] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/commons/tools/exception/EpmetErrorCode.java | 4 +++- .../epmet/modules/notice/controller/NoticeController.java | 3 ++- .../modules/notice/service/impl/NoticeServiceImpl.java | 6 ++++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java index fab6d1d2b0..7e37bb458e 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java @@ -177,7 +177,9 @@ public enum EpmetErrorCode { GROUP_ACT_CAN_NOT_COMMENT(8910,"当前活动,不能评论"), SIGN_IN_TIME_NOT_START(8911,"未到签到时间,不允许签到"), SIGN_IN_TIME_PASSED(8912,"当前时间已超过签到时间"), - INVITATION_NOT_EXIST(8913,"链接不存在"); + INVITATION_NOT_EXIST(8913,"链接不存在"), + NOTICE_EXPIRATION_TIME(8914,"通知过期时间不能早于当前时间"), + NOTICE_BE_OVERDUE(8915,"通知已过期不允许再次变更"); private int code; diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeController.java index fd4328ddaa..1f4d37d1df 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeController.java @@ -18,6 +18,7 @@ package com.epmet.modules.notice.controller; import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; @@ -63,7 +64,7 @@ public class NoticeController { public Result add(@LoginUser TokenDto tokenDto, @RequestBody AddNoticeFormDTO formDTO){ ValidatorUtils.validateEntity(formDTO, AddNoticeFormDTO.Add.class, AddNoticeFormDTO.AddUserShow.class); if(formDTO.getExpirationTime().before(new Date())){ - throw new RenException("通知过期时间不能早于当前时间"); + throw new RenException(EpmetErrorCode.NOTICE_EXPIRATION_TIME.getCode()); } formDTO.setUserId(tokenDto.getUserId()); noticeService.add(formDTO); 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 da7ffb59c2..9f91a71585 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 @@ -295,10 +295,12 @@ public class NoticeServiceImpl extends BaseServiceImpl } //通知已过期时不允许再次变更 if(entity.getChangeTime().before(new Date())){ - throw new RenException("通知已过期不允许再次变更"); + throw new RenException(EpmetErrorCode.NOTICE_BE_OVERDUE.getCode()); + } + //通知过期时间不能早于当前时间 if(formDTO.getExpirationTime().before(new Date())){ - throw new RenException("通知过期时间不能早于当前时间"); + throw new RenException(EpmetErrorCode.NOTICE_EXPIRATION_TIME.getCode()); } //2.文字、图片安全校验 From ca82d570733edbcc60ea6dbba6955dcac9eef840 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Sun, 25 Apr 2021 09:49:53 +0800 Subject: [PATCH 102/202] bugfix --- .../modules/act/service/impl/GroupActInfoServiceImpl.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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 aecf370b48..3e1d9af54e 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 @@ -75,10 +75,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; -import java.util.UUID; +import java.util.*; import java.util.stream.Collectors; /** @@ -808,6 +805,8 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl()); + actSummaryFormDTO.setTextList(new ArrayList<>()); actSummaryService.submitActSummary(actSummaryFormDTO); } //4、插入操作日志 From fae7378cd9d0835617c6df035267b9ca5c291d20 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Sun, 25 Apr 2021 10:17:29 +0800 Subject: [PATCH 103/202] =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resi/group/dto/act/result/ActDetailResultDTO.java | 8 +++++++- .../act/service/impl/GroupActInfoServiceImpl.java | 11 ++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/ActDetailResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/ActDetailResultDTO.java index 86b4e9ed07..73a0659098 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/ActDetailResultDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/ActDetailResultDTO.java @@ -1,5 +1,6 @@ package com.epmet.resi.group.dto.act.result; +import com.epmet.resi.group.dto.topic.form.FileDTO; import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; @@ -118,7 +119,12 @@ public class ActDetailResultDTO implements Serializable { /** * 图片列表 */ - private List imgList; + private List imgArrayList; + + /** + * 图片列表,最多3张 + */ + private List imgList; //以下字段需要单独赋值 /** 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 3e1d9af54e..1493c65a5e 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 @@ -491,7 +491,16 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl imgList=new ArrayList<>(); + resultDTO.getImgArrayList().forEach(imgUrl->{ + FileDTO fileDTO=new FileDTO(); + fileDTO.setUrl(imgUrl); + //文件类型(图片 - image、 视频 - video、 语音 - voice、 文档 - doc) + fileDTO.setType("image"); + imgList.add(fileDTO); + }); + resultDTO.setImgList(imgList); resultDTO.setCanceledReason(GroupActConstant.CANCELED.equals(resultDTO.getStatus()) ? actOperationRecordDao.selectCanceledReason(formDTO.getGroupActId()) : StrConstant.EPMETY_STR); handleSignInDesc(resultDTO,formDTO.getUserId()); From 2695db6a7d432ea23d51623a2f15272ea73a00bc Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Sun, 25 Apr 2021 10:25:38 +0800 Subject: [PATCH 104/202] =?UTF-8?q?=E6=B6=89=E5=8F=8A=E5=B7=B2=E8=AF=BB?= =?UTF-8?q?=E6=9C=AA=E8=AF=BB=E5=80=9F=E5=8F=A3=E6=9B=B4=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../notice/result/ReadStatusResultDTO.java | 28 +++++++++++++ .../notice/result/UnReadListResultDTO.java | 5 +++ .../epmet/modules/group/dao/ResiGroupDao.java | 10 +++++ .../impl/NoticeReadRecordServiceImpl.java | 2 +- .../service/impl/ResiTopicServiceImpl.java | 19 ++++++--- .../mapper/group/GroupMessageDao.xml | 1 + .../resources/mapper/group/ResiGroupDao.xml | 41 +++++++++++++++++-- 7 files changed, 96 insertions(+), 10 deletions(-) create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/result/ReadStatusResultDTO.java diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/result/ReadStatusResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/result/ReadStatusResultDTO.java new file mode 100644 index 0000000000..efa1c53e27 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/result/ReadStatusResultDTO.java @@ -0,0 +1,28 @@ +package com.epmet.resi.group.dto.notice.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2021/4/25 上午9:06 + * @DESC + */ +@Data +public class ReadStatusResultDTO implements Serializable { + + private static final long serialVersionUID = 5013713195316328657L; + + private String userId; + + /** + * 活动、通知ID + */ + private String id; + + /** + * 阅读状态 + */ + private String readFlag; +} diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/result/UnReadListResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/result/UnReadListResultDTO.java index 404e74a5d8..714a59537c 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/result/UnReadListResultDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/result/UnReadListResultDTO.java @@ -50,6 +50,11 @@ public class UnReadListResultDTO implements Serializable { */ private String contentType; + /** + * 通知是否过期(true:是,false:否) + */ + private Boolean isExpirat; + @JsonIgnore private String userId; } 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 9429897f97..6404010230 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 @@ -24,6 +24,7 @@ import com.epmet.resi.group.dto.group.ResiGroupDTO; 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.ReadStatusResultDTO; 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; @@ -304,4 +305,13 @@ public interface ResiGroupDao extends BaseDao { * @date 2021/4/22 下午2:59 */ List getPastTopicListV2ByIds(@Param("ids")List ids); + + /** + * @Description 根据用户ID和【活动、通知ID】查询阅读状态 + * @Param ids + * @Param userIds + * @author zxc + * @date 2021/4/25 上午9:10 + */ + List selectReadFlagByUserAndId(@Param("ids")List ids,@Param("userIds")List userIds); } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeReadRecordServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeReadRecordServiceImpl.java index 6d135a0b8c..c8c4cc1b1b 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeReadRecordServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeReadRecordServiceImpl.java @@ -194,7 +194,7 @@ public class NoticeReadRecordServiceImpl extends BaseServiceImpl userIds = result.stream().map(m -> m.getUserId()).collect(Collectors.toList()); + List userIds = result.stream().map(m -> m.getUserId()).distinct().collect(Collectors.toList()); List userInfos = topicServiceImpl.disPoseUserInfo(resiGroup.getGroupType(), userIds); if (!CollectionUtils.isEmpty(userInfos)){ result.forEach(r -> { 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 dde0ed3f86..a72be2296d 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 @@ -90,6 +90,7 @@ import com.epmet.resi.group.dto.member.ResiGroupMemberDTO; import com.epmet.resi.group.dto.member.ResiGroupMemberInfoRedisDTO; import com.epmet.resi.group.dto.member.form.RemoveMemberFormDTO; import com.epmet.resi.group.dto.member.result.ResiGroupMemberInfoRedisResultDTO; +import com.epmet.resi.group.dto.notice.result.ReadStatusResultDTO; import com.epmet.resi.group.dto.topic.ResiTopicAttachmentDTO; import com.epmet.resi.group.dto.topic.ResiTopicDTO; import com.epmet.resi.group.dto.topic.TopicInfoDTO; @@ -2253,7 +2254,7 @@ public class ResiTopicServiceImpl extends BaseServiceImpl userIds = latestTenData.stream().map(m -> m.getUserId()).collect(Collectors.toList()); + List userIds = latestTenData.stream().map(m -> m.getUserId()).distinct().collect(Collectors.toList()); // 活动、通知、话题 ID集合 List ids = latestTenData.stream().map(m -> m.getId()).collect(Collectors.toList()); List userInfos = disPoseUserInfo(result.getGroupType(), userIds); @@ -2316,11 +2317,13 @@ public class ResiTopicServiceImpl extends BaseServiceImpl(); } ResiGroupEntity resiGroup = resiGroupDao.selectById(formDTO.getGroupId()); - List userIds = infos.stream().map(m -> m.getUserId()).collect(Collectors.toList()); + List userIds = infos.stream().map(m -> m.getUserId()).distinct().collect(Collectors.toList()); // 用户信息 List userInfos = this.disPoseUserInfo(resiGroup.getGroupType(), userIds); + // 根据用户ID和【活动、通知ID】查询阅读状态 + List readStatus = resiGroupDao.selectReadFlagByUserAndId(ids, userIds); // 查询用户徽章信息 - Result> badgeResult = epmetUserOpenFeignClient.userBadges(new UserBadgesFormDTO()); + Result> badgeResult = epmetUserOpenFeignClient.userBadges(new UserBadgesFormDTO(formDTO.getCustomerId(),userIds)); if (!badgeResult.success()){ throw new RenException(ModuleConstant.GET_BADGE_INFO_ERR); } @@ -2343,8 +2346,14 @@ public class ResiTopicServiceImpl extends BaseServiceImpl { + if (i.getUserId().equals(r.getUserId()) && i.getId().equals(r.getId())){ + i.setReadOrUnRead(r.getReadFlag()); + } + }); + } } // 徽章 if (!CollectionUtils.isEmpty(badgeResult.getData())){ 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 00cef75da1..0921766109 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 @@ -15,6 +15,7 @@ message_id FROM group_message WHERE DEL_FLAG = '0' + AND STATUS != 'hidden' AND GROUP_ID = #{groupId} order by created_time desc 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 b5e21ff6eb..83af302eb0 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 @@ -731,7 +731,7 @@ - SELECT id,userId,releaseTime,content,status,issueId,contentType FROM + SELECT id,userId,releaseTime,content,status,issueId,contentType,isExpirat FROM ((SELECT t.ID, t.CREATED_BY AS userId, @@ -832,4 +834,35 @@ ORDER BY releaseTime DESC + + + From 664f3a3e0d096d484b1a3740921080aa47989e1f Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Sun, 25 Apr 2021 10:27:30 +0800 Subject: [PATCH 105/202] shanchu --- .../epmet/modules/act/service/impl/GroupActInfoServiceImpl.java | 1 - 1 file changed, 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 1493c65a5e..9922e003f1 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 @@ -497,7 +497,6 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl Date: Sun, 25 Apr 2021 13:38:11 +0800 Subject: [PATCH 106/202] =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=96=B0=E5=A2=9E=E8=BF=94=E5=8F=82menuCode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/resi/group/dto/act/result/ActDetailResultDTO.java | 2 ++ .../epmet/modules/act/service/impl/GroupActInfoServiceImpl.java | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/ActDetailResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/ActDetailResultDTO.java index 73a0659098..5644075e3b 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/ActDetailResultDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/ActDetailResultDTO.java @@ -48,6 +48,8 @@ public class ActDetailResultDTO implements Serializable { */ private String parentCode; + private String menuCode; + /** * 活动类别名称;eg:支部建设-三会一课 */ 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 9922e003f1..80760fbe63 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 @@ -469,7 +469,6 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl Date: Sun, 25 Apr 2021 13:46:33 +0800 Subject: [PATCH 107/202] =?UTF-8?q?=E4=BF=AE=E6=94=B9menulist=20=E8=BF=94?= =?UTF-8?q?=E5=8F=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/resi/group/dto/act/result/CategoryDTO.java | 2 +- .../src/main/resources/mapper/act/ActCategoryDictDao.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/CategoryDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/CategoryDTO.java index c188bc5b19..4edc16ab0a 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/CategoryDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/CategoryDTO.java @@ -12,7 +12,7 @@ import java.io.Serializable; */ @Data public class CategoryDTO implements Serializable { - private String categoryCode; + private String menuCode; private String categoryName; private String parentCode; } diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActCategoryDictDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActCategoryDictDao.xml index 440ed9f9f3..83df9d09ff 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActCategoryDictDao.xml +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActCategoryDictDao.xml @@ -5,7 +5,7 @@ SELECT - ID AS "customerId", - CUSTOMER_NAME, - TITLE, - VALIDITY_TIME, - ORGANIZATION_LEVEL, - LOGO, - GRID_NUMBER + id AS "customerId", + customer_name, + title, + validity_time, + organization_level, + logo, + grid_number FROM customer WHERE - DEL_FLAG = '0' + del_flag = '0' AND customer_name LIKE concat('%', trim(#{customerName}), '%') + ORDER BY + created_time DESC - SELECT id,userId,releaseTime,content,status,issueId,contentType,firstPhoto FROM + SELECT id,userId,releaseTime,content,status,issueId,contentType,firstPhoto,isChange FROM ((SELECT t.ID, t.CREATED_BY AS userId, @@ -562,7 +562,8 @@ IFNULL(t.ISSUE_ID,'') AS issueId, 'topic' AS contentType, IFNULL(ta.ATTACHMENT_URL,'') AS firstPhoto, - false AS isExpirat + false AS isExpirat, + 'no' AS isChange FROM resi_topic t LEFT JOIN resi_topic_attachment ta ON ta.TOPIC_ID = t.ID AND ta.ATTACHMENT_TYPE = 'image' AND ta.DEL_FLAG = '0' AND ta.SORT = 0 WHERE t.DEL_FLAG = '0' @@ -580,7 +581,8 @@ '' AS issueId, 'act' AS contentType, IFNULL(ac2.CONTENT,'') AS firstPhoto, - false AS isExpirat + false AS isExpirat, + 'no' AS isChange FROM group_act_info ai LEFT JOIN group_act_content ac2 ON ac2.GROUP_ACT_ID = ai.ID AND ac2.CONTENT_TYPE = 'img' AND ac2.DEL_FLAG = 0 AND ac2.SORT = 1 WHERE ai.DEL_FLAG = '0' @@ -597,7 +599,8 @@ '' AS issueId, 'notice' AS contentType, IFNULL(na.ATTACHMENT_URL,'') AS firstPhoto, - (CASE WHEN UNIX_TIMESTAMP(n.EXPIRATION_TIME) UNIX_TIMESTAMP(NOW()) THEN TRUE ELSE FALSE END) AS isExpirat + (CASE WHEN UNIX_TIMESTAMP(n.EXPIRATION_TIME) UNIX_TIMESTAMP(NOW()) THEN TRUE ELSE FALSE END) AS isExpirat, + n.IS_CHANGE FROM notice n LEFT JOIN notice_attachment na ON na.NOTICE_ID = n.ID AND na.DEL_FLAG = '0' AND na.ATTACHMENT_TYPE = 'image' AND na.SORT = 0 WHERE n.DEL_FLAG = '0' @@ -772,7 +775,7 @@ SELECT - id AS topicId, - topic_content AS topicContent, - created_by AS publishedUser, - UNIX_TIMESTAMP( created_time ) AS publishedTime + rt.id AS topicId, + rt.topic_content AS topicContent, + rt.created_by AS publishedUser, + UNIX_TIMESTAMP(rt.created_time) AS publishedTime, + rg.group_type AS groupType FROM - resi_topic + resi_topic rt + LEFT JOIN resi_group rg ON rt.group_id = rg.id WHERE - id = #{topicId} - AND del_flag = 0 + rt.del_flag = '0' + AND rg.del_flag = '0' + AND rt.id = #{topicId} diff --git a/epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/TopicInfoDTO.java b/epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/TopicInfoDTO.java index 6dcf993139..86e0daefb2 100644 --- a/epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/TopicInfoDTO.java +++ b/epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/TopicInfoDTO.java @@ -40,4 +40,10 @@ public class TopicInfoDTO implements Serializable { */ private Long publishedTime; + /** + * 小组类型(ordinary:楼院小组 branch:支部小组) + */ + private String groupType; + + } diff --git a/epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/result/IssueInitiatorResultDTO.java b/epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/result/IssueInitiatorResultDTO.java index 08e0113ace..8b5a7d7a81 100644 --- a/epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/result/IssueInitiatorResultDTO.java +++ b/epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/result/IssueInitiatorResultDTO.java @@ -16,5 +16,9 @@ public class IssueInitiatorResultDTO implements Serializable { * 议题发起人(山东路168-尹女士) */ private String issueInitiator; + /** + * 议题发起人真实姓名 + */ + private String realUserName; } diff --git a/epmet-module/resi-hall/resi-hall-server/pom.xml b/epmet-module/resi-hall/resi-hall-server/pom.xml index a78f2f33f8..09c3635faf 100644 --- a/epmet-module/resi-hall/resi-hall-server/pom.xml +++ b/epmet-module/resi-hall/resi-hall-server/pom.xml @@ -51,6 +51,12 @@ 2.0.0 compile + + com.epmet + epmet-user-client + 2.0.0 + compile + diff --git a/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java b/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java index 64c1d9361b..2b3abe016b 100644 --- a/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java +++ b/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java @@ -45,6 +45,8 @@ public class IssueServiceImpl implements IssueService { private GovIssueOpenFeignClient govIssueOpenFeignClient; @Autowired private LoginUserUtil loginUserUtil; + @Autowired + private EpmetUserOpenFeignClient epmetUserOpenFeignClient; /** * @param issueDetail @@ -62,13 +64,7 @@ public class IssueServiceImpl implements IssueService { return issueDetailResult; } BeanUtils.copyProperties(issueResult, issueDetailResult); - //话题发起人 - IssueInitiatorFormDTO initiatorFormDTO = new IssueInitiatorFormDTO(); - initiatorFormDTO.setUserId(issueResult.getUserId()); - if (!StringUtils.isBlank(issueResult.getUserId())) { - IssueInitiatorResultDTO initiatorResult = userFeignClient.selectIssueInitiator(initiatorFormDTO).getData(); - issueDetailResult.setIssueInitiator(initiatorResult == null ? HallConstat.NULL_CHARACTER_STRING : initiatorResult.getIssueInitiator()); - } + //网格名称 BelongGridNameFormDTO belongGridName = new BelongGridNameFormDTO(); belongGridName.setGridId(issueResult.getGridId()); @@ -79,10 +75,35 @@ public class IssueServiceImpl implements IssueService { //话题信息 TopicInfoFormDTO topicInfoFormDTO = new TopicInfoFormDTO(); topicInfoFormDTO.setTopicId(issueResult.getTopicId()); + TopicInfoDTO topicInfoDTOResult = new TopicInfoDTO(); if (!StringUtils.isBlank(issueResult.getTopicId())) { - TopicInfoDTO topicInfoDTOResult = resiGroupFeignClient.selectDetail(topicInfoFormDTO).getData(); + topicInfoDTOResult = resiGroupFeignClient.selectDetail(topicInfoFormDTO).getData(); issueDetailResult.setTopicInfo(topicInfoDTOResult == null ? new TopicInfoDTO() : topicInfoDTOResult); } + if("branch".equals(topicInfoDTOResult.getGroupType())){//支部小组话题发起人显示真实姓名 + List userIdList = new ArrayList<>(); + userIdList.add(issueResult.getUserId()); + Result> result = epmetUserOpenFeignClient.queryUserBaseInfo(userIdList); + if (!result.success()) { + throw new RenException("调用user服务,获取用户基础数据失败"); + } + List resultDTOList = result.getData(); + resultDTOList.forEach(re->{ + if(issueResult.getUserId().equals(re.getUserId())){ + //话题发起人 + issueDetailResult.setIssueInitiator(re.getRealName() == null ? "" : re.getRealName()); + } + }); + } else { + //话题发起人 + IssueInitiatorFormDTO initiatorFormDTO = new IssueInitiatorFormDTO(); + initiatorFormDTO.setUserId(issueResult.getUserId()); + if (!StringUtils.isBlank(issueResult.getUserId())) { + IssueInitiatorResultDTO initiatorResult = userFeignClient.selectIssueInitiator(initiatorFormDTO).getData(); + issueDetailResult.setIssueInitiator(initiatorResult == null ? HallConstat.NULL_CHARACTER_STRING : initiatorResult.getIssueInitiator()); + } + } + //判断是否投票 CheckVoteFormDTO formDTO = new CheckVoteFormDTO(); formDTO.setIssueId(issueDetail.getIssueId()); diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/IssueInitiatorResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/IssueInitiatorResultDTO.java index 08e0113ace..8b5a7d7a81 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/IssueInitiatorResultDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/IssueInitiatorResultDTO.java @@ -16,5 +16,9 @@ public class IssueInitiatorResultDTO implements Serializable { * 议题发起人(山东路168-尹女士) */ private String issueInitiator; + /** + * 议题发起人真实姓名 + */ + private String realUserName; } diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/UserResiInfoDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/UserResiInfoDao.xml index 1dca8f531b..1f585c1ab6 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/UserResiInfoDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/UserResiInfoDao.xml @@ -142,13 +142,20 @@ '-', uri.surname, CASE - WHEN uw.sex = '1' THEN - '先生' - WHEN uw.sex = '2' THEN - '女士' - ELSE '先生/女士' - END - ) AS issueInitiator + WHEN uw.sex = '1' THEN + '先生' + WHEN uw.sex = '2' THEN + '女士' + ELSE + '先生/女士' + END + ) AS issueInitiator, + CONCAT( + uri.street, + '-', + uri.surname, + uriNAME + ) AS realUserName FROM user_resi_info uri LEFT JOIN user_wechat uw ON uw.user_id = uri.user_id From 306ab61657b8bd16fbb653061b3db4cab8782b5f Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 27 Apr 2021 16:10:30 +0800 Subject: [PATCH 142/202] =?UTF-8?q?=E5=BE=85=E5=AE=A1=E6=A0=B8=EF=BC=8C?= =?UTF-8?q?=E5=B7=B2=E9=A9=B3=E5=9B=9E=E8=AE=AE=E9=A2=98=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/group/result/TopicInfoResultDTO.java | 2 ++ .../service/impl/GroupIssueServiceImpl.java | 33 +++++++++++++++---- .../service/impl/ResiTopicServiceImpl.java | 1 + .../resources/mapper/group/ResiGroupDao.xml | 4 ++- .../epmet/dto/result/UserInfoResultDTO.java | 5 +++ 5 files changed, 38 insertions(+), 7 deletions(-) diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/TopicInfoResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/TopicInfoResultDTO.java index 49ec851463..9830571222 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/TopicInfoResultDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/TopicInfoResultDTO.java @@ -47,6 +47,8 @@ public class TopicInfoResultDTO implements Serializable { */ private String topicPublishMobile; + private String groupId; + @JsonIgnore private String topicUserId; diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/GroupIssueServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/GroupIssueServiceImpl.java index cb5852ebfd..827fc40a5f 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/GroupIssueServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/GroupIssueServiceImpl.java @@ -5,14 +5,12 @@ import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.form.IssueAppQueryFormDTO; import com.epmet.dto.form.IssueApplicationIdFormDTO; -import com.epmet.dto.result.AllGridsByUserIdResultDTO; -import com.epmet.dto.result.ApplicationHistoryResDTO; -import com.epmet.dto.result.IssueApplicationResDTO; -import com.epmet.dto.result.UserBaseInfoResultDTO; +import com.epmet.dto.result.*; import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.feign.GovIssueOpenFeignClient; import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.modules.group.dao.ResiGroupDao; +import com.epmet.modules.group.entity.ResiGroupEntity; import com.epmet.modules.group.service.GroupIssueService; import com.epmet.modules.topic.service.ResiTopicService; import com.epmet.resi.group.dto.group.form.AllIssueFormDTO; @@ -20,6 +18,10 @@ import com.epmet.resi.group.dto.group.form.ApplicationDetailFormDTO; import com.epmet.resi.group.dto.group.form.ApplicationHistoryFormDTO; import com.epmet.resi.group.dto.group.form.ApplicationListFormDTO; import com.epmet.resi.group.dto.group.result.*; +import com.epmet.resi.group.dto.group.result.ApplicationDetailResultDTO; +import com.epmet.resi.group.dto.group.result.ApplicationHistoryResultDTO; +import com.epmet.resi.group.dto.group.result.ApplicationListResultDTO; +import com.epmet.resi.group.dto.group.result.TopicInfoResultDTO; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; @@ -74,7 +76,26 @@ public class GroupIssueServiceImpl implements GroupIssueService { userIds.add(data.getUserId()); TopicInfoResultDTO topicInfoResultDTO = resiGroupDao.selectTopicInfo(data.getTopicId()); userIds.add(topicInfoResultDTO.getTopicUserId()); - Result> listResult = epmetUserOpenFeignClient.queryUserBaseInfo(userIds); + // 查询小组类别 + ResiGroupEntity resiGroupEntity = resiGroupDao.selectById(topicInfoResultDTO.getGroupId()); + if (null == resiGroupEntity){ + throw new RenException("此小组信息不存在"); + } + List userInfos = resiTopicService.disPoseUserInfo(resiGroupEntity.getGroupType(), userIds); + if(CollectionUtils.isEmpty(userInfos)){ + throw new RenException("未查询到用户信息"); + } + userInfos.forEach(u -> { + if (u.getUserId().equals(data.getUserId())){ + data.setIssuePublisher(u.getReleaseUserName()); + data.setIssuePublisherMobile(u.getMobile()); + } + if (u.getUserId().equals(topicInfoResultDTO.getTopicUserId())){ + topicInfoResultDTO.setPublishedUser(u.getReleaseUserName()); + topicInfoResultDTO.setTopicPublishMobile(u.getMobile()); + } + }); + /*Result> listResult = epmetUserOpenFeignClient.queryUserBaseInfo(userIds); if (!listResult.success()){ throw new RenException("查询话题创建者,议题创建者失败......"); } @@ -87,7 +108,7 @@ public class GroupIssueServiceImpl implements GroupIssueService { topicInfoResultDTO.setPublishedUser(user.getStreet().concat("-").concat(user.getSurname()).concat(getMrOrMs(user.getGender()))); topicInfoResultDTO.setTopicPublishMobile(user.getMobile()); } - }); + });*/ List gridIds = new ArrayList<>(); gridIds.add(data.getGridId()); Result> gridListByGridIds = govOrgOpenFeignClient.getGridListByGridIds(gridIds); 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 2a3bb864d6..354ab4f88b 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 @@ -2426,6 +2426,7 @@ public class ResiTopicServiceImpl extends BaseServiceImpl + @@ -466,7 +467,8 @@ rt.CREATED_BY AS topicUserId, UNIX_TIMESTAMP(rt.CREATED_TIME) AS publishedTime, rt.TOPIC_CONTENT as topicContent, - ta.ATTACHMENT_URL AS imgUrl + ta.ATTACHMENT_URL AS imgUrl, + rt.GROUP_ID FROM resi_topic rt LEFT JOIN resi_topic_attachment ta ON ta.TOPIC_ID = rt.ID WHERE rt.DEL_FLAG = '0' diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/UserInfoResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/UserInfoResultDTO.java index cccc7c04ce..0189aaa6e8 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/UserInfoResultDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/UserInfoResultDTO.java @@ -25,4 +25,9 @@ public class UserInfoResultDTO implements Serializable { * 话题发布者的头像Url */ private String releaseUserHeadPhoto; + + /** + * 手机号 + */ + private String mobile; } From cb901a57b73663ebf654741118848d00f7674040 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 27 Apr 2021 16:36:46 +0800 Subject: [PATCH 143/202] =?UTF-8?q?=E5=BE=85=E5=AE=A1=E6=A0=B8=EF=BC=8C?= =?UTF-8?q?=E5=B7=B2=E9=A9=B3=E5=9B=9E=20=E8=AF=9D=E9=A2=98=20=E8=AF=A6?= =?UTF-8?q?=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/TopicDraftServiceImpl.java | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/TopicDraftServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/TopicDraftServiceImpl.java index ae899e3ee9..8b800af1b5 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/TopicDraftServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/TopicDraftServiceImpl.java @@ -697,13 +697,29 @@ public class TopicDraftServiceImpl extends BaseServiceImpl userIds = new ArrayList<>(); + userIds.add(entity.getCreatedBy()); + List userInfos = resiTopicService.disPoseUserInfo(resiGroup.getGroupType(), userIds); + if (CollectionUtils.isEmpty(userInfos)){ + throw new RenException("未查询到用户信息"); + } + userInfos.forEach(u -> { + if (u.getUserId().equals(entity.getCreatedBy())){ + result.setReleaseUserName(u.getReleaseUserName()); + result.setReleaseUserHeadPhoto(u.getReleaseUserHeadPhoto()); + } + }); return result; } From 8d037bd95ba1915c26f0a2ae8e640fc0ab7c9262 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 27 Apr 2021 16:53:46 +0800 Subject: [PATCH 144/202] =?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=8E=A5=E5=8F=A3=E6=8C=89=E7=BB=84=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E8=BF=94=E4=BA=BA=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/ResiTopicCommentServiceImpl.java | 67 +++++++++++++------ 1 file changed, 45 insertions(+), 22 deletions(-) diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicCommentServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicCommentServiceImpl.java index c930e96965..5dd5a57b80 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicCommentServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicCommentServiceImpl.java @@ -40,11 +40,14 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.ScanContentUtils; import com.epmet.commons.tools.utils.SendMqMsgUtils; import com.epmet.dto.form.UserResiInfoListFormDTO; +import com.epmet.dto.result.UserInfoResultDTO; import com.epmet.dto.result.UserResiInfoResultDTO; import com.epmet.modules.comment.entity.ResiTopicCommentEntity; import com.epmet.modules.constant.ResiGroupRedisKeys; import com.epmet.modules.constant.WxmpSubscribeConstant; import com.epmet.modules.feign.EpmetUserFeignClient; +import com.epmet.modules.group.dao.ResiGroupDao; +import com.epmet.modules.group.entity.ResiGroupEntity; import com.epmet.modules.group.redis.ResiGroupRedis; import com.epmet.modules.member.dao.ResiGroupMemberDao; import com.epmet.modules.member.redis.ResiGroupMemberRedis; @@ -58,6 +61,7 @@ import com.epmet.resi.group.constant.MemberStateConstant; import com.epmet.resi.group.constant.TopicConstant; import com.epmet.resi.group.dto.comment.form.ResiQueryCommentFormDTO; import com.epmet.resi.group.dto.comment.result.ResiCommentResultDTO; +import com.epmet.resi.group.dto.group.ResiGroupDTO; import com.epmet.resi.group.dto.member.ResiGroupMemberDTO; import com.epmet.resi.group.dto.member.ResiGroupMemberInfoRedisDTO; import com.epmet.resi.group.dto.member.result.ResiGroupMemberInfoRedisResultDTO; @@ -113,6 +117,9 @@ public class ResiTopicCommentServiceImpl extends BaseServiceImpl userIdList = new ArrayList<>(); - for (ResiCommentResultDTO comment : comments) { - userIdList.add(comment.getUserId()); - } - UserResiInfoListFormDTO formDTO = new UserResiInfoListFormDTO(); - formDTO.setUserIdList(userIdList); - Result> userResiInfoDTOListResult = epmetUserFeignClient.getUserResiInfoList(formDTO); - if (userResiInfoDTOListResult.success() && null != userResiInfoDTOListResult.getData()) { - if (userResiInfoDTOListResult.getData().size() > 0) { - for (UserResiInfoResultDTO resiUser : userResiInfoDTOListResult.getData()) { - for (ResiCommentResultDTO comment : comments) { - if (StringUtils.equals(comment.getUserId(), resiUser.getUserId())) { - comment.setCommentUserHeadPhoto(resiUser.getHeadPhoto()); - comment.setCommentUserName(resiUser.getShowName()); - continue; + /*List userIdList = new ArrayList<>(); + for (ResiCommentResultDTO comment : comments) { + userIdList.add(comment.getUserId()); + } + UserResiInfoListFormDTO formDTO = new UserResiInfoListFormDTO(); + formDTO.setUserIdList(userIdList); + Result> userResiInfoDTOListResult = epmetUserFeignClient.getUserResiInfoList(formDTO); + if (userResiInfoDTOListResult.success() && null != userResiInfoDTOListResult.getData()) { + if (userResiInfoDTOListResult.getData().size() > 0) { + for (UserResiInfoResultDTO resiUser : userResiInfoDTOListResult.getData()) { + for (ResiCommentResultDTO comment : comments) { + if (StringUtils.equals(comment.getUserId(), resiUser.getUserId())) { + comment.setCommentUserHeadPhoto(resiUser.getHeadPhoto()); + comment.setCommentUserName(resiUser.getShowName()); + continue; + } } } + } + }else{ + logger.warn(ModuleConstant.USER_INFO_LIST_NOT_FOUND); + }*/ + setCacheUserInfo(topic.getGroupId(),comments); + //支部小组人员返真实姓名 + ResiGroupEntity entity = resiGroupDao.selectById(topic.getGroupId()); + if("".equals(entity.getGroupType())){ + List userIds = comments.stream().map(m -> m.getUserId()).distinct().collect(Collectors.toList()); + List userInfos = resiTopicService.disPoseUserInfo(entity.getGroupType(), userIds); + comments.forEach(item -> { + userInfos.forEach(u->{ + if(item.getUserId().equals(u.getUserId())){ + item.setCommentUserName(u.getReleaseUserName()); } + }); + }); } - }else{ - logger.warn(ModuleConstant.USER_INFO_LIST_NOT_FOUND); - }*/ - setCacheUserInfo(topic.getGroupId(),comments); - } - return new Result>().ok(comments); + } + + return new Result>().ok(comments); } /** From 37d7a64826328ae7fcbd747b1ca219bc6fff6abf Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 27 Apr 2021 17:03:32 +0800 Subject: [PATCH 145/202] =?UTF-8?q?=E5=BE=85=E5=AE=A1=E6=A0=B8=EF=BC=8C?= =?UTF-8?q?=E5=B7=B2=E9=A9=B3=E5=9B=9E=20=E8=AE=AE=E9=A2=98=20=E8=AF=A6?= =?UTF-8?q?=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/group/ResiGroupDao.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 0f170f1a80..0abccca57f 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 @@ -468,7 +468,7 @@ UNIX_TIMESTAMP(rt.CREATED_TIME) AS publishedTime, rt.TOPIC_CONTENT as topicContent, ta.ATTACHMENT_URL AS imgUrl, - rt.GROUP_ID + rt.GROUP_ID AS groupId FROM resi_topic rt LEFT JOIN resi_topic_attachment ta ON ta.TOPIC_ID = rt.ID WHERE rt.DEL_FLAG = '0' From 412f182c66705413eae1ac98a375dd82edfb230b Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 27 Apr 2021 17:08:25 +0800 Subject: [PATCH 146/202] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/impl/IssueServiceImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java b/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java index 2b3abe016b..c4ee3ad86d 100644 --- a/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java +++ b/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java @@ -91,7 +91,9 @@ public class IssueServiceImpl implements IssueService { resultDTOList.forEach(re->{ if(issueResult.getUserId().equals(re.getUserId())){ //话题发起人 - issueDetailResult.setIssueInitiator(re.getRealName() == null ? "" : re.getRealName()); + String street = re.getStreet() == null ? "" : re.getStreet() + "-"; + String realName = re.getRealName() == null ? "" : re.getRealName(); + issueDetailResult.setIssueInitiator(street + realName); } }); } else { From 6c9ef49a571549d5f10b53bf793296d422d603b3 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 27 Apr 2021 17:18:17 +0800 Subject: [PATCH 147/202] =?UTF-8?q?=E5=8F=AF=E8=83=9C=E4=BB=BB=E7=BB=84?= =?UTF-8?q?=E9=95=BF=E5=88=97=E8=A1=A8=E6=8E=A5=E5=8F=A3=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/epmetuser/UserBaseInfoDao.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/UserBaseInfoDao.xml b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/UserBaseInfoDao.xml index 7e72f2a85e..1ce45a28d8 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/UserBaseInfoDao.xml +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/UserBaseInfoDao.xml @@ -13,7 +13,7 @@ ELSE '先生/女士' END ) AS userShowName, HEAD_IMG_URL AS headPhoto, - REAL_NAME AS realName + CONCAT(STREET,'-',REAL_NAME) AS realName FROM user_base_info WHERE DEL_FLAG = 0 AND From 0459b8a686bc7863ecf6225ffcf34d698ad3ea85 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 27 Apr 2021 17:25:46 +0800 Subject: [PATCH 148/202] =?UTF-8?q?bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../topic/service/impl/ResiTopicCommentServiceImpl.java | 2 +- .../modules/topic/service/impl/ResiTopicServiceImpl.java | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicCommentServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicCommentServiceImpl.java index 5dd5a57b80..702c088bcf 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicCommentServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicCommentServiceImpl.java @@ -338,7 +338,7 @@ public class ResiTopicCommentServiceImpl extends BaseServiceImpl userIds = comments.stream().map(m -> m.getUserId()).distinct().collect(Collectors.toList()); List userInfos = resiTopicService.disPoseUserInfo(entity.getGroupType(), userIds); comments.forEach(item -> { 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 3ad919e6d3..e59cd1f0b5 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 @@ -1380,7 +1380,9 @@ public class ResiTopicServiceImpl extends BaseServiceImpl{ if(topicInfo.getPublishedUser().equals(re.getUserId())){ //话题发起人 - topicInfo.setPublishedUser(re.getRealName() == null ? "" : re.getRealName()); + String street = re.getStreet() == null ? "" : re.getStreet() + "-"; + String realName = re.getRealName() == null ? "" : re.getRealName(); + topicInfo.setPublishedUser(street + realName); } }); } else { From b6485387544b19be3adc03f4a3902c3a4b4b87fb Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 28 Apr 2021 09:36:02 +0800 Subject: [PATCH 149/202] =?UTF-8?q?/resi/group/actsign/geturl=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/act/service/impl/ActSignInRecordServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSignInRecordServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSignInRecordServiceImpl.java index d3657b29cb..0fe4dd3e51 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSignInRecordServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSignInRecordServiceImpl.java @@ -284,7 +284,7 @@ public class ActSignInRecordServiceImpl extends BaseServiceImpl Date: Wed, 28 Apr 2021 09:45:47 +0800 Subject: [PATCH 150/202] =?UTF-8?q?=E8=BF=9B=E5=85=A5=E7=BD=91=E6=A0=BC?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=B7=BB=E5=8A=A0=E7=9C=9F=E5=AE=9E=E4=BA=BA?= =?UTF-8?q?=E5=90=8D=E8=BF=94=E5=8F=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/result/UserInfoOnEnterGridResultDTO.java | 6 +++++- .../com/epmet/service/impl/RegisterRelationServiceImpl.java | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/UserInfoOnEnterGridResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/UserInfoOnEnterGridResultDTO.java index 0e5cd22fef..0bada1c5ee 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/UserInfoOnEnterGridResultDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/UserInfoOnEnterGridResultDTO.java @@ -51,7 +51,11 @@ public class UserInfoOnEnterGridResultDTO implements Serializable{ private List userRoleList; /** - * + * XX街道-Y先生/女士 如果是未认证居民,这一列为空 */ private String userStreetName; + /** + * XX街道-YYY 如果是未认证居民,这一列为空 + */ + private String userStreetTrueName; } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/RegisterRelationServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/RegisterRelationServiceImpl.java index 8c6c448689..e2aaae2963 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/RegisterRelationServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/RegisterRelationServiceImpl.java @@ -273,6 +273,7 @@ public class RegisterRelationServiceImpl extends BaseServiceImpl Date: Wed, 28 Apr 2021 10:07:04 +0800 Subject: [PATCH 151/202] =?UTF-8?q?=E5=8E=86=E5=8F=B2=E8=AF=9D=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/ResiTopicServiceImpl.java | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) 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 e59cd1f0b5..abecb8e4e6 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 @@ -516,8 +516,24 @@ public class ResiTopicServiceImpl extends BaseServiceImpl 0) { //2. 在缓存中拉取用户信息 - setCacheUserInfoWithIssue(topicPageFormDTO.getGroupId(), pastTopics); - +// setCacheUserInfoWithIssue(topicPageFormDTO.getGroupId(), pastTopics); + ResiGroupEntity resiGroup = resiGroupDao.selectById(topicPageFormDTO.getGroupId()); + if(null == resiGroup){ + throw new RenException("此小组信息不存在"); + } + List userIds = pastTopics.stream().map(m -> m.getUserId()).collect(Collectors.toList()); + List userInfos = disPoseUserInfo(resiGroup.getGroupType(), userIds); + if (CollectionUtils.isEmpty(userInfos)){ + throw new RenException("未查询到用户信息"); + } + pastTopics.forEach(t -> { + userInfos.forEach(u -> { + if (t.getUserId().equals(u.getUserId())){ + t.setReleaseUserName(u.getReleaseUserName()); + t.setReleaseUserHeadPhoto(u.getReleaseUserHeadPhoto()); + } + }); + }); //3.用户徽章 //3.1首先需要拿到客户Id List other = pastTopics.stream() From c422a839e55d23438158cf5c3a971a7a9eef140b Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 28 Apr 2021 13:59:40 +0800 Subject: [PATCH 152/202] =?UTF-8?q?=E4=B8=BA=E6=B0=91=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E5=8F=91=E5=B8=83=E6=B4=BB=E5=8A=A8=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/resi/group/dto/act/form/PublishGroupActFormDTO.java | 4 +++- .../modules/act/service/impl/GroupActInfoServiceImpl.java | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/PublishGroupActFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/PublishGroupActFormDTO.java index 0b1c522a91..09756de07b 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/PublishGroupActFormDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/PublishGroupActFormDTO.java @@ -52,9 +52,11 @@ public class PublishGroupActFormDTO implements Serializable { /** * 类别编码所属的上一级编码 */ - @NotBlank(message = "parentCode不能为空", groups = AddUserInternalGroup.class) private String parentCode; + @NotBlank(message = "menuCode不能为空", groups = AddUserInternalGroup.class) + private String menuCode; + /** * 活动标题 */ 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 aec9d52567..899f73b5ad 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 @@ -133,7 +133,7 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl Date: Wed, 28 Apr 2021 14:08:46 +0800 Subject: [PATCH 153/202] =?UTF-8?q?=E5=B0=8F=E7=BB=84=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=E6=8E=A5=E5=8F=A3=E6=8C=89=E7=BB=84=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E8=BF=94=E5=9B=9E=E7=9C=9F=E5=AE=9E=E4=BA=BA=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/ResiGroupServiceImpl.java | 26 ++++++++++++++----- .../service/impl/NoticeServiceImpl.java | 4 +-- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java index 7980a41f14..1c6cc3f142 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java @@ -37,6 +37,7 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.ScanContentUtils; import com.epmet.constant.ReadFlagConstant; import com.epmet.dto.form.*; +import com.epmet.dto.result.UserInfoResultDTO; import com.epmet.dto.result.UserResiInfoResultDTO; import com.epmet.dto.result.UserRoleResultDTO; import com.epmet.feign.EpmetMessageOpenFeignClient; @@ -855,12 +856,24 @@ public class ResiGroupServiceImpl extends BaseServiceImpl groupLeaderUserInfo = this.getGroupLeaderUserInfo(formDTO.getGroupId()); - if (groupLeaderUserInfo.success() && null != groupLeaderUserInfo.getData()) { - resultDTO.setLeaderName(groupLeaderUserInfo.getData().getShowName()); + if("branch".equals(entity.getGroupType())){ + //获取组长信息 + if (groupLeaderUserInfo.success() && null != groupLeaderUserInfo.getData()) { + String street = groupLeaderUserInfo.getData().getStreet() == null ? "" : groupLeaderUserInfo.getData().getStreet() + "-"; + resultDTO.setLeaderName(street + groupLeaderUserInfo.getData().getSurname() + groupLeaderUserInfo.getData().getName()); + } else { + logger.warn("组长注册信息查询失败,msg:{},groupId:{}", groupLeaderUserInfo.getMsg(), formDTO.getGroupId()); + } } else { - logger.warn("组长注册信息查询失败,msg:{},groupId:{}", groupLeaderUserInfo.getMsg(), formDTO.getGroupId()); + //获取组长信息 + if (groupLeaderUserInfo.success() && null != groupLeaderUserInfo.getData()) { + resultDTO.setLeaderName(groupLeaderUserInfo.getData().getShowName()); + } else { + logger.warn("组长注册信息查询失败,msg:{},groupId:{}", groupLeaderUserInfo.getMsg(), formDTO.getGroupId()); + } } return new Result().ok(resultDTO); @@ -993,8 +1006,9 @@ public class ResiGroupServiceImpl extends BaseServiceImpl> getGroupIdsByGridIdList(List gridIdList) { - if(null == gridIdList || gridIdList.size() < NumConstant.ONE) - return null; + if(null == gridIdList || gridIdList.size() < NumConstant.ONE){ + return null; + } Map> result = new HashMap<>(); List groups = new ArrayList<>(); Map> groupMap 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 36a20ffde6..c0e8521ef2 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 @@ -479,8 +479,8 @@ public class NoticeServiceImpl extends BaseServiceImpl url.append(user.getHeadImgUrl()); } }); - resultDTO.setReleaseUserName(name.toString()); - resultDTO.setReleaseUserHeadPhoto(url.toString()); + resultDTO.setReleaseUserName(String.valueOf(name)); + resultDTO.setReleaseUserHeadPhoto(String.valueOf(url)); fileList.forEach(f -> { if ("image".equals(f.getType())) { imageList.add(f); From 3db20811b0f38d9dd314cf7eae9dc1f640842c86 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 28 Apr 2021 14:40:02 +0800 Subject: [PATCH 154/202] =?UTF-8?q?=E5=B7=B2=E5=B1=8F=E8=94=BD=E8=AF=9D?= =?UTF-8?q?=E9=A2=98=E5=88=97=E8=A1=A8=E6=8E=A5=E5=8F=A3=E6=8C=89=E7=BB=84?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E8=BF=94=E5=9B=9E=E7=9C=9F=E5=AE=9E=E4=BA=BA?= =?UTF-8?q?=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/ResiTopicServiceImpl.java | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) 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 abecb8e4e6..bac53dbb6a 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 @@ -1141,9 +1141,26 @@ public class ResiTopicServiceImpl extends BaseServiceImpl top.setBadgeList(Collections.EMPTY_LIST)); + } else { + pastTopics.forEach(top -> top.setBadgeList(Collections.EMPTY_LIST)); + } } + + //支部小组人员返真实姓名 + ResiGroupEntity entity = resiGroupDao.selectById(topicPageFormDTO.getGroupId()); + if("".equals(entity.getGroupType())){ + List userIds = pastTopics.stream().map(m -> m.getUserId()).distinct().collect(Collectors.toList()); + List userInfos = resiTopicService.disPoseUserInfo(entity.getGroupType(), userIds); + pastTopics.forEach(item -> { + userInfos.forEach(u->{ + if(item.getUserId().equals(u.getUserId())){ + item.setReleaseUserName(u.getReleaseUserName()); + } + }); + }); + } + } return new Result>().ok(pastTopics); From 502e52eef19ff2076253d87a8d2ce985caefa7c4 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 28 Apr 2021 14:40:39 +0800 Subject: [PATCH 155/202] =?UTF-8?q?=E6=89=80=E6=9C=89=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=B7=A5=E4=BD=9C=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/controller/ResiTopicController.java | 16 +++- .../com/epmet/service/ResiTopicService.java | 10 +++ .../service/impl/ResiTopicServiceImpl.java | 29 ++++++- .../dto/topic/form/AllMessagesFormDTO.java | 32 ++++++++ .../topic/result/AllMessagesResultDTO.java | 78 +++++++++++++++++++ .../group/feign/ResiGroupOpenFeignClient.java | 10 +++ .../ResiGroupOpenFeignClientFallback.java | 5 ++ .../epmet/modules/group/dao/ResiGroupDao.java | 9 +++ .../topic/controller/ResiTopicController.java | 13 ++++ .../topic/service/ResiTopicService.java | 9 +++ .../service/impl/ResiTopicServiceImpl.java | 50 ++++++++++++ .../resources/mapper/group/ResiGroupDao.xml | 67 ++++++++++++++++ 12 files changed, 323 insertions(+), 5 deletions(-) create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/AllMessagesFormDTO.java create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/AllMessagesResultDTO.java diff --git a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/controller/ResiTopicController.java b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/controller/ResiTopicController.java index 6686e605f6..444b81dc02 100644 --- a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/controller/ResiTopicController.java +++ b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/controller/ResiTopicController.java @@ -6,8 +6,10 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.resi.group.dto.comment.form.ResiQueryCommentFormDTO; import com.epmet.resi.group.dto.comment.result.GovCommentResultDTO; +import com.epmet.resi.group.dto.topic.form.AllMessagesFormDTO; import com.epmet.resi.group.dto.topic.form.ResiTopicDetailFormDTO; import com.epmet.resi.group.dto.topic.form.ResiTopicPageFormDTO; +import com.epmet.resi.group.dto.topic.result.AllMessagesResultDTO; import com.epmet.resi.group.dto.topic.result.GovHiddenTopicInfoResultDTO; import com.epmet.resi.group.dto.topic.result.GovTopicInfoResultDTO; import com.epmet.resi.group.dto.topic.result.ResiTopicDetailResultDTO; @@ -70,6 +72,18 @@ public class ResiTopicController { return resiTopicService.topicDetail(topicDetailFormDTO); } - + /** + * @Description 小组内所有历史消息【话题,通知,活动】 + * @Param tokenDto + * @Param topicPageFormDTO + * @author zxc + * @date 2021/4/28 上午10:41 + */ + @PostMapping("allmessages") + public Result> allMessages(@LoginUser TokenDto tokenDto, @RequestBody AllMessagesFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, AllMessagesFormDTO.AllMessagesForm.class); + formDTO.setCustomerId(tokenDto.getCustomerId()); + return new Result>().ok(resiTopicService.allMessages(formDTO)); + } } diff --git a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/ResiTopicService.java b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/ResiTopicService.java index ac12a9fcfe..0b30bc2734 100644 --- a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/ResiTopicService.java +++ b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/ResiTopicService.java @@ -3,8 +3,10 @@ package com.epmet.service; import com.epmet.commons.tools.utils.Result; import com.epmet.resi.group.dto.comment.form.ResiQueryCommentFormDTO; import com.epmet.resi.group.dto.comment.result.GovCommentResultDTO; +import com.epmet.resi.group.dto.topic.form.AllMessagesFormDTO; import com.epmet.resi.group.dto.topic.form.ResiTopicDetailFormDTO; import com.epmet.resi.group.dto.topic.form.ResiTopicPageFormDTO; +import com.epmet.resi.group.dto.topic.result.AllMessagesResultDTO; import com.epmet.resi.group.dto.topic.result.GovHiddenTopicInfoResultDTO; import com.epmet.resi.group.dto.topic.result.GovTopicInfoResultDTO; import com.epmet.resi.group.dto.topic.result.ResiTopicDetailResultDTO; @@ -53,5 +55,13 @@ public interface ResiTopicService { **/ Result> topicComments(ResiQueryCommentFormDTO queryCommentFormDTO); + /** + * @Description 小组内所有历史消息【话题,通知,活动】 + * @Param formDTO + * @author zxc + * @date 2021/4/28 下午1:29 + */ + List allMessages(AllMessagesFormDTO formDTO); + } diff --git a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/impl/ResiTopicServiceImpl.java b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/impl/ResiTopicServiceImpl.java index a51eebbed6..260dee432e 100644 --- a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/impl/ResiTopicServiceImpl.java +++ b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/impl/ResiTopicServiceImpl.java @@ -1,20 +1,21 @@ package com.epmet.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.ResiGroupFeignClient; import com.epmet.resi.group.dto.comment.form.ResiQueryCommentFormDTO; import com.epmet.resi.group.dto.comment.result.GovCommentResultDTO; import com.epmet.resi.group.dto.comment.result.ResiCommentResultDTO; +import com.epmet.resi.group.dto.topic.form.AllMessagesFormDTO; import com.epmet.resi.group.dto.topic.form.ResiTopicDetailFormDTO; import com.epmet.resi.group.dto.topic.form.ResiTopicPageFormDTO; -import com.epmet.resi.group.dto.topic.result.GovHiddenTopicInfoResultDTO; -import com.epmet.resi.group.dto.topic.result.GovTopicInfoResultDTO; -import com.epmet.resi.group.dto.topic.result.ResiTopicDetailResultDTO; -import com.epmet.resi.group.dto.topic.result.ResiTopicInfoResultDTO; +import com.epmet.resi.group.dto.topic.result.*; +import com.epmet.resi.group.feign.ResiGroupOpenFeignClient; import com.epmet.service.ResiTopicService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; import java.util.ArrayList; import java.util.List; @@ -24,6 +25,8 @@ public class ResiTopicServiceImpl implements ResiTopicService { @Autowired private ResiGroupFeignClient resiGroupFeignClient; + @Autowired + private ResiGroupOpenFeignClient resiGroupOpenFeignClient; /** * @Description 政府端群组管理-屏蔽话题列表查询 @@ -125,4 +128,22 @@ public class ResiTopicServiceImpl implements ResiTopicService { return new Result>().ok(commentsResult); } + + /** + * @Description 小组内所有历史消息【话题,通知,活动】 + * @Param formDTO + * @author zxc + * @date 2021/4/28 下午1:29 + */ + @Override + public List allMessages(AllMessagesFormDTO formDTO) { + Result> listResult = resiGroupOpenFeignClient.allMessages(formDTO); + if (!listResult.success()){ + throw new RenException(listResult.getMsg()); + } + if (CollectionUtils.isEmpty(listResult.getData())){ + return new ArrayList<>(); + } + return listResult.getData(); + } } diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/AllMessagesFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/AllMessagesFormDTO.java new file mode 100644 index 0000000000..335790f7cd --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/AllMessagesFormDTO.java @@ -0,0 +1,32 @@ +package com.epmet.resi.group.dto.topic.form; + +import lombok.Data; + +import javax.validation.constraints.Min; +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2021/4/28 上午10:43 + * @DESC + */ +@Data +public class AllMessagesFormDTO implements Serializable { + + private static final long serialVersionUID = -2658793886922936733L; + + public interface AllMessagesForm{} + + @NotBlank(message = "小组ID不能为空",groups = AllMessagesForm.class) + private String groupId; + + @NotNull(message = "pageNo不能为空",groups = AllMessagesForm.class) + private Integer pageNo; + + @NotNull(message = "pageSize不能为空",groups = AllMessagesForm.class) + private Integer pageSize; + + private String customerId; +} diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/AllMessagesResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/AllMessagesResultDTO.java new file mode 100644 index 0000000000..378b3ad861 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/AllMessagesResultDTO.java @@ -0,0 +1,78 @@ +package com.epmet.resi.group.dto.topic.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2021/4/28 上午10:51 + * @DESC + */ +@Data +public class AllMessagesResultDTO implements Serializable { + + private static final long serialVersionUID = -4123381714064953276L; + + /** + * 话题、通知、活动Id + */ + private String id; + + /** + * 发布者的全称(街道-姓氏先生/女士)【专项组显示真实名】 + */ + private String userNickName; + + /** + * 发布者的头像Url + */ + private String userHeadPhoto; + + /** + * 发布时间yyyy-MM-dd + */ + private String releaseTime; + + /** + * 内容 + */ + private String content; + + /** + * 话题状态(discussing进行中、closed已关闭) + */ + private String status; + + /** + * 数据类型(topic:话题 notice:通知 act:活动) + */ + private String contentType; + + /** + * 徽章Url集合 + */ + private List badgeList = new ArrayList<>(); + + /** + * 通知是否过期(true:是 false:否) + */ + private Boolean isExpirat; + + /** + * 是否变更,yes,no + */ + private String isChange = "no"; + + /** + * 发布者ID + */ + private String userId; + + /** + * 第一张图 + */ + private String firstPhoto; +} diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/ResiGroupOpenFeignClient.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/ResiGroupOpenFeignClient.java index d604e0abc6..26dab5da6b 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/ResiGroupOpenFeignClient.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/ResiGroupOpenFeignClient.java @@ -216,4 +216,14 @@ public interface ResiGroupOpenFeignClient { **/ @PostMapping(value = "/resi/group/topic/topicattachmentlist") Result topicAttachmentList(@RequestBody TopicAttachmentFormDTO formDTO); + + /** + * @Description 小组内所有历史消息【话题,通知,活动】 + * @Param tokenDto + * @Param topicPageFormDTO + * @author zxc + * @date 2021/4/28 上午10:41 + */ + @PostMapping("/resi/group/topic/allmessages") + Result> allMessages(@RequestBody AllMessagesFormDTO formDTO); } diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/fallback/ResiGroupOpenFeignClientFallback.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/fallback/ResiGroupOpenFeignClientFallback.java index b53570bfa8..544e18c6ba 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/fallback/ResiGroupOpenFeignClientFallback.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/fallback/ResiGroupOpenFeignClientFallback.java @@ -157,4 +157,9 @@ public class ResiGroupOpenFeignClientFallback implements ResiGroupOpenFeignClien public Result topicAttachmentList(TopicAttachmentFormDTO formDTO) { return ModuleUtils.feignConError(ServiceConstant.RESI_GROUP_SERVER, "topicAttachmentList", formDTO); } + + @Override + public Result> allMessages(AllMessagesFormDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.RESI_GROUP_SERVER, "allMessages", formDTO); + } } 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 6404010230..44d94c04aa 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 @@ -26,6 +26,7 @@ import com.epmet.resi.group.dto.group.result.*; import com.epmet.resi.group.dto.member.ResiGroupMemberDTO; import com.epmet.resi.group.dto.notice.result.ReadStatusResultDTO; import com.epmet.resi.group.dto.notice.result.UnReadListResultDTO; +import com.epmet.resi.group.dto.topic.result.AllMessagesResultDTO; import com.epmet.resi.group.dto.topic.result.GetPastTopicListV2ResultDTO; import com.epmet.resi.group.dto.topic.result.LatestTenResultDTO; import org.apache.ibatis.annotations.Mapper; @@ -306,6 +307,14 @@ public interface ResiGroupDao extends BaseDao { */ List getPastTopicListV2ByIds(@Param("ids")List ids); + /** + * @Description 根据IDs查询 topic,act,notice信息【工作端】 + * @Param ids + * @author zxc + * @date 2021/4/28 下午1:56 + */ + List getAllMessagesOrg(@Param("ids")List ids); + /** * @Description 根据用户ID和【活动、通知ID】查询阅读状态 * @Param ids diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/controller/ResiTopicController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/controller/ResiTopicController.java index aa8158ede0..d1b5a15106 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/controller/ResiTopicController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/controller/ResiTopicController.java @@ -470,4 +470,17 @@ public class ResiTopicController { formDTO.setCustomerId(tokenDto.getCustomerId()); return new Result>().ok(topicService.getPastTopicListV2(formDTO)); } + + /** + * @Description 小组内所有历史消息【话题,通知,活动】 + * @Param tokenDto + * @Param topicPageFormDTO + * @author zxc + * @date 2021/4/28 上午10:41 + */ + @PostMapping("allmessages") + public Result> allMessages(@RequestBody AllMessagesFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, GetPastTopicListV2FormDTO.GetPastTopicListV2Form.class); + return new Result>().ok(topicService.allMessages(formDTO)); + } } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/ResiTopicService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/ResiTopicService.java index 134a4b9885..064255c04c 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/ResiTopicService.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/ResiTopicService.java @@ -380,4 +380,13 @@ public interface ResiTopicService extends BaseService { * @date 2021/4/27 下午1:50 */ List disPoseUserInfo(String groupType, List userIds); + + /** + * @Description 小组内所有历史消息【话题,通知,活动】 + * @Param tokenDto + * @Param topicPageFormDTO + * @author zxc + * @date 2021/4/28 上午10:41 + */ + List allMessages(AllMessagesFormDTO formDTO); } 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 abecb8e4e6..9bb0d18e3c 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 @@ -2475,6 +2475,56 @@ public class ResiTopicServiceImpl extends BaseServiceImpl allMessages(AllMessagesFormDTO formDTO) { + 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 allMessages = resiGroupDao.getAllMessagesOrg(ids); + if (CollectionUtils.isEmpty(allMessages)){ + return new ArrayList<>(); + } + // 查询小组类型 + ResiGroupEntity resiGroup = resiGroupDao.selectById(formDTO.getGroupId()); + List userIds = allMessages.stream().map(m -> m.getUserId()).distinct().collect(Collectors.toList()); + // 查询用户头像,姓名 + List userInfos = disPoseUserInfo(resiGroup.getGroupType(), userIds); + if (CollectionUtils.isEmpty(userInfos)){ + throw new RenException("未查询到用户信息"); + } + Result> badgeResult = epmetUserOpenFeignClient.userBadges(new UserBadgesFormDTO(formDTO.getCustomerId(),userIds)); + if (!badgeResult.success()){ + throw new RenException(ModuleConstant.GET_BADGE_INFO_ERR); + } + allMessages.forEach(a -> { + // 用户头像姓名赋值 + userInfos.forEach(u -> { + if (a.getUserId().equals(u.getUserId())){ + a.setUserNickName(u.getReleaseUserName()); + a.setUserHeadPhoto(u.getReleaseUserHeadPhoto()); + } + }); + // 徽章 + if (!CollectionUtils.isEmpty(badgeResult.getData())){ + badgeResult.getData().forEach(b -> { + if (a.getUserId().equals(b.getUserId())){ + a.setBadgeList(b.getBadgeIcons()); + } + }); + } + }); + return allMessages; + } + } 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 0abccca57f..a010334abd 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 @@ -870,4 +870,71 @@ ) + + + From 80d0643d11315ad0863c348bfe49063617dbbfec Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 28 Apr 2021 15:04:15 +0800 Subject: [PATCH 156/202] =?UTF-8?q?=E7=BB=84=E4=BF=A1=E6=81=AF=E7=BC=96?= =?UTF-8?q?=E8=BE=91-=E7=94=B3=E8=AF=B7=E8=AF=A6=E6=83=85=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E6=8C=89=E7=BB=84=E7=B1=BB=E5=9E=8B=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E7=9C=9F=E5=AE=9E=E4=BA=BA=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/ResiGroupServiceImpl.java | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java index 1c6cc3f142..bf50316c61 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java @@ -62,6 +62,7 @@ import com.epmet.modules.member.dao.ResiGroupMemberDao; import com.epmet.modules.member.redis.ResiGroupMemberRedis; import com.epmet.modules.member.service.GroupMemeberOperationService; import com.epmet.modules.member.service.ResiGroupMemberService; +import com.epmet.modules.topic.service.ResiTopicService; import com.epmet.modules.utils.ModuleConstant; import com.epmet.resi.group.constant.*; import com.epmet.resi.group.dto.UserRoleDTO; @@ -164,6 +165,8 @@ public class ResiGroupServiceImpl extends BaseServiceImpl page(Map params) { @@ -993,7 +996,9 @@ public class ResiGroupServiceImpl extends BaseServiceImpl getGroupIdByGridId(String gridId) { - if(StringUtils.isBlank(gridId)) return null; + if(StringUtils.isBlank(gridId)) { + return null; + } return baseDao.getGroupIdByGridId(gridId); } @@ -1483,7 +1488,19 @@ public class ResiGroupServiceImpl extends BaseServiceImpl userIds = new ArrayList<>(); + userIds.add(edit.getCreatedBy()); + List userInfos = resiTopicService.disPoseUserInfo(entity.getGroupType(), userIds); + userInfos.forEach(u->{ + if(edit.getCreatedBy().equals(u.getUserId())){ + result.setGroupLeaderName(u.getReleaseUserName()); + } + }); + } else { + result.setGroupLeaderName(resiGroupRedis.getFullName(edit.getCreatedBy())); + } return result; } From 4d64c41cbecb6412fcc231c9254f0d7f0ea281ad Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 28 Apr 2021 15:37:09 +0800 Subject: [PATCH 157/202] =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E5=B7=B2=E8=AF=BB?= =?UTF-8?q?=E6=9C=AA=E8=AF=BB=EF=BC=8C=E5=A2=9E=E5=8A=A0VIEW=5FDETAIL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resi/group/dto/act/ActReadRecordDTO.java | 7 ++- .../act/entity/ActReadRecordEntity.java | 7 ++- .../service/impl/GroupActInfoServiceImpl.java | 44 +++++++++++-------- 3 files changed, 38 insertions(+), 20 deletions(-) diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActReadRecordDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActReadRecordDTO.java index c9350d4716..5af02bbd7e 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActReadRecordDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActReadRecordDTO.java @@ -60,10 +60,15 @@ public class ActReadRecordDTO implements Serializable { private String groupActId; /** - * 已读: read未读:un_read;查看活动详情后修改此表,或者插入一条新的已读记录 + * 活动关闭前已读:read;未读:un_read */ private String readFlag; + /** + * 已读:read未读:un_read + */ + private String viewDetail; + /** * 用户id */ diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActReadRecordEntity.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActReadRecordEntity.java index 4ffe1d4c5f..81cc38589c 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActReadRecordEntity.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActReadRecordEntity.java @@ -56,10 +56,15 @@ public class ActReadRecordEntity extends BaseEpmetEntity { private String groupActId; /** - * 已读: read未读:un_read;查看活动详情后修改此表,或者插入一条新的已读记录 + * 活动关闭前已读:read;未读:un_read */ private String readFlag; + /** + * 已读:read未读:un_read + */ + private String viewDetail; + /** * 用户id */ 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 899f73b5ad..2369c5de2c 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 @@ -202,8 +202,10 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl NumConstant.ZERO ? false : true); - if (!GroupActConstant.CLOSED.equals(groupActInfoEntity.getStatus())) { - //如果活动关闭,则不更新已读记录 - //非关闭状态下,返回详情,并且已读状态 - ActReadRecordEntity actReadRecordEntity = actReadRecordDao.selectUserRec(formDTO.getGroupActId(), formDTO.getUserId()); - if (null == actReadRecordEntity) { - if (!GroupActConstant.CLOSED.equals(groupActInfoEntity.getStatus())) { - //插入已读记录,默认不属于应读人。 - ActReadRecordEntity insertEntity = new ActReadRecordEntity(); - insertEntity.setCustomerId(groupActInfoEntity.getCustomerId()); - insertEntity.setGroupActId(formDTO.getGroupActId()); - insertEntity.setReadFlag(GroupActConstant.READ); - insertEntity.setShouldBeRead(Constant.NO); - insertEntity.setUserId(formDTO.getUserId()); - insertEntity.setGridId(groupActInfoEntity.getGridId()); - insertEntity.setGroupId(groupActInfoEntity.getGroupId()); - actReadRecordDao.insert(insertEntity); - } - } else { + //如果活动关闭,则不更新已读记录 + //非关闭状态下,返回详情,并且已读状态 + ActReadRecordEntity actReadRecordEntity = actReadRecordDao.selectUserRec(formDTO.getGroupActId(), formDTO.getUserId()); + if (null != actReadRecordEntity) { + /*if (!GroupActConstant.CLOSED.equals(groupActInfoEntity.getStatus())) { + //插入已读记录,默认不属于应读人。 + ActReadRecordEntity insertEntity = new ActReadRecordEntity(); + insertEntity.setCustomerId(groupActInfoEntity.getCustomerId()); + insertEntity.setGroupActId(formDTO.getGroupActId()); + insertEntity.setReadFlag(GroupActConstant.READ); + insertEntity.setShouldBeRead(Constant.NO); + insertEntity.setUserId(formDTO.getUserId()); + insertEntity.setGridId(groupActInfoEntity.getGridId()); + insertEntity.setGroupId(groupActInfoEntity.getGroupId()); + insertEntity.setViewDetail(GroupActConstant.READ); + actReadRecordDao.insert(insertEntity); + }*/ + // } else { + if(!GroupActConstant.CLOSED.equals(groupActInfoEntity.getStatus())){ if (GroupActConstant.UN_READ.equals(actReadRecordEntity.getReadFlag())) { //未读->已读 actReadRecordEntity.setReadFlag(GroupActConstant.READ); actReadRecordEntity.setUpdatedTime(new Date()); + actReadRecordEntity.setViewDetail(GroupActConstant.READ); actReadRecordDao.updateById(actReadRecordEntity); } + }else{ + actReadRecordEntity.setUpdatedTime(new Date()); + actReadRecordEntity.setViewDetail(GroupActConstant.READ); + actReadRecordDao.updateById(actReadRecordEntity); } } return resultDTO; From 4de03750be45b7917f6b9e489f3b2a58bd84ce91 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 28 Apr 2021 15:52:16 +0800 Subject: [PATCH 158/202] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../notice/result/UnReadListResultDTO.java | 5 +++++ .../topic/result/AllMessagesResultDTO.java | 4 ++-- .../epmet/modules/group/dao/ResiGroupDao.java | 2 +- .../service/impl/ResiTopicServiceImpl.java | 6 +++--- .../resources/mapper/group/ResiGroupDao.xml | 20 +++++++------------ 5 files changed, 18 insertions(+), 19 deletions(-) diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/result/UnReadListResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/result/UnReadListResultDTO.java index 714a59537c..b92a1879d1 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/result/UnReadListResultDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/result/UnReadListResultDTO.java @@ -55,6 +55,11 @@ public class UnReadListResultDTO implements Serializable { */ private Boolean isExpirat; + /** + * 是否编辑过(true:是,false:否) + */ + private Boolean isChanged; + @JsonIgnore private String userId; } diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/AllMessagesResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/AllMessagesResultDTO.java index 378b3ad861..fbb744420c 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/AllMessagesResultDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/AllMessagesResultDTO.java @@ -24,12 +24,12 @@ public class AllMessagesResultDTO implements Serializable { /** * 发布者的全称(街道-姓氏先生/女士)【专项组显示真实名】 */ - private String userNickName; + private String releaseUserName; /** * 发布者的头像Url */ - private String userHeadPhoto; + private String releaseUserHeadPhoto; /** * 发布时间yyyy-MM-dd 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 44d94c04aa..0818935a1c 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 @@ -271,7 +271,7 @@ public interface ResiGroupDao extends BaseDao { * @author zxc * @date 2021/4/21 上午9:45 */ - List selectUserReadFlag(@Param("groupId")String groupId,@Param("userIds")List userIds,@Param("ids")List ids); + List selectUserReadFlag(@Param("groupId")String groupId,@Param("userId")String userId,@Param("ids")List ids); /** * @Description 根据 活动或通知查询 未读人数 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 7f67bf5f83..79a5172bd5 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 @@ -2345,7 +2345,7 @@ public class ResiTopicServiceImpl extends BaseServiceImpl ids = latestTenData.stream().map(m -> m.getId()).collect(Collectors.toList()); List userInfos = disPoseUserInfo(result.getGroupType(), userIds); // 查询用户的 活动或通知的 阅读状态 - List userReadFlag = resiGroupDao.selectUserReadFlag(groupId, userIds, ids); + List userReadFlag = resiGroupDao.selectUserReadFlag(groupId, userId, ids); // 查询小组下的 通知或活动 未读人数 List userUnReadCount = resiGroupDao.selectUserUnReadById(groupId, ids); latestTenData.forEach(l -> { @@ -2526,8 +2526,8 @@ public class ResiTopicServiceImpl extends BaseServiceImpl { if (a.getUserId().equals(u.getUserId())){ - a.setUserNickName(u.getReleaseUserName()); - a.setUserHeadPhoto(u.getReleaseUserHeadPhoto()); + a.setReleaseUserName(u.getReleaseUserName()); + a.setReleaseUserHeadPhoto(u.getReleaseUserHeadPhoto()); } }); // 徽章 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 a010334abd..49c73e454b 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 @@ -643,11 +643,7 @@ FROM act_read_record WHERE DEL_FLAG = 0 - AND ( - - USER_ID = #{userId} - - ) + AND USER_ID = #{userId} AND ( GROUP_ACT_ID = #{id} @@ -663,11 +659,7 @@ FROM notice_read_record WHERE DEL_FLAG = 0 - AND ( - - USER_ID = #{userId} - - ) + AND USER_ID = #{userId} AND ( NOTICE_ID = #{id} @@ -735,7 +727,7 @@ From cc3cd519bfd86fd8e31e3462b13666d3819f96e7 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 28 Apr 2021 16:30:41 +0800 Subject: [PATCH 161/202] =?UTF-8?q?readFlag=E4=BF=AE=E6=94=B9=20VIEW=5FDET?= =?UTF-8?q?AIL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/mapper/group/ResiGroupDao.xml | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) 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 59c565d694..38140fe84e 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 @@ -621,7 +621,7 @@ COUNT( 1 ) AS unRead FROM act_read_record WHERE DEL_FLAG = 0 - AND `READ_FLAG` = 'un_read' + AND `VIEW_DETAIL` = 'un_read' AND USER_ID = #{userId} AND GROUP_ID = #{groupId}) UNION ALL @@ -629,7 +629,7 @@ COUNT( 1 ) AS unRead FROM notice_read_record WHERE DEL_FLAG = 0 - AND READ_FLAG = 'un_read' + AND VIEW_DETAIL = 'un_read' AND USER_ID = #{userId} AND GROUP_ID = #{groupId})) temp @@ -637,7 +637,7 @@ - (SELECT USER_ID, read_flag, GROUP_ACT_ID AS id + (SELECT USER_ID, VIEW_DETAIL AS readFlag, GROUP_ACT_ID AS id FROM act_read_record WHERE DEL_FLAG = 0 AND ( @@ -847,7 +847,7 @@ ) ) UNION ALL - (SELECT USER_ID, read_flag, NOTICE_ID AS id + (SELECT USER_ID, VIEW_DETAIL AS readFlag, NOTICE_ID AS id FROM notice_read_record WHERE DEL_FLAG = 0 AND ( From 674cf45c1aeae02b1246e54b6150dba8930f93fa Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 28 Apr 2021 16:59:42 +0800 Subject: [PATCH 162/202] =?UTF-8?q?=E8=AE=AE=E9=A2=98=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=8C=89=E7=BB=84=E7=B1=BB=E5=9E=8B=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E7=9C=9F=E5=AE=9E=E5=A7=93=E5=90=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/impl/IssueServiceImpl.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java b/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java index c4ee3ad86d..163fda848c 100644 --- a/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java +++ b/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java @@ -80,7 +80,8 @@ public class IssueServiceImpl implements IssueService { topicInfoDTOResult = resiGroupFeignClient.selectDetail(topicInfoFormDTO).getData(); issueDetailResult.setTopicInfo(topicInfoDTOResult == null ? new TopicInfoDTO() : topicInfoDTOResult); } - if("branch".equals(topicInfoDTOResult.getGroupType())){//支部小组话题发起人显示真实姓名 + + /*if("branch".equals(topicInfoDTOResult.getGroupType())){//支部小组话题发起人显示真实姓名 List userIdList = new ArrayList<>(); userIdList.add(issueResult.getUserId()); Result> result = epmetUserOpenFeignClient.queryUserBaseInfo(userIdList); @@ -104,7 +105,8 @@ public class IssueServiceImpl implements IssueService { IssueInitiatorResultDTO initiatorResult = userFeignClient.selectIssueInitiator(initiatorFormDTO).getData(); issueDetailResult.setIssueInitiator(initiatorResult == null ? HallConstat.NULL_CHARACTER_STRING : initiatorResult.getIssueInitiator()); } - } + }*/ + issueDetailResult.setIssueInitiator(topicInfoDTOResult.getPublishedUser()); //判断是否投票 CheckVoteFormDTO formDTO = new CheckVoteFormDTO(); From 83ef47c76a8a486b36b1ce0229d72419a43ec38a Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 28 Apr 2021 17:18:24 +0800 Subject: [PATCH 163/202] bug --- .../src/main/resources/mapper/UserResiInfoDao.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/UserResiInfoDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/UserResiInfoDao.xml index 1f585c1ab6..fb360d3a39 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/UserResiInfoDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/UserResiInfoDao.xml @@ -154,7 +154,7 @@ uri.street, '-', uri.surname, - uriNAME + uri.NAME ) AS realUserName FROM user_resi_info uri From 139277c5e592c6ebfc243b211d4dc9ab6593cc41 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 29 Apr 2021 09:41:46 +0800 Subject: [PATCH 164/202] =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E7=AB=AF=E6=9F=A5?= =?UTF-8?q?=E7=9C=8B=E6=B4=BB=E5=8A=A8=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../commons/tools/dto/form/FileCommonDTO.java | 42 +++++ .../dto/result/ActDetailGovResultDTO.java | 151 ++++++++++++++++++ .../epmet/controller/ResiGroupController.java | 21 ++- .../com/epmet/service/ResiGroupService.java | 7 +- .../service/impl/ResiGroupServiceImpl.java | 12 +- .../group/dto/act/form/ActDetailFormDTO.java | 8 + .../controller/GroupActInfoController.java | 1 + 7 files changed, 232 insertions(+), 10 deletions(-) create mode 100644 epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/FileCommonDTO.java create mode 100644 epmet-module/gov-grid/gov-grid-client/src/main/java/com/epmet/dto/result/ActDetailGovResultDTO.java diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/FileCommonDTO.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/FileCommonDTO.java new file mode 100644 index 0000000000..494c636a95 --- /dev/null +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/FileCommonDTO.java @@ -0,0 +1,42 @@ +package com.epmet.commons.tools.dto.form; + +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * @author zhaoqifeng + * @dscription + * @date 2020/12/21 15:37 + */ +@NoArgsConstructor +@Data +public class FileCommonDTO implements Serializable { + + private static final long serialVersionUID = -5307959406648243353L; + /** + * 文件名 + */ + private String name; + /** + * url地址 + */ + private String url; + /** + * 文件类型(图片 - image、 视频 - video、 语音 - voice、 文档 - doc) + */ + private String type; + /** + * 后缀名 + */ + private String format; + /** + * 文件大小 kb + */ + private Integer size; + /** + * 语音或视频文件时长,单位秒 + */ + private Integer duration; +} diff --git a/epmet-module/gov-grid/gov-grid-client/src/main/java/com/epmet/dto/result/ActDetailGovResultDTO.java b/epmet-module/gov-grid/gov-grid-client/src/main/java/com/epmet/dto/result/ActDetailGovResultDTO.java new file mode 100644 index 0000000000..65b2541ed0 --- /dev/null +++ b/epmet-module/gov-grid/gov-grid-client/src/main/java/com/epmet/dto/result/ActDetailGovResultDTO.java @@ -0,0 +1,151 @@ +package com.epmet.dto.result; + +import com.epmet.commons.tools.dto.form.FileCommonDTO; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; +import java.util.List; + +/** + * 工作端小组内,活动详情返参DTO + * + * @author yinzuomei@elink-cn.com + * @date 2021/4/29 9:30 + */ +@Data +public class ActDetailGovResultDTO implements Serializable { + private static final long serialVersionUID = 3982724635100043221L; + + private String groupActId; + + /** + * 小组id + */ + private String groupId; + + /** + * 活动标题; + */ + private String title; + + /** + * 活动时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") + private Date startTime; + + /** + * 活动所属类别编码 + */ + private String categoryCode; + + /** + * 上级类别编码 + */ + private String parentCode; + + private String menuCode; + + /** + * 活动类别名称;eg:支部建设-三会一课 + */ + private String allCategoryName; + + /** + * 活动地点 + */ + private String address; + + /** + * 应参加人数组长填入;此列也是应签到人数; + */ + private Integer shouldAttend; + + /** + * 活动状态:已发布:published;已取消:canceled;已变更:changed;已关闭:closed + */ + private String status; + + /** + * 签到开始时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date signInStartTime; + + /** + * 签到截止时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date signInEndTime; + + /** + * 是否填写总结?1:已填写;0:未填写 + */ + private Integer summaryFlag; + + /** + * 取消时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") + private Date canceledTime; + + /** + * 关闭时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") + private Date closedTime; + + /** + * 活动发布人用户id + */ + private String publishUserId; + + /** + * 内容列表 + */ + private List textList; + + /** + * 图片列表 + */ + private List imgArrayList; + + /** + * 图片列表,最多3张 + */ + private List imgList; + + //以下字段需要单独赋值 + /** + * 取消原因 + */ + private String canceledReason; + + /** + * blank: 不显示; display:显示 + */ + private String signInButton; + + /** + * 未签到时的描述,可能是签到时间未开始,可能是签到时间已经过 + */ + private String signInDesc; + + /** + * 已签到人数(有人签到自动+1) + */ + private Integer signedInNum; + + /** + * 网格id + */ + private String gridId; + + /** + * 客户id + */ + private String customerId; + +} diff --git a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/controller/ResiGroupController.java b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/controller/ResiGroupController.java index 4ee3b04ee8..31c745fe35 100644 --- a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/controller/ResiGroupController.java +++ b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/controller/ResiGroupController.java @@ -6,11 +6,10 @@ import com.epmet.commons.tools.enums.RequirePermissionEnum; 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.dto.result.ActDetailGovResultDTO; +import com.epmet.resi.group.dto.act.form.ActDetailFormDTO; import com.epmet.resi.group.dto.group.form.*; import com.epmet.resi.group.dto.group.result.*; -import com.epmet.commons.tools.validator.ValidatorUtils; -import com.epmet.resi.group.dto.group.form.GovGroupSummarizeFromDTO; -import com.epmet.resi.group.dto.group.form.GroupAuditedFromDTO; import com.epmet.resi.group.feign.ResiGroupOpenFeignClient; import com.epmet.service.ResiGroupService; import org.springframework.beans.factory.annotation.Autowired; @@ -175,5 +174,19 @@ public class ResiGroupController { return groupOpenFeignClient.govAuditEdit(param); } - + /** + * @return com.epmet.commons.tools.utils.Result + * @param tokenDto + * @param actDetailFormDTO + * @author yinzuomei + * @description 工作端查看小组内活动详情 + * @Date 2021/4/29 9:38 + **/ + @PostMapping("actdetail") + public Result queryActDetailForWork(@LoginUser TokenDto tokenDto, @RequestBody ActDetailFormDTO actDetailFormDTO){ + actDetailFormDTO.setUserId(tokenDto.getUserId()); + actDetailFormDTO.setClient("gov"); + ValidatorUtils.validateEntity(actDetailFormDTO,ActDetailFormDTO.AddUserInternalGroup.class); + return new Result().ok(resiGroupService.queryActDetailForWork(actDetailFormDTO)); + } } diff --git a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/ResiGroupService.java b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/ResiGroupService.java index 02dc4e458d..2609cb7b87 100644 --- a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/ResiGroupService.java +++ b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/ResiGroupService.java @@ -1,10 +1,10 @@ package com.epmet.service; import com.epmet.commons.tools.utils.Result; -import com.epmet.resi.group.dto.group.form.GovGroupSummarizeFromDTO; -import com.epmet.resi.group.dto.group.form.GroupAuditedFromDTO; -import com.epmet.resi.group.dto.group.result.*; +import com.epmet.dto.result.ActDetailGovResultDTO; +import com.epmet.resi.group.dto.act.form.ActDetailFormDTO; import com.epmet.resi.group.dto.group.form.*; +import com.epmet.resi.group.dto.group.result.*; import java.util.List; @@ -74,4 +74,5 @@ public interface ResiGroupService { **/ Result disagreeApplying(DisAgreeApplyGroupFormDTO disAgreeApplyGroupFormDTO); + ActDetailGovResultDTO queryActDetailForWork(ActDetailFormDTO actDetailFormDTO); } diff --git a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/impl/ResiGroupServiceImpl.java b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/impl/ResiGroupServiceImpl.java index 28cb001f5e..d876c7180a 100644 --- a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/impl/ResiGroupServiceImpl.java +++ b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/impl/ResiGroupServiceImpl.java @@ -1,11 +1,11 @@ package com.epmet.service.impl; import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.result.ActDetailGovResultDTO; import com.epmet.feign.ResiGroupFeignClient; -import com.epmet.resi.group.dto.group.form.GovGroupSummarizeFromDTO; -import com.epmet.resi.group.dto.group.form.GroupAuditedFromDTO; -import com.epmet.resi.group.dto.group.result.*; +import com.epmet.resi.group.dto.act.form.ActDetailFormDTO; import com.epmet.resi.group.dto.group.form.*; +import com.epmet.resi.group.dto.group.result.*; import com.epmet.service.ResiGroupService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -57,5 +57,11 @@ public class ResiGroupServiceImpl implements ResiGroupService{ return resiGroupFeignClient.disagreeApplying(disAgreeApplyGroupFormDTO); } + @Override + public ActDetailGovResultDTO queryActDetailForWork(ActDetailFormDTO actDetailFormDTO) { + //todo + return null; + } + } diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/ActDetailFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/ActDetailFormDTO.java index 4403b96a48..2cf07cf690 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/ActDetailFormDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/ActDetailFormDTO.java @@ -24,4 +24,12 @@ public class ActDetailFormDTO implements Serializable { */ @NotBlank(message = "tokenDto获取userId为空", groups = AddUserInternalGroup.class) private String userId; + + + + /** + * 工作端:gov; 居民端:resi + * 这个是代码里赋值的 + */ + private String client; } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java index 6492fe4008..3c204ac284 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java @@ -74,6 +74,7 @@ public class GroupActInfoController { @PostMapping("actdetail") public Result queryActDetail(@LoginUser TokenDto tokenDto, @RequestBody ActDetailFormDTO actDetailFormDTO){ actDetailFormDTO.setUserId(tokenDto.getUserId()); + actDetailFormDTO.setClient("resi"); ValidatorUtils.validateEntity(actDetailFormDTO,ActDetailFormDTO.AddUserInternalGroup.class); return new Result().ok(groupActInfoService.queryActDetail(actDetailFormDTO)); } From 4e335188aa631e8ee73495bd165425fdb478b9ba Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 29 Apr 2021 09:59:48 +0800 Subject: [PATCH 165/202] =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E7=AB=AF=E6=9F=A5?= =?UTF-8?q?=E7=9C=8B=E6=B4=BB=E5=8A=A8=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/result/ActDetailGovResultDTO.java | 10 ---- .../epmet/controller/ResiGroupController.java | 3 +- .../com/epmet/feign/ResiGroupFeignClient.java | 12 ++++ .../ResiGroupFeignClientFallBack.java | 14 +++++ .../service/impl/ResiGroupServiceImpl.java | 11 +++- .../controller/GroupActInfoController.java | 3 +- .../service/impl/GroupActInfoServiceImpl.java | 58 ++++++++----------- 7 files changed, 63 insertions(+), 48 deletions(-) diff --git a/epmet-module/gov-grid/gov-grid-client/src/main/java/com/epmet/dto/result/ActDetailGovResultDTO.java b/epmet-module/gov-grid/gov-grid-client/src/main/java/com/epmet/dto/result/ActDetailGovResultDTO.java index 65b2541ed0..c10c9cf2ec 100644 --- a/epmet-module/gov-grid/gov-grid-client/src/main/java/com/epmet/dto/result/ActDetailGovResultDTO.java +++ b/epmet-module/gov-grid/gov-grid-client/src/main/java/com/epmet/dto/result/ActDetailGovResultDTO.java @@ -123,16 +123,6 @@ public class ActDetailGovResultDTO implements Serializable { */ private String canceledReason; - /** - * blank: 不显示; display:显示 - */ - private String signInButton; - - /** - * 未签到时的描述,可能是签到时间未开始,可能是签到时间已经过 - */ - private String signInDesc; - /** * 已签到人数(有人签到自动+1) */ diff --git a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/controller/ResiGroupController.java b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/controller/ResiGroupController.java index 31c745fe35..08b7284e19 100644 --- a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/controller/ResiGroupController.java +++ b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/controller/ResiGroupController.java @@ -2,6 +2,7 @@ package com.epmet.controller; import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.annotation.RequirePermission; +import com.epmet.commons.tools.constant.AppClientConstant; import com.epmet.commons.tools.enums.RequirePermissionEnum; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; @@ -185,7 +186,7 @@ public class ResiGroupController { @PostMapping("actdetail") public Result queryActDetailForWork(@LoginUser TokenDto tokenDto, @RequestBody ActDetailFormDTO actDetailFormDTO){ actDetailFormDTO.setUserId(tokenDto.getUserId()); - actDetailFormDTO.setClient("gov"); + actDetailFormDTO.setClient(AppClientConstant.APP_GOV); ValidatorUtils.validateEntity(actDetailFormDTO,ActDetailFormDTO.AddUserInternalGroup.class); return new Result().ok(resiGroupService.queryActDetailForWork(actDetailFormDTO)); } diff --git a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/feign/ResiGroupFeignClient.java b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/feign/ResiGroupFeignClient.java index 2fc38efdf0..18f125c969 100644 --- a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/feign/ResiGroupFeignClient.java +++ b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/feign/ResiGroupFeignClient.java @@ -6,6 +6,8 @@ import com.epmet.controller.TestFormDTO1; import com.epmet.controller.TestResultDTO1; import com.epmet.dto.result.GridProcessingCountResultDTO; import com.epmet.feign.fallback.ResiGroupFeignClientFallBack; +import com.epmet.resi.group.dto.act.form.ActDetailFormDTO; +import com.epmet.resi.group.dto.act.result.ActDetailResultDTO; import com.epmet.resi.group.dto.comment.form.ResiQueryCommentFormDTO; import com.epmet.resi.group.dto.comment.result.ResiCommentResultDTO; import com.epmet.resi.group.dto.group.form.*; @@ -151,4 +153,14 @@ public interface ResiGroupFeignClient { @PostMapping(value = "/resi/group/group/test",consumes = MediaType.APPLICATION_JSON_VALUE) Result test(@RequestBody TestFormDTO1 testFormDTO1); + + /** + * @return com.epmet.commons.tools.utils.Result + * @param actDetailFormDTO + * @author yinzuomei + * @description 查询活动详情 + * @Date 2021/4/29 9:57 + **/ + @PostMapping(value = "/resi/group/act/actdetail",consumes = MediaType.APPLICATION_JSON_VALUE) + Result queryActDetail(@RequestBody ActDetailFormDTO actDetailFormDTO); } diff --git a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/feign/fallback/ResiGroupFeignClientFallBack.java b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/feign/fallback/ResiGroupFeignClientFallBack.java index 588142a4f0..01d7ff57ec 100644 --- a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/feign/fallback/ResiGroupFeignClientFallBack.java +++ b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/feign/fallback/ResiGroupFeignClientFallBack.java @@ -7,6 +7,8 @@ import com.epmet.controller.TestFormDTO1; import com.epmet.controller.TestResultDTO1; import com.epmet.dto.result.GridProcessingCountResultDTO; import com.epmet.feign.ResiGroupFeignClient; +import com.epmet.resi.group.dto.act.form.ActDetailFormDTO; +import com.epmet.resi.group.dto.act.result.ActDetailResultDTO; import com.epmet.resi.group.dto.comment.form.ResiQueryCommentFormDTO; import com.epmet.resi.group.dto.comment.result.ResiCommentResultDTO; import com.epmet.resi.group.dto.group.form.GovGroupSummarizeFromDTO; @@ -120,4 +122,16 @@ public class ResiGroupFeignClientFallBack implements ResiGroupFeignClient { public Result test(TestFormDTO1 testFormDTO1) { return ModuleUtils.feignConError(ServiceConstant.RESI_GROUP_SERVER, "test", testFormDTO1); } + + /** + * @param actDetailFormDTO + * @return com.epmet.commons.tools.utils.Result + * @author yinzuomei + * @description 查询活动详情 + * @Date 2021/4/29 9:57 + **/ + @Override + public Result queryActDetail(ActDetailFormDTO actDetailFormDTO) { + return ModuleUtils.feignConError(ServiceConstant.RESI_GROUP_SERVER, "queryActDetail", actDetailFormDTO); + } } diff --git a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/impl/ResiGroupServiceImpl.java b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/impl/ResiGroupServiceImpl.java index d876c7180a..7bae657b2b 100644 --- a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/impl/ResiGroupServiceImpl.java +++ b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/impl/ResiGroupServiceImpl.java @@ -1,9 +1,12 @@ package com.epmet.service.impl; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.result.ActDetailGovResultDTO; import com.epmet.feign.ResiGroupFeignClient; import com.epmet.resi.group.dto.act.form.ActDetailFormDTO; +import com.epmet.resi.group.dto.act.result.ActDetailResultDTO; import com.epmet.resi.group.dto.group.form.*; import com.epmet.resi.group.dto.group.result.*; import com.epmet.service.ResiGroupService; @@ -59,8 +62,12 @@ public class ResiGroupServiceImpl implements ResiGroupService{ @Override public ActDetailGovResultDTO queryActDetailForWork(ActDetailFormDTO actDetailFormDTO) { - //todo - return null; + Result actDetailResult=resiGroupFeignClient.queryActDetail(actDetailFormDTO); + if(actDetailResult.success()&&null!=actDetailResult.getData()){ + ActDetailGovResultDTO resultDTO= ConvertUtils.sourceToTarget(actDetailResult.getData(),ActDetailGovResultDTO.class); + return resultDTO; + } + throw new RenException("调用resi-group服务,查询活动详情异常"); } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java index 3c204ac284..3587ca35d0 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java @@ -18,6 +18,7 @@ package com.epmet.modules.act.controller; import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.constant.AppClientConstant; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; @@ -74,7 +75,7 @@ public class GroupActInfoController { @PostMapping("actdetail") public Result queryActDetail(@LoginUser TokenDto tokenDto, @RequestBody ActDetailFormDTO actDetailFormDTO){ actDetailFormDTO.setUserId(tokenDto.getUserId()); - actDetailFormDTO.setClient("resi"); + actDetailFormDTO.setClient(AppClientConstant.APP_RESI); ValidatorUtils.validateEntity(actDetailFormDTO,ActDetailFormDTO.AddUserInternalGroup.class); return new Result().ok(groupActInfoService.queryActDetail(actDetailFormDTO)); } 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 2369c5de2c..fc29566767 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 @@ -484,12 +484,15 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl NumConstant.ZERO ? false : true); - //如果活动关闭,则不更新已读记录 - //非关闭状态下,返回详情,并且已读状态 - ActReadRecordEntity actReadRecordEntity = actReadRecordDao.selectUserRec(formDTO.getGroupActId(), formDTO.getUserId()); - if (null != actReadRecordEntity) { - /*if (!GroupActConstant.CLOSED.equals(groupActInfoEntity.getStatus())) { - //插入已读记录,默认不属于应读人。 - ActReadRecordEntity insertEntity = new ActReadRecordEntity(); - insertEntity.setCustomerId(groupActInfoEntity.getCustomerId()); - insertEntity.setGroupActId(formDTO.getGroupActId()); - insertEntity.setReadFlag(GroupActConstant.READ); - insertEntity.setShouldBeRead(Constant.NO); - insertEntity.setUserId(formDTO.getUserId()); - insertEntity.setGridId(groupActInfoEntity.getGridId()); - insertEntity.setGroupId(groupActInfoEntity.getGroupId()); - insertEntity.setViewDetail(GroupActConstant.READ); - actReadRecordDao.insert(insertEntity); - }*/ - // } else { - if(!GroupActConstant.CLOSED.equals(groupActInfoEntity.getStatus())){ - if (GroupActConstant.UN_READ.equals(actReadRecordEntity.getReadFlag())) { - //未读->已读 - actReadRecordEntity.setReadFlag(GroupActConstant.READ); + + //居民端记录已读标志 + if(AppClientConstant.APP_RESI.equals(formDTO.getClient())){ + ActReadRecordEntity actReadRecordEntity = actReadRecordDao.selectUserRec(formDTO.getGroupActId(), formDTO.getUserId()); + if (null != actReadRecordEntity) { + if(!GroupActConstant.CLOSED.equals(groupActInfoEntity.getStatus())){ + //非关闭状态下,返回详情,并且已读状态 + if (GroupActConstant.UN_READ.equals(actReadRecordEntity.getReadFlag())) { + //未读->已读 + actReadRecordEntity.setReadFlag(GroupActConstant.READ); + actReadRecordEntity.setUpdatedTime(new Date()); + actReadRecordEntity.setViewDetail(GroupActConstant.READ); + actReadRecordDao.updateById(actReadRecordEntity); + } + }else{ + //如果活动关闭,则不更新已读、未读。只记录是否查看过详情。 actReadRecordEntity.setUpdatedTime(new Date()); actReadRecordEntity.setViewDetail(GroupActConstant.READ); actReadRecordDao.updateById(actReadRecordEntity); } - }else{ - actReadRecordEntity.setUpdatedTime(new Date()); - actReadRecordEntity.setViewDetail(GroupActConstant.READ); - actReadRecordDao.updateById(actReadRecordEntity); } } return resultDTO; From 60ca399254b13d57c4ffca0c396ba93bf16a4789 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Thu, 29 Apr 2021 10:32:00 +0800 Subject: [PATCH 166/202] =?UTF-8?q?=E5=B0=8F=E7=BB=84=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=E6=9C=80=E5=A4=9A20=E5=AD=97=E7=AC=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resi/group/dto/group/form/ApplyCreateGroupFormDTO.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/form/ApplyCreateGroupFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/form/ApplyCreateGroupFormDTO.java index 60550f0c4d..8950443263 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/form/ApplyCreateGroupFormDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/form/ApplyCreateGroupFormDTO.java @@ -2,6 +2,7 @@ package com.epmet.resi.group.dto.group.form; import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; import lombok.Data; +import org.hibernate.validator.constraints.Length; import javax.validation.constraints.NotBlank; import java.io.Serializable; @@ -39,12 +40,14 @@ public class ApplyCreateGroupFormDTO implements Serializable { * 小组名称 */ @NotBlank(message = "小组名称不能为空", groups = {AddUserShowGroup.class}) + @Length(max = 20, message = "小组名称不能超过20个字符",groups = {AddUserShowGroup.class}) private String groupName; /** * 群介绍 */ @NotBlank(message = "群介绍不能为空", groups = {AddUserShowGroup.class}) + @Length(max = 500, message = "群介绍不能超过500个字符",groups = {AddUserShowGroup.class}) private String groupIntroduction; /** From 09cfd1df2e012a4471b86a2376c7cc5e251a4d14 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 29 Apr 2021 10:43:34 +0800 Subject: [PATCH 167/202] =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=B0=8F=E7=BB=84?= =?UTF-8?q?=E4=BF=A1=E6=81=AF-=E7=BB=84=E5=90=8D=E4=B8=8D=E8=83=BD?= =?UTF-8?q?=E8=B6=85=E8=BF=8720?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/resi/group/dto/group/form/EditGroupFormDTO.java | 2 +- .../epmet/modules/group/controller/ResiGroupController.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/form/EditGroupFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/form/EditGroupFormDTO.java index a86f1bb9ae..ed56de167a 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/form/EditGroupFormDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/form/EditGroupFormDTO.java @@ -29,7 +29,7 @@ public class EditGroupFormDTO { private String groupHeadPhoto; @NotBlank(message = "组名称不能为空", groups = { SubmitGroupEditVG.class }) - @Length(max = 10, message = "组名称长度不能超过10个字", groups = { SubmitGroupEditVG.class }) + @Length(max = 20, message = "组名称长度不能超过20个字", groups = { SubmitGroupEditVG.class }) private String groupName; @NotBlank(message = "组介绍不能为空", groups = { SubmitGroupEditVG.class }) diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/ResiGroupController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/ResiGroupController.java index f9f38417d8..54fe089221 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/ResiGroupController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/ResiGroupController.java @@ -369,7 +369,7 @@ public class ResiGroupController { } /** - * 查询组详情 + * 编辑小组信息-获取小组详情 * @param form * @return */ @@ -381,7 +381,7 @@ public class ResiGroupController { } /** - * 提交小组信息编辑 + * 编辑小组信息-提交编辑审核 * @param form * @return */ From 4521a47e5d9d8e1bd499991a7ccdb45c07981ce0 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 29 Apr 2021 13:30:35 +0800 Subject: [PATCH 168/202] =?UTF-8?q?=E6=88=91=E5=88=9B=E5=BB=BA=E7=9A=84?= =?UTF-8?q?=E5=B0=8F=E7=BB=84=EF=BC=8C=E8=BF=94=E5=8F=82=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?groupType?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/resi/group/dto/group/result/CreatedResultDTO.java | 5 +++++ .../src/main/resources/mapper/group/ResiGroupDao.xml | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/CreatedResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/CreatedResultDTO.java index d51285725a..ebeeea752c 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/CreatedResultDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/CreatedResultDTO.java @@ -41,4 +41,9 @@ public class CreatedResultDTO implements Serializable { * (审核通过 - approved 、 审核中 - under_auditting、 审核未通过 - rejected 、 已屏蔽 - hidden、 已关闭 - closed) */ private String groupState; + + /** + * 小组类型(ordinary:楼院小组 branch:支部小组) + */ + private String groupType; } 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 38140fe84e..2d424313a8 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 @@ -101,7 +101,8 @@ rg.GROUP_NAME AS groupName, rgs.TOTAL_MEMBERS AS totalMember, rgs.TOTAL_PARTY_MEMBERS AS totalPartyMember, - rg.STATE AS groupState + rg.STATE AS groupState, + rg.GROUP_TYPE AS groupType FROM resi_group_member rgm LEFT JOIN resi_group rg ON ( rgm.RESI_GROUP_ID = rg.ID ) From cced40e2f6714446f5e011fda0e45ccec0e8d3ff Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 29 Apr 2021 14:18:05 +0800 Subject: [PATCH 169/202] =?UTF-8?q?=E4=BF=AE=E6=94=B9grouptypelist?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=EF=BC=8C=E4=BC=98=E5=85=88=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E5=BD=93=E5=89=8D=E5=AE=A2=E6=88=B7=EF=BC=8C=E5=A6=82=E6=9E=9C?= =?UTF-8?q?=E5=BD=93=E5=89=8D=E5=AE=A2=E6=88=B7=E6=B2=A1=E6=9C=89=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=EF=BC=8C=E9=BB=98=E8=AE=A4=E6=9F=A5=E8=AF=A2default?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../group/controller/ResiGroupSetupController.java | 6 +----- .../modules/group/service/ResiGroupSetupService.java | 2 +- .../group/service/impl/ResiGroupSetupServiceImpl.java | 9 +++++++-- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/ResiGroupSetupController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/ResiGroupSetupController.java index c50cc57817..95c624aabd 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/ResiGroupSetupController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/ResiGroupSetupController.java @@ -20,14 +20,10 @@ package com.epmet.modules.group.controller; import com.epmet.commons.tools.annotation.LoginUser; 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.ResiGroupSetupService; import com.epmet.resi.group.dto.group.result.GroupTypeListResultDTO; -import com.epmet.resi.group.dto.notice.form.NoticeDetailFormDTO; -import com.epmet.resi.group.dto.notice.result.NoticeDetailResultDTO; 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; @@ -52,7 +48,7 @@ public class ResiGroupSetupController { **/ @PostMapping(value = "grouptypelist") public Result groupTypeList(@LoginUser TokenDto tokenDto){ - return new Result().ok(resiGroupSetupService.groupTypeList()); + return new Result().ok(resiGroupSetupService.groupTypeList(tokenDto.getCustomerId())); } } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/ResiGroupSetupService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/ResiGroupSetupService.java index ac384d3ec0..134f656f35 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/ResiGroupSetupService.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/ResiGroupSetupService.java @@ -34,5 +34,5 @@ public interface ResiGroupSetupService extends BaseService * @Author sun * @Description 创建小组选择组类型 **/ - GroupTypeListResultDTO groupTypeList(); + GroupTypeListResultDTO groupTypeList(String customerId); } \ 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/ResiGroupSetupServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupSetupServiceImpl.java index b614daf3db..aa5bc80aef 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupSetupServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupSetupServiceImpl.java @@ -18,11 +18,13 @@ package com.epmet.modules.group.service.impl; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.modules.constant.GroupActConstant; import com.epmet.modules.group.dao.ResiGroupSetupDao; import com.epmet.modules.group.entity.ResiGroupSetupEntity; import com.epmet.modules.group.redis.ResiGroupSetupRedis; import com.epmet.modules.group.service.ResiGroupSetupService; import com.epmet.resi.group.dto.group.result.GroupTypeListResultDTO; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -47,13 +49,16 @@ public class ResiGroupSetupServiceImpl extends BaseServiceImpl dedicatedGroup = new ArrayList<>(); List commonUsedGroup = new ArrayList<>(); //初期所有客户共用一套建组设置,客户Id为default,后边可以根据token用户所属客户查询 - List list = baseDao.selectGroupList("default"); + List list = baseDao.selectGroupList(customerId); list.forEach(l -> { if ("ordinary".equals(l.getGroupType())) { commonUsedGroup.add(l); From 3c9b4a77e110e37eea3054e554165b03a62cfe94 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 29 Apr 2021 14:29:22 +0800 Subject: [PATCH 170/202] =?UTF-8?q?=E4=BF=AE=E6=94=B9grouptypelist?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=EF=BC=8C=E4=BC=98=E5=85=88=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E5=BD=93=E5=89=8D=E5=AE=A2=E6=88=B7=EF=BC=8C=E5=A6=82=E6=9E=9C?= =?UTF-8?q?=E5=BD=93=E5=89=8D=E5=AE=A2=E6=88=B7=E6=B2=A1=E6=9C=89=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=EF=BC=8C=E9=BB=98=E8=AE=A4=E6=9F=A5=E8=AF=A2default?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/group/service/impl/ResiGroupSetupServiceImpl.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupSetupServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupSetupServiceImpl.java index aa5bc80aef..77ac999897 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupSetupServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupSetupServiceImpl.java @@ -24,6 +24,7 @@ import com.epmet.modules.group.entity.ResiGroupSetupEntity; import com.epmet.modules.group.redis.ResiGroupSetupRedis; import com.epmet.modules.group.service.ResiGroupSetupService; import com.epmet.resi.group.dto.group.result.GroupTypeListResultDTO; +import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -59,6 +60,9 @@ public class ResiGroupSetupServiceImpl extends BaseServiceImpl list = baseDao.selectGroupList(customerId); + if(CollectionUtils.isEmpty(list)){ + list = baseDao.selectGroupList(GroupActConstant.DEFAULT_CUSTOMER_ID); + } list.forEach(l -> { if ("ordinary".equals(l.getGroupType())) { commonUsedGroup.add(l); From cd47bb5a3624b8d7e47dba84d74dec6876062c63 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Thu, 29 Apr 2021 14:33:56 +0800 Subject: [PATCH 171/202] =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E9=80=9A=E7=9F=A5?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E6=97=B6=E4=BF=AE=E6=94=B9=E9=98=85=E8=AF=BB?= =?UTF-8?q?=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../group/dto/notice/form/NoticeDetailFormDTO.java | 5 +++++ .../modules/notice/controller/NoticeController.java | 3 ++- .../notice/service/impl/NoticeServiceImpl.java | 13 +++++++++---- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/NoticeDetailFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/NoticeDetailFormDTO.java index c9a57033b1..dc1b79f935 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/NoticeDetailFormDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/NoticeDetailFormDTO.java @@ -17,5 +17,10 @@ public class NoticeDetailFormDTO { @NotBlank(message = "通知Id不能为空",groups = {NoticeDetailFormDTO.Detail.class}) private String noticeId; + /** + * token中用户Id + */ + private String userId; + public interface Detail{} } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeController.java index 1f4d37d1df..e18d71970c 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeController.java @@ -92,8 +92,9 @@ public class NoticeController { * @Description 小组通知详情 **/ @PostMapping(value = "noticedetail") - public Result noticeDetail(@RequestBody NoticeDetailFormDTO formDTO){ + public Result noticeDetail(@LoginUser TokenDto tokenDto, @RequestBody NoticeDetailFormDTO formDTO){ ValidatorUtils.validateEntity(formDTO, NoticeDetailFormDTO.Detail.class); + formDTO.setUserId(tokenDto.getUserId()); return new Result().ok(noticeService.noticeDetail(formDTO)); } 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 39d4d9033e..c78dc30bc5 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 @@ -57,10 +57,7 @@ import com.epmet.modules.notice.service.NoticeService; import com.epmet.resi.group.constant.TopicConstant; import com.epmet.resi.group.dto.member.ResiGroupMemberDTO; import com.epmet.resi.group.dto.notice.NoticeDTO; -import com.epmet.resi.group.dto.notice.form.AddNoticeFormDTO; -import com.epmet.resi.group.dto.notice.form.EditNoticeFormDTO; -import com.epmet.resi.group.dto.notice.form.NoticeDetailFormDTO; -import com.epmet.resi.group.dto.notice.form.NoticeFileDTO; +import com.epmet.resi.group.dto.notice.form.*; import com.epmet.resi.group.dto.notice.result.NoticeDetailResultDTO; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.logging.Log; @@ -115,6 +112,8 @@ public class NoticeServiceImpl extends BaseServiceImpl private NoticeReadRecordDao noticeReadRecordDao; @Autowired private GroupMessageDao groupMessageDao; + @Autowired + private NoticeReadRecordService noticeReadRecordService; @Override @@ -495,6 +494,12 @@ public class NoticeServiceImpl extends BaseServiceImpl resultDTO.setImageList(imageList); resultDTO.setDocList(docList); + //5.修改当前人员对通知的阅读状态 + ReadTypeFormDTO readType = new ReadTypeFormDTO(); + readType.setNoticeId(formDTO.getNoticeId()); + readType.setUserId(formDTO.getUserId()); + noticeReadRecordService.readType(readType); + return resultDTO; } From 475432542bdeae341f0ac433970be96c5cdf60b6 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 29 Apr 2021 14:55:38 +0800 Subject: [PATCH 172/202] =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E7=AB=AF=E6=9F=A5?= =?UTF-8?q?=E7=9C=8B=E6=B4=BB=E5=8A=A8=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/feign/ResiGroupFeignClient.java | 4 ++-- .../feign/fallback/ResiGroupFeignClientFallBack.java | 4 ++-- .../com/epmet/service/impl/ResiGroupServiceImpl.java | 2 +- .../act/controller/GroupActInfoController.java | 12 ++++++++++++ 4 files changed, 17 insertions(+), 5 deletions(-) diff --git a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/feign/ResiGroupFeignClient.java b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/feign/ResiGroupFeignClient.java index 18f125c969..ee668f7ba6 100644 --- a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/feign/ResiGroupFeignClient.java +++ b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/feign/ResiGroupFeignClient.java @@ -161,6 +161,6 @@ public interface ResiGroupFeignClient { * @description 查询活动详情 * @Date 2021/4/29 9:57 **/ - @PostMapping(value = "/resi/group/act/actdetail",consumes = MediaType.APPLICATION_JSON_VALUE) - Result queryActDetail(@RequestBody ActDetailFormDTO actDetailFormDTO); + @PostMapping(value = "/resi/group/act/actdetail-internal",consumes = MediaType.APPLICATION_JSON_VALUE) + Result queryActDetailInternal(@RequestBody ActDetailFormDTO actDetailFormDTO); } diff --git a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/feign/fallback/ResiGroupFeignClientFallBack.java b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/feign/fallback/ResiGroupFeignClientFallBack.java index 01d7ff57ec..413022ea78 100644 --- a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/feign/fallback/ResiGroupFeignClientFallBack.java +++ b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/feign/fallback/ResiGroupFeignClientFallBack.java @@ -131,7 +131,7 @@ public class ResiGroupFeignClientFallBack implements ResiGroupFeignClient { * @Date 2021/4/29 9:57 **/ @Override - public Result queryActDetail(ActDetailFormDTO actDetailFormDTO) { - return ModuleUtils.feignConError(ServiceConstant.RESI_GROUP_SERVER, "queryActDetail", actDetailFormDTO); + public Result queryActDetailInternal(ActDetailFormDTO actDetailFormDTO) { + return ModuleUtils.feignConError(ServiceConstant.RESI_GROUP_SERVER, "queryActDetailInternal", actDetailFormDTO); } } diff --git a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/impl/ResiGroupServiceImpl.java b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/impl/ResiGroupServiceImpl.java index 7bae657b2b..81231e26f2 100644 --- a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/impl/ResiGroupServiceImpl.java +++ b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/impl/ResiGroupServiceImpl.java @@ -62,7 +62,7 @@ public class ResiGroupServiceImpl implements ResiGroupService{ @Override public ActDetailGovResultDTO queryActDetailForWork(ActDetailFormDTO actDetailFormDTO) { - Result actDetailResult=resiGroupFeignClient.queryActDetail(actDetailFormDTO); + Result actDetailResult=resiGroupFeignClient.queryActDetailInternal(actDetailFormDTO); if(actDetailResult.success()&&null!=actDetailResult.getData()){ ActDetailGovResultDTO resultDTO= ConvertUtils.sourceToTarget(actDetailResult.getData(),ActDetailGovResultDTO.class); return resultDTO; diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java index 3587ca35d0..4a1a973022 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java @@ -80,6 +80,18 @@ public class GroupActInfoController { return new Result().ok(groupActInfoService.queryActDetail(actDetailFormDTO)); } + /** + * @param actDetailFormDTO + * @author yinzuomei + * @description 内部feign接口 + * @Date 2021/4/29 14:55 + **/ + @PostMapping("actdetail-internal") + public Result queryActDetailInternal(@RequestBody ActDetailFormDTO actDetailFormDTO){ + ValidatorUtils.validateEntity(actDetailFormDTO,ActDetailFormDTO.AddUserInternalGroup.class); + return new Result().ok(groupActInfoService.queryActDetail(actDetailFormDTO)); + } + /** * @return com.epmet.commons.tools.utils.Result * @param tokenDto From c3c2a68482646726b508b60ff04fc4a0b7da25ab Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Thu, 29 Apr 2021 15:08:28 +0800 Subject: [PATCH 173/202] =?UTF-8?q?bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../notice/service/impl/NoticeReadRecordServiceImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeReadRecordServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeReadRecordServiceImpl.java index ba58278c76..d4025dcd6f 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeReadRecordServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeReadRecordServiceImpl.java @@ -143,7 +143,7 @@ public class NoticeReadRecordServiceImpl extends BaseServiceImpl Date: Thu, 29 Apr 2021 15:33:02 +0800 Subject: [PATCH 174/202] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E8=B0=83=E6=95=B4=20?= =?UTF-8?q?=E4=B8=8D=E5=9C=A8=E5=90=A7=E9=80=9A=E7=9F=A5=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E4=B8=8E=E9=98=85=E8=AF=BB=E6=94=BE=E5=9C=A8=E4=B8=80=E8=B5=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resi/group/dto/notice/form/NoticeDetailFormDTO.java | 5 ----- .../epmet/modules/notice/controller/NoticeController.java | 3 +-- .../notice/controller/NoticeReadRecordController.java | 5 +++++ .../notice/service/impl/NoticeReadRecordServiceImpl.java | 4 ++-- .../modules/notice/service/impl/NoticeServiceImpl.java | 6 ------ 5 files changed, 8 insertions(+), 15 deletions(-) diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/NoticeDetailFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/NoticeDetailFormDTO.java index dc1b79f935..c9a57033b1 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/NoticeDetailFormDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/NoticeDetailFormDTO.java @@ -17,10 +17,5 @@ public class NoticeDetailFormDTO { @NotBlank(message = "通知Id不能为空",groups = {NoticeDetailFormDTO.Detail.class}) private String noticeId; - /** - * token中用户Id - */ - private String userId; - public interface Detail{} } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeController.java index e18d71970c..1f4d37d1df 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeController.java @@ -92,9 +92,8 @@ public class NoticeController { * @Description 小组通知详情 **/ @PostMapping(value = "noticedetail") - public Result noticeDetail(@LoginUser TokenDto tokenDto, @RequestBody NoticeDetailFormDTO formDTO){ + public Result noticeDetail(@RequestBody NoticeDetailFormDTO formDTO){ ValidatorUtils.validateEntity(formDTO, NoticeDetailFormDTO.Detail.class); - formDTO.setUserId(tokenDto.getUserId()); return new Result().ok(noticeService.noticeDetail(formDTO)); } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeReadRecordController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeReadRecordController.java index 7be5648a82..e4c5cab55a 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeReadRecordController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeReadRecordController.java @@ -18,6 +18,7 @@ package com.epmet.modules.notice.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; @@ -66,11 +67,15 @@ public class NoticeReadRecordController { * @return * @Author sun * @Description 小组通知阅读状态修改 + * 只给居民端使用 **/ @PostMapping(value = "readtype") public Result readType(@LoginUser TokenDto tokenDto, @RequestBody ReadTypeFormDTO formDTO){ ValidatorUtils.validateEntity(formDTO, ReadTypeFormDTO.Read.class); formDTO.setUserId(tokenDto.getUserId()); + if(!"resi".equals(tokenDto.getApp())){ + throw new RenException(String.format("接口仅用于居民端使用,请检查用户是否为居民端用户,userId->", formDTO.getUserId())); + } noticeReafdRecordService.readType(formDTO); return new Result(); } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeReadRecordServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeReadRecordServiceImpl.java index d4025dcd6f..316a2a81ff 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeReadRecordServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeReadRecordServiceImpl.java @@ -165,13 +165,13 @@ public class NoticeReadRecordServiceImpl extends BaseServiceImpl resultDTO.setImageList(imageList); resultDTO.setDocList(docList); - //5.修改当前人员对通知的阅读状态 - ReadTypeFormDTO readType = new ReadTypeFormDTO(); - readType.setNoticeId(formDTO.getNoticeId()); - readType.setUserId(formDTO.getUserId()); - noticeReadRecordService.readType(readType); - return resultDTO; } From 7484ca70cb4b50690864fac561628bd8ed1ee510 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 29 Apr 2021 15:38:25 +0800 Subject: [PATCH 175/202] =?UTF-8?q?=E4=B8=BA=20if=EF=BC=8Celse=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=A4=A7=E6=8B=AC=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/ResiTopicServiceImpl.java | 60 ++++++++++++++----- 1 file changed, 45 insertions(+), 15 deletions(-) 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 fcf366c789..f5d4db2f50 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 @@ -482,10 +482,14 @@ public class ResiTopicServiceImpl extends BaseServiceImpl top.setBadgeList(Collections.EMPTY_LIST)); + } else { + latestTenTopics.forEach(top -> top.setBadgeList(Collections.EMPTY_LIST)); + } } } @@ -555,10 +559,14 @@ public class ResiTopicServiceImpl extends BaseServiceImpl top.setBadgeList(Collections.EMPTY_LIST)); + }else { + pastTopics.forEach(top -> top.setBadgeList(Collections.EMPTY_LIST)); + } } @@ -887,8 +895,12 @@ public class ResiTopicServiceImpl extends BaseServiceImpl>> badgeR = userOpenFeignClient.userShowBadge(new UserGroupFormDTO(customerId, userId)); @@ -965,10 +977,14 @@ public class ResiTopicServiceImpl extends BaseServiceImpl top.setBadgeList(Collections.EMPTY_LIST)); + } else { + hiddenTopics.forEach(top -> top.setBadgeList(Collections.EMPTY_LIST)); + } } } @@ -1803,7 +1819,9 @@ public class ResiTopicServiceImpl extends BaseServiceImpl baseDao.selectParticipatedTopics(param.getCustomerId(),param.getUserId())); List result = page.getList(); - if(CollectionUtils.isEmpty(result)) return Collections.EMPTY_LIST; + if(CollectionUtils.isEmpty(result)) { + return Collections.EMPTY_LIST; + } Result> gridR = govOrgOpenFeignClient.selectOrgInfo( new OrgInfoFormDTO(OrgInfoConstant.GRID,result.stream().map(ParticipatedTopicUnitResultDTO :: getTopicReleaseGridName).distinct().collect(Collectors.toList()))); if(gridR.success() && !CollectionUtils.isEmpty(gridR.getData())){ @@ -2120,7 +2148,9 @@ public class ResiTopicServiceImpl extends BaseServiceImpl applications = reply.getData(); return StringUtils.equals(ModuleConstant.TOPIC_SHIFTED_TO_ISSUE_STATUS_UNDER_AUDITING,applications.get(NumConstant.ZERO).getApplyStatus()) ? true : false; - }else return false; + }else { + return false; + } } log.error("Method [checkTopicIfUnderAuditing] of service gov-issue called failed,topicId is [%s]",topicId); throw new RenException(reply.getInternalMsg()); From 71b56c81d82e11bec05a48d38f9810b18c12320e Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Thu, 29 Apr 2021 16:23:13 +0800 Subject: [PATCH 176/202] =?UTF-8?q?isChanged=E6=94=B9=E4=B8=BAtrue=20false?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resi/group/dto/topic/result/LatestTenResultDTO.java | 4 ++-- .../src/main/resources/mapper/group/ResiGroupDao.xml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/LatestTenResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/LatestTenResultDTO.java index 7682cc71a9..1302bd15f9 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/LatestTenResultDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/LatestTenResultDTO.java @@ -91,9 +91,9 @@ public class LatestTenResultDTO implements Serializable { private Boolean isExpirat; /** - * 是否变更,yes,no + * 是否变更(true:是 false:否) */ - private String isChange; + private Boolean isChanged; public LatestTenResultDTO() { this.id = ""; 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 2d424313a8..d2a8d92efe 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 @@ -566,7 +566,7 @@ 'topic' AS contentType, IFNULL(ta.ATTACHMENT_URL,'') AS firstPhoto, false AS isExpirat, - 'no' AS isChange + false AS isChanged FROM resi_topic t LEFT JOIN resi_topic_attachment ta ON ta.TOPIC_ID = t.ID AND ta.ATTACHMENT_TYPE = 'image' AND ta.DEL_FLAG = '0' AND ta.SORT = 0 WHERE t.DEL_FLAG = '0' @@ -585,7 +585,7 @@ 'act' AS contentType, IFNULL(ac2.CONTENT,'') AS firstPhoto, false AS isExpirat, - 'no' AS isChange + false AS isChanged FROM group_act_info ai LEFT JOIN group_act_content ac2 ON ac2.GROUP_ACT_ID = ai.ID AND ac2.CONTENT_TYPE = 'img' AND ac2.DEL_FLAG = 0 AND ac2.SORT = 1 WHERE ai.DEL_FLAG = '0' @@ -603,7 +603,7 @@ 'notice' AS contentType, IFNULL(na.ATTACHMENT_URL,'') AS firstPhoto, (CASE WHEN UNIX_TIMESTAMP(n.EXPIRATION_TIME) UNIX_TIMESTAMP(NOW()) THEN TRUE ELSE FALSE END) AS isExpirat, - n.IS_CHANGE + (case when n.is_change = 'yes' then true else false end) AS isChanged FROM notice n LEFT JOIN notice_attachment na ON na.NOTICE_ID = n.ID AND na.DEL_FLAG = '0' AND na.ATTACHMENT_TYPE = 'image' AND na.SORT = 0 WHERE n.DEL_FLAG = '0' From 1776b4d84b02e9340ed871c90bc1027c4bc17ef0 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 29 Apr 2021 16:25:42 +0800 Subject: [PATCH 177/202] =?UTF-8?q?isChanged=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/topic/result/GetPastTopicListV2ResultDTO.java | 2 +- .../src/main/resources/mapper/group/ResiGroupDao.xml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) 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 ef6ed42a4f..60ae030008 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 @@ -85,7 +85,7 @@ public class GetPastTopicListV2ResultDTO implements Serializable { /** * 是否变更,yes,no */ - private String isChange = "no"; + private Boolean isChanged = false; @JsonIgnore private String userId; 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 d2a8d92efe..8a4c374d44 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 @@ -770,7 +770,7 @@ - SELECT id,userId,releaseTime,content,status,issueId,contentType,firstPhoto,isChange FROM + SELECT id,userId,releaseTime,content,status,issueId,contentType,firstPhoto,isChanged FROM ((SELECT t.ID, t.CREATED_BY AS userId, From 3a279ff4b635142af278e5d02e4390d26c47f44c Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 29 Apr 2021 17:30:10 +0800 Subject: [PATCH 180/202] =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E6=80=BB=E7=BB=93?= =?UTF-8?q?=E8=AF=A6=E6=83=85bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resi/group/dto/act/form/ActSummaryDetailFormDTO.java | 6 ------ .../epmet/modules/act/controller/ActSummaryController.java | 3 +-- .../modules/act/service/impl/ActSummaryServiceImpl.java | 3 ++- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/ActSummaryDetailFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/ActSummaryDetailFormDTO.java index 2bab9daf98..de3abf82ac 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/ActSummaryDetailFormDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/ActSummaryDetailFormDTO.java @@ -19,10 +19,4 @@ public class ActSummaryDetailFormDTO implements Serializable { } @NotBlank(message = "groupActId不能为空", groups = AddUserInternalGroup.class) private String groupActId; - - /** - * 当前用户id - */ - @NotBlank(message = "tokenDto获取userId为空", groups = ActReadViewFormDTO.AddUserInternalGroup.class) - private String userId; } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/ActSummaryController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/ActSummaryController.java index dd12563508..2cb24ce356 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/ActSummaryController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/ActSummaryController.java @@ -84,8 +84,7 @@ public class ActSummaryController { * @Date 2021/4/21 14:20 **/ @PostMapping("detail") - public Result queryActSummaryDetail(@LoginUser TokenDto tokenDto,@RequestBody ActSummaryDetailFormDTO formDTO) { - formDTO.setUserId(tokenDto.getUserId()); + public Result queryActSummaryDetail(@RequestBody ActSummaryDetailFormDTO formDTO) { ValidatorUtils.validateEntity(formDTO, ActSummaryFormDTO.AddUserInternalGroup.class); return new Result().ok(actSummaryService.queryActSummaryDetail(formDTO)); } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSummaryServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSummaryServiceImpl.java index 69a0ca792c..ccc506b113 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSummaryServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSummaryServiceImpl.java @@ -280,7 +280,8 @@ public class ActSummaryServiceImpl extends BaseServiceImpl Date: Thu, 29 Apr 2021 17:52:06 +0800 Subject: [PATCH 181/202] delFlag --- .../src/main/resources/mapper/group/ResiGroupDao.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 dea6e2e262..ee38fc6fe0 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 @@ -738,7 +738,7 @@ false AS isExpirat, false AS isChanged FROM group_act_info ai - LEFT JOIN group_act_content ac2 ON ac2.GROUP_ACT_ID = ai.ID AND ac2.CONTENT_TYPE = 'img' AND ac2.SORT = 1 + LEFT JOIN group_act_content ac2 ON ac2.GROUP_ACT_ID = ai.ID AND ac2.CONTENT_TYPE = 'img' AND ac2.DEL_FLAG = 0 AND ac2.SORT = 1 WHERE ai.DEL_FLAG = '0' AND ( @@ -898,7 +898,7 @@ 'no' AS isChange, IFNULL(ac2.CONTENT,'') AS firstPhoto FROM group_act_info ai - LEFT JOIN group_act_content ac2 ON ac2.GROUP_ACT_ID = ai.ID AND ac2.CONTENT_TYPE = 'img' AND ac2.SORT = 1 + LEFT JOIN group_act_content ac2 ON ac2.GROUP_ACT_ID = ai.ID AND ac2.CONTENT_TYPE = 'img' AND ac2.DEL_FLAG = 0 AND ac2.SORT = 1 WHERE ai.DEL_FLAG = '0' AND ( From 4171b9c7c06775774d818dfbce62e7d62a6a63c6 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 29 Apr 2021 17:54:30 +0800 Subject: [PATCH 182/202] =?UTF-8?q?=E7=BC=96=E8=BE=91=E6=B4=BB=E5=8A=A8?= =?UTF-8?q?=EF=BC=8C=E5=88=A0=E9=99=A4=E6=B4=BB=E5=8A=A8=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/modules/act/dao/GroupActContentDao.java | 3 +-- .../act/service/impl/GroupActInfoServiceImpl.java | 2 +- .../src/main/resources/mapper/act/GroupActContentDao.xml | 9 +++------ 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/GroupActContentDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/GroupActContentDao.java index fbbb87774d..0705db93d1 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/GroupActContentDao.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/GroupActContentDao.java @@ -37,10 +37,9 @@ public interface GroupActContentDao extends BaseDao { * 重新编辑活动提交,将原来的内容置为已删除 * * @param groupActId 活动id - * @param userId 更新人 * @return int */ - int updateToDel(@Param("groupActId") String groupActId, @Param("userId") String userId); + int deleteByGroupActId(@Param("groupActId") String groupActId); /** * 活动内容,升序返回 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 fc29566767..58ac631f4f 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 @@ -154,7 +154,7 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl - - UPDATE group_act_content - SET DEL_FLAG = '1', - UPDATED_BY = #{userId}, - UPDATED_TIME = now() + + delete from group_act_content WHERE GROUP_ACT_ID = #{groupActId} - + - SELECT id,userId,releaseTime,content,contentType,firstPhoto,isExpirat,isChanged FROM + SELECT id,userId,releaseTime,content,contentType,firstPhoto,isExpirat,isChanged,status FROM ( (SELECT ai.ID, @@ -739,7 +739,8 @@ 'act' AS contentType, IFNULL(ac2.CONTENT,'') AS firstPhoto, false AS isExpirat, - false AS isChanged + false AS isChanged, + ai.`STATUS` AS status FROM group_act_info ai LEFT JOIN group_act_content ac2 ON ac2.GROUP_ACT_ID = ai.ID AND ac2.CONTENT_TYPE = 'img' AND ac2.DEL_FLAG = 0 AND ac2.SORT = 1 WHERE ai.DEL_FLAG = '0' @@ -758,7 +759,8 @@ 'notice' AS contentType, IFNULL(na.ATTACHMENT_URL,'') AS firstPhoto, (CASE WHEN UNIX_TIMESTAMP(n.EXPIRATION_TIME) UNIX_TIMESTAMP(NOW()) THEN TRUE ELSE FALSE END) AS isExpirat, - (case when n.is_change = 'yes' then true else false end) AS isChanged + (case when n.is_change = 'yes' then true else false end) AS isChanged, + '' AS status FROM notice n LEFT JOIN notice_attachment na ON na.NOTICE_ID = n.ID AND na.DEL_FLAG = '0' AND na.ATTACHMENT_TYPE = 'image' AND na.SORT = 0 WHERE n.DEL_FLAG = '0' From 2e7759ba915136a85974136db763d50d7b96761d Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Fri, 30 Apr 2021 17:13:51 +0800 Subject: [PATCH 195/202] =?UTF-8?q?=E5=8E=86=E5=8F=B2=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E8=BF=94=E5=9B=BE=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../group/dto/topic/result/GetPastTopicListV2ResultDTO.java | 5 +++++ 1 file changed, 5 insertions(+) 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 3f312795d0..419238e55a 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 @@ -93,6 +93,11 @@ public class GetPastTopicListV2ResultDTO implements Serializable { */ private Integer unReadCount = NumConstant.ZERO; + /** + * 如果有图片,后台只返回第一张,没有图片此列为空 + */ + private String firstPhoto; + @JsonIgnore private String userId; } From eb6de5b2d8c702541363758106a67934b067c0ac Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 30 Apr 2021 17:26:25 +0800 Subject: [PATCH 196/202] edit --- .../group/dto/topic/form/GetLatestV2FormDTO.java | 2 ++ .../group/dto/topic/result/LatestTenResultDTO.java | 8 ++++++++ .../topic/controller/ResiTopicController.java | 1 + .../topic/service/impl/ResiTopicServiceImpl.java | 13 +++++++++++++ .../main/resources/mapper/group/ResiGroupDao.xml | 14 ++++++++++---- 5 files changed, 34 insertions(+), 4 deletions(-) diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/GetLatestV2FormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/GetLatestV2FormDTO.java index 19406e5a62..38cbf68869 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/GetLatestV2FormDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/GetLatestV2FormDTO.java @@ -21,4 +21,6 @@ public class GetLatestV2FormDTO implements Serializable { private String groupId; private String userId; + + private String customerId; } diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/LatestTenResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/LatestTenResultDTO.java index 129c7a462d..df6a310fbe 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/LatestTenResultDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/LatestTenResultDTO.java @@ -4,6 +4,8 @@ import com.epmet.commons.tools.constant.NumConstant; import lombok.Data; import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; /** * @Author zxc @@ -95,6 +97,11 @@ public class LatestTenResultDTO implements Serializable { */ private Boolean isChanged; + /** + * 徽章Url集合 + */ + private List badgeList; + public LatestTenResultDTO() { this.id = ""; this.userId = ""; @@ -112,5 +119,6 @@ public class LatestTenResultDTO implements Serializable { this.unReadCount = NumConstant.ZERO; this.isExpirat = false; this.isChanged = false; + this.badgeList = new ArrayList<>(); } } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/controller/ResiTopicController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/controller/ResiTopicController.java index d1b5a15106..828401e23e 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/controller/ResiTopicController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/controller/ResiTopicController.java @@ -453,6 +453,7 @@ public class ResiTopicController { public Result getLatestV2(@LoginUser TokenDto tokenDto,@RequestBody GetLatestV2FormDTO formDTO){ ValidatorUtils.validateEntity(formDTO, GetLatestV2FormDTO.GetLatestV2Form.class); formDTO.setUserId(tokenDto.getUserId()); + formDTO.setCustomerId(tokenDto.getCustomerId()); return new Result().ok(topicService.getLatestV2(formDTO)); } 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 ed8387e203..53552e733a 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 @@ -2378,6 +2378,11 @@ public class ResiTopicServiceImpl extends BaseServiceImpl userReadFlag = resiGroupDao.selectUserReadFlag( userId, ids); // 查询小组下的 通知或活动 未读人数 List userUnReadCount = resiGroupDao.selectUserUnReadById(groupId, ids); + // 查询用户徽章信息 + Result> badgeResult = epmetUserOpenFeignClient.userBadges(new UserBadgesFormDTO(formDTO.getCustomerId(),userIds)); + if (!badgeResult.success()){ + throw new RenException(ModuleConstant.GET_BADGE_INFO_ERR); + } latestTenData.forEach(l -> { // 是否转议题,true:是,false:不是 l.setShiftIssueFlag(StringUtils.isNotEmpty(l.getIssueId())); @@ -2408,6 +2413,14 @@ public class ResiTopicServiceImpl extends BaseServiceImpl { + if (l.getUserId().equals(b.getUserId())){ + l.setBadgeList(b.getBadgeIcons()); + } + }); + } }); result.setList(latestTenData); return result; diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupDao.xml index 265289856c..3b1d361bc6 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 @@ -778,7 +778,7 @@ + + + UPDATE resi_group_member + SET DEL_FLAG = '1', + `STATUS` = 'exit', + UPDATED_TIME = NOW(), + UPDATED_BY = #{updatedBy} + WHERE + id = #{id} + From 64ea0a2fc4288739b52e29d9507895ca01207868 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Thu, 6 May 2021 16:17:27 +0800 Subject: [PATCH 202/202] =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E7=AB=AF-=E5=BE=85?= =?UTF-8?q?=E5=AE=A1=E6=A0=B8||=E5=B7=B2=E9=A9=B3=E5=9B=9E=C2=A0=E7=94=B3?= =?UTF-8?q?=E8=AF=B7=E8=AF=A6=E6=83=85-=E6=8E=A5=E5=8F=A3=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E8=AF=9D=E9=A2=98=E9=99=84=E4=BB=B6=E6=97=B6=E5=8F=AA?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=9B=BE=E7=89=87=E9=99=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/group/ResiGroupDao.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 3b1d361bc6..50006ae2dd 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 @@ -473,7 +473,8 @@ FROM resi_topic rt LEFT JOIN resi_topic_attachment ta ON ta.TOPIC_ID = rt.ID WHERE rt.DEL_FLAG = '0' - AND rt.ID = #{topicId} + AND ta.attachment_type = 'image' + AND rt.ID = #{topicId}