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 01/20] =?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 02/20] =?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 03/20] =?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 04/20] =?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 05/20] =?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 06/20] =?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 07/20] =?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 08/20] =?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 09/20] =?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 10/20] =?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 11/20] =?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 12/20] =?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 13/20] =?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 14/20] =?UTF-8?q?8905=E9=94=99=E8=AF=AF=E7=BC=96=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 15/20] =?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 16/20] =?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 17/20] =?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 18/20] =?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 19/20] =?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 20/20] =?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