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 839d80dbd4..240bb7a199 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,7 +161,16 @@ 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_CAN_NOT_EDIT(8901,"活动已取消,不能编辑"), + GROUP_ACT_CLOSED_CAN_NOT_EDIT(8902,"活动已关闭,不能编辑"), + PLEASE_INPUT_ACT_CONTENT(8903,"请输入活动内容,或添加图片"), + GROUP_ACT_CONTENT_MAX(8904,"活动内容至多输入1000字"), + GROUP_ACT_IMG_MAX(8905,"最多可添加3张图片"), + PARTY_MEMBER_CREATE_BRANCH_GROUP(8906,"您不是党员,不能创建支部小组"); + private int code; private String msg; 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/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 5c2c4599de..107616d691 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 @@ -486,6 +486,7 @@ public class CustomerGridServiceImpl extends BaseServiceImpl + * 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/ActSignInCodeDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActSignInCodeDTO.java new file mode 100644 index 0000000000..fb236618f8 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActSignInCodeDTO.java @@ -0,0 +1,87 @@ +/** + * 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 ActSignInCodeDTO 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/ActSignInRecordDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActSignInRecordDTO.java new file mode 100644 index 0000000000..2ff892364a --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActSignInRecordDTO.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 ActSignInRecordDTO 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 signUserId; + + /** + * 签到地点 + */ + private String signInAddress; + + /** + * 签到地点-经度 + */ + 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..c118fd27f6 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActSummaryDTO.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 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 signedInNum; + + /** + * 已签到人员姓名列表、分隔 + */ + 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/GroupActIdDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/GroupActIdDTO.java new file mode 100644 index 0000000000..c898920da1 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/GroupActIdDTO.java @@ -0,0 +1,17 @@ +package com.epmet.resi.group.dto.act; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 描述一下 + * + * @author yinzuomei@elink-cn.com + * @date 2021/4/19 15:11 + */ +@Data +public class GroupActIdDTO implements Serializable { + private static final long serialVersionUID = -729672768113053794L; + private String groupActId; +} 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..5b63bbf6be --- /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 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 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 signInStartTime; + + /** + * 签到截止时间 + */ + private Date signInEndTime; + + /** + * 是否填写总结?1:已填写;0:未填写 + */ + private Integer summaryFlag; + + /** + * 已签到人数(有人签到自动+1) + */ + private Integer signedInNum; + + /** + * 取消时间 + */ + private Date canceledTime; + + /** + * 关闭时间 + */ + 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/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/ActDetailFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/ActDetailFormDTO.java new file mode 100644 index 0000000000..4403b96a48 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/ActDetailFormDTO.java @@ -0,0 +1,27 @@ +package com.epmet.resi.group.dto.act.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * 004、活动详情 + * + * @author yinzuomei@elink-cn.com + * @date 2021/4/19 19:16 + */ +@Data +public class ActDetailFormDTO implements Serializable { + private static final long serialVersionUID = 9163803497503557861L; + public interface AddUserInternalGroup { + } + @NotBlank(message = "groupActId不能为空", groups = AddUserInternalGroup.class) + private String groupActId; + + /** + * 当前用户id + */ + @NotBlank(message = "tokenDto获取userId为空", groups = AddUserInternalGroup.class) + private String userId; +} diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/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/form/PublishGroupActFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/PublishGroupActFormDTO.java new file mode 100644 index 0000000000..bef66ba14b --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/PublishGroupActFormDTO.java @@ -0,0 +1,104 @@ +package com.epmet.resi.group.dto.act.form; + +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import lombok.Data; +import org.hibernate.validator.constraints.Length; + +import javax.validation.constraints.Min; +import javax.validation.constraints.NotBlank; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.List; + +/** + * 003、发布(编辑)组织活动 + * + * @author yinzuomei@elink-cn.com + * @date 2021/4/19 15:10 + */ +@Data +public class PublishGroupActFormDTO implements Serializable { + private static final long serialVersionUID = 3507465802034946254L; + + public interface AddUserInternalGroup { + } + + public interface AddUserShowGroup extends CustomerClientShowGroup { + } + + @NotBlank(message = "tokenDto获取customerId为空", groups = AddUserInternalGroup.class) + private String customerId; + + /** + * 活动发布人用户id + */ + @NotBlank(message = "tokenDto获取userId为空", groups = AddUserInternalGroup.class) + private String publishUserId; + + @NotBlank(message = "groupId不能为空", groups = AddUserInternalGroup.class) + private String groupId; + + /** + * 小组活动id,此列有值代表编辑 + */ + private String groupActId; + + /** + * 类别编码 + */ + @NotBlank(message = "categoryCode不能为空", groups = AddUserInternalGroup.class) + private String categoryCode; + + /** + * 类别编码所属的上一级编码 + */ + @NotBlank(message = "parentCode不能为空", groups = AddUserInternalGroup.class) + private String parentCode; + + /** + * 活动标题 + */ + @NotBlank(message = "title不能为空,最多输入50个字", groups = AddUserShowGroup.class) + @Length(min = 1, max = 50, message = "title不能为空,最多输入50个字", groups = {AddUserShowGroup.class}) + private String title; + + /** + * 活动时间,格式:yyyy-MM-dd HH:mm + */ + private String startTime; + + /** + * 活动地点 + */ + @NotBlank(message = "活动地点不能为空", groups = AddUserShowGroup.class) + private String address; + + + /** + * 活动地点-经度 + */ + private BigDecimal longitude; + + /** + * 活动地点-纬度 + */ + private BigDecimal latitude; + + /** + * 应参加人数组长填入;此列也是应签到人数; + */ + @Min(value = 1, message = "应参加人数需大于0", groups = AddUserShowGroup.class) + private Integer shouldAttend; + + /** + * 活动文本内容,目前只有一段,限制1000字 + */ + private List 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-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-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/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-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-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-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-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-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-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-client/src/main/java/com/epmet/resi/group/dto/notice/form/AddNoticeFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/AddNoticeFormDTO.java new file mode 100644 index 0000000000..f83f802c6c --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/AddNoticeFormDTO.java @@ -0,0 +1,44 @@ +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; + +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-client/src/main/java/com/epmet/resi/group/dto/notice/form/EditNoticeFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/EditNoticeFormDTO.java new file mode 100644 index 0000000000..79dd421f7f --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/form/EditNoticeFormDTO.java @@ -0,0 +1,42 @@ +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; + +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-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/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/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-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/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..d80c7b807b --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/ActCategoryDictController.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.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; + + +/** + * 活动类别字典 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-16 + */ +@RestController +@RequestMapping("actdict") +public class ActCategoryDictController { + + @Autowired + 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/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/ActSignInRecordController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/ActSignInRecordController.java new file mode 100644 index 0000000000..f315d843b5 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/ActSignInRecordController.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.ActSignInRecordService; +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("actsign") +public class ActSignInRecordController { + + @Autowired + 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/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..e063637bca --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.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.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; + + +/** + * 组织活动信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-16 + */ +@RestController +@RequestMapping("act") +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 new file mode 100644 index 0000000000..1ac8020020 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActCategoryDictDao.java @@ -0,0 +1,59 @@ +/** + * 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.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; + +/** + * 活动类别字典 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-16 + */ +@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); + + 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/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/ActCommentDao.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/ActCommentDao.java index fa28a17e4a..93a72a4913 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/ActCommentDao.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.ActCommentEntity; 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 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..139c075655 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActReadRecordDao.java @@ -0,0 +1,34 @@ +/** + * 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 { + + 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/ActSignInCodeDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActSignInCodeDao.java new file mode 100644 index 0000000000..cc918ba292 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActSignInCodeDao.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.ActSignInCodeEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 组织活动签到码 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-16 + */ +@Mapper +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/ActSignInRecordDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActSignInRecordDao.java new file mode 100644 index 0000000000..788ed87051 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActSignInRecordDao.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.ActSignInRecordEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 组织活动签到记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-16 + */ +@Mapper +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/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..14402fbe3d --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/GroupActContentDao.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.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; + +/** + * 组织活动内容 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-16 + */ +@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/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/ActSignInCodeEntity.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActSignInCodeEntity.java new file mode 100644 index 0000000000..747251144f --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActSignInCodeEntity.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_sign_in_code") +public class ActSignInCodeEntity 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/ActSignInRecordEntity.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActSignInRecordEntity.java new file mode 100644 index 0000000000..254f2d833c --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/ActSignInRecordEntity.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_sign_in_record") +public class ActSignInRecordEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * group_act_info.id + */ + private String groupActId; + + /** + * 签到用户id + */ + private String signUserId; + + /** + * 签到地点 + */ + private String signInAddress; + + /** + * 签到地点-经度 + */ + 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..abe18e4bf7 --- /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 signedInNum; + + /** + * 已签到人员姓名列表、分隔 + */ + 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..5314c9c49f --- /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 signInStartTime; + + /** + * 签到截止时间 + */ + private Date signInEndTime; + + /** + * 是否填写总结?1:已填写;0:未填写 + */ + private Integer summaryFlag; + + /** + * 已签到人数(有人签到自动+1) + */ + private Integer signedInNum; + + /** + * 取消时间 + */ + private Date canceledTime; + + /** + * 关闭时间 + */ + 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..e9f0aec7c6 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActCategoryDictService.java @@ -0,0 +1,61 @@ +/** + * 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; +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; + +/** + * 活动类别字典 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-16 + */ +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); + + /** + * 查询类别编码的全路径名称 + * + * @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/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/ActSignInCodeService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSignInCodeService.java new file mode 100644 index 0000000000..a5d713dcb2 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSignInCodeService.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.ActSignInCodeEntity; + +/** + * 组织活动签到码 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-16 + */ +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/ActSignInRecordService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSignInRecordService.java new file mode 100644 index 0000000000..279a72fd3a --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSignInRecordService.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.ActSignInRecordEntity; + +/** + * 组织活动签到记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-16 + */ +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/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..6bad0862fa --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/GroupActInfoService.java @@ -0,0 +1,50 @@ +/** + * 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; +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; + +/** + * 组织活动信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-16 + */ +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 new file mode 100644 index 0000000000..c0f5582203 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActCategoryDictServiceImpl.java @@ -0,0 +1,118 @@ +/** + * 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.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; +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.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.List; + +/** + * 活动类别字典 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-16 + */ +@Slf4j +@Service +public class 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; + } + + /** + * 查询类别编码的全路径名称 + * + * @param categoryCode + * @param customerId + * @return 支部建设-三会一课 + */ + @Override + public String queryAllCategoryName(String categoryCode, String customerId) { + if (baseDao.selectCountByCustomerId(customerId) == NumConstant.ZERO) { + customerId = GroupActConstant.DEFAULT_CUSTOMER_ID; + } + ActCategoryDictEntity entity = baseDao.selectByCode(categoryCode, customerId); + if (null == entity) { + log.warn(String.format("根据categoryCode:%s,查询act_category_dict表为null", categoryCode)); + return StrConstant.EPMETY_STR; + } + List 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/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/ActSignInCodeServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSignInCodeServiceImpl.java new file mode 100644 index 0000000000..3ee20b3195 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSignInCodeServiceImpl.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.ActSignInCodeDao; +import com.epmet.modules.act.entity.ActSignInCodeEntity; +import com.epmet.modules.act.service.ActSignInCodeService; +import org.springframework.stereotype.Service; + +/** + * 组织活动签到码 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-16 + */ +@Service +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/ActSignInRecordServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSignInRecordServiceImpl.java new file mode 100644 index 0000000000..3dd6e6e8e1 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSignInRecordServiceImpl.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.ActSignInRecordDao; +import com.epmet.modules.act.entity.ActSignInRecordEntity; +import com.epmet.modules.act.service.ActSignInRecordService; +import org.springframework.stereotype.Service; + +/** + * 组织活动签到记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-16 + */ +@Service +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/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..6db5b3551d --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/GroupActInfoServiceImpl.java @@ -0,0 +1,367 @@ +/** + * 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.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; + +/** + * 组织活动信息 + * + * @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 new file mode 100644 index 0000000000..f53850141e --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/constant/GroupActConstant.java @@ -0,0 +1,36 @@ +package com.epmet.modules.constant; + +/** + * 描述一下 + * + * @author yinzuomei@elink-cn.com + * @date 2021/4/19 13:41 + */ +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/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/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..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 @@ -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) { @@ -518,6 +532,7 @@ public class ResiGroupServiceImpl extends BaseServiceImpl + * 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.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; + + +/** + * 分享记录(话题、通知...后续支持增加) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-16 + */ +@RestController +@RequestMapping("invitationrecord") +public class InvitationRecordController { + + @Autowired + 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/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..4373554965 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/service/InvitationRecordService.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.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; + +/** + * 分享记录(话题、通知...后续支持增加) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-16 + */ +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 new file mode 100644 index 0000000000..f8a24b172d --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/service/impl/InvitationRecordServiceImpl.java @@ -0,0 +1,92 @@ +/** + * 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.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; + +/** + * 分享记录(话题、通知...后续支持增加) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-16 + */ +@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 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..6c6618cc9a 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,19 @@ 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); + + /** + * @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..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 @@ -225,4 +225,31 @@ 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); + + /** + * @return com.epmet.resi.group.dto.member.ResiGroupMemberDTO + * @param groupId + * @author yinzuomei + * @description 获取组长信息 + * @Date 2021/4/19 19:14 + **/ + ResiGroupMemberDTO getLeaderMember(String groupId); + + /** + * @return java.util.List + * @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 7fd7e48259..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 @@ -339,6 +339,28 @@ 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/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..339fd1e04a --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeController.java @@ -0,0 +1,138 @@ +/** + * 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.annotation.LoginUser; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.modules.notice.excel.NoticeExcel; +import com.epmet.modules.notice.service.NoticeService; +import com.epmet.resi.group.dto.notice.NoticeDTO; +import com.epmet.resi.group.dto.notice.form.AddNoticeFormDTO; +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.*; + +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); + } + + /** + * @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(); + } + + /** + * @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(); + } + + /** + * @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/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..902615a92b --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeReafdRecordController.java @@ -0,0 +1,110 @@ +/** + * 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.annotation.LoginUser; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.modules.notice.excel.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.*; + +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); + } + + /** + * @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/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..5442f7d806 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/dao/NoticeAttachmentDao.java @@ -0,0 +1,48 @@ +/** + * 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 com.epmet.resi.group.dto.notice.result.NoticeDetailResultDTO; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 小组通知附件表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-19 + */ +@Mapper +public interface NoticeAttachmentDao extends BaseDao { + + /** + * @Author sun + * @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/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..9e767ed133 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/dao/NoticeReafdRecordDao.java @@ -0,0 +1,48 @@ +/** + * 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 com.epmet.resi.group.dto.notice.NoticeReafdRecordDTO; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 小组通知组成员阅读记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-19 + */ +@Mapper +public interface NoticeReafdRecordDao extends BaseDao { + + /** + * @Author sun + * @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/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..c142fefcdc --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeReafdRecordService.java @@ -0,0 +1,106 @@ +/** + * 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.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; + +/** + * 小组通知组成员阅读记录表 + * + * @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); + + /** + * @param formDTO + * @return + * @Author sun + * @Description 通知已读未读列表查询 + **/ + NoticeReadListResultDTO noticeReadList(TokenDto tokenDto, NoticeReadListFormDTO 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/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..a10a82fb07 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeService.java @@ -0,0 +1,124 @@ +/** + * 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.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.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; + +/** + * 小组通知表 + * + * @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); + + /** + * @param formDTO + * @return + * @Author sun + * @Description 小组通知保存 + **/ + void add(TokenDto tokenDto, AddNoticeFormDTO formDTO); + + /** + * @param formDTO + * @return + * @Author sun + * @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/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..11507e85ba --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeReafdRecordServiceImpl.java @@ -0,0 +1,170 @@ +/** + * 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.exception.RenException; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.result.UserBaseInfoResultDTO; +import com.epmet.feign.EpmetUserOpenFeignClient; +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 com.epmet.resi.group.dto.notice.form.NoticeReadListFormDTO; +import com.epmet.resi.group.dto.notice.result.NoticeReadListResultDTO; +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.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.concurrent.atomic.AtomicReference; +import java.util.stream.Collectors; + +/** + * 小组通知组成员阅读记录表 + * + * @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; + @Autowired + private EpmetUserOpenFeignClient epmetUserOpenFeignClient; + + @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)); + } + + /** + * @param formDTO + * @return + * @Author sun + * @Description 通知已读未读列表查询 + **/ + @Override + public NoticeReadListResultDTO noticeReadList(TokenDto tokenDto, NoticeReadListFormDTO formDTO) { + NoticeReadListResultDTO resultDTO = new NoticeReadListResultDTO(); + List 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 new file mode 100644 index 0000000000..8ef6c3dcc4 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeServiceImpl.java @@ -0,0 +1,541 @@ +/** + * 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 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.dto.result.UserBaseInfoResultDTO; +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.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.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; +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.*; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.concurrent.atomic.AtomicReference; +import java.util.stream.Collectors; + +/** + * 小组通知表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-04-19 + */ +@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; + @Autowired + private ResiGroupMemberDao resiGroupMemberDao; + @Autowired + private ResiGroupDao resiGroupDao; + @Autowired + private EpmetUserOpenFeignClient epmetUserOpenFeignClient; + @Autowired + private EpmetMessageOpenFeignClient epmetMessageOpenFeignClient; + @Autowired + private NoticeAttachmentService noticeAttachmentService; + @Autowired + private NoticeAttachmentDao noticeAttachmentDao; + @Autowired + private NoticeReafdRecordService noticeReafdRecordService; + @Autowired + private NoticeReafdRecordDao noticeReafdRecordDao; + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, NoticeDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, NoticeDTO.class); + } + + private QueryWrapper getWrapper(Map params) { + String id = (String) params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public NoticeDTO get(String id) { + NoticeEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, NoticeDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(NoticeDTO dto) { + NoticeEntity entity = ConvertUtils.sourceToTarget(dto, NoticeEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(NoticeDTO dto) { + NoticeEntity entity = ConvertUtils.sourceToTarget(dto, NoticeEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + /** + * @param formDTO + * @return + * @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 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())) { + 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("小组通知,给组内成员推送站内信失败。"); + } + + } + + /** + * @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("小组通知,给组内成员推送站内信失败。"); + } + } + + /** + * @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 文字、图片安全校验 + **/ + 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/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/act/ActCategoryDictDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActCategoryDictDao.xml new file mode 100644 index 0000000000..440ed9f9f3 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActCategoryDictDao.xml @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + \ 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/ActCommentDao.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/ActCommentDao.xml index cdb6940650..e04b803f59 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/ActCommentDao.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/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..9f55748033 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActReadRecordDao.xml @@ -0,0 +1,10 @@ + + + + + + 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/ActSignInCodeDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActSignInCodeDao.xml new file mode 100644 index 0000000000..21072b30c4 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActSignInCodeDao.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/ActSignInRecordDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActSignInRecordDao.xml new file mode 100644 index 0000000000..cc6b2a0261 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActSignInRecordDao.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..7152cf67eb --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/GroupActContentDao.xml @@ -0,0 +1,15 @@ + + + + + + + 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 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/group/GroupEditSubmitRecordDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/GroupEditSubmitRecordDao.xml index b9b2924cdb..d282690dea 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/GroupEditSubmitRecordDao.xml +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/GroupEditSubmitRecordDao.xml @@ -72,6 +72,7 @@ edit.GROUP_ID, groupp.GROUP_NAME, groupp.GROUP_HEAD_PHOTO, + groupp.GROUP_TYPE, edit.READ_FLAG, edit.MESSAGE_TEXT, DATE_FORMAT( edit.CREATED_TIME, '%Y-%m-%d %H:%i' ) AS createdTime 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..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 @@ -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} @@ -242,6 +245,7 @@ + + + + + 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..5423a4620a --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/notice/NoticeAttachmentDao.xml @@ -0,0 +1,31 @@ + + + + + + + + + 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/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..2d0a934811 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/notice/NoticeReafdRecordDao.xml @@ -0,0 +1,24 @@ + + + + + + + + + DELETE + FROM + notice_reafd_record + WHERE + notice_id = #{noticeId} + + + \ No newline at end of file diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java index 52fe2a04cb..8a6b4db22a 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java @@ -512,4 +512,13 @@ public interface EpmetUserOpenFeignClient { **/ @PostMapping(value = "/epmetuser/customerstaff/getcustomerstafflist") Result getCustomerStaffList(@RequestBody List staffIdList); + + /** + * @Description 查询此人是不是党员,true是党员,false不是党员 + * @Param userId + * @author zxc + * @date 2021/4/19 下午4:34 + */ + @GetMapping(value = "/epmetuser/userrole/ispartymember") + Result selectIsPartyMemberByUserId(@RequestParam("userId") String userId); } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java index 6230e5d875..7cb96271ec 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java @@ -363,4 +363,9 @@ public class EpmetUserOpenFeignClientFallback implements EpmetUserOpenFeignClien public Result getCustomerStaffList(List staffIdList) { return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getCustomerStaffList", staffIdList); } + + @Override + public Result selectIsPartyMemberByUserId(String userId) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "selectIsPartyMemberByUserId", userId); + } } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserRoleController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserRoleController.java index 90ceb71ea0..8178a62abe 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserRoleController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserRoleController.java @@ -132,4 +132,15 @@ public class UserRoleController { public Result> getUserRoleInfoByUserId(@PathVariable("userId") String userId) { return userRoleService.getUserRoleInfoByUserId(userId); } + + /** + * @Description 查询此人是不是党员,true是党员,false不是党员 + * @Param userId + * @author zxc + * @date 2021/4/19 下午4:34 + */ + @GetMapping("ispartymember") + public Result selectIsPartyMemberByUserId(@RequestParam("userId") String userId){ + return new Result().ok(userRoleService.selectIsPartyMemberByUserId(userId)); + } } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserRoleDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserRoleDao.java index a9d2f1bded..ccd35bd999 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserRoleDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserRoleDao.java @@ -81,4 +81,12 @@ public interface UserRoleDao extends BaseDao { * @date 2020/11/18 上午10:50 */ List selectPartyMemberUserIds(); + + /** + * @Description 查询此人是不是党员 + * @Param userId + * @author zxc + * @date 2021/4/19 下午4:29 + */ + Integer selectIsPartyMemberByUserId(@Param("userId")String userId); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserRoleService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserRoleService.java index c431331236..c33b13d019 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserRoleService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserRoleService.java @@ -122,4 +122,12 @@ public interface UserRoleService extends BaseService { * @Date 14:24 2020-07-23 **/ Result> getUserRoleInfoByUserId(String userId); + + /** + * @Description 查询此人是不是党员,true是党员,false不是党员 + * @Param userId + * @author zxc + * @date 2021/4/19 下午4:34 + */ + Boolean selectIsPartyMemberByUserId(String userId); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserRoleServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserRoleServiceImpl.java index 9e48e599e2..7efb353bcb 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserRoleServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserRoleServiceImpl.java @@ -21,6 +21,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; @@ -138,4 +139,19 @@ public class UserRoleServiceImpl extends BaseServiceImpl>().ok(list); } + /** + * @Description 查询此人是不是党员,true是党员,false不是党员 + * @Param userId + * @author zxc + * @date 2021/4/19 下午4:34 + */ + @Override + public Boolean selectIsPartyMemberByUserId(String userId) { + Integer num = baseDao.selectIsPartyMemberByUserId(userId); + if (null != num && num > NumConstant.ZERO){ + return true; + } + return false; + } + } diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/UserRoleDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/UserRoleDao.xml index 4472c48b77..53a167cb77 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/UserRoleDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/UserRoleDao.xml @@ -112,4 +112,16 @@ AND er.ROLE_KEY = 'partymember' + + +