diff --git a/esua-epdc/doc/db/dev_1010/esua_epdc_events.sql b/esua-epdc/doc/db/dev_1010/esua_epdc_events.sql
new file mode 100644
index 000000000..c2c823286
--- /dev/null
+++ b/esua-epdc/doc/db/dev_1010/esua_epdc_events.sql
@@ -0,0 +1,21 @@
+------------------------------------------2019-11-08-----------------------------------------------
+-- 删除友邻社区ID字段
+ALTER TABLE epdc_events DROP COLUMN FRIENDLY_COMMUNITY_ID;
+ALTER TABLE epdc_issue DROP COLUMN FRIENDLY_COMMUNITY_ID;
+ALTER TABLE epdc_item DROP COLUMN FRIENDLY_COMMUNITY_ID;
+-- 增加社群ID字段
+ALTER TABLE epdc_events ADD GROUP_ID varchar(32) NULL COMMENT '社群ID';
+ALTER TABLE epdc_issue ADD GROUP_ID varchar(32) NULL COMMENT '社群ID';
+ALTER TABLE epdc_item ADD GROUP_ID varchar(32) NULL COMMENT '社群ID';
+-- 增加社群名称字段
+ALTER TABLE epdc_events ADD GROUP_NAME varchar(128) NULL COMMENT '社群名称';
+ALTER TABLE epdc_issue ADD GROUP_NAME varchar(128) NULL COMMENT '社群名称';
+ALTER TABLE epdc_item ADD GROUP_NAME varchar(128) NULL COMMENT '社群名称';
+------------------------------------------2019-11-08-----------------------------------------------
+
+------------------------------------------2019-11-11-----------------------------------------------
+-- 增加话题ID字段
+ALTER TABLE epdc_events ADD TOPIC_ID varchar(32) NULL COMMENT '话题ID';
+ALTER TABLE epdc_issue ADD TOPIC_ID varchar(32) NULL COMMENT '话题ID';
+ALTER TABLE epdc_item ADD TOPIC_ID varchar(32) NULL COMMENT '话题ID';
+------------------------------------------2019-11-11-----------------------------------------------
\ No newline at end of file
diff --git a/esua-epdc/doc/db/dev_1114/esua_epdc_admin.sql b/esua-epdc/doc/db/dev_1114/esua_epdc_admin.sql
new file mode 100644
index 000000000..645821e05
--- /dev/null
+++ b/esua-epdc/doc/db/dev_1114/esua_epdc_admin.sql
@@ -0,0 +1,22 @@
+-------------------------------------------------------2019-11-14------------------------------------------------
+-- 新增党委部门管理表
+CREATE TABLE sys_party_dept(
+ ID BIGINT NOT NULL COMMENT '主键' ,
+ PID BIGINT COMMENT '上级ID' ,
+ PIDS VARCHAR(500) COMMENT '所有上级ID,用逗号分开' ,
+ NAME VARCHAR(50) COMMENT '部门名称' ,
+ TYPE_KEY VARCHAR(50) COMMENT '机构类型键值' ,
+ PARTY_CODE VARCHAR(50) COMMENT '部门编码' ,
+ SORT INT COMMENT '排序' ,
+ DEL_FLAG VARCHAR(1) NOT NULL COMMENT '删除标记' ,
+ CREATOR BIGINT NOT NULL COMMENT '创建者' ,
+ CREATED_DATE DATETIME NOT NULL COMMENT '创建时间' ,
+ UPDATER BIGINT NOT NULL COMMENT '更新者' ,
+ UPDATED_DATE DATETIME NOT NULL COMMENT '更新时间' ,
+ PRIMARY KEY (ID)
+) COMMENT = '党委部门管理 党委部门管理';;
+
+-- 部门表新增所属党委ID字段
+ALTER TABLE sys_dept ADD ppid bigint NULL COMMENT '所属党委ID';
+
+-------------------------------------------------------2019-11-14------------------------------------------------
\ No newline at end of file
diff --git a/esua-epdc/doc/db/dev_1114/esua_epdc_events.sql b/esua-epdc/doc/db/dev_1114/esua_epdc_events.sql
new file mode 100644
index 000000000..6f976f815
--- /dev/null
+++ b/esua-epdc/doc/db/dev_1114/esua_epdc_events.sql
@@ -0,0 +1,18 @@
+-------------------------------------------------------2019-11-14------------------------------------------------
+-- 新增接口日志表
+CREATE TABLE epdc_interface_log(
+ ID VARCHAR(32) NOT NULL COMMENT '主键' ,
+ REFERENCE_ID VARCHAR(32) NOT NULL COMMENT '引用ID' ,
+ BUSINESS_TYPE VARCHAR(100) COMMENT '业务类型' ,
+ INTERFACE_NAME VARCHAR(200) NOT NULL COMMENT '调用接口名称' ,
+ SUCCESS_FLAG VARCHAR(1) NOT NULL COMMENT '调用是否成功 0-调用失败,1-调用成功' ,
+ CALL_MSG_BODY VARCHAR(2000) COMMENT '调用消息体' ,
+ RETURN_MSG_BODY TEXT COMMENT '调用返回消息体' ,
+ CREATED_BY VARCHAR(32) NOT NULL COMMENT '创建人' ,
+ CREATED_TIME DATETIME NOT NULL COMMENT '创建时间' ,
+ UPDATED_BY VARCHAR(32) NOT NULL COMMENT '更新人' ,
+ UPDATED_TIME DATETIME NOT NULL COMMENT '更新时间' ,
+ DEL_FLAG VARCHAR(1) NOT NULL COMMENT '删除标记' ,
+ PRIMARY KEY (ID)
+) COMMENT = '接口日志表 接口日志表';;
+-------------------------------------------------------2019-11-14------------------------------------------------
\ No newline at end of file
diff --git a/esua-epdc/doc/db/dev_1114/esua_epdc_user.sql b/esua-epdc/doc/db/dev_1114/esua_epdc_user.sql
new file mode 100644
index 000000000..7a8e3ed75
--- /dev/null
+++ b/esua-epdc/doc/db/dev_1114/esua_epdc_user.sql
@@ -0,0 +1,39 @@
+-------------------------------------------------------2019-11-14------------------------------------------------
+-- 新建党员认证失败表
+CREATE TABLE epdc_party_authentication_failed(
+ ID VARCHAR(32) NOT NULL COMMENT '主键' ,
+ REAL_NAME VARCHAR(20) NOT NULL COMMENT '姓名' ,
+ MOBILE VARCHAR(20) COMMENT '手机号' ,
+ IDENTITY_NO VARCHAR(20) NOT NULL COMMENT '身份证号' ,
+ USER_ID VARCHAR(32) COMMENT '用户ID' ,
+ ADDRESS VARCHAR(512) COMMENT '居民住址' ,
+ POST VARCHAR(128) COMMENT '职务 字典表dict_name' ,
+ POST_VALUE VARCHAR(32) COMMENT '职务ID 字典表dict_value' ,
+ CADRE_FLAG VARCHAR(1) NOT NULL COMMENT '干部下沉标识 0-否,1-是' ,
+ REGIST_FLAG VARCHAR(1) NOT NULL COMMENT '注册状态 0-否,1-是' ,
+ REGIST_TIME DATETIME COMMENT '注册时间' ,
+ STREET_NAME VARCHAR(128) COMMENT '街道名称' ,
+ STREET_ID BIGINT COMMENT '街道ID' ,
+ COMMUNITY_NAME VARCHAR(128) COMMENT '社区名称' ,
+ COMMUNITY_ID BIGINT COMMENT '社区ID' ,
+ GRID_NAME VARCHAR(128) COMMENT '网格名称' ,
+ GRID_ID BIGINT COMMENT '网格ID' ,
+ DEPT_ID BIGINT COMMENT '部门ID' ,
+ STATE INT COMMENT '状态 0-认证失败' ,
+ PROCESSING_OPINIONS VARCHAR(500) COMMENT '处理意见' ,
+ REVISION INT COMMENT '乐观锁' ,
+ CREATED_BY VARCHAR(32) NOT NULL COMMENT '创建人' ,
+ CREATED_TIME DATETIME NOT NULL COMMENT '创建时间' ,
+ UPDATED_BY VARCHAR(32) NOT NULL COMMENT '更新人' ,
+ UPDATED_TIME DATETIME NOT NULL COMMENT '更新时间' ,
+ DEL_FLAG VARCHAR(1) NOT NULL COMMENT '删除标记 0-否,1-是' ,
+ PRIMARY KEY (ID)
+) COMMENT = '党员认证失败表 党员认证失败表';;
+
+-- 党员表新增居住地址字段
+ALTER TABLE epdc_party_members ADD ADDRESS varchar(512) NULL COMMENT '居民住址';
+
+-- 用户表增加约束
+ALTER TABLE esua_epdc_user.epdc_user ADD CONSTRAINT epdc_user_un UNIQUE KEY (`MOBILE`,`IDENTITY_NO`);
+
+-------------------------------------------------------2019-11-14------------------------------------------------
\ No newline at end of file
diff --git a/esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/constant/ServiceConstant.java b/esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/constant/ServiceConstant.java
index c35f7343b..d56c9fb99 100644
--- a/esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/constant/ServiceConstant.java
+++ b/esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/constant/ServiceConstant.java
@@ -46,7 +46,7 @@ public interface ServiceConstant {
/**
* 友邻社群模块
*/
- String EPDC_NEIGHBOR_SERVER = "epdc-neighbor-server";
+ String EPDC_GROUP_SERVER = "epdc-group-server";
/**
* 新闻公告模块
*/
diff --git a/esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/enums/UserSexEnum.java b/esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/enums/UserSexEnum.java
new file mode 100644
index 000000000..ddbbc8f23
--- /dev/null
+++ b/esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/enums/UserSexEnum.java
@@ -0,0 +1,38 @@
+/**
+ * Copyright (c) 2018 人人开源 All rights reserved.
+ *
+ * https://www.renren.io
+ *
+ * 版权所有,侵权必究!
+ */
+
+package com.elink.esua.epdc.commons.tools.enums;
+
+/**
+ * 用户性别 枚举类
+ *
+ * @author work@yujt.net.cn
+ * @date 2019/11/18 14:30
+ */
+public enum UserSexEnum {
+
+ /**
+ * 男
+ */
+ MALE("1"),
+
+ /**
+ * 女
+ */
+ FEMALE("0");
+
+ private String sex;
+
+ UserSexEnum(String sex) {
+ this.sex = sex;
+ }
+
+ public String sex() {
+ return sex;
+ }
+}
diff --git a/esua-epdc/epdc-gateway/pom.xml b/esua-epdc/epdc-gateway/pom.xml
index a4b2f7894..f84a048b6 100644
--- a/esua-epdc/epdc-gateway/pom.xml
+++ b/esua-epdc/epdc-gateway/pom.xml
@@ -106,9 +106,6 @@
lb://epdc-message-server
- lb://epdc-neighbor-server
-
-
http://127.0.0.1:9064
lb://epdc-oss-server
@@ -120,10 +117,11 @@
http://127.0.0.1:9068
lb://epdc-demo-server
+ http://127.0.0.1:9064
+
lb://epdc-websocket-server
-
- true
+ false
47.104.224.45:8848
http://localhost:9411
@@ -151,8 +149,6 @@
lb://epdc-job-server
lb://epdc-message-server
- lb://epdc-neighbor-server
-
lb://epdc-news-server
lb://epdc-oss-server
lb://epdc-events-server
@@ -160,6 +156,7 @@
lb://epdc-user-server
lb://epdc-demo-server
+ lb://epdc-group-server
lb://epdc-websocket-server
@@ -185,8 +182,6 @@
lb://epdc-job-server
lb://epdc-message-server
- lb://epdc-neighbor-server
-
lb://epdc-news-server
lb://epdc-oss-server
lb://epdc-events-server
@@ -194,6 +189,7 @@
lb://epdc-user-server
lb://epdc-demo-server
+ lb://epdc-group-server
lb://epdc-websocket-server
diff --git a/esua-epdc/epdc-gateway/src/main/resources/application.yml b/esua-epdc/epdc-gateway/src/main/resources/application.yml
index 37a30e659..53946043b 100644
--- a/esua-epdc/epdc-gateway/src/main/resources/application.yml
+++ b/esua-epdc/epdc-gateway/src/main/resources/application.yml
@@ -83,11 +83,12 @@ spring:
filters:
- StripPrefix=1
#友邻社群模块
- - id: epdc-neighbor-server
- uri: @gateway.routes.epdc-neighbor-server.uri@
+ - id: epdc-group-server
+ uri: @gateway.routes.epdc-group-server.uri@
order: 9
predicates:
- - Path=${server.servlet.context-path}/neighbor/**
+ - Path=/group/**
+ - Path=${server.servlet.context-path}/group/**
filters:
- StripPrefix=1
#新闻公告模块
diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-client/pom.xml b/esua-epdc/epdc-module/epdc-api/epdc-api-client/pom.xml
index 8b601441a..fb4e2c8d7 100644
--- a/esua-epdc/epdc-module/epdc-api/epdc-api-client/pom.xml
+++ b/esua-epdc/epdc-module/epdc-api/epdc-api-client/pom.xml
@@ -68,6 +68,11 @@
epdc-message-client
1.0.0
+
+ com.esua.epdc
+ epdc-group-client
+ 1.0.0
+
diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/form/EpdcCompleteUserInfoFormDTO.java b/esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/form/EpdcCompleteUserInfoFormDTO.java
index ab9640135..dfbc61f96 100644
--- a/esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/form/EpdcCompleteUserInfoFormDTO.java
+++ b/esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/form/EpdcCompleteUserInfoFormDTO.java
@@ -51,4 +51,10 @@ public class EpdcCompleteUserInfoFormDTO implements Serializable {
* 住处(楼栋-单元-房间)
*/
private String dwellingPlace;
+
+ /**
+ * 0女,1男
+ */
+ @NotBlank(message = "性别不能为空")
+ private String sex;
}
diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiGroupController.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiGroupController.java
new file mode 100644
index 000000000..6f132de78
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiGroupController.java
@@ -0,0 +1,229 @@
+package com.elink.esua.epdc.controller;
+
+import com.elink.esua.epdc.common.token.dto.TokenDto;
+import com.elink.esua.epdc.commons.tools.annotation.LoginUser;
+import com.elink.esua.epdc.commons.tools.utils.Result;
+import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils;
+import com.elink.esua.epdc.dto.epdc.form.EpdcUserGroupInviteFormDTO;
+import com.elink.esua.epdc.dto.epdc.result.EpdcUserGroupInviteResultDTO;
+import com.elink.esua.epdc.dto.group.GroupSettingStateDTO;
+import com.elink.esua.epdc.dto.group.form.*;
+import com.elink.esua.epdc.dto.group.result.*;
+import com.elink.esua.epdc.service.GroupService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ *
+ * 移动端接口-社群模块
+ *
+ * @Author:liuchuang
+ * @Date:2019/10/17 13:48
+ */
+@RestController
+@RequestMapping("group/group")
+public class ApiGroupController {
+
+ @Autowired
+ private GroupService groupService;
+
+ /**
+ *
+ * 创建社群
+ *
+ * @params [userDetail, formDto]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @author liuchuang
+ * @since 2019/10/17 13:58
+ */
+ @PostMapping("create")
+ public Result createGroup(@LoginUser TokenDto userDetail, @RequestBody GroupCreateFormDTO formDto) {
+ return groupService.saveGroup(userDetail, formDto);
+ }
+
+ /**
+ *
+ * 解散社群
+ *
+ * @params [formDto]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @author liuchuang
+ * @since 2019/10/21 9:51
+ */
+ @PostMapping("disband")
+ public Result disbandGroup(@RequestBody GroupSettingStateDTO formDto) {
+ return groupService.disbandGroup(formDto);
+ }
+
+ /**
+ *
+ * 我的群列表
+ *
+ * @params [userDetail]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result>
+ * @author liuchuang
+ * @since 2019/10/21 17:20
+ */
+ @GetMapping("listOfMine")
+ public Result> groupsOfMine(@LoginUser TokenDto userDetail) {
+ return groupService.listGroupsOfMine(userDetail);
+ }
+
+ /**
+ *
+ * 推荐群列表
+ *
+ * @params [userDetail]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result>
+ * @author liuchuang
+ * @since 2019/10/22 13:53
+ */
+ @GetMapping("listOfRecommend")
+ public Result> groupsOfRecommend(@LoginUser TokenDto userDetail) {
+ return groupService.listGroupsOfRecommend(userDetail);
+ }
+
+ /**
+ *
+ * 社群详情
+ *
+ * @params [userDetail, id]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result>
+ * @author liuchuang
+ * @since 2019/10/22 15:14
+ */
+ @GetMapping("detail/{id}")
+ public Result detail(@LoginUser TokenDto userDetail, @PathVariable("id") String id) {
+ return groupService.getGroupDetail(userDetail, id);
+ }
+
+ /**
+ *
+ * 修改群介绍
+ *
+ * @params [userDetail, formDto]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @author liuchuang
+ * @since 2019/10/22 15:33
+ */
+ @PostMapping("modifyIntroduction")
+ public Result modifyIntroduction(@LoginUser TokenDto userDetail, @RequestBody GroupIntroductionFormDTO formDto) {
+ return groupService.modifyIntroduction(userDetail, formDto);
+ }
+
+ /**
+ *
+ * 修改群头像
+ *
+ * @params [userDetail, formDto]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @author liuchuang
+ * @since 2019/10/22 17:25
+ */
+ @PostMapping("modifyAvatar")
+ public Result modifyAvatar(@LoginUser TokenDto userDetail, @RequestBody GroupModifyAvatarFormDTO formDto) {
+ return groupService.modifyAvatar(userDetail, formDto);
+ }
+
+ /**
+ *
+ * 社群成员列表(待审核/审核通过)
+ *
+ * @params [formDto]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @author liuchuang
+ * @since 2019/10/23 9:13
+ */
+ @GetMapping("listOfMember")
+ public Result> listOfMember(@RequestBody GroupUsersFormDTO formDto) {
+ return groupService.listOfMember(formDto);
+ }
+
+ /**
+ *
+ * 移除社群成员
+ *
+ * @params [formDto]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @author liuchuang
+ * @since 2019/10/23 10:35
+ */
+ @PostMapping("removeMember")
+ public Result removeMember(@LoginUser TokenDto userDetail, @RequestBody GroupUserRemoveOrQuitFormDTO formDto) {
+ return groupService.removeMember(userDetail, formDto);
+ }
+
+ /**
+ *
+ * 退出社群
+ *
+ * @params [formDto]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @author liuchuang
+ * @since 2019/10/23 10:40
+ */
+ @PostMapping("quitGroup")
+ public Result quitGroup(@LoginUser TokenDto userDetail, @RequestBody GroupUserRemoveOrQuitFormDTO formDto) {
+ return groupService.quitGroup(userDetail, formDto);
+ }
+
+ /**
+ *
+ * 添加成员列表
+ *
+ * @params [formDto]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result>
+ * @author liuchuang
+ * @since 2019/10/23 16:39
+ */
+ @GetMapping("getInviteList")
+ public Result> getInviteList(@LoginUser TokenDto userDetail, @RequestBody EpdcUserGroupInviteFormDTO formDto) {
+ return groupService.listOfInviteUsers(userDetail, formDto);
+ }
+
+ /**
+ *
+ * 添加社群成员
+ *
+ * @params [formDto]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @author liuchuang
+ * @since 2019/11/6 9:17
+ */
+ @PostMapping("addMember")
+ public Result addMember(@RequestBody GroupAddUserFormDTO formDto) {
+ return groupService.saveGroupUsers(formDto);
+ }
+
+ /**
+ *
+ * 审核入群申请
+ *
+ * @params [formDto]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @author liuchuang
+ * @since 2019/11/6 13:22
+ */
+ @PostMapping("reviewApply")
+ public Result reviewApply(@RequestBody GroupUserReviewFormDTO formDto) {
+ return groupService.updateGroupUsers(formDto);
+ }
+
+ /**
+ *
+ * 申请入群
+ *
+ * @params [formDto]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @author liuchuang
+ * @since 2019/11/11 14:00
+ */
+ @PostMapping("applyForGroup")
+ public Result applyForGroup(@LoginUser TokenDto userDetail, @RequestBody GroupApplyFormDTO formDto) {
+ ValidatorUtils.validateEntity(formDto);
+ return groupService.applyForGroup(userDetail, formDto);
+ }
+
+}
diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiTopicCommentController.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiTopicCommentController.java
new file mode 100644
index 000000000..a325ea0a7
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiTopicCommentController.java
@@ -0,0 +1,50 @@
+package com.elink.esua.epdc.controller;
+
+import com.elink.esua.epdc.common.token.dto.TokenDto;
+import com.elink.esua.epdc.commons.tools.annotation.LoginUser;
+import com.elink.esua.epdc.commons.tools.utils.Result;
+import com.elink.esua.epdc.dto.comment.TopicCommentFormDTO;
+import com.elink.esua.epdc.dto.comment.TopicCommentStatementFormDTO;
+import com.elink.esua.epdc.dto.comment.TopicCommentsFormDTO;
+import com.elink.esua.epdc.dto.comment.result.EventCommentsResultDTO;
+import com.elink.esua.epdc.service.TopicCommentService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * 移动端接口-评论模块
+ * @Author WJP
+ * @Date 2019/9/9 09:45
+ */
+@RestController
+@RequestMapping("group/comment")
+public class ApiTopicCommentController {
+
+ @Autowired
+ private TopicCommentService topicCommentService;
+
+ /**
+ * 提交评论或回复接口
+ */
+ @PostMapping("submit")
+ public Result submit(@LoginUser TokenDto userDetail, @RequestBody TopicCommentFormDTO topicCommentFormDTO) {
+ return topicCommentService.submit(userDetail,topicCommentFormDTO);
+ }
+
+ /**
+ * 评论(赞/踩)
+ */
+ @PostMapping("statement")
+ public Result statement(@LoginUser TokenDto userDetail, @RequestBody TopicCommentStatementFormDTO topicCommentStatementFormDTO) {
+ return topicCommentService.statement(userDetail,topicCommentStatementFormDTO);
+ }
+
+ /**
+ * 评论列表
+ */
+ @GetMapping("list")
+ public Result listOfComments(@LoginUser TokenDto userDetail, TopicCommentsFormDTO topicCommentsFormDTO) {
+ return topicCommentService.listOfComments(userDetail,topicCommentsFormDTO);
+ }
+
+}
diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiTopicController.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiTopicController.java
new file mode 100644
index 000000000..401ee3294
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiTopicController.java
@@ -0,0 +1,136 @@
+package com.elink.esua.epdc.controller;
+
+import com.elink.esua.epdc.common.token.dto.TokenDto;
+import com.elink.esua.epdc.commons.tools.annotation.LoginUser;
+import com.elink.esua.epdc.commons.tools.utils.Result;
+import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils;
+import com.elink.esua.epdc.dto.group.result.TopicAuditRecordResultDTO;
+import com.elink.esua.epdc.dto.topic.form.TopicListFormDTO;
+import com.elink.esua.epdc.dto.topic.form.TopicChangeToIssueFormDTO;
+import com.elink.esua.epdc.dto.topic.form.TopicCloseFormDTO;
+import com.elink.esua.epdc.dto.topic.form.TopicSubmitFormDTO;
+import com.elink.esua.epdc.dto.topic.result.TopicDetailResultDTO;
+import com.elink.esua.epdc.dto.topic.result.TopicListResultDTO;
+import com.elink.esua.epdc.service.TopicService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ *
+ * 移动端接口-话题模块
+ *
+ * @Author:liuchuang
+ * @Date:2019/11/6 14:44
+ */
+@RestController
+@RequestMapping("group/topic")
+public class ApiTopicController {
+
+ @Autowired
+ private TopicService topicService;
+
+ /**
+ *
+ * 发布话题
+ *
+ * @params [userDetail, formDto]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @author liuchuang
+ * @since 2019/11/6 14:46
+ */
+ @PostMapping("submit")
+ public Result submit(@LoginUser TokenDto userDetail, @RequestBody TopicSubmitFormDTO formDto) {
+ ValidatorUtils.validateEntity(formDto);
+ return topicService.saveTopic(userDetail, formDto);
+ }
+
+ /**
+ *
+ * 话题列表
+ *
+ * @params [userDetail, formDto]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result>
+ * @author liuchuang
+ * @since 2019/11/11 15:04
+ */
+ @GetMapping("list")
+ public Result> listTopic(@LoginUser TokenDto userDetail, @RequestBody TopicListFormDTO formDto) {
+ ValidatorUtils.validateEntity(formDto);
+ return topicService.listOfTopic(userDetail, formDto);
+ }
+
+ /**
+ *
+ * 我的话题列表
+ *
+ * @params [userDetail, formDto]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result>
+ * @author liuchuang
+ * @since 2019/11/11 15:04
+ */
+ @GetMapping("listOfMine")
+ public Result> listTopicOfMine(@LoginUser TokenDto userDetail, @RequestBody TopicListFormDTO formDto) {
+ ValidatorUtils.validateEntity(formDto);
+ return topicService.listTopicOfMine(userDetail, formDto);
+ }
+
+ /**
+ *
+ * 话题详情
+ *
+ * @params [id]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @author liuchuang
+ * @since 2019/11/7 15:37
+ */
+ @GetMapping("detail/{id}")
+ public Result detail(@PathVariable("id") String id) {
+ return topicService.getTopicDetailById(id);
+ }
+
+ /**
+ *
+ * 关闭话题
+ *
+ * @params [formDto]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @author liuchuang
+ * @since 2019/11/7 16:10
+ */
+ @PostMapping("close")
+ public Result close(@LoginUser TokenDto userDetail, @RequestBody TopicCloseFormDTO formDto) {
+ ValidatorUtils.validateEntity(formDto);
+ return topicService.closeTopic(userDetail, formDto);
+ }
+
+ /**
+ *
+ * 话题审核记录
+ *
+ * @params [topicId]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result>
+ * @author liuchuang
+ * @since 2019/11/8 9:39
+ */
+ @GetMapping("auditRecord/{topicId}")
+ public Result> auditRecord(@PathVariable("topicId") String topicId) {
+ return topicService.listOfTopicAuditRecord(topicId);
+ }
+
+ /**
+ *
+ * 转议题
+ *
+ * @params [userDetail, formDto]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @author liuchuang
+ * @since 2019/11/8 10:37
+ */
+ @PostMapping("changeToIssue")
+ public Result changeToIssue(@LoginUser TokenDto userDetail, @RequestBody TopicChangeToIssueFormDTO formDto) {
+ ValidatorUtils.validateEntity(formDto);
+ return topicService.changeToIssue(userDetail, formDto);
+ }
+}
diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/GroupFeignClient.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/GroupFeignClient.java
new file mode 100644
index 000000000..b79f9e3a6
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/GroupFeignClient.java
@@ -0,0 +1,207 @@
+package com.elink.esua.epdc.feign;
+
+import com.elink.esua.epdc.commons.tools.constant.ServiceConstant;
+import com.elink.esua.epdc.commons.tools.utils.Result;
+import com.elink.esua.epdc.dto.epdc.form.EpdcUserGroupInviteFormDTO;
+import com.elink.esua.epdc.dto.epdc.result.EpdcUserGroupInviteResultDTO;
+import com.elink.esua.epdc.dto.group.GroupSettingStateDTO;
+import com.elink.esua.epdc.dto.group.form.*;
+import com.elink.esua.epdc.dto.group.result.*;
+import com.elink.esua.epdc.feign.fallback.GroupFeignClientFallback;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.http.MediaType;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+
+import java.util.List;
+
+/**
+ *
+ * 社群模块调用
+ *
+ * @Author:liuchuang
+ * @Date:2019/10/17 14:40
+ */
+@FeignClient(name = ServiceConstant.EPDC_GROUP_SERVER, fallback = GroupFeignClientFallback.class)
+public interface GroupFeignClient {
+
+ /**
+ *
+ * 创建社群
+ *
+ * @params [formDto]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @author liuchuang
+ * @since 2019/10/17 14:44
+ */
+ @PostMapping(value = "group/epdc-app/group/create", consumes = MediaType.APPLICATION_JSON_VALUE)
+ Result createGroup(GroupCreateFormDTO formDto);
+
+ /**
+ *
+ * 解散社群
+ *
+ * @params [formDto]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @author liuchuang
+ * @since 2019/10/21 9:54
+ */
+ @PostMapping(value = "group/epdc-app/group/operate", consumes = MediaType.APPLICATION_JSON_VALUE)
+ Result disbandGroup(GroupSettingStateDTO formDto);
+
+ /**
+ *
+ * 我的群列表
+ *
+ * @params [formDTO]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result>
+ * @author liuchuang
+ * @since 2019/10/21 17:26
+ */
+ @GetMapping(value = "group/epdc-app/group/listOfMine", consumes = MediaType.APPLICATION_JSON_VALUE)
+ Result> listGroupsOfMine(GroupsOfMineFormDTO formDto);
+
+ /**
+ *
+ * 推荐群列表
+ *
+ * @params [formDto]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result>
+ * @author liuchuang
+ * @since 2019/10/22 13:51
+ */
+ @GetMapping(value = "group/epdc-app/group/listOfRecommend", consumes = MediaType.APPLICATION_JSON_VALUE)
+ Result> listGroupsOfRecommend(GroupsOfMineFormDTO formDto);
+
+ /**
+ *
+ * 社群详情
+ *
+ * @params [formDto]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @author liuchuang
+ * @since 2019/10/22 15:09
+ */
+ @GetMapping(value = "group/epdc-app/group/detail", consumes = MediaType.APPLICATION_JSON_VALUE)
+ Result detail(GroupDetailForMobileEndFormDTO formDto);
+
+ /**
+ *
+ * 修改群介绍
+ *
+ * @params [formDto]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @author liuchuang
+ * @since 2019/10/22 15:36
+ */
+ @PostMapping(value = "group/epdc-app/group/modifyIntroduction", consumes = MediaType.APPLICATION_JSON_VALUE)
+ Result modifyIntroduction(GroupIntroductionFormDTO formDto);
+
+ /**
+ *
+ * 修改群头像
+ *
+ * @params [formDto]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @author liuchuang
+ * @since 2019/10/22 17:29
+ */
+ @PostMapping(value = "group/epdc-app/group/modifyAvatar", consumes = MediaType.APPLICATION_JSON_VALUE)
+ Result modifyAvatar(GroupModifyAvatarFormDTO formDto);
+
+ /**
+ *
+ * 社群成员列表(待审核/审核通过)
+ *
+ * @params [formDto]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @author liuchuang
+ * @since 2019/10/23 9:16
+ */
+ @GetMapping(value = "group/epdc-app/group/listOfMember", consumes = MediaType.APPLICATION_JSON_VALUE)
+ Result> listOfMember(GroupUsersFormDTO formDto);
+
+ /**
+ *
+ * 移除社群成员
+ *
+ * @params [formDto]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @author liuchuang
+ * @since 2019/10/23 10:47
+ */
+ @PostMapping(value = "group/epdc-app/group/removeMember", consumes = MediaType.APPLICATION_JSON_VALUE)
+ Result removeMember(GroupUserRemoveOrQuitFormDTO formDto);
+
+ /**
+ *
+ * 退出社群
+ *
+ * @params [formDto]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @author liuchuang
+ * @since 2019/10/23 10:47
+ */
+ @PostMapping(value = "group/epdc-app/group/quitGroup", consumes = MediaType.APPLICATION_JSON_VALUE)
+ Result quitGroup(GroupUserRemoveOrQuitFormDTO formDto);
+
+ /**
+ *
+ * 添加成员列表
+ *
+ * @params [formDto]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result>
+ * @author liuchuang
+ * @since 2019/10/23 16:38
+ */
+ @GetMapping(value = "group/epdc-app/usergroup/getInviteList", consumes = MediaType.APPLICATION_JSON_VALUE)
+ Result> getInviteList(EpdcUserGroupInviteFormDTO formDto);
+
+ /**
+ *
+ * 添加成员
+ *
+ * @params [formDto]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @author liuchuang
+ * @since 2019/11/6 9:37
+ */
+ @PostMapping(value = "group/epdc-app/usergroup/addMember", consumes = MediaType.APPLICATION_JSON_VALUE)
+ Result addMember(GroupAddUserFormDTO formDto);
+
+ /**
+ *
+ * 审核入群申请
+ *
+ * @params [formDto]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @author liuchuang
+ * @since 2019/11/6 13:26
+ */
+ @PostMapping(value = "group/epdc-app/usergroup/reviewApply", consumes = MediaType.APPLICATION_JSON_VALUE)
+ Result reviewApply(GroupUserReviewFormDTO formDto);
+
+ /**
+ *
+ * 申请入群
+ *
+ * @params [formDto]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @author liuchuang
+ * @since 2019/11/11 14:04
+ */
+ @PostMapping(value = "group/epdc-app/group/applyForGroup", consumes = MediaType.APPLICATION_JSON_VALUE)
+ Result applyForGroup(GroupApplyFormDTO formDto);
+
+ /**
+ *
+ * 更新社群用户党员标识
+ *
+ * @params [formDto]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @author liuchuang
+ * @since 2019/11/11 14:32
+ */
+ @PostMapping(value = "group/epdc-app/usergroup/partyMember", consumes = MediaType.APPLICATION_JSON_VALUE)
+ Result updateUserPartyMember(GroupUserPartyMemberFormDTO formDto);
+}
diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/TopicCommentFeignClient.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/TopicCommentFeignClient.java
new file mode 100644
index 000000000..0540257eb
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/TopicCommentFeignClient.java
@@ -0,0 +1,35 @@
+package com.elink.esua.epdc.feign;
+
+import com.elink.esua.epdc.commons.tools.constant.ServiceConstant;
+import com.elink.esua.epdc.commons.tools.utils.Result;
+import com.elink.esua.epdc.dto.comment.TopicCommentFormDTO;
+import com.elink.esua.epdc.dto.comment.TopicCommentStatementFormDTO;
+import com.elink.esua.epdc.dto.comment.TopicCommentsFormDTO;
+import com.elink.esua.epdc.dto.comment.result.EventCommentsResultDTO;
+import com.elink.esua.epdc.feign.fallback.TopicCommentFeignClientFallback;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.http.MediaType;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+
+/**
+ * 评论模块调用
+ * @Author LC
+ * @Date 2019/9/7 11:34
+ */
+@FeignClient(name = ServiceConstant.EPDC_GROUP_SERVER, fallback = TopicCommentFeignClientFallback.class)
+public interface TopicCommentFeignClient {
+
+
+ @PostMapping(value = "group/epdc-app/comment/submit", consumes = MediaType.APPLICATION_JSON_VALUE)
+ Result submit(TopicCommentFormDTO commentFormDTO);
+
+ @PostMapping(value = "group/epdc-app/comment/statement", consumes = MediaType.APPLICATION_JSON_VALUE)
+ Result statement(TopicCommentStatementFormDTO commentStatementFormDTO);
+
+ @GetMapping(value = "group/epdc-app/comment/list", consumes = MediaType.APPLICATION_JSON_VALUE)
+ Result listOfComments(TopicCommentsFormDTO formDto);
+
+
+
+}
diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/TopicFeignClient.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/TopicFeignClient.java
new file mode 100644
index 000000000..2054ceb43
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/TopicFeignClient.java
@@ -0,0 +1,102 @@
+package com.elink.esua.epdc.feign;
+
+import com.elink.esua.epdc.commons.tools.constant.ServiceConstant;
+import com.elink.esua.epdc.commons.tools.utils.Result;
+import com.elink.esua.epdc.dto.group.result.TopicAuditRecordResultDTO;
+import com.elink.esua.epdc.dto.topic.form.TopicChangeToIssueFormDTO;
+import com.elink.esua.epdc.dto.topic.form.TopicListFormDTO;
+import com.elink.esua.epdc.dto.topic.form.TopicCloseFormDTO;
+import com.elink.esua.epdc.dto.topic.form.TopicSubmitFormDTO;
+import com.elink.esua.epdc.dto.topic.result.TopicDetailResultDTO;
+import com.elink.esua.epdc.dto.topic.result.TopicListResultDTO;
+import com.elink.esua.epdc.feign.fallback.TopicFeignClientFallback;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.http.MediaType;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+
+import java.util.List;
+
+/**
+ *
+ * 社群-话题模块调用
+ *
+ * @Author:liuchuang
+ * @Date:2019/11/6 15:36
+ */
+@FeignClient(name = ServiceConstant.EPDC_GROUP_SERVER, fallback = TopicFeignClientFallback.class)
+public interface TopicFeignClient {
+
+ /**
+ *
+ * 发布话题
+ *
+ * @params [formDto]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @author liuchuang
+ * @since 2019/11/6 15:40
+ */
+ @PostMapping(value = "group/epdc-app/topic/submit", consumes = MediaType.APPLICATION_JSON_VALUE)
+ Result submit(TopicSubmitFormDTO formDto);
+
+ /**
+ *
+ * 话题详情
+ *
+ * @params [id]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @author liuchuang
+ * @since 2019/11/7 15:37
+ */
+ @GetMapping(value = "group/epdc-app/topic/detail/{id}", consumes = MediaType.APPLICATION_JSON_VALUE)
+ Result detail(@PathVariable("id") String id);
+
+ /**
+ *
+ * 话题列表
+ *
+ * @params [formDto]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result>
+ * @author liuchuang
+ * @since 2019/11/11 15:06
+ */
+ @GetMapping(value = "group/epdc-app/topic/list", consumes = MediaType.APPLICATION_JSON_VALUE)
+ Result> listOfTopic(TopicListFormDTO formDto);
+
+ /**
+ *
+ * 关闭话题
+ *
+ * @params [formDto]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @author liuchuang
+ * @since 2019/11/7 16:14
+ */
+ @PostMapping(value = "group/epdc-app/topic/close", consumes = MediaType.APPLICATION_JSON_VALUE)
+ Result close(TopicCloseFormDTO formDto);
+
+ /**
+ *
+ * 话题审核记录
+ *
+ * @params [topicId]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result>
+ * @author liuchuang
+ * @since 2019/11/8 9:41
+ */
+ @GetMapping(value = "group/epdc-app/topic/auditRecord/{topicId}", consumes = MediaType.APPLICATION_JSON_VALUE)
+ Result> auditRecord(@PathVariable("topicId") String topicId);
+
+ /**
+ *
+ * 转议题
+ *
+ * @params [formDto]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @author liuchuang
+ * @since 2019/11/8 10:39
+ */
+ @PostMapping(value = "group/epdc-app/topic/changeToIssue", consumes = MediaType.APPLICATION_JSON_VALUE)
+ Result changeToIssue(TopicChangeToIssueFormDTO formDto);
+}
diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/GroupFeignClientFallback.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/GroupFeignClientFallback.java
new file mode 100644
index 000000000..42754e74d
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/GroupFeignClientFallback.java
@@ -0,0 +1,97 @@
+package com.elink.esua.epdc.feign.fallback;
+
+import com.elink.esua.epdc.commons.tools.constant.ServiceConstant;
+import com.elink.esua.epdc.commons.tools.utils.ModuleUtils;
+import com.elink.esua.epdc.commons.tools.utils.Result;
+import com.elink.esua.epdc.dto.epdc.form.EpdcUserGroupInviteFormDTO;
+import com.elink.esua.epdc.dto.epdc.result.EpdcUserGroupInviteResultDTO;
+import com.elink.esua.epdc.dto.group.GroupSettingStateDTO;
+import com.elink.esua.epdc.dto.group.form.*;
+import com.elink.esua.epdc.dto.group.result.*;
+import com.elink.esua.epdc.feign.GroupFeignClient;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+/**
+ * @Author:liuchuang
+ * @Date:2019/10/17 14:40
+ */
+@Component
+public class GroupFeignClientFallback implements GroupFeignClient {
+
+ @Override
+ public Result createGroup(GroupCreateFormDTO formDto) {
+ return ModuleUtils.feignConError(ServiceConstant.EPDC_GROUP_SERVER, "createGroup", formDto);
+ }
+
+ @Override
+ public Result disbandGroup(GroupSettingStateDTO formDto) {
+ return ModuleUtils.feignConError(ServiceConstant.EPDC_GROUP_SERVER, "disbandGroup", formDto);
+ }
+
+ @Override
+ public Result> listGroupsOfMine(GroupsOfMineFormDTO formDto) {
+ return ModuleUtils.feignConError(ServiceConstant.EPDC_GROUP_SERVER, "listGroupsOfMine", formDto);
+ }
+
+ @Override
+ public Result> listGroupsOfRecommend(GroupsOfMineFormDTO formDto) {
+ return ModuleUtils.feignConError(ServiceConstant.EPDC_GROUP_SERVER, "listGroupsOfRecommend", formDto);
+ }
+
+ @Override
+ public Result detail(GroupDetailForMobileEndFormDTO formDto) {
+ return ModuleUtils.feignConError(ServiceConstant.EPDC_GROUP_SERVER, "detail", formDto);
+ }
+
+ @Override
+ public Result modifyIntroduction(GroupIntroductionFormDTO formDto) {
+ return ModuleUtils.feignConError(ServiceConstant.EPDC_GROUP_SERVER, "modifyIntroduction", formDto);
+ }
+
+ @Override
+ public Result modifyAvatar(GroupModifyAvatarFormDTO formDto) {
+ return ModuleUtils.feignConError(ServiceConstant.EPDC_GROUP_SERVER, "modifyAvatar", formDto);
+ }
+
+ @Override
+ public Result> listOfMember(GroupUsersFormDTO formDto) {
+ return ModuleUtils.feignConError(ServiceConstant.EPDC_GROUP_SERVER, "listOfMember", formDto);
+ }
+
+ @Override
+ public Result removeMember(GroupUserRemoveOrQuitFormDTO formDto) {
+ return ModuleUtils.feignConError(ServiceConstant.EPDC_GROUP_SERVER, "removeMember", formDto);
+ }
+
+ @Override
+ public Result quitGroup(GroupUserRemoveOrQuitFormDTO formDto) {
+ return ModuleUtils.feignConError(ServiceConstant.EPDC_GROUP_SERVER, "quitGroup", formDto);
+ }
+
+ @Override
+ public Result> getInviteList(EpdcUserGroupInviteFormDTO formDto) {
+ return ModuleUtils.feignConError(ServiceConstant.EPDC_GROUP_SERVER, "getInviteList", formDto);
+ }
+
+ @Override
+ public Result addMember(GroupAddUserFormDTO formDto) {
+ return ModuleUtils.feignConError(ServiceConstant.EPDC_GROUP_SERVER, "addMember", formDto);
+ }
+
+ @Override
+ public Result reviewApply(GroupUserReviewFormDTO formDto) {
+ return ModuleUtils.feignConError(ServiceConstant.EPDC_GROUP_SERVER, "reviewApply", formDto);
+ }
+
+ @Override
+ public Result applyForGroup(GroupApplyFormDTO formDto) {
+ return ModuleUtils.feignConError(ServiceConstant.EPDC_GROUP_SERVER, "applyForGroup", formDto);
+ }
+
+ @Override
+ public Result updateUserPartyMember(GroupUserPartyMemberFormDTO formDto) {
+ return ModuleUtils.feignConError(ServiceConstant.EPDC_GROUP_SERVER, "updateUserPartyMember", formDto);
+ }
+}
diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/TopicCommentFeignClientFallback.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/TopicCommentFeignClientFallback.java
new file mode 100644
index 000000000..f97e4efaf
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/TopicCommentFeignClientFallback.java
@@ -0,0 +1,32 @@
+package com.elink.esua.epdc.feign.fallback;
+
+import com.elink.esua.epdc.commons.tools.constant.ServiceConstant;
+import com.elink.esua.epdc.commons.tools.utils.ModuleUtils;
+import com.elink.esua.epdc.commons.tools.utils.Result;
+import com.elink.esua.epdc.dto.comment.TopicCommentFormDTO;
+import com.elink.esua.epdc.dto.comment.TopicCommentStatementFormDTO;
+import com.elink.esua.epdc.dto.comment.TopicCommentsFormDTO;
+import com.elink.esua.epdc.dto.comment.result.EventCommentsResultDTO;
+import com.elink.esua.epdc.feign.TopicCommentFeignClient;
+import org.springframework.stereotype.Component;
+
+
+@Component
+public class TopicCommentFeignClientFallback implements TopicCommentFeignClient {
+
+ @Override
+ public Result submit(TopicCommentFormDTO commentFormDTO) {
+ return ModuleUtils.feignConError(ServiceConstant.EPDC_GROUP_SERVER, "submit", commentFormDTO);
+ }
+
+ @Override
+ public Result statement(TopicCommentStatementFormDTO commentStatementFormDTO) {
+ return ModuleUtils.feignConError(ServiceConstant.EPDC_GROUP_SERVER, "statement", commentStatementFormDTO);
+ }
+
+ @Override
+ public Result listOfComments(TopicCommentsFormDTO formDto) {
+ return ModuleUtils.feignConError(ServiceConstant.EPDC_GROUP_SERVER, "listOfComments", formDto);
+ }
+
+}
diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/TopicFeignClientFallback.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/TopicFeignClientFallback.java
new file mode 100644
index 000000000..2c332b2e1
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/TopicFeignClientFallback.java
@@ -0,0 +1,55 @@
+package com.elink.esua.epdc.feign.fallback;
+
+import com.elink.esua.epdc.commons.tools.constant.ServiceConstant;
+import com.elink.esua.epdc.commons.tools.utils.ModuleUtils;
+import com.elink.esua.epdc.commons.tools.utils.Result;
+import com.elink.esua.epdc.dto.group.result.TopicAuditRecordResultDTO;
+import com.elink.esua.epdc.dto.topic.form.TopicChangeToIssueFormDTO;
+import com.elink.esua.epdc.dto.topic.form.TopicListFormDTO;
+import com.elink.esua.epdc.dto.topic.form.TopicCloseFormDTO;
+import com.elink.esua.epdc.dto.topic.form.TopicSubmitFormDTO;
+import com.elink.esua.epdc.dto.topic.result.TopicDetailResultDTO;
+import com.elink.esua.epdc.dto.topic.result.TopicListResultDTO;
+import com.elink.esua.epdc.feign.TopicFeignClient;
+import org.springframework.stereotype.Component;
+import org.springframework.web.bind.annotation.PathVariable;
+
+import java.util.List;
+
+/**
+ * @Author:liuchuang
+ * @Date:2019/11/6 15:36
+ */
+@Component
+public class TopicFeignClientFallback implements TopicFeignClient {
+
+ @Override
+ public Result submit(TopicSubmitFormDTO formDto) {
+ return ModuleUtils.feignConError(ServiceConstant.EPDC_GROUP_SERVER, "submit", formDto);
+ }
+
+ @Override
+ public Result detail(String id) {
+ return ModuleUtils.feignConError(ServiceConstant.EPDC_GROUP_SERVER, "detail", id);
+ }
+
+ @Override
+ public Result close(TopicCloseFormDTO formDto) {
+ return ModuleUtils.feignConError(ServiceConstant.EPDC_GROUP_SERVER, "close", formDto);
+ }
+
+ @Override
+ public Result> auditRecord(@PathVariable("topicId") String topicId) {
+ return ModuleUtils.feignConError(ServiceConstant.EPDC_GROUP_SERVER, "auditRecord", topicId);
+ }
+
+ @Override
+ public Result> listOfTopic(TopicListFormDTO formDto) {
+ return ModuleUtils.feignConError(ServiceConstant.EPDC_GROUP_SERVER, "listOfTopic", formDto);
+ }
+
+ @Override
+ public Result changeToIssue(TopicChangeToIssueFormDTO formDto) {
+ return ModuleUtils.feignConError(ServiceConstant.EPDC_GROUP_SERVER, "changeToIssue", formDto);
+ }
+}
diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/GroupService.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/GroupService.java
new file mode 100644
index 000000000..902678854
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/GroupService.java
@@ -0,0 +1,176 @@
+package com.elink.esua.epdc.service;
+
+import com.elink.esua.epdc.common.token.dto.TokenDto;
+import com.elink.esua.epdc.commons.tools.utils.Result;
+import com.elink.esua.epdc.dto.epdc.form.EpdcUserGroupInviteFormDTO;
+import com.elink.esua.epdc.dto.epdc.result.EpdcUserGroupInviteResultDTO;
+import com.elink.esua.epdc.dto.group.GroupSettingStateDTO;
+import com.elink.esua.epdc.dto.group.form.*;
+import com.elink.esua.epdc.dto.group.result.*;
+
+import java.util.List;
+
+/**
+ *
+ * 社群模块
+ *
+ * @Author:liuchuang
+ * @Date:2019/10/17 13:55
+ */
+public interface GroupService {
+
+ /**
+ *
+ * 创建社群
+ *
+ * @params [userDetail, formDto]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @author liuchuang
+ * @since 2019/10/17 13:58
+ */
+ Result saveGroup(TokenDto userDetail, GroupCreateFormDTO formDto);
+
+ /**
+ *
+ * 解散社群
+ *
+ * @params [formDto]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @author liuchuang
+ * @since 2019/10/21 9:51
+ */
+ Result disbandGroup(GroupSettingStateDTO dto);
+
+ /**
+ *
+ * 我的群列表
+ *
+ * @params [userDetail]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result>
+ * @author liuchuang
+ * @since 2019/10/21 17:21
+ */
+ Result> listGroupsOfMine(TokenDto userDetail);
+
+ /**
+ *
+ * 推荐群列表
+ *
+ * @params [userDetail]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result>
+ * @author liuchuang
+ * @since 2019/10/22 13:54
+ */
+ Result> listGroupsOfRecommend(TokenDto userDetail);
+
+ /**
+ *
+ * 社群详情
+ *
+ * @params [userDetail, id]
+ * @return com.elink.esua.epdc.dto.group.result.GroupDetailForMobileEndResultDTO
+ * @author liuchuang
+ * @since 2019/10/22 15:15
+ */
+ Result getGroupDetail(TokenDto userDetail, String id);
+
+ /**
+ *
+ * 修改群介绍
+ *
+ * @params [userDetail, formDto]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @author liuchuang
+ * @since 2019/10/22 15:34
+ */
+ Result modifyIntroduction(TokenDto userDetail, GroupIntroductionFormDTO formDto);
+
+ /**
+ *
+ * 修改群头像
+ *
+ * @params [userDetail, formDto]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @author liuchuang
+ * @since 2019/10/22 17:26
+ */
+ Result modifyAvatar(TokenDto userDetail, GroupModifyAvatarFormDTO formDto);
+
+ /**
+ *
+ * 社群成员列表(待审核/审核通过)
+ *
+ * @params [formDto]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @author liuchuang
+ * @since 2019/10/23 9:14
+ */
+ Result> listOfMember(GroupUsersFormDTO formDto);
+
+ /**
+ *
+ * 移除社群成员
+ *
+ * @params [userDetail, formDto]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @author liuchuang
+ * @since 2019/10/23 10:43
+ */
+ Result removeMember(TokenDto userDetail, GroupUserRemoveOrQuitFormDTO formDto);
+
+ /**
+ *
+ * 退出社群
+ *
+ * @params [userDetail, formDto]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @author liuchuang
+ * @since 2019/10/23 10:43
+ */
+ Result quitGroup(TokenDto userDetail, GroupUserRemoveOrQuitFormDTO formDto);
+
+ /**
+ *
+ * 添加成员列表
+ *
+ * @params [formDto]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result>
+ * @author liuchuang
+ * @since 2019/10/23 16:40
+ */
+ Result> listOfInviteUsers(TokenDto userDetail, EpdcUserGroupInviteFormDTO formDto);
+
+ /**
+ *
+ * 添加社群成员
+ *
+ * @params [formDto]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @author liuchuang
+ * @since 2019/11/6 9:18
+ */
+ Result saveGroupUsers(GroupAddUserFormDTO formDto);
+
+ /**
+ *
+ * 审核入群申请
+ *
+ * @params [formDto]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @author liuchuang
+ * @since 2019/11/6 13:23
+ */
+ Result updateGroupUsers(GroupUserReviewFormDTO formDto);
+
+ /**
+ *
+ * 申请入群
+ *
+ * @params [userDetail, formDto]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @author liuchuang
+ * @since 2019/11/11 14:02
+ */
+ Result applyForGroup(TokenDto userDetail, GroupApplyFormDTO formDto);
+
+}
diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/TopicCommentService.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/TopicCommentService.java
new file mode 100644
index 000000000..54802b4ae
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/TopicCommentService.java
@@ -0,0 +1,34 @@
+package com.elink.esua.epdc.service;
+
+import com.elink.esua.epdc.common.token.dto.TokenDto;
+import com.elink.esua.epdc.commons.tools.annotation.LoginUser;
+import com.elink.esua.epdc.commons.tools.utils.Result;
+import com.elink.esua.epdc.dto.comment.*;
+import com.elink.esua.epdc.dto.comment.form.CommentFormDTO;
+import com.elink.esua.epdc.dto.comment.form.EventCommentsFormDTO;
+import com.elink.esua.epdc.dto.comment.result.EventCommentsResultDTO;
+
+
+/**
+ * 移动端接口-评论模块
+ * @Author WJP
+ * @Date 2019/9/9 09:45
+ */
+public interface TopicCommentService {
+
+ /**
+ * 提交评论或回复接口
+ */
+ Result submit(@LoginUser TokenDto userDetail, TopicCommentFormDTO topicCommentFormDTO);
+
+ /**
+ * 评论(赞/踩)
+ */
+ Result statement(@LoginUser TokenDto userDetail, TopicCommentStatementFormDTO topicCommentStatementFormDTO);
+
+
+ /**
+ * 评论列表
+ */
+ Result listOfComments(TokenDto userDetail, TopicCommentsFormDTO topicCommentsFormDTO);
+}
diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/TopicService.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/TopicService.java
new file mode 100644
index 000000000..b674e6400
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/TopicService.java
@@ -0,0 +1,100 @@
+package com.elink.esua.epdc.service;
+
+import com.elink.esua.epdc.common.token.dto.TokenDto;
+import com.elink.esua.epdc.commons.tools.utils.Result;
+import com.elink.esua.epdc.dto.group.result.TopicAuditRecordResultDTO;
+import com.elink.esua.epdc.dto.topic.form.TopicListFormDTO;
+import com.elink.esua.epdc.dto.topic.form.TopicChangeToIssueFormDTO;
+import com.elink.esua.epdc.dto.topic.form.TopicCloseFormDTO;
+import com.elink.esua.epdc.dto.topic.form.TopicSubmitFormDTO;
+import com.elink.esua.epdc.dto.topic.result.TopicDetailResultDTO;
+import com.elink.esua.epdc.dto.topic.result.TopicListResultDTO;
+
+import java.util.List;
+
+/**
+ *
+ * 话题模块
+ *
+ * @Author:liuchuang
+ * @Date:2019/11/6 14:48
+ */
+public interface TopicService {
+
+ /**
+ *
+ * 发布话题
+ *
+ * @params [userDetail, formDto]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @author liuchuang
+ * @since 2019/11/6 14:51
+ */
+ Result saveTopic(TokenDto userDetail, TopicSubmitFormDTO formDto);
+
+ /**
+ *
+ * 话题详情
+ *
+ * @params [id]
+ * @return com.elink.esua.epdc.dto.topic.result.TopicDetailResultDTO
+ * @author liuchuang
+ * @since 2019/11/7 15:34
+ */
+ Result getTopicDetailById(String id);
+
+ /**
+ *
+ * 关闭话题
+ *
+ * @params [userDetail, formDto]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @author liuchuang
+ * @since 2019/11/7 16:11
+ */
+ Result closeTopic(TokenDto userDetail, TopicCloseFormDTO formDto);
+
+ /**
+ *
+ * 话题审核记录
+ *
+ * @params [topicId]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result>
+ * @author liuchuang
+ * @since 2019/11/8 9:43
+ */
+ Result> listOfTopicAuditRecord(String topicId);
+
+ /**
+ *
+ * 话题列表
+ *
+ * @params [userDetail, formDto]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result>
+ * @author liuchuang
+ * @since 2019/11/11 15:05
+ */
+ Result> listOfTopic(TokenDto userDetail, TopicListFormDTO formDto);
+
+ /**
+ *
+ * 我的话题列表
+ *
+ * @params [userDetail, formDto]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result>
+ * @author liuchuang
+ * @since 2019/11/11 15:50
+ */
+ Result> listTopicOfMine(TokenDto userDetail, TopicListFormDTO formDto);
+
+ /**
+ *
+ * 转议题
+ *
+ * @params [userDetail, formDto]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @author liuchuang
+ * @since 2019/11/8 10:37
+ */
+ Result changeToIssue(TokenDto userDetail, TopicChangeToIssueFormDTO formDto);
+}
diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppUserServiceImpl.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppUserServiceImpl.java
index 59defbbbf..0b2f1c825 100644
--- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppUserServiceImpl.java
+++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppUserServiceImpl.java
@@ -20,11 +20,13 @@ import com.elink.esua.epdc.dto.epdc.result.EpdcUserGridResultDTO;
import com.elink.esua.epdc.dto.epdc.result.EpdcUserRegisterInfoResultDTO;
import com.elink.esua.epdc.dto.epdc.result.EpdcUserInfoResultDTO;
import com.elink.esua.epdc.dto.form.*;
+import com.elink.esua.epdc.dto.group.form.GroupUserPartyMemberFormDTO;
import com.elink.esua.epdc.dto.result.EpdcAppRegisterCallbackDTO;
import com.elink.esua.epdc.dto.result.EpdcAppAuthorizationDTO;
import com.elink.esua.epdc.dto.result.EpdcCompleteUserInfoDTO;
import com.elink.esua.epdc.enums.*;
import com.elink.esua.epdc.feign.AdminFeignClient;
+import com.elink.esua.epdc.feign.GroupFeignClient;
import com.elink.esua.epdc.feign.UserFeignClient;
import com.elink.esua.epdc.jwt.JwtTokenProperties;
import com.elink.esua.epdc.jwt.JwtTokenUtils;
@@ -80,6 +82,9 @@ public class AppUserServiceImpl implements AppUserService {
@Autowired
private RedisUtils redisUtils;
+ @Autowired
+ private GroupFeignClient groupFeignClient;
+
private static String USER_FACE = "https://epdc.elinkchina.com.cn/esua-epdc/static/default/default_user_face.png";
@@ -705,6 +710,12 @@ public class AppUserServiceImpl implements AppUserService {
tokenDto.setPartyFlag(user.getPartyFlag());
EpdcAppAuthorizationDTO authorizationDto = this.packageEpdcAppAuthorization(tokenDto, userGrid.getGrid(), userDto.getState());
+ // 更新社群用户党员标识
+ GroupUserPartyMemberFormDTO formDto = new GroupUserPartyMemberFormDTO();
+ formDto.setUserId(user.getId());
+ formDto.setPartyMember(user.getPartyFlag());
+ groupFeignClient.updateUserPartyMember(formDto);
+
return new Result().ok(authorizationDto);
}
@@ -739,9 +750,6 @@ public class AppUserServiceImpl implements AppUserService {
if (YesOrNoEnum.YES.value().equals(dto.getPartyFlag())) {
dto.setState(AppUserStatesEnum.STATE_INFORMATION_PASSED.value());
dto.setSex(IdentityNoUtils.getSex(identityNo));
- dto.setNickname(
- road.concat("-").concat(dto.getRealName().substring(NumConstant.ZERO, NumConstant.ONE))
- .concat(NumConstant.ZERO_STR.equals(dto.getSex()) ? "女士" : "先生"));
dto.setBirthday(DateUtils.parse(IdentityNoUtils.getBirthday(identityNo), DateUtils.DATE_PATTERN));
} else {
dto.setState(AppUserStatesEnum.STATE_COMPLETED_INFORMATION_PENDING_REVIEW.value());
diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/GroupServiceImpl.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/GroupServiceImpl.java
new file mode 100644
index 000000000..40fe3c679
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/GroupServiceImpl.java
@@ -0,0 +1,186 @@
+package com.elink.esua.epdc.service.impl;
+
+import com.elink.esua.epdc.common.token.dto.TokenDto;
+import com.elink.esua.epdc.commons.tools.constant.NumConstant;
+import com.elink.esua.epdc.commons.tools.utils.Result;
+import com.elink.esua.epdc.dto.CompleteDeptDTO;
+import com.elink.esua.epdc.dto.epdc.form.EpdcUserGroupInviteFormDTO;
+import com.elink.esua.epdc.dto.epdc.result.EpdcUserGroupInviteResultDTO;
+import com.elink.esua.epdc.dto.group.GroupSettingStateDTO;
+import com.elink.esua.epdc.dto.enums.GroupStateEnum;
+import com.elink.esua.epdc.dto.enums.GroupUserStateEnum;
+import com.elink.esua.epdc.dto.group.form.*;
+import com.elink.esua.epdc.dto.group.result.*;
+import com.elink.esua.epdc.feign.AdminFeignClient;
+import com.elink.esua.epdc.feign.GroupFeignClient;
+import com.elink.esua.epdc.service.GroupService;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ *
+ * 社群模块
+ *
+ * @Author:liuchuang
+ * @Date:2019/10/17 13:55
+ */
+@Service
+public class GroupServiceImpl implements GroupService {
+
+ @Autowired
+ private AdminFeignClient adminFeignClient;
+
+ @Autowired
+ private GroupFeignClient groupFeignClient;
+
+ @Override
+ public Result saveGroup(TokenDto userDetail, GroupCreateFormDTO formDto) {
+ if (null == userDetail) {
+ return new Result().error("获取用户信息失败");
+ }
+ // 获取该网格所有上级机构
+ Result deptDTOResult = adminFeignClient.getCompleteDept(userDetail.getGridId());
+ CompleteDeptDTO deptDTO = deptDTOResult.getData();
+ formDto.setArea(deptDTO.getDistrict());
+ formDto.setAreaId(deptDTO.getDistrictId());
+ formDto.setStreet(deptDTO.getStreet());
+ formDto.setStreetId(deptDTO.getStreetId());
+ formDto.setCommunity(deptDTO.getCommunity());
+ formDto.setCommunityId(deptDTO.getCommunityId());
+ formDto.setGrid(deptDTO.getGrid());
+ formDto.setGridId(deptDTO.getGridId());
+ formDto.setGroupCategory(NumConstant.ONE_STR);
+ // 群主信息
+ GroupUserFormDTO groupUserFormDTO = new GroupUserFormDTO();
+ groupUserFormDTO.setUserId(userDetail.getUserId());
+ groupUserFormDTO.setNickname(userDetail.getNickname());
+ groupUserFormDTO.setUserAvatar(userDetail.getFaceImg());
+ groupUserFormDTO.setMobile(userDetail.getMobile());
+ // 判断当前用户是否为党员
+ if (!NumConstant.ONE_STR.equals(userDetail.getPartyFlag())) {
+ return new Result().error("您当前身份不是党员,不能创建社群");
+ }
+ groupUserFormDTO.setPartyMember(userDetail.getPartyFlag());
+ groupUserFormDTO.setLordFlag(NumConstant.ONE_STR);
+ groupUserFormDTO.setState(GroupUserStateEnum.GROUP_USER_STATE_EXAMINATION_PASSED.getValue());
+ formDto.setGroupUserFormDTO(groupUserFormDTO);
+
+ return groupFeignClient.createGroup(formDto);
+ }
+
+ @Override
+ public Result disbandGroup(GroupSettingStateDTO dto) {
+ dto.setState(GroupStateEnum.GROUP_STATE_DISBANDED.getValue());
+ return groupFeignClient.disbandGroup(dto);
+ }
+
+ @Override
+ public Result> listGroupsOfMine(TokenDto userDetail) {
+ if (null == userDetail) {
+ return new Result().error("获取用户信息失败");
+ }
+ GroupsOfMineFormDTO formDto = new GroupsOfMineFormDTO();
+ formDto.setUserId(userDetail.getUserId());
+ formDto.setGridId(userDetail.getGridId());
+ return groupFeignClient.listGroupsOfMine(formDto);
+ }
+
+ @Override
+ public Result> listGroupsOfRecommend(TokenDto userDetail) {
+ if (null == userDetail) {
+ return new Result().error("获取用户信息失败");
+ }
+ GroupsOfMineFormDTO formDto = new GroupsOfMineFormDTO();
+ formDto.setUserId(userDetail.getUserId());
+ formDto.setGridId(userDetail.getGridId());
+ return groupFeignClient.listGroupsOfRecommend(formDto);
+ }
+
+ @Override
+ public Result getGroupDetail(TokenDto userDetail, String id) {
+ if (null == userDetail) {
+ return new Result().error("获取用户信息失败");
+ }
+ GroupDetailForMobileEndFormDTO formDto = new GroupDetailForMobileEndFormDTO();
+ formDto.setId(id);
+ formDto.setUserId(userDetail.getUserId());
+ return groupFeignClient.detail(formDto);
+ }
+
+ @Override
+ public Result modifyIntroduction(TokenDto userDetail, GroupIntroductionFormDTO formDto) {
+ if (null == userDetail) {
+ return new Result().error("获取用户信息失败");
+ }
+ formDto.setUserId(userDetail.getUserId());
+ return groupFeignClient.modifyIntroduction(formDto);
+ }
+
+ @Override
+ public Result modifyAvatar(TokenDto userDetail, GroupModifyAvatarFormDTO formDto) {
+ if (null == userDetail) {
+ return new Result().error("获取用户信息失败");
+ }
+ formDto.setUserId(userDetail.getUserId());
+ return groupFeignClient.modifyAvatar(formDto);
+ }
+
+ @Override
+ public Result> listOfMember(GroupUsersFormDTO formDto) {
+ return groupFeignClient.listOfMember(formDto);
+ }
+
+ @Override
+ public Result removeMember(TokenDto userDetail, GroupUserRemoveOrQuitFormDTO formDto) {
+ if (null == userDetail) {
+ return new Result().error("获取用户信息失败");
+ }
+ formDto.setOperatorId(userDetail.getUserId());
+ return groupFeignClient.removeMember(formDto);
+ }
+
+ @Override
+ public Result quitGroup(TokenDto userDetail, GroupUserRemoveOrQuitFormDTO formDto) {
+ if (null == userDetail) {
+ return new Result().error("获取用户信息失败");
+ }
+ formDto.setOperatorId(userDetail.getUserId());
+ formDto.setUserId(userDetail.getUserId());
+ return groupFeignClient.quitGroup(formDto);
+ }
+
+ @Override
+ public Result> listOfInviteUsers(TokenDto userDetail, EpdcUserGroupInviteFormDTO formDto) {
+ if (null == userDetail) {
+ return new Result().error("获取用户信息失败");
+ }
+ formDto.setGridId(userDetail.getGridId());
+ return groupFeignClient.getInviteList(formDto);
+ }
+
+ @Override
+ public Result saveGroupUsers(GroupAddUserFormDTO formDto) {
+ return groupFeignClient.addMember(formDto);
+ }
+
+ @Override
+ public Result updateGroupUsers(GroupUserReviewFormDTO formDto) {
+ return groupFeignClient.reviewApply(formDto);
+ }
+
+ @Override
+ public Result applyForGroup(TokenDto userDetail, GroupApplyFormDTO formDto) {
+ if (null == userDetail) {
+ return new Result().error("获取用户信息失败");
+ }
+ formDto.setUserId(userDetail.getUserId());
+ formDto.setNickname(userDetail.getNickname());
+ formDto.setUserAvatar(userDetail.getFaceImg());
+ formDto.setMobile(userDetail.getMobile());
+ formDto.setPartyMember(userDetail.getPartyFlag());
+ return groupFeignClient.applyForGroup(formDto);
+ }
+}
diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/TopicCommentServiceImpl.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/TopicCommentServiceImpl.java
new file mode 100644
index 000000000..c878f58c5
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/TopicCommentServiceImpl.java
@@ -0,0 +1,62 @@
+package com.elink.esua.epdc.service.impl;
+
+
+import com.elink.esua.epdc.async.WxMaSecCheckTask;
+import com.elink.esua.epdc.common.token.dto.TokenDto;
+import com.elink.esua.epdc.commons.tools.utils.Result;
+import com.elink.esua.epdc.dto.comment.TopicCommentFormDTO;
+import com.elink.esua.epdc.dto.comment.TopicCommentStatementFormDTO;
+import com.elink.esua.epdc.dto.comment.TopicCommentsFormDTO;
+import com.elink.esua.epdc.dto.comment.result.EventCommentsResultDTO;
+import com.elink.esua.epdc.feign.TopicCommentFeignClient;
+import com.elink.esua.epdc.service.TopicCommentService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.redis.listener.Topic;
+import org.springframework.stereotype.Service;
+
+/**
+ * 移动端接口-评论模块
+ * @Author WJP
+ * @Date 2019/9/9 09:45
+ */
+@Service
+public class TopicCommentServiceImpl implements TopicCommentService {
+
+ @Autowired
+ private TopicCommentFeignClient topicCommentFeignClient;
+
+ @Autowired
+ private WxMaSecCheckTask wxMaSecCheckTask;
+
+ @Override
+ public Result submit(TokenDto userDetail, TopicCommentFormDTO topicCommentFormDTO) {
+ if (null == userDetail) {
+ return new Result().error("获取用户信息失败");
+ }
+ // 上传内容安全检查
+ wxMaSecCheckTask.checkMessage(topicCommentFormDTO.getContent());
+ topicCommentFormDTO.setUserId(userDetail.getUserId());
+ topicCommentFormDTO.setUserName(userDetail.getNickname());
+ topicCommentFormDTO.setUserFace(userDetail.getFaceImg());
+ return topicCommentFeignClient.submit(topicCommentFormDTO);
+ }
+
+ @Override
+ public Result statement(TokenDto userDetail, TopicCommentStatementFormDTO topicCommentStatementFormDTO) {
+ if (null == userDetail) {
+ return new Result().error("获取用户信息失败");
+ }
+ topicCommentStatementFormDTO.setUseId(userDetail.getUserId());
+ topicCommentStatementFormDTO.setUserName(userDetail.getNickname());
+ return topicCommentFeignClient.statement(topicCommentStatementFormDTO);
+ }
+
+ @Override
+ public Result listOfComments(TokenDto userDetail, TopicCommentsFormDTO topicCommentsFormDTO) {
+ if (null == userDetail) {
+ return new Result().error("获取用户信息失败");
+ }
+ topicCommentsFormDTO.setUserId(userDetail.getUserId());
+ return topicCommentFeignClient.listOfComments(topicCommentsFormDTO);
+ }
+}
diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/TopicServiceImpl.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/TopicServiceImpl.java
new file mode 100644
index 000000000..86bf60786
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/TopicServiceImpl.java
@@ -0,0 +1,111 @@
+package com.elink.esua.epdc.service.impl;
+
+import com.elink.esua.epdc.common.token.dto.TokenDto;
+import com.elink.esua.epdc.commons.tools.utils.Result;
+import com.elink.esua.epdc.dto.CompleteDeptDTO;
+import com.elink.esua.epdc.dto.enums.TopicStateEnum;
+import com.elink.esua.epdc.dto.group.result.TopicAuditRecordResultDTO;
+import com.elink.esua.epdc.dto.topic.form.TopicChangeToIssueFormDTO;
+import com.elink.esua.epdc.dto.topic.form.TopicListFormDTO;
+import com.elink.esua.epdc.dto.topic.form.TopicCloseFormDTO;
+import com.elink.esua.epdc.dto.topic.form.TopicSubmitFormDTO;
+import com.elink.esua.epdc.dto.topic.result.TopicDetailResultDTO;
+import com.elink.esua.epdc.dto.topic.result.TopicListResultDTO;
+import com.elink.esua.epdc.feign.AdminFeignClient;
+import com.elink.esua.epdc.feign.TopicFeignClient;
+import com.elink.esua.epdc.service.TopicService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ *
+ * 话题模块
+ *
+ * @Author:liuchuang
+ * @Date:2019/11/6 14:48
+ */
+@Service
+public class TopicServiceImpl implements TopicService {
+
+ @Autowired
+ private AdminFeignClient adminFeignClient;
+
+ @Autowired
+ private TopicFeignClient topicFeignClient;
+
+ @Override
+ public Result saveTopic(TokenDto userDetail, TopicSubmitFormDTO formDto) {
+ if (null == userDetail) {
+ return new Result().error("获取用户信息失败");
+ }
+
+ // 获取该网格所有上级机构
+ Result deptDTOResult = adminFeignClient.getCompleteDept(userDetail.getGridId());
+ CompleteDeptDTO deptDTO = deptDTOResult.getData();
+ formDto.setArea(deptDTO.getDistrict());
+ formDto.setAreaId(deptDTO.getDistrictId());
+ formDto.setStreet(deptDTO.getStreet());
+ formDto.setStreetId(deptDTO.getStreetId());
+ formDto.setCommunity(deptDTO.getCommunity());
+ formDto.setCommunityId(deptDTO.getCommunityId());
+ formDto.setGrid(deptDTO.getGrid());
+ formDto.setGridId(deptDTO.getGridId());
+
+ formDto.setUserId(userDetail.getUserId());
+ formDto.setUserFace(userDetail.getFaceImg());
+ formDto.setNickname(userDetail.getNickname());
+ formDto.setPartyMember(userDetail.getPartyFlag());
+ formDto.setMobile(userDetail.getMobile());
+ formDto.setState(TopicStateEnum.TOPIC_STATE_IN_CONVERSATION.getValue());
+
+ return topicFeignClient.submit(formDto);
+ }
+
+ @Override
+ public Result getTopicDetailById(String id) {
+ return topicFeignClient.detail(id);
+ }
+
+ @Override
+ public Result closeTopic(TokenDto userDetail, TopicCloseFormDTO formDto) {
+ if (null == userDetail) {
+ return new Result().error("获取用户信息失败");
+ }
+ formDto.setUserId(userDetail.getUserId());
+ return topicFeignClient.close(formDto);
+ }
+
+ @Override
+ public Result> listOfTopicAuditRecord(String topicId) {
+ return topicFeignClient.auditRecord(topicId);
+ }
+
+ @Override
+ public Result> listOfTopic(TokenDto userDetail, TopicListFormDTO formDto) {
+ if (null == userDetail) {
+ return new Result().error("获取用户信息失败");
+ }
+ formDto.setGridId(userDetail.getGridId());
+ return topicFeignClient.listOfTopic(formDto);
+ }
+
+ @Override
+ public Result> listTopicOfMine(TokenDto userDetail, TopicListFormDTO formDto) {
+ if (null == userDetail) {
+ return new Result().error("获取用户信息失败");
+ }
+ formDto.setUserId(userDetail.getUserId());
+ return topicFeignClient.listOfTopic(formDto);
+ }
+
+ @Override
+ public Result changeToIssue(TokenDto userDetail, TopicChangeToIssueFormDTO formDto) {
+ if (null == userDetail) {
+ return new Result().error("获取用户信息失败");
+ }
+ formDto.setUserId(userDetail.getUserId());
+ return topicFeignClient.changeToIssue(formDto);
+ }
+}
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/comment/EpdcCommentsAndAttitudeFromTopicFormDTO.java b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/comment/EpdcCommentsAndAttitudeFromTopicFormDTO.java
new file mode 100644
index 000000000..65221ea4f
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/comment/EpdcCommentsAndAttitudeFromTopicFormDTO.java
@@ -0,0 +1,28 @@
+package com.elink.esua.epdc.dto.comment;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ *
+ * 话题评论、评论支持反对数据
+ *
+ * @Author:liuchuang
+ * @Date:2019/11/12 14:17
+ */
+@Data
+public class EpdcCommentsAndAttitudeFromTopicFormDTO implements Serializable {
+ private static final long serialVersionUID = 8779307899428155354L;
+
+ /**
+ * 评论
+ */
+ private List comments;
+
+ /**
+ * 表态
+ */
+ private List attitudes;
+}
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/events/form/EpdcEventSubmitFormDTO.java b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/events/form/EpdcEventSubmitFormDTO.java
index 9ff25f7d6..05585d995 100644
--- a/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/events/form/EpdcEventSubmitFormDTO.java
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/events/form/EpdcEventSubmitFormDTO.java
@@ -46,7 +46,7 @@ public class EpdcEventSubmitFormDTO implements Serializable {
/**
* 区ID
*/
- @NotBlank(message = "用户区ID不能为空")
+ @NotNull(message = "用户区ID不能为空")
private Long areaId;
/**
* 街道
@@ -55,7 +55,7 @@ public class EpdcEventSubmitFormDTO implements Serializable {
/**
* 街道ID
*/
- @NotBlank(message = "用户街道ID不能为空")
+ @NotNull(message = "用户街道ID不能为空")
private Long streetId;
/**
* 社区
@@ -64,7 +64,7 @@ public class EpdcEventSubmitFormDTO implements Serializable {
/**
* 社区ID
*/
- @NotBlank(message = "用户社区ID不能为空")
+ @NotNull(message = "用户社区ID不能为空")
private Long communityId;
/**
* 网格
@@ -73,7 +73,7 @@ public class EpdcEventSubmitFormDTO implements Serializable {
/**
* 网格ID
*/
- @NotBlank(message = "用户网格ID不能为空")
+ @NotNull(message = "用户网格ID不能为空")
private Long gridId;
/**
* 用户ID
@@ -100,4 +100,14 @@ public class EpdcEventSubmitFormDTO implements Serializable {
* 手机号
*/
private String mobile;
+
+ /**
+ * 社群ID
+ */
+ private String groupId;
+
+ /**
+ * 社群名称
+ */
+ private String groupName;
}
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/interfacelog/InterfaceLogDTO.java b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/interfacelog/InterfaceLogDTO.java
new file mode 100644
index 000000000..0889cd6df
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/interfacelog/InterfaceLogDTO.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.elink.esua.epdc.dto.interfacelog;
+
+import java.io.Serializable;
+import java.util.Date;
+import lombok.Data;
+
+
+/**
+ * 接口日志表 接口日志表
+ *
+ * @author qu qu@elink-cn.com
+ * @since v1.0.0 2019-11-14
+ */
+@Data
+public class InterfaceLogDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 主键
+ */
+ private String id;
+
+ /**
+ * 引用ID
+ */
+ private String referenceId;
+
+ /**
+ * 业务类型
+ */
+ private String businessType;
+
+ /**
+ * 调用接口名称
+ */
+ private String interfaceName;
+
+ /**
+ * 调用是否成功 0-调用失败,1-调用成功
+ */
+ private String successFlag;
+
+ /**
+ * 调用消息体
+ */
+ private String callMsgBody;
+
+ /**
+ * 调用返回消息体
+ */
+ private String returnMsgBody;
+
+ /**
+ * 创建人
+ */
+ private String createdBy;
+
+ /**
+ * 创建时间
+ */
+ private Date createdTime;
+
+ /**
+ * 更新人
+ */
+ private String updatedBy;
+
+ /**
+ * 更新时间
+ */
+ private Date updatedTime;
+
+ /**
+ * 删除标记
+ */
+ private String delFlag;
+
+}
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/issue/IssueDTO.java b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/issue/IssueDTO.java
index 82b333663..63ef376fe 100644
--- a/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/issue/IssueDTO.java
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/issue/IssueDTO.java
@@ -21,7 +21,6 @@ import java.io.Serializable;
import java.util.Date;
import lombok.Data;
-import java.math.BigDecimal;
/**
* 议题表 议题表
@@ -129,11 +128,6 @@ public class IssueDTO implements Serializable {
*/
private Double issueLongitude;
- /**
- * 友邻社区ID
- */
- private String friendlyCommunityId;
-
/**
* 议题状态 0-审核通过,2-已关闭,4-已转项目
*/
@@ -169,4 +163,19 @@ public class IssueDTO implements Serializable {
*/
private Date updatedTime;
+ /**
+ * 社群ID
+ */
+ private String groupId;
+
+ /**
+ * 社群名称
+ */
+ private String groupName;
+
+ /**
+ * 话题ID
+ */
+ private String topicId;
+
}
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/item/ItemDTO.java b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/item/ItemDTO.java
index b10f649d8..f6d452fad 100755
--- a/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/item/ItemDTO.java
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/item/ItemDTO.java
@@ -19,6 +19,7 @@ package com.elink.esua.epdc.dto.item;
import java.io.Serializable;
import java.util.Date;
+
import lombok.Data;
import java.math.BigDecimal;
@@ -37,32 +38,32 @@ public class ItemDTO implements Serializable {
/**
* ID
*/
- private String id;
+ private String id;
/**
* 事件ID
*/
- private String eventId;
+ private String eventId;
/**
* 议题ID
*/
- private String issueId;
+ private String issueId;
/**
* 用户ID
*/
- private String userId;
+ private String userId;
/**
* 用户昵称
*/
- private String nickName;
+ private String nickName;
/**
* 用户头像
*/
- private String userFace;
+ private String userFace;
/**
* 手机号
*/
@@ -71,116 +72,127 @@ public class ItemDTO implements Serializable {
/**
* 议题内容
*/
- private String issueContent;
+ private String issueContent;
/**
* 区
*/
- private String area;
+ private String area;
/**
* 区ID
*/
- private Long areaId;
+ private Long areaId;
/**
* 街道
*/
- private String street;
+ private String street;
/**
* 街道ID
*/
- private Long streetId;
+ private Long streetId;
/**
* 社区
*/
- private String community;
+ private String community;
/**
* 社区ID
*/
- private Long communityId;
+ private Long communityId;
/**
* 网格
*/
- private String grid;
+ private String grid;
/**
* 网格ID
*/
- private Long gridId;
+ private Long gridId;
/**
* 议题位置地址
*/
- private String issueAddress;
+ private String issueAddress;
/**
* 议题分类ID
*/
- private String issueCategoryId;
+ private String issueCategoryId;
/**
* 议题位置纬度
*/
- private Double issusLatitude;
+ private Double issusLatitude;
/**
* 议题位置经度
*/
- private Double issueLongitude;
-
- /**
- * 友邻社区ID
- */
- private String friendlyCommunityId;
+ private Double issueLongitude;
/**
* 评价打分
*/
- private Integer issueScore;
+ private Integer issueScore;
/**
* 项目状态 0-待网格长处理,5-待社区处理,10-待街道党建办处理,15-待街道处理,20-待区直部门党建办处理,25-待区直部门处理,30-处理,35-关闭,40-结束议题
*/
- private Integer itemState;
+ private Integer itemState;
/**
* 删除标识 0:未删除,1:已删除
*/
- private String delFlag;
+ private String delFlag;
/**
* 乐观锁
*/
- private Integer revision;
+ private Integer revision;
/**
* 创建人
*/
- private String createdBy;
+ private String createdBy;
/**
* 创建时间
*/
- private Date createdTime;
+ private Date createdTime;
/**
* 更新人
*/
- private String updatedBy;
+ private String updatedBy;
/**
* 更新时间
*/
- private Date updatedTime;
+ private Date updatedTime;
+
+
+ /**
+ * 社群ID
+ */
+ private String groupId;
+
+ /**
+ * 社群名称
+ */
+ private String groupName;
/**
* 最后一次处理时间
*/
private Date lastHandleTime;
+ /**
+ * 话题ID
+ */
+ private String topicId;
+
}
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/log/DeptRespondLogDTO.java b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/log/DeptRespondLogDTO.java
new file mode 100644
index 000000000..82a1edd0c
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/log/DeptRespondLogDTO.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.elink.esua.epdc.dto.log;
+
+import java.io.Serializable;
+import java.util.Date;
+import lombok.Data;
+
+
+/**
+ * 部门响应记录
+ *
+ * @author qu qu@elink-cn.com
+ * @since v1.0.0 2019-10-22
+ */
+@Data
+public class DeptRespondLogDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * ID
+ */
+ private String id;
+
+ /**
+ * 引用ID
+ */
+ private String referenceId;
+
+ /**
+ * 引用类型 issue或item
+ */
+ private String referenceType;
+
+ /**
+ * 响应部门的id(被呼叫的部门即审核部门)
+ */
+ private Long respondDeptId;
+
+ /**
+ * 响应时间即审核时间
+ */
+ private Date respondTime;
+
+ /**
+ * 响应类型,参考枚举类DeptRespondTypeEnum
+ */
+ private Integer respondType;
+
+ /**
+ * 删除标识 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/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/rule/DeptKpiConfigDTO.java b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/rule/DeptKpiConfigDTO.java
new file mode 100644
index 000000000..5212e70e1
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/rule/DeptKpiConfigDTO.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.elink.esua.epdc.dto.rule;
+
+import java.io.Serializable;
+import java.util.Date;
+import lombok.Data;
+
+
+/**
+ * 考核规则
+ *
+ * @author qu qu@elink-cn.com
+ * @since v1.0.0 2019-10-21
+ */
+@Data
+public class DeptKpiConfigDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * ID
+ */
+ private String id;
+
+ /**
+ * 绩效指标编码
+ */
+ private String kpiItemCode;
+
+ /**
+ * 绩效指标值
+ */
+ private Integer kpiItemValue;
+
+ /**
+ * 绩效指标描述
+ */
+ private String kpiItemDesc;
+
+ /**
+ * 删除标识 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/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/time/DeptRespondTimeConfigDTO.java b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/time/DeptRespondTimeConfigDTO.java
new file mode 100644
index 000000000..7440d1cb8
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/time/DeptRespondTimeConfigDTO.java
@@ -0,0 +1,127 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.elink.esua.epdc.dto.time;
+
+import java.io.Serializable;
+import java.util.Date;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+/**
+ * 绩效考核时间规则表
+ *
+ * @author qu qu@elink-cn.com
+ * @since v1.0.0 2019-10-23
+ */
+@Data
+public class DeptRespondTimeConfigDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * ID
+ */
+ private String id;
+
+ /**
+ * 议题或项目类别ID(不可重复)
+ */
+ private String categoryId;
+
+ /**
+ * 类别名称
+ */
+ private String categoryName;
+
+ /**
+ * 网格长在多少小时内响应算是有效响应
+ */
+ private Integer gridValidRespLimitHour;
+
+ /**
+ * 网格长在多少小时内关闭算是有效关闭
+ */
+ private Integer gridValidCloseLimitHour;
+
+ /**
+ * 社区在多少小时内响应算是有效响应
+ */
+ private Integer commValidRespLimitHour;
+
+ /**
+ * 街道在多少小时内响应算是有效响应
+ */
+ private Integer streetValidRespLimitHour;
+
+ /**
+ * 区直在多少小时内响应算是有效响应
+ */
+ private Integer districtValidRespLimitHour;
+
+ /**
+ * 超过多少小时响应算是无效响应。此值应大于各部门的有效响应值。若响应发生在有效响应与无效响应之间,为超时响应。
+ */
+ private Integer invalidRespLimitHour;
+
+ /**
+ * 有效响应系数
+ */
+ private BigDecimal validRespCoefficient;
+
+ /**
+ * 超时响应系数
+ */
+ private BigDecimal overtimeRespCoefficient;
+
+ /**
+ * 无效响应系数
+ */
+ private BigDecimal invalidRespCoefficient;
+
+ /**
+ * 删除标识 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/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/enums/DeptKpiConfigEnum.java b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/enums/DeptKpiConfigEnum.java
new file mode 100644
index 000000000..d27fb7316
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/enums/DeptKpiConfigEnum.java
@@ -0,0 +1,58 @@
+package com.elink.esua.epdc.enums;
+
+/**
+ * 部门绩效考核项枚举
+ *
+ * @author work@yujt.net.cn
+ * @date 2019/10/21 14:28
+ */
+public enum DeptKpiConfigEnum {
+
+ /**
+ * 选用单词:Grid(网格) Work(工作) Score(得分) Percent(百分比)
+ */
+ G_WSP("G_WSP", "履行抓基层党建工作职责得分占比(%)"),
+ /**
+ * 选用单词:People(人们) Satisfied(满意) Percent(百分比)
+ */
+ P_SP("P_SP", "群众满意度得分占比(%)"),
+ /**
+ * 选用单词:Grid(网格) Respond(响应)
+ */
+ G_R("G_R", "群众反应问题网格响应率得分"),
+ /**
+ * 选用单词:Grid(网格) Satisfied(满意)
+ */
+ G_S("G_S", "群众反应问题网格满意率得分"),
+ /**
+ * 选用单词:District(地区) Street(街道) Respond(响应)
+ */
+ DS_R("DS_R", "(区直/街道)网格呼叫事项响应率得分"),
+ /**
+ * 选用单词:District(地区) Street(街道) Complete(完成)
+ */
+ DS_C("DS_C", "(区直/街道)网格呼叫事项办结率得分"),
+ /**
+ * 选用单词:District(地区) Street(街道) Satisfied(满意)
+ */
+ DS_S("DS_S", "(区直/街道)网格工作评议得分");
+
+
+ private String code;
+
+ private String desc;
+
+
+ DeptKpiConfigEnum(String code, String desc) {
+ this.code = code;
+ this.desc = desc;
+ }
+
+ public String getCode() {
+ return code;
+ }
+
+ public String getDesc() {
+ return desc;
+ }
+}
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/enums/DeptRespondTypeEnum.java b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/enums/DeptRespondTypeEnum.java
new file mode 100644
index 000000000..e6569d443
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/enums/DeptRespondTypeEnum.java
@@ -0,0 +1,88 @@
+package com.elink.esua.epdc.enums;
+
+
+import com.elink.esua.epdc.constant.EventIssueItemState;
+
+/**
+ * 部门响应类型枚举
+ *
+ * @author work@yujt.net.cn
+ * @date 2019/10/21 09:52
+ */
+public enum DeptRespondTypeEnum {
+
+ /**
+ * 项目:处理
+ */
+ ITEM_I_HANDLE(ItemHandleCategoryEnum.HANDLE_I_HANDLE.getValue(), ItemHandleCategoryEnum.HANDLE_I_HANDLE.getName()),
+ /**
+ * 项目:流转协助
+ */
+ ITEM_CIRCULATION_ASSISTANCE(ItemHandleCategoryEnum.HANDLE_CIRCULATION_ASSISTANCE.getValue(), ItemHandleCategoryEnum.HANDLE_CIRCULATION_ASSISTANCE.getName()),
+ /**
+ * 项目:关闭
+ */
+ ITEM_HANDLED_CLOSE(ItemHandleCategoryEnum.HANDLE_CLOSE.getValue(), ItemHandleCategoryEnum.HANDLE_CLOSE.getName()),
+ /**
+ * 项目:结案
+ */
+ ITEM_HANDLED_END(ItemHandleCategoryEnum.HANDLE_CLOSING_CASE.getValue(), ItemHandleCategoryEnum.HANDLE_CLOSING_CASE.getName()),
+
+
+ //-------------------------------------
+
+ /**
+ * 事件-驳回
+ */
+ EVENT_REVIEW_REJECT(EventIssueItemState.EVENT_REVIEW_REJECT,"事件驳回"),
+
+ //-----------------------------------------------------------
+ /**
+ * 议题:审核通过 成为议题
+ */
+ ISSUE_HANDLED_PASS(EventIssueItemState.ISSUE_HANDLED_PASS, "审核通过"),
+ /**
+ * 议题:议题-已转项目
+ */
+ ISSUE_CHANGE_TO_ITEM(EventIssueItemState.ISSUE_CHANGE_TO_ITEM, "审核通过"),
+ /**
+ * 议题:反馈
+ */
+ ISSUE_HANDLED_FEEDBACK(EventIssueItemState.ISSUE_HANDLED_FEEDBACK, "反馈"),
+ /**
+ * 议题:关闭
+ */
+ ISSUE_CLOSED(EventIssueItemState.ISSUE_CLOSED, "关闭"),
+
+
+ //-------------------------------------
+
+
+ /**
+ * 被抢占响应(还未响应时,议题或项目已被关闭或结案)
+ */
+ RESPONSE_BE_ROBBED(-1, "被抢占响应"),
+
+ /**
+ * 超时响应
+ */
+ RESPONSE_TIMED_OUT(-2, "超时响应");
+
+ private int value;
+ private String desc;
+
+ DeptRespondTypeEnum(int value, String desc) {
+ this.value = value;
+ this.desc = desc;
+ }
+
+
+ public int getValue() {
+ return value;
+ }
+
+ public String getDesc() {
+ return desc;
+ }
+
+}
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/enums/ReferenceTypeEnum.java b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/enums/ReferenceTypeEnum.java
new file mode 100644
index 000000000..6921bcdd3
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/enums/ReferenceTypeEnum.java
@@ -0,0 +1,35 @@
+package com.elink.esua.epdc.enums;
+
+/**
+ * 议题或项目枚举
+ *
+ * @author work@yujt.net.cn
+ * @date 2019/10/21 10:30
+ */
+public enum ReferenceTypeEnum {
+
+ /**
+ * 议题
+ */
+ ISSUE("issue"),
+
+ /**
+ * 项目
+ */
+ ITEM("item"),
+
+ /**
+ * 事件
+ */
+ EVENT("event");
+
+ private String name;
+
+ ReferenceTypeEnum(String name) {
+ this.name = name;
+ }
+
+ public String getName() {
+ return name;
+ }
+}
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/async/DeptRespondTask.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/async/DeptRespondTask.java
new file mode 100644
index 000000000..7dd9776e8
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/async/DeptRespondTask.java
@@ -0,0 +1,138 @@
+package com.elink.esua.epdc.modules.async;
+
+import com.elink.esua.epdc.commons.tools.security.user.SecurityUser;
+import com.elink.esua.epdc.commons.tools.security.user.UserDetail;
+import com.elink.esua.epdc.commons.tools.utils.ConvertUtils;
+import com.elink.esua.epdc.constant.EventIssueItemState;
+import com.elink.esua.epdc.constant.EventsNoticeConstant;
+import com.elink.esua.epdc.dto.events.form.EpdcEventsReviewFormDTO;
+import com.elink.esua.epdc.dto.issue.form.IssueWaitHandleSubmitFormDTO;
+import com.elink.esua.epdc.dto.item.form.ItemHandleSubmitFormDTO;
+import com.elink.esua.epdc.dto.log.DeptRespondLogDTO;
+import com.elink.esua.epdc.enums.DeptRespondTypeEnum;
+import com.elink.esua.epdc.enums.ItemHandleCategoryEnum;
+import com.elink.esua.epdc.enums.ReferenceTypeEnum;
+import com.elink.esua.epdc.modules.issue.service.IssueService;
+import com.elink.esua.epdc.modules.log.entity.DeptRespondLogEntity;
+import com.elink.esua.epdc.modules.log.service.DeptRespondLogService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Async;
+import org.springframework.stereotype.Component;
+
+import java.util.Date;
+
+/**
+ * @author: qushutong
+ * @Date: 2019/10/22 14:22
+ * @Description: 响应log日志
+ */
+@Component
+public class DeptRespondTask {
+
+ @Autowired
+ private DeptRespondLogService deptRespondLogService;
+
+ /***
+ * 转议题插入部门响应记录 4-事件-审核通过 2-事件-驳回
+ * @param dto
+ * @return void
+ * @author qushutong
+ * @date 2019/10/22 11:06
+ */
+ @Async
+ public void saveEventDeptRespond(EpdcEventsReviewFormDTO dto) {
+ //待审核 则不插入
+ if (EventIssueItemState.EVENT_PENDING_REVIEW == dto.getEventState()) {
+ return;
+ }
+ //组装插入数据
+ DeptRespondLogEntity entity = new DeptRespondLogEntity();
+ UserDetail user = SecurityUser.getUser();
+ entity.setReferenceId(dto.getId());
+ entity.setReferenceType(ReferenceTypeEnum.EVENT.getName());
+ entity.setRespondDeptId(user.getDeptId());
+ entity.setRespondTime(new Date());
+ //审核通过
+ if (EventIssueItemState.EVENT_REVIEW_PASS == dto.getEventState()) {
+ entity.setRespondType(DeptRespondTypeEnum.ISSUE_HANDLED_PASS.getValue());
+ }//驳回
+ else if (EventIssueItemState.EVENT_REVIEW_REJECT == dto.getEventState()) {
+ entity.setRespondType(DeptRespondTypeEnum.EVENT_REVIEW_REJECT.getValue());
+ }
+ DeptRespondLogDTO deptRespondLogDTO = ConvertUtils.sourceToTarget(entity, DeptRespondLogDTO.class);
+ deptRespondLogService.save(deptRespondLogDTO);
+ }
+
+ /***
+ * 议事处理审核/关闭 1-反馈,2-关闭,4-已转项目 不是这三种状态不作响应
+ * @param dto
+ * @return void
+ * @author qushutong
+ * @date 2019/10/22 14:51
+ */
+ @Async
+ public void saveIssueDeptRespond(IssueWaitHandleSubmitFormDTO dto) {
+ //1-反馈,2-关闭,4-已转项目 不是这三种状态不作响应
+ if (EventIssueItemState.ISSUE_CLOSED != dto.getState() || EventIssueItemState.ISSUE_HANDLED_FEEDBACK != dto.getState() || EventIssueItemState.ISSUE_CHANGE_TO_ITEM != dto.getState()) {
+ return;
+ }
+ //组装插入数据
+ DeptRespondLogEntity entity = new DeptRespondLogEntity();
+ UserDetail user = SecurityUser.getUser();
+ entity.setReferenceId(dto.getId());
+ entity.setReferenceType(ReferenceTypeEnum.ISSUE.getName());
+ entity.setRespondDeptId(user.getDeptId());
+ entity.setRespondTime(new Date());
+ //议题关闭 1-反馈,2-关闭,4-已转项目
+ if (EventIssueItemState.ISSUE_CLOSED == dto.getState()) {
+ entity.setRespondType(DeptRespondTypeEnum.ISSUE_CLOSED.getValue());
+ }
+ //议题审核
+ else if (EventIssueItemState.ISSUE_HANDLED_FEEDBACK == dto.getState()) {
+ entity.setRespondType(DeptRespondTypeEnum.ISSUE_HANDLED_FEEDBACK.getValue());
+ }
+ //已转项目
+ else if (EventIssueItemState.ISSUE_CHANGE_TO_ITEM == dto.getState()) {
+ entity.setRespondType(DeptRespondTypeEnum.ISSUE_CHANGE_TO_ITEM.getValue());
+ }
+ DeptRespondLogDTO deptRespondLogDTO = ConvertUtils.sourceToTarget(entity, DeptRespondLogDTO.class);
+ deptRespondLogService.save(deptRespondLogDTO);
+ }
+
+
+ /***
+ * 项目 处理方式:0 处理,1 流转协助,5 关闭,10 结案
+ * @param dto
+ * @return void
+ * @author qushutong
+ * @date 2019/10/22 16:03
+ */
+ @Async
+ public void saveItemDeptRespond(ItemHandleSubmitFormDTO dto) {
+ //组装插入数据
+ DeptRespondLogEntity entity = new DeptRespondLogEntity();
+ UserDetail user = SecurityUser.getUser();
+ entity.setReferenceId(dto.getId());
+ entity.setReferenceType(ReferenceTypeEnum.ITEM.getName());
+ entity.setRespondDeptId(user.getDeptId());
+ entity.setRespondTime(new Date());
+ //流转
+ if (ItemHandleCategoryEnum.HANDLE_CIRCULATION_ASSISTANCE.getValue() == dto.getHandleCategory()) {
+ entity.setRespondType(DeptRespondTypeEnum.ITEM_CIRCULATION_ASSISTANCE.getValue());
+ }
+ //关闭
+ else if (ItemHandleCategoryEnum.HANDLE_CLOSE.getValue() == dto.getHandleCategory()) {
+ entity.setRespondType(DeptRespondTypeEnum.ITEM_HANDLED_CLOSE.getValue());
+ }
+ //结案
+ else if (ItemHandleCategoryEnum.HANDLE_CLOSING_CASE.getValue() == dto.getHandleCategory()) {
+ entity.setRespondType(DeptRespondTypeEnum.ITEM_HANDLED_END.getValue());
+ }
+ //处理
+ else if (ItemHandleCategoryEnum.HANDLE_CLOSING_CASE.getValue() == dto.getHandleCategory()) {
+ entity.setRespondType(DeptRespondTypeEnum.ITEM_I_HANDLE.getValue());
+ }
+ DeptRespondLogDTO deptRespondLogDTO = ConvertUtils.sourceToTarget(entity, DeptRespondLogDTO.class);
+ deptRespondLogService.save(deptRespondLogDTO);
+ }
+}
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/comment/controller/AppEventCommentController.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/comment/controller/AppEventCommentController.java
index d960b1330..cc13e34c0 100755
--- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/comment/controller/AppEventCommentController.java
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/comment/controller/AppEventCommentController.java
@@ -40,7 +40,7 @@ public class AppEventCommentController {
@Autowired
private EventCommentUserAttitudeService eventCommentUserAttitudeService;
- /**
+ /**AppTopicCommentController
* 提交评论或回复接口
* @param commentFormDTO
* @return
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/comment/controller/EventCommentController.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/comment/controller/EventCommentController.java
index c2da1982d..47be820d3 100755
--- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/comment/controller/EventCommentController.java
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/comment/controller/EventCommentController.java
@@ -25,6 +25,7 @@ import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils;
import com.elink.esua.epdc.commons.tools.validator.group.AddGroup;
import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup;
import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup;
+import com.elink.esua.epdc.dto.comment.EpdcCommentsAndAttitudeFromTopicFormDTO;
import com.elink.esua.epdc.dto.comment.EventCommentDTO;
import com.elink.esua.epdc.modules.comment.excel.EventCommentExcel;
import com.elink.esua.epdc.modules.comment.service.EventCommentService;
@@ -91,4 +92,18 @@ public class EventCommentController {
ExcelUtils.exportExcelToTarget(response, null, list, EventCommentExcel.class);
}
+ /**
+ *
+ * 接收话题评论和评论表态
+ *
+ * @params [formDto]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @author liuchuang
+ * @since 2019/11/12 14:25
+ */
+ @PostMapping("receive")
+ public Result receiveTopicCommentAndAttitude(@RequestBody EpdcCommentsAndAttitudeFromTopicFormDTO formDto){
+ return eventCommentService.saveCommentAndAttitudeFromTopic(formDto);
+ }
+
}
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/comment/service/EventCommentService.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/comment/service/EventCommentService.java
index 7cc635474..da75da155 100755
--- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/comment/service/EventCommentService.java
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/comment/service/EventCommentService.java
@@ -20,6 +20,7 @@ package com.elink.esua.epdc.modules.comment.service;
import com.elink.esua.epdc.commons.mybatis.service.BaseService;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.Result;
+import com.elink.esua.epdc.dto.comment.EpdcCommentsAndAttitudeFromTopicFormDTO;
import com.elink.esua.epdc.dto.comment.EventCommentDTO;
import com.elink.esua.epdc.dto.comment.form.CommentFormDTO;
import com.elink.esua.epdc.dto.comment.form.EventCommentsFormDTO;
@@ -148,4 +149,15 @@ public interface EventCommentService extends BaseService {
* @Date: 2019/9/9 19:05
*/
IssueHotCommentResultDTO getHotComment(String eventId);
+
+ /**
+ *
+ * 接收话题评论和评论表态
+ *
+ * @params [formDto]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @author liuchuang
+ * @since 2019/11/12 14:26
+ */
+ Result saveCommentAndAttitudeFromTopic(EpdcCommentsAndAttitudeFromTopicFormDTO formDto);
}
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/comment/service/impl/EventCommentServiceImpl.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/comment/service/impl/EventCommentServiceImpl.java
index 272425aa0..2702cd908 100755
--- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/comment/service/impl/EventCommentServiceImpl.java
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/comment/service/impl/EventCommentServiceImpl.java
@@ -26,7 +26,9 @@ import com.elink.esua.epdc.commons.tools.utils.ConvertUtils;
import com.elink.esua.epdc.commons.tools.constant.FieldConstant;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.constant.EventsNoticeConstant;
+import com.elink.esua.epdc.dto.comment.EpdcCommentsAndAttitudeFromTopicFormDTO;
import com.elink.esua.epdc.dto.comment.EventCommentDTO;
+import com.elink.esua.epdc.dto.comment.EventCommentUserAttitudeDTO;
import com.elink.esua.epdc.dto.comment.form.CommentFormDTO;
import com.elink.esua.epdc.dto.comment.form.EventCommentsFormDTO;
import com.elink.esua.epdc.dto.comment.result.EventCommentsResultDTO;
@@ -36,7 +38,9 @@ import com.elink.esua.epdc.dto.issue.result.IssueHotCommentResultDTO;
import com.elink.esua.epdc.modules.async.NewsTask;
import com.elink.esua.epdc.modules.comment.dao.EventCommentDao;
import com.elink.esua.epdc.modules.comment.entity.EventCommentEntity;
+import com.elink.esua.epdc.modules.comment.entity.EventCommentUserAttitudeEntity;
import com.elink.esua.epdc.modules.comment.service.EventCommentService;
+import com.elink.esua.epdc.modules.comment.service.EventCommentUserAttitudeService;
import com.elink.esua.epdc.modules.events.service.EpdcEventsService;
import com.elink.esua.epdc.modules.issue.entity.IssueEntity;
import com.elink.esua.epdc.modules.issue.service.IssueService;
@@ -49,6 +53,7 @@ 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;
@@ -76,6 +81,9 @@ public class EventCommentServiceImpl extends BaseServiceImpl page(Map params) {
IPage page = baseDao.selectPage(
@@ -289,4 +297,28 @@ public class EventCommentServiceImpl extends BaseServiceImpl commentEntities = new ArrayList<>(formDto.getComments().size());
+ for (EventCommentDTO dto:
+ formDto.getComments()) {
+ EventCommentEntity entity = ConvertUtils.sourceToTarget(dto, EventCommentEntity.class);
+ commentEntities.add(entity);
+ }
+ this.insertBatch(commentEntities);
+
+ // 保存表态
+ List attitudeEntities = new ArrayList<>(formDto.getAttitudes().size());
+ for (EventCommentUserAttitudeDTO dto:
+ formDto.getAttitudes()) {
+ EventCommentUserAttitudeEntity entity = ConvertUtils.sourceToTarget(dto, EventCommentUserAttitudeEntity.class);
+ attitudeEntities.add(entity);
+ }
+ eventCommentUserAttitudeService.insertBatch(attitudeEntities);
+
+ return new Result();
+ }
}
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/dao/EpdcEventsDao.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/dao/EpdcEventsDao.java
index acf532d2c..baeed4a1b 100644
--- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/dao/EpdcEventsDao.java
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/dao/EpdcEventsDao.java
@@ -77,7 +77,7 @@ public interface EpdcEventsDao extends BaseDao {
List selectListOfCommentsByEventId(Map params);
/**
- * 修改评论数+1
+ * 评论数+1
*/
void updateCommentNum(String id);
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/entity/EpdcEventsEntity.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/entity/EpdcEventsEntity.java
index 83a4c583a..2453b2ddc 100644
--- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/entity/EpdcEventsEntity.java
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/entity/EpdcEventsEntity.java
@@ -114,10 +114,6 @@ public class EpdcEventsEntity extends BaseEpdcEntity {
* 议题位置经度
*/
private Double issueLongitude;
- /**
- * 友邻社区ID
- */
- private String friendlyCommunityId;
/**
* 事件状态 0-待审核,2-驳回,4-审核通过
*/
@@ -143,4 +139,19 @@ public class EpdcEventsEntity extends BaseEpdcEntity {
*/
private Integer browseNum;
+ /**
+ * 社群ID
+ */
+ private String groupId;
+
+ /**
+ * 社群名称
+ */
+ private String groupName;
+
+ /**
+ * 话题ID
+ */
+ private String topicId;
+
}
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/excel/EpdcEventsExcel.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/excel/EpdcEventsExcel.java
index 37e56cbb0..f05e88e29 100644
--- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/excel/EpdcEventsExcel.java
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/excel/EpdcEventsExcel.java
@@ -61,8 +61,6 @@ public class EpdcEventsExcel {
private BigDecimal issusLatitude;
@Excel(name = "议题位置经度")
private BigDecimal issueLongitude;
- @Excel(name = "友邻社区ID")
- private String friendlyCommunityId;
@Excel(name = "事件状态 0-待审核,2-驳回,4-审核通过")
private Integer eventState;
@Excel(name = "删除标识 0:未删除,1:已删除")
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/impl/EpdcEventsServiceImpl.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/impl/EpdcEventsServiceImpl.java
index b97407fab..3c53d730a 100644
--- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/impl/EpdcEventsServiceImpl.java
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/impl/EpdcEventsServiceImpl.java
@@ -21,6 +21,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl;
import com.elink.esua.epdc.commons.tools.constant.FieldConstant;
+import com.elink.esua.epdc.commons.tools.constant.NumConstant;
import com.elink.esua.epdc.commons.tools.constant.OrganizationTypeConstant;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.security.user.SecurityUser;
@@ -38,12 +39,14 @@ import com.elink.esua.epdc.dto.events.*;
import com.elink.esua.epdc.dto.events.form.EpdcEventSubmitFormDTO;
import com.elink.esua.epdc.dto.events.form.EpdcEventsReviewFormDTO;
import com.elink.esua.epdc.dto.events.result.EventAppDetailResultDTO;
+import com.elink.esua.epdc.modules.async.DeptRespondTask;
import com.elink.esua.epdc.modules.async.NewsTask;
import com.elink.esua.epdc.modules.events.dao.EpdcEventsDao;
import com.elink.esua.epdc.modules.events.entity.EpdcEventsEntity;
import com.elink.esua.epdc.modules.events.service.EpdcEventsService;
import com.elink.esua.epdc.modules.events.service.ImgService;
import com.elink.esua.epdc.modules.feign.AdminFeignClient;
+import com.elink.esua.epdc.modules.feign.GroupFeignClient;
import com.elink.esua.epdc.modules.issue.entity.IssueEntity;
import com.elink.esua.epdc.modules.issue.entity.IssueHandleEntity;
import com.elink.esua.epdc.modules.issue.service.IssueHandleService;
@@ -54,6 +57,9 @@ 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;
import java.util.*;
/**
@@ -77,12 +83,18 @@ public class EpdcEventsServiceImpl extends BaseServiceImpl listOfPendingReviewEvents(Map params) {
IPage page = getPage(params);
@@ -97,9 +109,9 @@ public class EpdcEventsServiceImpl extends BaseServiceImpl getWrapper(Map params){
- String id = (String)params.get(FieldConstant.ID_HUMP);
- String issueCategoryId = (String)params.get("issueCategoryId");
+ private QueryWrapper getWrapper(Map params) {
+ String id = (String) params.get(FieldConstant.ID_HUMP);
+ String issueCategoryId = (String) params.get("issueCategoryId");
QueryWrapper wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
wrapper.eq(StringUtils.isNotBlank(issueCategoryId), "ISSUE_CATEGORY_ID", issueCategoryId);
@@ -174,7 +186,7 @@ public class EpdcEventsServiceImpl extends BaseServiceImpl callbackMap = new HashMap<>();
+ callbackMap.put("topicId", topicId);
+ callbackMap.put("processingOpinions", dto.getAdvice());
+ callbackMap.put("eventId", dto.getId());
+ if (dto.getEventState().equals(EventIssueItemState.EVENT_REVIEW_REJECT)) {
+ callbackMap.put("state", NumConstant.ZERO_STR);
+ } else if (dto.getEventState().equals(EventIssueItemState.EVENT_REVIEW_PASS)) {
+ callbackMap.put("state", "10");
+ }
+
+ groupFeignClient.reviewCallback(callbackMap);
+ }
+
@Override
public PageData listOfRejectEvents(Map params) {
IPage page = getPage(params);
@@ -231,7 +271,7 @@ public class EpdcEventsServiceImpl extends BaseServiceImpl callbackMap);
+
+ /**
+ *
+ * 更新话题状态
+ *
+ * @params [formDto]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @author liuchuang
+ * @since 2019/11/11 13:31
+ */
+ @PostMapping(value = "group/topic/modifyState", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
+ Result modifyTopicState(Map map);
+
+}
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/feign/fallback/GroupFeignClientFallback.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/feign/fallback/GroupFeignClientFallback.java
new file mode 100644
index 000000000..8ec25bf14
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/feign/fallback/GroupFeignClientFallback.java
@@ -0,0 +1,27 @@
+package com.elink.esua.epdc.modules.feign.fallback;
+
+import com.elink.esua.epdc.commons.tools.constant.ServiceConstant;
+import com.elink.esua.epdc.commons.tools.utils.ModuleUtils;
+import com.elink.esua.epdc.commons.tools.utils.Result;
+import com.elink.esua.epdc.modules.feign.GroupFeignClient;
+import org.springframework.stereotype.Component;
+
+import java.util.Map;
+
+/**
+ * @Author:liuchuang
+ * @Date:2019/11/11 10:31
+ */
+@Component
+public class GroupFeignClientFallback implements GroupFeignClient {
+
+ @Override
+ public Result reviewCallback(Map callbackMap) {
+ return ModuleUtils.feignConError(ServiceConstant.EPDC_GROUP_SERVER, "reviewCallback", callbackMap);
+ }
+
+ @Override
+ public Result modifyTopicState(Map map) {
+ return ModuleUtils.feignConError(ServiceConstant.EPDC_GROUP_SERVER, "modifyTopicState", map);
+ }
+}
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/interfacelog/controller/InterfaceLogController.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/interfacelog/controller/InterfaceLogController.java
new file mode 100644
index 000000000..bb61055b2
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/interfacelog/controller/InterfaceLogController.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.elink.esua.epdc.modules.interfacelog.controller;
+
+import com.elink.esua.epdc.commons.tools.page.PageData;
+import com.elink.esua.epdc.commons.tools.utils.ExcelUtils;
+import com.elink.esua.epdc.commons.tools.utils.Result;
+import com.elink.esua.epdc.commons.tools.validator.AssertUtils;
+import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils;
+import com.elink.esua.epdc.commons.tools.validator.group.AddGroup;
+import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup;
+import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup;
+import com.elink.esua.epdc.dto.interfacelog.InterfaceLogDTO;
+import com.elink.esua.epdc.modules.interfacelog.excel.InterfaceLogExcel;
+import com.elink.esua.epdc.modules.interfacelog.service.InterfaceLogService;
+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 qu qu@elink-cn.com
+ * @since v1.0.0 2019-11-14
+ */
+@RestController
+@RequestMapping("interfacelog")
+public class InterfaceLogController {
+
+ @Autowired
+ private InterfaceLogService interfaceLogService;
+
+ @GetMapping("page")
+ public Result> page(@RequestParam Map params){
+ PageData page = interfaceLogService.listInterfaceLog(params);
+ return new Result>().ok(page);
+ }
+
+ @GetMapping("{id}")
+ public Result get(@PathVariable("id") String id){
+ InterfaceLogDTO data = interfaceLogService.get(id);
+ return new Result().ok(data);
+ }
+
+ @PostMapping
+ public Result save(@RequestBody InterfaceLogDTO dto){
+ //效验数据
+ ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
+ interfaceLogService.save(dto);
+ return new Result();
+ }
+
+ @PutMapping
+ public Result update(@RequestBody InterfaceLogDTO dto){
+ //效验数据
+ ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
+ interfaceLogService.update(dto);
+ return new Result();
+ }
+
+ @DeleteMapping
+ public Result delete(@RequestBody String[] ids){
+ //效验数据
+ AssertUtils.isArrayEmpty(ids, "id");
+ interfaceLogService.delete(ids);
+ return new Result();
+ }
+
+ @GetMapping("export")
+ public void export(@RequestParam Map params, HttpServletResponse response) throws Exception {
+ List list = interfaceLogService.list(params);
+ ExcelUtils.exportExcelToTarget(response, null, list, InterfaceLogExcel.class);
+ }
+
+}
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/interfacelog/dao/InterfaceLogDao.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/interfacelog/dao/InterfaceLogDao.java
new file mode 100644
index 000000000..6cf6b38ca
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/interfacelog/dao/InterfaceLogDao.java
@@ -0,0 +1,42 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.elink.esua.epdc.modules.interfacelog.dao;
+
+import com.elink.esua.epdc.commons.mybatis.dao.BaseDao;
+import com.elink.esua.epdc.dto.interfacelog.InterfaceLogDTO;
+import com.elink.esua.epdc.modules.interfacelog.entity.InterfaceLogEntity;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 接口日志表 接口日志表
+ *
+ * @author qu qu@elink-cn.com
+ * @since v1.0.0 2019-11-14
+ */
+@Mapper
+public interface InterfaceLogDao extends BaseDao {
+ /**
+ *
+ * @param params
+ * @return 获取接口日志列表
+ */
+ List listInterfaceLog(Map params);
+}
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/interfacelog/entity/InterfaceLogEntity.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/interfacelog/entity/InterfaceLogEntity.java
new file mode 100644
index 000000000..a6c14a871
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/interfacelog/entity/InterfaceLogEntity.java
@@ -0,0 +1,69 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.elink.esua.epdc.modules.interfacelog.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 接口日志表 接口日志表
+ *
+ * @author qu qu@elink-cn.com
+ * @since v1.0.0 2019-11-14
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("epdc_interface_log")
+public class InterfaceLogEntity extends BaseEpdcEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 引用ID
+ */
+ private String referenceId;
+
+ /**
+ * 业务类型
+ */
+ private String businessType;
+
+ /**
+ * 调用接口名称
+ */
+ private String interfaceName;
+
+ /**
+ * 调用是否成功 0-调用失败,1-调用成功
+ */
+ private String successFlag;
+
+ /**
+ * 调用消息体
+ */
+ private String callMsgBody;
+
+ /**
+ * 调用返回消息体
+ */
+ private String returnMsgBody;
+
+}
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/interfacelog/excel/InterfaceLogExcel.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/interfacelog/excel/InterfaceLogExcel.java
new file mode 100644
index 000000000..7026148f9
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/interfacelog/excel/InterfaceLogExcel.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.elink.esua.epdc.modules.interfacelog.excel;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * 接口日志表 接口日志表
+ *
+ * @author qu qu@elink-cn.com
+ * @since v1.0.0 2019-11-14
+ */
+@Data
+public class InterfaceLogExcel {
+
+ @Excel(name = "主键")
+ private String id;
+
+ @Excel(name = "引用ID")
+ private String referenceId;
+
+ @Excel(name = "业务类型")
+ private String businessType;
+
+ @Excel(name = "调用接口名称")
+ private String interfaceName;
+
+ @Excel(name = "调用是否成功 0-调用失败,1-调用成功")
+ private String successFlag;
+
+ @Excel(name = "调用消息体")
+ private String callMsgBody;
+
+ @Excel(name = "调用返回消息体")
+ private String returnMsgBody;
+
+ @Excel(name = "创建人")
+ private String createdBy;
+
+ @Excel(name = "创建时间")
+ private Date createdTime;
+
+ @Excel(name = "更新人")
+ private String updatedBy;
+
+ @Excel(name = "更新时间")
+ private Date updatedTime;
+
+ @Excel(name = "删除标记")
+ private String delFlag;
+
+
+}
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/interfacelog/redis/InterfaceLogRedis.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/interfacelog/redis/InterfaceLogRedis.java
new file mode 100644
index 000000000..01e7e7a1d
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/interfacelog/redis/InterfaceLogRedis.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.elink.esua.epdc.modules.interfacelog.redis;
+
+import com.elink.esua.epdc.commons.tools.redis.RedisUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+/**
+ * 接口日志表 接口日志表
+ *
+ * @author qu qu@elink-cn.com
+ * @since v1.0.0 2019-11-14
+ */
+@Component
+public class InterfaceLogRedis {
+ @Autowired
+ private RedisUtils redisUtils;
+
+ public void delete(Object[] ids) {
+
+ }
+
+ public void set(){
+
+ }
+
+ public String get(String id){
+ return null;
+ }
+
+}
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/interfacelog/service/InterfaceLogService.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/interfacelog/service/InterfaceLogService.java
new file mode 100644
index 000000000..4b7aed2d4
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/interfacelog/service/InterfaceLogService.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.elink.esua.epdc.modules.interfacelog.service;
+
+import com.elink.esua.epdc.commons.mybatis.service.BaseService;
+import com.elink.esua.epdc.commons.tools.page.PageData;
+import com.elink.esua.epdc.dto.interfacelog.InterfaceLogDTO;
+import com.elink.esua.epdc.modules.interfacelog.entity.InterfaceLogEntity;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 接口日志表 接口日志表
+ *
+ * @author qu qu@elink-cn.com
+ * @since v1.0.0 2019-11-14
+ */
+public interface InterfaceLogService extends BaseService {
+
+ /**
+ * 默认分页
+ *
+ * @param params
+ * @return PageData
+ * @author generator
+ * @date 2019-11-14
+ */
+ PageData listInterfaceLog(Map params);
+
+ /**
+ * 默认查询
+ *
+ * @param params
+ * @return java.util.List
+ * @author generator
+ * @date 2019-11-14
+ */
+ List list(Map params);
+
+ /**
+ * 单条查询
+ *
+ * @param id
+ * @return InterfaceLogDTO
+ * @author generator
+ * @date 2019-11-14
+ */
+ InterfaceLogDTO get(String id);
+
+ /**
+ * 默认保存
+ *
+ * @param dto
+ * @return void
+ * @author generator
+ * @date 2019-11-14
+ */
+ void save(InterfaceLogDTO dto);
+
+ /**
+ * 默认更新
+ *
+ * @param dto
+ * @return void
+ * @author generator
+ * @date 2019-11-14
+ */
+ void update(InterfaceLogDTO dto);
+
+ /**
+ * 批量删除
+ *
+ * @param ids
+ * @return void
+ * @author generator
+ * @date 2019-11-14
+ */
+ void delete(String[] ids);
+}
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/interfacelog/service/impl/InterfaceLogServiceImpl.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/interfacelog/service/impl/InterfaceLogServiceImpl.java
new file mode 100644
index 000000000..2b2b86bf6
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/interfacelog/service/impl/InterfaceLogServiceImpl.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.elink.esua.epdc.modules.interfacelog.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl;
+import com.elink.esua.epdc.commons.tools.constant.FieldConstant;
+import com.elink.esua.epdc.commons.tools.page.PageData;
+import com.elink.esua.epdc.commons.tools.utils.ConvertUtils;
+import com.elink.esua.epdc.dto.interfacelog.InterfaceLogDTO;
+import com.elink.esua.epdc.modules.interfacelog.dao.InterfaceLogDao;
+import com.elink.esua.epdc.modules.interfacelog.entity.InterfaceLogEntity;
+import com.elink.esua.epdc.modules.interfacelog.redis.InterfaceLogRedis;
+import com.elink.esua.epdc.modules.interfacelog.service.InterfaceLogService;
+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 qu qu@elink-cn.com
+ * @since v1.0.0 2019-11-14
+ */
+@Service
+public class InterfaceLogServiceImpl extends BaseServiceImpl implements InterfaceLogService {
+
+ @Autowired
+ private InterfaceLogRedis interfaceLogRedis;
+
+ @Override
+ public PageData listInterfaceLog(Map params) {
+ IPage page = getPage(params);
+ List list = baseDao.listInterfaceLog(params);
+ return new PageData<>(list, page.getTotal());
+ }
+
+ @Override
+ public List list(Map params) {
+ List entityList = baseDao.selectList(getWrapper(params));
+
+ return ConvertUtils.sourceToTarget(entityList, InterfaceLogDTO.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 InterfaceLogDTO get(String id) {
+ InterfaceLogEntity entity = baseDao.selectById(id);
+ return ConvertUtils.sourceToTarget(entity, InterfaceLogDTO.class);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void save(InterfaceLogDTO dto) {
+ InterfaceLogEntity entity = ConvertUtils.sourceToTarget(dto, InterfaceLogEntity.class);
+ insert(entity);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void update(InterfaceLogDTO dto) {
+ InterfaceLogEntity entity = ConvertUtils.sourceToTarget(dto, InterfaceLogEntity.class);
+ updateById(entity);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void delete(String[] ids) {
+ // 逻辑删除(@TableLogic 注解)
+ baseDao.deleteBatchIds(Arrays.asList(ids));
+ }
+}
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/issue/entity/IssueEntity.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/issue/entity/IssueEntity.java
index 624462745..6385c71d3 100644
--- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/issue/entity/IssueEntity.java
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/issue/entity/IssueEntity.java
@@ -139,14 +139,24 @@ public class IssueEntity extends BaseEpdcEntity {
*/
private Double issueLongitude;
- /**
- * 友邻社区ID
- */
- private String friendlyCommunityId;
-
/**
* 议题状态 0-审核通过,2-已关闭,4-已转项目
*/
private Integer issueState;
+ /**
+ * 社群ID
+ */
+ private String groupId;
+
+ /**
+ * 社群名称
+ */
+ private String groupName;
+
+ /**
+ * 话题ID
+ */
+ private String topicId;
+
}
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/issue/excel/IssueExcel.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/issue/excel/IssueExcel.java
index da5d09cc7..3d0817900 100644
--- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/issue/excel/IssueExcel.java
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/issue/excel/IssueExcel.java
@@ -86,9 +86,6 @@ public class IssueExcel {
@Excel(name = "议题位置经度")
private BigDecimal issueLongitude;
- @Excel(name = "友邻社区ID")
- private String friendlyCommunityId;
-
@Excel(name = "议题状态 0-审核通过,2-已关闭,4-已转项目")
private Integer issueState;
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/issue/service/impl/IssueServiceImpl.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/issue/service/impl/IssueServiceImpl.java
index 03e0a8d61..e37d8c502 100644
--- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/issue/service/impl/IssueServiceImpl.java
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/issue/service/impl/IssueServiceImpl.java
@@ -39,9 +39,11 @@ import com.elink.esua.epdc.dto.events.result.EventAppDetailResultDTO;
import com.elink.esua.epdc.dto.issue.*;
import com.elink.esua.epdc.dto.issue.form.*;
import com.elink.esua.epdc.dto.issue.result.*;
+import com.elink.esua.epdc.modules.async.DeptRespondTask;
import com.elink.esua.epdc.modules.async.NewsTask;
import com.elink.esua.epdc.modules.comment.service.EventCommentService;
import com.elink.esua.epdc.modules.events.service.EpdcEventsService;
+import com.elink.esua.epdc.modules.feign.GroupFeignClient;
import com.elink.esua.epdc.modules.issue.dao.IssueDao;
import com.elink.esua.epdc.modules.issue.entity.IssueEntity;
import com.elink.esua.epdc.modules.issue.entity.IssueHandleEntity;
@@ -58,10 +60,7 @@ 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.Date;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
/**
* 议题表 议题表
@@ -93,6 +92,13 @@ public class IssueServiceImpl extends BaseServiceImpl imp
@Autowired
private NewsTask newsTask;
+ @Autowired
+ private DeptRespondTask deptRespondTask;
+
+ @Autowired
+ private GroupFeignClient groupFeignClient;
+
+
@Override
public PageData listOfIssues(Map params) {
IPage page = getPage(params);
@@ -107,8 +113,8 @@ public class IssueServiceImpl extends BaseServiceImpl imp
return ConvertUtils.sourceToTarget(entityList, IssueDTO.class);
}
- private QueryWrapper getWrapper(Map params){
- String id = (String)params.get(FieldConstant.ID_HUMP);
+ private QueryWrapper getWrapper(Map params) {
+ String id = (String) params.get(FieldConstant.ID_HUMP);
QueryWrapper wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
@@ -171,7 +177,7 @@ public class IssueServiceImpl extends BaseServiceImpl imp
informationFormDTO.setType(EventsNoticeConstant.NOTICE_TYPE_PROGRESS_NOTICE);
informationFormDTO.setBusinessType(EventsNoticeConstant.NOTICE_BUSINESS_TYPE_ITEM);
informationFormDTO.setBusinessId(entity.getId());
- informationFormDTO.setRelBusinessContent("议题:"+entity.getIssueContent());
+ informationFormDTO.setRelBusinessContent("议题:" + entity.getIssueContent());
// 反馈、关闭
if (EventIssueItemState.ISSUE_HANDLED_FEEDBACK == dto.getState() || EventIssueItemState.ISSUE_CLOSED == dto.getState()) {
@@ -208,11 +214,20 @@ public class IssueServiceImpl extends BaseServiceImpl imp
informationFormDTO.setBusinessId(itemEntity.getId());
+ // 事件来源-友邻社群
+ if (StringUtils.isNotEmpty(entity.getGroupId())) {
+ // 更新话题状态
+ Map map = new HashMap<>();
+ map.put("topicId", entity.getTopicId());
+ map.put("state", "15");
+ groupFeignClient.modifyTopicState(map);
+ }
// 发送菜单消息-待处理项目
itemService.sendItemHandleMenuNotice(itemEntity.getGridId(), null);
}
}
-
+ //插入绩效部门响应日志表
+ deptRespondTask.saveIssueDeptRespond(dto);
// 发送消息
newsTask.insertUserInformation(informationFormDTO);
// 发送菜单消息-议题待处理
@@ -264,7 +279,7 @@ public class IssueServiceImpl extends BaseServiceImpl imp
formDto.setSomeMonthsAgo(DateUtils.addDateMonths(new Date(), -6));
List data = baseDao.selectListOfNewOrHotIssues(formDto);
// 查询最热评论
- for (IssueResultDTO dto:
+ for (IssueResultDTO dto :
data) {
IssueHotCommentResultDTO resultDTO = eventCommentService.getHotComment(dto.getEventId());
dto.setComment(resultDTO);
@@ -298,7 +313,7 @@ public class IssueServiceImpl extends BaseServiceImpl imp
public Result> listIssuesAndEventsOfMine(IssuesAndEventsOfMineFormDTO formDTO) {
List data = baseDao.selectListOfIssuesAndEventsOfMine(formDTO);
// 查询最热评论
- for (IssuesAndEventsOfMineResultDTO dto:
+ for (IssuesAndEventsOfMineResultDTO dto :
data) {
IssueHotCommentResultDTO resultDTO = eventCommentService.getHotComment(dto.getEventId());
dto.setComment(resultDTO);
@@ -325,6 +340,7 @@ public class IssueServiceImpl extends BaseServiceImpl imp
/**
* 初始化项目
+ *
* @Params: [issueEntity]
* @Return: com.elink.esua.epdc.modules.item.entity.ItemEntity
* @Author: liuchuang
@@ -353,7 +369,8 @@ public class IssueServiceImpl extends BaseServiceImpl imp
itemEntity.setIssueAddress(issueEntity.getIssueAddress());
itemEntity.setIssueLongitude(issueEntity.getIssueLongitude());
itemEntity.setIssueLatitude(issueEntity.getIssueLatitude());
- itemEntity.setFriendlyCommunityId(issueEntity.getFriendlyCommunityId());
+ itemEntity.setGroupId(issueEntity.getGroupId());
+ itemEntity.setGroupName(issueEntity.getGroupName());
itemEntity.setItemState(EventIssueItemState.ITEM_HANDLING);
itemEntity.setLastHandleTime(new Date());
return itemEntity;
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/entity/ItemEntity.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/entity/ItemEntity.java
index 4e2bc160a..cddd19fe9 100755
--- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/entity/ItemEntity.java
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/entity/ItemEntity.java
@@ -33,143 +33,153 @@ import java.util.Date;
* @since v1.0.0 2019-09-04
*/
@Data
-@EqualsAndHashCode(callSuper=false)
+@EqualsAndHashCode(callSuper = false)
@TableName("epdc_item")
public class ItemEntity extends BaseEpdcEntity {
- private static final long serialVersionUID = 1L;
+ private static final long serialVersionUID = 1L;
/**
* 事件ID
*/
- private String eventId;
+ private String eventId;
/**
* 议题ID
*/
- private String issueId;
+ private String issueId;
/**
* 用户ID
*/
- private String userId;
+ private String userId;
/**
* 用户昵称
*/
- private String nickName;
+ private String nickName;
/**
* 用户头像
*/
- private String userFace;
+ private String userFace;
- /**
- * 党员标识 0:否,1:是
- */
- private String isPartyMember;
-
- /**
- * 手机号
- */
- private String mobile;
+ /**
+ * 党员标识 0:否,1:是
+ */
+ private String isPartyMember;
/**
* 议题内容
*/
- private String itemContent;
+ private String itemContent;
- /**
- * 发布时间
- */
- private Date distributeTime;
+ /**
+ * 发布时间
+ */
+ private Date distributeTime;
/**
* 区
*/
- private String area;
+ private String area;
/**
* 区ID
*/
- private Long areaId;
+ private Long areaId;
/**
* 街道
*/
- private String street;
+ private String street;
/**
* 街道ID
*/
- private Long streetId;
+ private Long streetId;
/**
* 社区
*/
- private String community;
+ private String community;
/**
* 社区ID
*/
- private Long communityId;
+ private Long communityId;
/**
* 网格
*/
- private String grid;
+ private String grid;
/**
* 网格ID
*/
- private Long gridId;
+ private Long gridId;
/**
* 议题位置地址
*/
- private String issueAddress;
+ private String issueAddress;
/**
* 议题分类ID
*/
- private String issueCategoryId;
+ private String issueCategoryId;
/**
* 议题位置纬度
*/
- private Double issueLatitude;
+ private Double issueLatitude;
/**
* 议题位置经度
*/
- private Double issueLongitude;
+ private Double issueLongitude;
/**
- * 友邻社区ID
+ * 满意度评价得分
+ */
+ private Integer evaluationScore;
+ /**
+ * 满意度评价内容
*/
- private String friendlyCommunityId;
-
+ private String evaluationContent;
/**
- * 满意度评价得分
+ * 满意度评价时间
*/
- private Integer evaluationScore;
- /**
- * 满意度评价内容
- */
- private String evaluationContent;
- /**
- * 满意度评价时间
- */
- private Date evaluationTime;
+ private Date evaluationTime;
/**
* 项目状态 0-处理中,5-已关闭,10-已结案
*/
- private Integer itemState;
+ private Integer itemState;
+
+ /**
+ * 手机号
+ */
+ private String mobile;
+
+ /**
+ * 社群ID
+ */
+ private String groupId;
+
+ /**
+ * 社群名称
+ */
+ private String groupName;
+
+ /**
+ * 最后一次处理时间
+ */
+ private Date lastHandleTime;
- /**
- * 最后一次处理时间
- */
- private Date lastHandleTime;
+ /**
+ * 话题ID
+ */
+ private String topicId;
}
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/excel/ItemExcel.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/excel/ItemExcel.java
index 6380d7761..20e431f49 100755
--- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/excel/ItemExcel.java
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/excel/ItemExcel.java
@@ -89,9 +89,6 @@ public class ItemExcel {
@Excel(name = "议题位置经度")
private BigDecimal issueLongitude;
- @Excel(name = "友邻社区ID")
- private String friendlyCommunityId;
-
@Excel(name = "评价打分")
private Integer issueScore;
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemServiceImpl.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemServiceImpl.java
index e2d2f3bd8..0a4ebc2b9 100755
--- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemServiceImpl.java
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemServiceImpl.java
@@ -45,6 +45,7 @@ import com.elink.esua.epdc.dto.item.ItemPendingHandleDTO;
import com.elink.esua.epdc.dto.item.form.*;
import com.elink.esua.epdc.dto.item.result.*;
import com.elink.esua.epdc.enums.ItemHandleCategoryEnum;
+import com.elink.esua.epdc.modules.async.DeptRespondTask;
import com.elink.esua.epdc.modules.async.NewsTask;
import com.elink.esua.epdc.modules.events.service.EpdcEventsService;
import com.elink.esua.epdc.modules.feign.AdminFeignClient;
@@ -93,6 +94,9 @@ public class ItemServiceImpl extends BaseServiceImpl implem
@Autowired
private NewsTask newsTask;
+ @Autowired
+ private DeptRespondTask deptRespondTask;
+
@Override
public PageData page(Map params) {
IPage page = baseDao.selectPage(
@@ -132,8 +136,8 @@ public class ItemServiceImpl extends BaseServiceImpl implem
return ConvertUtils.sourceToTarget(entityList, ItemDTO.class);
}
- private QueryWrapper getWrapper(Map params){
- String id = (String)params.get(FieldConstant.ID_HUMP);
+ private QueryWrapper getWrapper(Map params) {
+ String id = (String) params.get(FieldConstant.ID_HUMP);
QueryWrapper wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
@@ -199,7 +203,7 @@ public class ItemServiceImpl extends BaseServiceImpl implem
@Override
public Result evaluation(EvaluationFormDTO evaluationFormDTO) {
ItemEntity itemEntityResult = baseDao.selectById(evaluationFormDTO.getItemId());
- if (itemEntityResult.getUserId().equals(evaluationFormDTO.getUserId()) && itemEntityResult.getEvaluationScore() == null){
+ if (itemEntityResult.getUserId().equals(evaluationFormDTO.getUserId()) && itemEntityResult.getEvaluationScore() == null) {
ItemEntity itemEntity = new ItemEntity();
itemEntity.setId(evaluationFormDTO.getItemId());
itemEntity.setEvaluationScore(evaluationFormDTO.getEvaluationScore());
@@ -207,7 +211,7 @@ public class ItemServiceImpl extends BaseServiceImpl implem
itemEntity.setEvaluationTime(new Date());
baseDao.updateById(itemEntity);
return new Result();
- }else {
+ } else {
return new Result().error("您无法评价");
}
}
@@ -247,6 +251,7 @@ public class ItemServiceImpl extends BaseServiceImpl implem
/**
* 项目详情-网格-可做操作和可流转部门
+ *
* @Params: [resultDTO, itemDeptDTOS]
* @Return: com.elink.esua.epdc.dto.item.result.ItemDetailForPCEndResultDTO
* @Author: liuchuang
@@ -268,7 +273,7 @@ public class ItemServiceImpl extends BaseServiceImpl implem
if (null != itemDeptDTOS && itemDeptDTOS.size() > 0) {
selected = true;
// 判断已流转部门
- for (ItemDeptDTO dto:
+ for (ItemDeptDTO dto :
itemDeptDTOS) {
if (dto.getDeptId().equals(completeDeptDTO.getCommunityId())) {
communitySelected = true;
@@ -314,6 +319,7 @@ public class ItemServiceImpl extends BaseServiceImpl implem
/**
* 项目详情-社区、街道部门、区直部门-可做操作
+ *
* @Params: [resultDTO]
* @Return: com.elink.esua.epdc.dto.item.result.ItemDetailForPCEndResultDTO
* @Author: liuchuang
@@ -334,13 +340,14 @@ public class ItemServiceImpl extends BaseServiceImpl implem
/**
* 项目详情-街道党工委-可做操作和可流转部门
+ *
* @Params: [resultDTO, itemDeptDTOS]
* @Return: com.elink.esua.epdc.dto.item.result.ItemDetailForPCEndResultDTO
* @Author: liuchuang
* @Date: 2019/9/16 16:17
*/
private ItemDetailForPCEndResultDTO getHandleCategoryAndCirculationDeptOfStreet(ItemDetailForPCEndResultDTO resultDTO,
- List itemDeptDTOS) {
+ List itemDeptDTOS) {
// 可流转部门
Result> listResult = adminFeignClient.listOfItemCirculationDept(SecurityUser.getDeptId());
if (!listResult.success()) {
@@ -349,14 +356,14 @@ public class ItemServiceImpl extends BaseServiceImpl implem
List deptDTOS = listResult.getData();
// 初始化可流转部门-街道党工委:街道部门、区直部门
List deptResultDTOS = new ArrayList<>();
- for (SysDeptDTO dto:
+ for (SysDeptDTO dto :
deptDTOS) {
ItemCirculationDeptResultDTO circulationDeptResultDTO = new ItemCirculationDeptResultDTO();
circulationDeptResultDTO.setDeptId(dto.getId());
circulationDeptResultDTO.setDeptName(dto.getName());
circulationDeptResultDTO.setTypeKey(dto.getTypeKey());
circulationDeptResultDTO.setSelected(false);
- for (ItemDeptDTO dto1:
+ for (ItemDeptDTO dto1 :
itemDeptDTOS) {
if (dto.getId().equals(dto1.getDeptId())) {
circulationDeptResultDTO.setSelected(true);
@@ -408,7 +415,7 @@ public class ItemServiceImpl extends BaseServiceImpl implem
informationFormDTO.setBusinessType(EventsNoticeConstant.NOTICE_BUSINESS_TYPE_ITEM);
informationFormDTO.setBusinessId(entity.getId());
informationFormDTO.setTitle(EventsNoticeConstant.NOTICE_ITEM_HANDLE);
- informationFormDTO.setRelBusinessContent("项目:"+entity.getItemContent());
+ informationFormDTO.setRelBusinessContent("项目:" + entity.getItemContent());
ItemHandleProcessEntity handleProcessEntity = new ItemHandleProcessEntity();
handleProcessEntity.setHandlerDeptId(user.getDeptId());
@@ -435,7 +442,7 @@ public class ItemServiceImpl extends BaseServiceImpl implem
itemDeptService.saveItemDepts(SecurityUser.getDeptId(), dto, handleProcessEntity.getId());
List circulationDeptResultDTOS = dto.getDeptResultDTOS();
List newDeptIds = new ArrayList<>();
- for (ItemCirculationDeptResultDTO circulationDto:
+ for (ItemCirculationDeptResultDTO circulationDto :
circulationDeptResultDTOS) {
newDeptIds.add(circulationDto.getDeptId());
}
@@ -469,6 +476,14 @@ public class ItemServiceImpl extends BaseServiceImpl implem
handleProcessEntity.setHandlerDeptId(user.getDeptId());
itemHandleProcessService.insert(handleProcessEntity);
}
+ // 记录处理记录
+ handleProcessEntity.setItemId(dto.getId());
+ handleProcessEntity.setHandleAdvice(dto.getHandleAdvice());
+ handleProcessEntity.setOutHandleAdvice(dto.getOutHandleAdvice());
+ handleProcessEntity.setHandlerDeptId(user.getDeptId());
+ itemHandleProcessService.insert(handleProcessEntity);
+ //插入部门响应表
+ deptRespondTask.saveItemDeptRespond(dto);
// 更新项目最后一次处理时间
ItemEntity itemEntity = new ItemEntity();
@@ -496,6 +511,7 @@ public class ItemServiceImpl extends BaseServiceImpl implem
/**
* 项目流转校验
+ *
* @Params: [dto]
* @Return: com.elink.esua.epdc.commons.tools.utils.Result
* @Author: liuchuang
@@ -508,7 +524,7 @@ public class ItemServiceImpl extends BaseServiceImpl implem
}
// 校验是否跨级流转
String typeKey = "";
- for (ItemCirculationDeptResultDTO circulationDeptResultDTO:
+ for (ItemCirculationDeptResultDTO circulationDeptResultDTO :
dto.getDeptResultDTOS()) {
if (!"".equals(typeKey) && !typeKey.equals(circulationDeptResultDTO.getTypeKey())) {
return new Result().error("不可跨级流转协助,请重新选择流转协助部门");
@@ -526,7 +542,7 @@ public class ItemServiceImpl extends BaseServiceImpl implem
// 获取街道党工委已流转协助部门
List itemDeptDTOS = itemDeptService.listOfItemDept(dto.getId(), completeDept.getData().getStreetId());
if (null != itemDeptDTOS && itemDeptDTOS.size() > 0) {
- return new Result().error(completeDept.getData().getStreet()+"已将该项目流转协助到其他部门,不能重新流转协助");
+ return new Result().error(completeDept.getData().getStreet() + "已将该项目流转协助到其他部门,不能重新流转协助");
}
}
@@ -592,7 +608,7 @@ public class ItemServiceImpl extends BaseServiceImpl implem
public void sendWhistlingDeptItemHandleMenuNotice(List deptIds, Long userId) {
MenuNoticeDTO menuNoticeDTO = new MenuNoticeDTO();
menuNoticeDTO.setMenuCode(MenuCodeConstant.PARTY_GROUP_DISCUSSION_ITEM_HANDLE);
- for (Long deptId:
+ for (Long deptId :
deptIds) {
// 获取吹哨部门待处理项目数量
int num = baseDao.selectCountOfItemWhistlingDeptNotice(deptId);
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/log/controller/DeptRespondLogController.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/log/controller/DeptRespondLogController.java
new file mode 100644
index 000000000..b8cc0bcfe
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/log/controller/DeptRespondLogController.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.elink.esua.epdc.modules.log.controller;
+
+import com.elink.esua.epdc.commons.tools.page.PageData;
+import com.elink.esua.epdc.commons.tools.utils.ExcelUtils;
+import com.elink.esua.epdc.commons.tools.utils.Result;
+import com.elink.esua.epdc.commons.tools.validator.AssertUtils;
+import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils;
+import com.elink.esua.epdc.commons.tools.validator.group.AddGroup;
+import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup;
+import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup;
+import com.elink.esua.epdc.dto.log.DeptRespondLogDTO;
+import com.elink.esua.epdc.modules.log.excel.DeptRespondLogExcel;
+import com.elink.esua.epdc.modules.log.service.DeptRespondLogService;
+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 qu qu@elink-cn.com
+ * @since v1.0.0 2019-10-22
+ */
+@RestController
+@RequestMapping("deptrespondlog")
+public class DeptRespondLogController {
+
+ @Autowired
+ private DeptRespondLogService deptRespondLogService;
+
+ @GetMapping("page")
+ public Result> page(@RequestParam Map params){
+ PageData page = deptRespondLogService.page(params);
+ return new Result>().ok(page);
+ }
+
+ @GetMapping("{id}")
+ public Result get(@PathVariable("id") String id){
+ DeptRespondLogDTO data = deptRespondLogService.get(id);
+ return new Result().ok(data);
+ }
+
+ @PostMapping
+ public Result save(@RequestBody DeptRespondLogDTO dto){
+ //效验数据
+ ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
+ deptRespondLogService.save(dto);
+ return new Result();
+ }
+
+ @PutMapping
+ public Result update(@RequestBody DeptRespondLogDTO dto){
+ //效验数据
+ ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
+ deptRespondLogService.update(dto);
+ return new Result();
+ }
+
+ @DeleteMapping
+ public Result delete(@RequestBody String[] ids){
+ //效验数据
+ AssertUtils.isArrayEmpty(ids, "id");
+ deptRespondLogService.delete(ids);
+ return new Result();
+ }
+
+ @GetMapping("export")
+ public void export(@RequestParam Map params, HttpServletResponse response) throws Exception {
+ List list = deptRespondLogService.list(params);
+ ExcelUtils.exportExcelToTarget(response, null, list, DeptRespondLogExcel.class);
+ }
+
+}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/log/dao/DeptRespondLogDao.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/log/dao/DeptRespondLogDao.java
new file mode 100644
index 000000000..17bbfc82f
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/log/dao/DeptRespondLogDao.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.elink.esua.epdc.modules.log.dao;
+
+import com.elink.esua.epdc.commons.mybatis.dao.BaseDao;
+import com.elink.esua.epdc.modules.log.entity.DeptRespondLogEntity;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 部门响应记录
+ *
+ * @author qu qu@elink-cn.com
+ * @since v1.0.0 2019-10-22
+ */
+@Mapper
+public interface DeptRespondLogDao extends BaseDao {
+
+}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/log/entity/DeptRespondLogEntity.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/log/entity/DeptRespondLogEntity.java
new file mode 100644
index 000000000..67fd80106
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/log/entity/DeptRespondLogEntity.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.elink.esua.epdc.modules.log.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.Date;
+
+/**
+ * 部门响应记录
+ *
+ * @author qu qu@elink-cn.com
+ * @since v1.0.0 2019-10-22
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("epdc_dept_respond_log")
+public class DeptRespondLogEntity extends BaseEpdcEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 引用ID
+ */
+ private String referenceId;
+
+ /**
+ * 引用类型 issue或item
+ */
+ private String referenceType;
+
+ /**
+ * 响应部门的id(被呼叫的部门即审核部门)
+ */
+ private Long respondDeptId;
+
+ /**
+ * 响应时间即审核时间
+ */
+ private Date respondTime;
+
+ /**
+ * 响应类型,参考枚举类DeptRespondTypeEnum
+ */
+ private Integer respondType;
+
+}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/log/excel/DeptRespondLogExcel.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/log/excel/DeptRespondLogExcel.java
new file mode 100644
index 000000000..12e31f896
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/log/excel/DeptRespondLogExcel.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.elink.esua.epdc.modules.log.excel;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * 部门响应记录
+ *
+ * @author qu qu@elink-cn.com
+ * @since v1.0.0 2019-10-22
+ */
+@Data
+public class DeptRespondLogExcel {
+
+ @Excel(name = "ID")
+ private String id;
+
+ @Excel(name = "引用ID")
+ private String referenceId;
+
+ @Excel(name = "引用类型 issue或item")
+ private String referenceType;
+
+ @Excel(name = "响应部门的id(被呼叫的部门即审核部门)")
+ private Long respondDeptId;
+
+ @Excel(name = "响应时间即审核时间")
+ private Date respondTime;
+
+ @Excel(name = "响应类型,参考枚举类DeptRespondTypeEnum")
+ private Integer respondType;
+
+ @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/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/log/redis/DeptRespondLogRedis.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/log/redis/DeptRespondLogRedis.java
new file mode 100644
index 000000000..e186849fb
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/log/redis/DeptRespondLogRedis.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.elink.esua.epdc.modules.log.redis;
+
+import com.elink.esua.epdc.commons.tools.redis.RedisUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+/**
+ * 部门响应记录
+ *
+ * @author qu qu@elink-cn.com
+ * @since v1.0.0 2019-10-22
+ */
+@Component
+public class DeptRespondLogRedis {
+ @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/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/log/service/DeptRespondLogService.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/log/service/DeptRespondLogService.java
new file mode 100644
index 000000000..5c62038bf
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/log/service/DeptRespondLogService.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.elink.esua.epdc.modules.log.service;
+
+import com.elink.esua.epdc.commons.mybatis.service.BaseService;
+import com.elink.esua.epdc.commons.tools.page.PageData;
+import com.elink.esua.epdc.dto.log.DeptRespondLogDTO;
+import com.elink.esua.epdc.modules.log.entity.DeptRespondLogEntity;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 部门响应记录
+ *
+ * @author qu qu@elink-cn.com
+ * @since v1.0.0 2019-10-22
+ */
+public interface DeptRespondLogService extends BaseService {
+
+ /**
+ * 默认分页
+ *
+ * @param params
+ * @return PageData
+ * @author generator
+ * @date 2019-10-22
+ */
+ PageData page(Map params);
+
+ /**
+ * 默认查询
+ *
+ * @param params
+ * @return java.util.List
+ * @author generator
+ * @date 2019-10-22
+ */
+ List list(Map params);
+
+ /**
+ * 单条查询
+ *
+ * @param id
+ * @return DeptRespondLogDTO
+ * @author generator
+ * @date 2019-10-22
+ */
+ DeptRespondLogDTO get(String id);
+
+ /**
+ * 默认保存
+ *
+ * @param dto
+ * @return void
+ * @author generator
+ * @date 2019-10-22
+ */
+ void save(DeptRespondLogDTO dto);
+
+ /**
+ * 默认更新
+ *
+ * @param dto
+ * @return void
+ * @author generator
+ * @date 2019-10-22
+ */
+ void update(DeptRespondLogDTO dto);
+
+ /**
+ * 批量删除
+ *
+ * @param ids
+ * @return void
+ * @author generator
+ * @date 2019-10-22
+ */
+ void delete(String[] ids);
+}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/log/service/impl/DeptRespondLogServiceImpl.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/log/service/impl/DeptRespondLogServiceImpl.java
new file mode 100644
index 000000000..d8f3c4afa
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/log/service/impl/DeptRespondLogServiceImpl.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.elink.esua.epdc.modules.log.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl;
+import com.elink.esua.epdc.commons.tools.page.PageData;
+import com.elink.esua.epdc.commons.tools.utils.ConvertUtils;
+import com.elink.esua.epdc.commons.tools.constant.FieldConstant;
+import com.elink.esua.epdc.modules.log.dao.DeptRespondLogDao;
+import com.elink.esua.epdc.dto.log.DeptRespondLogDTO;
+import com.elink.esua.epdc.modules.log.entity.DeptRespondLogEntity;
+import com.elink.esua.epdc.modules.log.redis.DeptRespondLogRedis;
+import com.elink.esua.epdc.modules.log.service.DeptRespondLogService;
+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 qu qu@elink-cn.com
+ * @since v1.0.0 2019-10-22
+ */
+@Service
+public class DeptRespondLogServiceImpl extends BaseServiceImpl implements DeptRespondLogService {
+
+ @Autowired
+ private DeptRespondLogRedis deptRespondLogRedis;
+
+ @Override
+ public PageData page(Map params) {
+ IPage page = baseDao.selectPage(
+ getPage(params, FieldConstant.CREATED_TIME, false),
+ getWrapper(params)
+ );
+ return getPageData(page, DeptRespondLogDTO.class);
+ }
+
+ @Override
+ public List list(Map params) {
+ List entityList = baseDao.selectList(getWrapper(params));
+
+ return ConvertUtils.sourceToTarget(entityList, DeptRespondLogDTO.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 DeptRespondLogDTO get(String id) {
+ DeptRespondLogEntity entity = baseDao.selectById(id);
+ return ConvertUtils.sourceToTarget(entity, DeptRespondLogDTO.class);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void save(DeptRespondLogDTO dto) {
+ DeptRespondLogEntity entity = ConvertUtils.sourceToTarget(dto, DeptRespondLogEntity.class);
+ insert(entity);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void update(DeptRespondLogDTO dto) {
+ DeptRespondLogEntity entity = ConvertUtils.sourceToTarget(dto, DeptRespondLogEntity.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/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/rule/controller/DeptKpiConfigController.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/rule/controller/DeptKpiConfigController.java
new file mode 100644
index 000000000..db8f9d0f7
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/rule/controller/DeptKpiConfigController.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.elink.esua.epdc.modules.rule.controller;
+
+import com.elink.esua.epdc.commons.tools.page.PageData;
+import com.elink.esua.epdc.commons.tools.utils.ExcelUtils;
+import com.elink.esua.epdc.commons.tools.utils.Result;
+import com.elink.esua.epdc.commons.tools.validator.AssertUtils;
+import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils;
+import com.elink.esua.epdc.commons.tools.validator.group.AddGroup;
+import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup;
+import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup;
+import com.elink.esua.epdc.dto.rule.DeptKpiConfigDTO;
+import com.elink.esua.epdc.modules.rule.excel.DeptKpiConfigExcel;
+import com.elink.esua.epdc.modules.rule.service.DeptKpiConfigService;
+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 qu qu@elink-cn.com
+ * @since v1.0.0 2019-10-21
+ */
+@RestController
+@RequestMapping("deptkpiconfig")
+public class DeptKpiConfigController {
+
+ @Autowired
+ private DeptKpiConfigService deptKpiConfigService;
+
+ @GetMapping("page")
+ public Result> page(@RequestParam Map params){
+ PageData page = deptKpiConfigService.page(params);
+ return new Result>().ok(page);
+ }
+
+ @GetMapping("{id}")
+ public Result get(@PathVariable("id") String id){
+ DeptKpiConfigDTO data = deptKpiConfigService.get(id);
+ return new Result().ok(data);
+ }
+
+ @PostMapping
+ public Result save(@RequestBody DeptKpiConfigDTO dto){
+ //效验数据
+ ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
+ deptKpiConfigService.save(dto);
+ return new Result();
+ }
+
+ @PutMapping
+ public Result update(@RequestBody DeptKpiConfigDTO dto){
+ //效验数据
+ ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
+ deptKpiConfigService.update(dto);
+ return new Result();
+ }
+
+ @DeleteMapping
+ public Result delete(@RequestBody String[] ids){
+ //效验数据
+ AssertUtils.isArrayEmpty(ids, "id");
+ deptKpiConfigService.delete(ids);
+ return new Result();
+ }
+
+ @GetMapping("export")
+ public void export(@RequestParam Map params, HttpServletResponse response) throws Exception {
+ List list = deptKpiConfigService.list(params);
+ ExcelUtils.exportExcelToTarget(response, null, list, DeptKpiConfigExcel.class);
+ }
+
+}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/rule/dao/DeptKpiConfigDao.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/rule/dao/DeptKpiConfigDao.java
new file mode 100644
index 000000000..1caa6de84
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/rule/dao/DeptKpiConfigDao.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.elink.esua.epdc.modules.rule.dao;
+
+import com.elink.esua.epdc.commons.mybatis.dao.BaseDao;
+import com.elink.esua.epdc.modules.rule.entity.DeptKpiConfigEntity;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 考核规则
+ *
+ * @author qu qu@elink-cn.com
+ * @since v1.0.0 2019-10-21
+ */
+@Mapper
+public interface DeptKpiConfigDao extends BaseDao {
+
+}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/rule/entity/DeptKpiConfigEntity.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/rule/entity/DeptKpiConfigEntity.java
new file mode 100644
index 000000000..490bc2989
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/rule/entity/DeptKpiConfigEntity.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.elink.esua.epdc.modules.rule.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.Date;
+
+/**
+ * 考核规则
+ *
+ * @author qu qu@elink-cn.com
+ * @since v1.0.0 2019-10-21
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("epdc_dept_kpi_config")
+public class DeptKpiConfigEntity extends BaseEpdcEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 绩效指标编码
+ */
+ private String kpiItemCode;
+
+ /**
+ * 绩效指标值
+ */
+ private Integer kpiItemValue;
+
+ /**
+ * 绩效指标描述
+ */
+ private String kpiItemDesc;
+
+}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/rule/excel/DeptKpiConfigExcel.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/rule/excel/DeptKpiConfigExcel.java
new file mode 100644
index 000000000..a9092adb9
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/rule/excel/DeptKpiConfigExcel.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.elink.esua.epdc.modules.rule.excel;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * 考核规则
+ *
+ * @author qu qu@elink-cn.com
+ * @since v1.0.0 2019-10-21
+ */
+@Data
+public class DeptKpiConfigExcel {
+
+ @Excel(name = "ID")
+ private String id;
+
+ @Excel(name = "绩效指标编码")
+ private String kpiItemCode;
+
+ @Excel(name = "绩效指标值")
+ private Integer kpiItemValue;
+
+ @Excel(name = "绩效指标描述")
+ private String kpiItemDesc;
+
+ @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/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/rule/redis/DeptKpiConfigRedis.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/rule/redis/DeptKpiConfigRedis.java
new file mode 100644
index 000000000..2d3edfa20
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/rule/redis/DeptKpiConfigRedis.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.elink.esua.epdc.modules.rule.redis;
+
+import com.elink.esua.epdc.commons.tools.redis.RedisUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+/**
+ * 考核规则
+ *
+ * @author qu qu@elink-cn.com
+ * @since v1.0.0 2019-10-21
+ */
+@Component
+public class DeptKpiConfigRedis {
+ @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/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/rule/service/DeptKpiConfigService.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/rule/service/DeptKpiConfigService.java
new file mode 100644
index 000000000..7ce501ae3
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/rule/service/DeptKpiConfigService.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.elink.esua.epdc.modules.rule.service;
+
+import com.elink.esua.epdc.commons.mybatis.service.BaseService;
+import com.elink.esua.epdc.commons.tools.page.PageData;
+import com.elink.esua.epdc.dto.rule.DeptKpiConfigDTO;
+import com.elink.esua.epdc.modules.rule.entity.DeptKpiConfigEntity;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 考核规则
+ *
+ * @author qu qu@elink-cn.com
+ * @since v1.0.0 2019-10-21
+ */
+public interface DeptKpiConfigService extends BaseService {
+
+ /**
+ * 默认分页
+ *
+ * @param params
+ * @return PageData
+ * @author generator
+ * @date 2019-10-21
+ */
+ PageData page(Map params);
+
+ /**
+ * 默认查询
+ *
+ * @param params
+ * @return java.util.List
+ * @author generator
+ * @date 2019-10-21
+ */
+ List list(Map params);
+
+ /**
+ * 单条查询
+ *
+ * @param id
+ * @return DeptKpiConfigDTO
+ * @author generator
+ * @date 2019-10-21
+ */
+ DeptKpiConfigDTO get(String id);
+
+ /**
+ * 默认保存
+ *
+ * @param dto
+ * @return void
+ * @author generator
+ * @date 2019-10-21
+ */
+ void save(DeptKpiConfigDTO dto);
+
+ /**
+ * 默认更新
+ *
+ * @param dto
+ * @return void
+ * @author generator
+ * @date 2019-10-21
+ */
+ void update(DeptKpiConfigDTO dto);
+
+ /**
+ * 批量删除
+ *
+ * @param ids
+ * @return void
+ * @author generator
+ * @date 2019-10-21
+ */
+ void delete(String[] ids);
+}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/rule/service/impl/DeptKpiConfigServiceImpl.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/rule/service/impl/DeptKpiConfigServiceImpl.java
new file mode 100644
index 000000000..43d7e4900
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/rule/service/impl/DeptKpiConfigServiceImpl.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.elink.esua.epdc.modules.rule.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl;
+import com.elink.esua.epdc.commons.tools.page.PageData;
+import com.elink.esua.epdc.commons.tools.utils.ConvertUtils;
+import com.elink.esua.epdc.commons.tools.constant.FieldConstant;
+import com.elink.esua.epdc.modules.rule.dao.DeptKpiConfigDao;
+import com.elink.esua.epdc.dto.rule.DeptKpiConfigDTO;
+import com.elink.esua.epdc.modules.rule.entity.DeptKpiConfigEntity;
+import com.elink.esua.epdc.modules.rule.redis.DeptKpiConfigRedis;
+import com.elink.esua.epdc.modules.rule.service.DeptKpiConfigService;
+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 qu qu@elink-cn.com
+ * @since v1.0.0 2019-10-21
+ */
+@Service
+public class DeptKpiConfigServiceImpl extends BaseServiceImpl implements DeptKpiConfigService {
+
+ @Autowired
+ private DeptKpiConfigRedis deptKpiConfigRedis;
+
+ @Override
+ public PageData page(Map params) {
+ IPage page = baseDao.selectPage(
+ getPage(params, FieldConstant.CREATED_TIME, false),
+ getWrapper(params)
+ );
+ return getPageData(page, DeptKpiConfigDTO.class);
+ }
+
+ @Override
+ public List list(Map params) {
+ List entityList = baseDao.selectList(getWrapper(params));
+
+ return ConvertUtils.sourceToTarget(entityList, DeptKpiConfigDTO.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 DeptKpiConfigDTO get(String id) {
+ DeptKpiConfigEntity entity = baseDao.selectById(id);
+ return ConvertUtils.sourceToTarget(entity, DeptKpiConfigDTO.class);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void save(DeptKpiConfigDTO dto) {
+ DeptKpiConfigEntity entity = ConvertUtils.sourceToTarget(dto, DeptKpiConfigEntity.class);
+ insert(entity);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void update(DeptKpiConfigDTO dto) {
+ DeptKpiConfigEntity entity = ConvertUtils.sourceToTarget(dto, DeptKpiConfigEntity.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/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/time/controller/DeptRespondTimeConfigController.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/time/controller/DeptRespondTimeConfigController.java
new file mode 100644
index 000000000..67a67eb81
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/time/controller/DeptRespondTimeConfigController.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.elink.esua.epdc.controller;
+
+import com.elink.esua.epdc.commons.tools.page.PageData;
+import com.elink.esua.epdc.commons.tools.utils.ExcelUtils;
+import com.elink.esua.epdc.commons.tools.utils.Result;
+import com.elink.esua.epdc.commons.tools.validator.AssertUtils;
+import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils;
+import com.elink.esua.epdc.commons.tools.validator.group.AddGroup;
+import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup;
+import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup;
+import com.elink.esua.epdc.dto.time.DeptRespondTimeConfigDTO;
+import com.elink.esua.epdc.modules.time.excel.DeptRespondTimeConfigExcel;
+import com.elink.esua.epdc.modules.time.service.DeptRespondTimeConfigService;
+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 qu qu@elink-cn.com
+ * @since v1.0.0 2019-10-23
+ */
+@RestController
+@RequestMapping("deptrespondtimeconfig")
+public class DeptRespondTimeConfigController {
+
+ @Autowired
+ private DeptRespondTimeConfigService deptRespondTimeConfigService;
+
+ @GetMapping("page")
+ public Result> page(@RequestParam Map params){
+ PageData page = deptRespondTimeConfigService.page(params);
+ return new Result