Browse Source

合并1114分支

dev
yujintao 6 years ago
parent
commit
1baf5ceadc
  1. 21
      esua-epdc/doc/db/dev_1010/esua_epdc_events.sql
  2. 22
      esua-epdc/doc/db/dev_1114/esua_epdc_admin.sql
  3. 18
      esua-epdc/doc/db/dev_1114/esua_epdc_events.sql
  4. 39
      esua-epdc/doc/db/dev_1114/esua_epdc_user.sql
  5. 2
      esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/constant/ServiceConstant.java
  6. 38
      esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/enums/UserSexEnum.java
  7. 14
      esua-epdc/epdc-gateway/pom.xml
  8. 7
      esua-epdc/epdc-gateway/src/main/resources/application.yml
  9. 5
      esua-epdc/epdc-module/epdc-api/epdc-api-client/pom.xml
  10. 6
      esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/form/EpdcCompleteUserInfoFormDTO.java
  11. 229
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiGroupController.java
  12. 50
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiTopicCommentController.java
  13. 136
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiTopicController.java
  14. 207
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/GroupFeignClient.java
  15. 35
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/TopicCommentFeignClient.java
  16. 102
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/TopicFeignClient.java
  17. 97
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/GroupFeignClientFallback.java
  18. 32
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/TopicCommentFeignClientFallback.java
  19. 55
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/TopicFeignClientFallback.java
  20. 176
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/GroupService.java
  21. 34
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/TopicCommentService.java
  22. 100
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/TopicService.java
  23. 14
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppUserServiceImpl.java
  24. 186
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/GroupServiceImpl.java
  25. 62
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/TopicCommentServiceImpl.java
  26. 111
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/TopicServiceImpl.java
  27. 28
      esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/comment/EpdcCommentsAndAttitudeFromTopicFormDTO.java
  28. 18
      esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/events/form/EpdcEventSubmitFormDTO.java
  29. 96
      esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/interfacelog/InterfaceLogDTO.java
  30. 21
      esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/issue/IssueDTO.java
  31. 76
      esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/item/ItemDTO.java
  32. 96
      esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/log/DeptRespondLogDTO.java
  33. 86
      esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/rule/DeptKpiConfigDTO.java
  34. 127
      esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/time/DeptRespondTimeConfigDTO.java
  35. 58
      esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/enums/DeptKpiConfigEnum.java
  36. 88
      esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/enums/DeptRespondTypeEnum.java
  37. 35
      esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/enums/ReferenceTypeEnum.java
  38. 138
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/async/DeptRespondTask.java
  39. 2
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/comment/controller/AppEventCommentController.java
  40. 15
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/comment/controller/EventCommentController.java
  41. 12
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/comment/service/EventCommentService.java
  42. 32
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/comment/service/impl/EventCommentServiceImpl.java
  43. 2
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/dao/EpdcEventsDao.java
  44. 19
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/entity/EpdcEventsEntity.java
  45. 2
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/excel/EpdcEventsExcel.java
  46. 62
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/impl/EpdcEventsServiceImpl.java
  47. 46
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/feign/GroupFeignClient.java
  48. 27
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/feign/fallback/GroupFeignClientFallback.java
  49. 94
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/interfacelog/controller/InterfaceLogController.java
  50. 42
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/interfacelog/dao/InterfaceLogDao.java
  51. 69
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/interfacelog/entity/InterfaceLogEntity.java
  52. 71
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/interfacelog/excel/InterfaceLogExcel.java
  53. 47
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/interfacelog/redis/InterfaceLogRedis.java
  54. 95
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/interfacelog/service/InterfaceLogService.java
  55. 101
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/interfacelog/service/impl/InterfaceLogServiceImpl.java
  56. 20
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/issue/entity/IssueEntity.java
  57. 3
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/issue/excel/IssueExcel.java
  58. 39
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/issue/service/impl/IssueServiceImpl.java
  59. 112
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/entity/ItemEntity.java
  60. 3
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/excel/ItemExcel.java
  61. 42
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemServiceImpl.java
  62. 94
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/log/controller/DeptRespondLogController.java
  63. 33
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/log/dao/DeptRespondLogDao.java
  64. 66
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/log/entity/DeptRespondLogEntity.java
  65. 71
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/log/excel/DeptRespondLogExcel.java
  66. 47
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/log/redis/DeptRespondLogRedis.java
  67. 95
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/log/service/DeptRespondLogService.java
  68. 104
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/log/service/impl/DeptRespondLogServiceImpl.java
  69. 94
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/rule/controller/DeptKpiConfigController.java
  70. 33
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/rule/dao/DeptKpiConfigDao.java
  71. 56
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/rule/entity/DeptKpiConfigEntity.java
  72. 65
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/rule/excel/DeptKpiConfigExcel.java
  73. 47
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/rule/redis/DeptKpiConfigRedis.java
  74. 95
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/rule/service/DeptKpiConfigService.java
  75. 104
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/rule/service/impl/DeptKpiConfigServiceImpl.java
  76. 94
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/time/controller/DeptRespondTimeConfigController.java
  77. 33
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/time/dao/DeptRespondTimeConfigDao.java
  78. 97
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/time/entity/DeptRespondTimeConfigEntity.java
  79. 90
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/time/excel/DeptRespondTimeConfigExcel.java
  80. 47
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/time/redis/DeptRespondTimeConfigRedis.java
  81. 95
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/time/service/DeptRespondTimeConfigService.java
  82. 104
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/time/service/impl/DeptRespondTimeConfigServiceImpl.java
  83. 5
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/logback-spring.xml
  84. 61
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/interfacelog/InterfaceLogDao.xml
  85. 22
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/log/DeptRespondLogDao.xml
  86. 20
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/rule/DeptKpiConfigDao.xml
  87. 28
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/tiime/DeptRespondTimeConfigDao.xml
  88. 42
      esua-epdc/epdc-module/epdc-group/epdc-group-client/pom.xml
  89. 141
      esua-epdc/epdc-module/epdc-group/epdc-group-client/src/main/java/com.elink.esua.epdc/dto/comment/TopicCommentDTO.java
  90. 48
      esua-epdc/epdc-module/epdc-group/epdc-group-client/src/main/java/com.elink.esua.epdc/dto/comment/TopicCommentFormDTO.java
  91. 62
      esua-epdc/epdc-module/epdc-group/epdc-group-client/src/main/java/com.elink.esua.epdc/dto/comment/TopicCommentListDTO.java
  92. 47
      esua-epdc/epdc-module/epdc-group/epdc-group-client/src/main/java/com.elink.esua.epdc/dto/comment/TopicCommentStatementFormDTO.java
  93. 86
      esua-epdc/epdc-module/epdc-group/epdc-group-client/src/main/java/com.elink.esua.epdc/dto/comment/TopicCommentUserAttitudeDTO.java
  94. 43
      esua-epdc/epdc-module/epdc-group/epdc-group-client/src/main/java/com.elink.esua.epdc/dto/comment/TopicCommentsFormDTO.java
  95. 27
      esua-epdc/epdc-module/epdc-group/epdc-group-client/src/main/java/com.elink.esua.epdc/dto/comment/TopicCommentsResultDTO.java
  96. 16
      esua-epdc/epdc-module/epdc-group/epdc-group-client/src/main/java/com.elink.esua.epdc/dto/comment/TopicDeleteCommentsFormDTO.java
  97. 161
      esua-epdc/epdc-module/epdc-group/epdc-group-client/src/main/java/com.elink.esua.epdc/dto/constant/GroupNoticeConstant.java
  98. 16
      esua-epdc/epdc-module/epdc-group/epdc-group-client/src/main/java/com.elink.esua.epdc/dto/constant/TopicImageConstant.java
  99. 52
      esua-epdc/epdc-module/epdc-group/epdc-group-client/src/main/java/com.elink.esua.epdc/dto/constant/TopicNoticeConstant.java
  100. 56
      esua-epdc/epdc-module/epdc-group/epdc-group-client/src/main/java/com.elink.esua.epdc/dto/enums/GroupStateEnum.java

21
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-----------------------------------------------

22
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------------------------------------------------

18
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------------------------------------------------

39
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------------------------------------------------

2
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";
/**
* 新闻公告模块
*/

38
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.
* <p>
* https://www.renren.io
* <p>
* 版权所有侵权必究
*/
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;
}
}

14
esua-epdc/epdc-gateway/pom.xml

@ -106,9 +106,6 @@
<!-- <gateway.routes.epdc-job-server.uri>http://127.0.0.1:9061</gateway.routes.epdc-job-server.uri>-->
<gateway.routes.epdc-message-server.uri>lb://epdc-message-server
</gateway.routes.epdc-message-server.uri>
<gateway.routes.epdc-neighbor-server.uri>lb://epdc-neighbor-server
</gateway.routes.epdc-neighbor-server.uri>
<!-- <gateway.routes.epdc-neighbor-server.uri>http://127.0.0.1:9063</gateway.routes.epdc-neighbor-server.uri>-->
<!--<gateway.routes.epdc-news-server.uri>lb://epdc-news-server</gateway.routes.epdc-news-server.uri>-->
<gateway.routes.epdc-news-server.uri>http://127.0.0.1:9064</gateway.routes.epdc-news-server.uri>
<gateway.routes.epdc-oss-server.uri>lb://epdc-oss-server</gateway.routes.epdc-oss-server.uri>
@ -120,10 +117,11 @@
<!--<gateway.routes.epdc-user-server.uri>lb://epdc-user-server</gateway.routes.epdc-user-server.uri>-->
<gateway.routes.epdc-user-server.uri>http://127.0.0.1:9068</gateway.routes.epdc-user-server.uri>
<gateway.routes.epdc-demo-server.uri>lb://epdc-demo-server</gateway.routes.epdc-demo-server.uri>
<gateway.routes.epdc-group-server.uri>http://127.0.0.1:9064</gateway.routes.epdc-group-server.uri>
<!--<gateway.routes.epdc-group-server.uri>lb://epdc-group-server</gateway.routes.epdc-group-server.uri>-->
<gateway.routes.epdc-websocket-server.uri>lb://epdc-websocket-server</gateway.routes.epdc-websocket-server.uri>
<!-- nacos -->
<nacos.register-enabled>true</nacos.register-enabled>
<nacos.register-enabled>false</nacos.register-enabled>
<nacos.server-addr>47.104.224.45:8848</nacos.server-addr>
<spring.zipkin.base-url>http://localhost:9411</spring.zipkin.base-url>
@ -151,8 +149,6 @@
<gateway.routes.epdc-job-server.uri>lb://epdc-job-server</gateway.routes.epdc-job-server.uri>
<gateway.routes.epdc-message-server.uri>lb://epdc-message-server
</gateway.routes.epdc-message-server.uri>
<gateway.routes.epdc-neighbor-server.uri>lb://epdc-neighbor-server
</gateway.routes.epdc-neighbor-server.uri>
<gateway.routes.epdc-news-server.uri>lb://epdc-news-server</gateway.routes.epdc-news-server.uri>
<gateway.routes.epdc-oss-server.uri>lb://epdc-oss-server</gateway.routes.epdc-oss-server.uri>
<gateway.routes.epdc-events-server.uri>lb://epdc-events-server</gateway.routes.epdc-events-server.uri>
@ -160,6 +156,7 @@
</gateway.routes.epdc-services-server.uri>
<gateway.routes.epdc-user-server.uri>lb://epdc-user-server</gateway.routes.epdc-user-server.uri>
<gateway.routes.epdc-demo-server.uri>lb://epdc-demo-server</gateway.routes.epdc-demo-server.uri>
<gateway.routes.epdc-group-server.uri>lb://epdc-group-server</gateway.routes.epdc-group-server.uri>
<gateway.routes.epdc-websocket-server.uri>lb://epdc-websocket-server</gateway.routes.epdc-websocket-server.uri>
<!-- nacos -->
@ -185,8 +182,6 @@
<gateway.routes.epdc-job-server.uri>lb://epdc-job-server</gateway.routes.epdc-job-server.uri>
<gateway.routes.epdc-message-server.uri>lb://epdc-message-server
</gateway.routes.epdc-message-server.uri>
<gateway.routes.epdc-neighbor-server.uri>lb://epdc-neighbor-server
</gateway.routes.epdc-neighbor-server.uri>
<gateway.routes.epdc-news-server.uri>lb://epdc-news-server</gateway.routes.epdc-news-server.uri>
<gateway.routes.epdc-oss-server.uri>lb://epdc-oss-server</gateway.routes.epdc-oss-server.uri>
<gateway.routes.epdc-events-server.uri>lb://epdc-events-server</gateway.routes.epdc-events-server.uri>
@ -194,6 +189,7 @@
</gateway.routes.epdc-services-server.uri>
<gateway.routes.epdc-user-server.uri>lb://epdc-user-server</gateway.routes.epdc-user-server.uri>
<gateway.routes.epdc-demo-server.uri>lb://epdc-demo-server</gateway.routes.epdc-demo-server.uri>
<gateway.routes.epdc-group-server.uri>lb://epdc-group-server</gateway.routes.epdc-group-server.uri>
<gateway.routes.epdc-websocket-server.uri>lb://epdc-websocket-server</gateway.routes.epdc-websocket-server.uri>
<!-- redis配置 -->

7
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
#新闻公告模块

5
esua-epdc/epdc-module/epdc-api/epdc-api-client/pom.xml

@ -68,6 +68,11 @@
<artifactId>epdc-message-client</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.esua.epdc</groupId>
<artifactId>epdc-group-client</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>
<build>

6
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;
}

229
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;
/**
*
* 移动端接口-社群模块
*
* @Authorliuchuang
* @Date2019/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<java.util.List<com.elink.esua.epdc.dto.group.result.GroupsOfMineResultDTO>>
* @author liuchuang
* @since 2019/10/21 17:20
*/
@GetMapping("listOfMine")
public Result<List<GroupsOfMineResultDTO>> groupsOfMine(@LoginUser TokenDto userDetail) {
return groupService.listGroupsOfMine(userDetail);
}
/**
*
* 推荐群列表
*
* @params [userDetail]
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.group.result.GroupsOfRecommendResultDTO>>
* @author liuchuang
* @since 2019/10/22 13:53
*/
@GetMapping("listOfRecommend")
public Result<List<GroupsOfRecommendResultDTO>> groupsOfRecommend(@LoginUser TokenDto userDetail) {
return groupService.listGroupsOfRecommend(userDetail);
}
/**
*
* 社群详情
*
* @params [userDetail, id]
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.group.result.GroupsOfRecommendResultDTO>>
* @author liuchuang
* @since 2019/10/22 15:14
*/
@GetMapping("detail/{id}")
public Result<GroupDetailForMobileEndResultDTO> 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<List<GroupUserListResultDTO>> 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<java.util.List<com.elink.esua.epdc.dto.epdc.result.EpdcUserGroupInviteResultDTO>>
* @author liuchuang
* @since 2019/10/23 16:39
*/
@GetMapping("getInviteList")
public Result<List<EpdcUserGroupInviteResultDTO>> 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);
}
}

50
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<EventCommentsResultDTO> listOfComments(@LoginUser TokenDto userDetail, TopicCommentsFormDTO topicCommentsFormDTO) {
return topicCommentService.listOfComments(userDetail,topicCommentsFormDTO);
}
}

136
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;
/**
*
* 移动端接口-话题模块
*
* @Authorliuchuang
* @Date2019/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<java.util.List<com.elink.esua.epdc.dto.topic.result.TopicListResultDTO>>
* @author liuchuang
* @since 2019/11/11 15:04
*/
@GetMapping("list")
public Result<List<TopicListResultDTO>> 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<java.util.List<com.elink.esua.epdc.dto.topic.result.TopicListResultDTO>>
* @author liuchuang
* @since 2019/11/11 15:04
*/
@GetMapping("listOfMine")
public Result<List<TopicListResultDTO>> 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<com.elink.esua.epdc.dto.topic.result.TopicDetailResultDTO>
* @author liuchuang
* @since 2019/11/7 15:37
*/
@GetMapping("detail/{id}")
public Result<TopicDetailResultDTO> 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<java.util.List<com.elink.esua.epdc.dto.group.result.TopicAuditRecordResultDTO>>
* @author liuchuang
* @since 2019/11/8 9:39
*/
@GetMapping("auditRecord/{topicId}")
public Result<List<TopicAuditRecordResultDTO>> 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);
}
}

207
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;
/**
*
* 社群模块调用
*
* @Authorliuchuang
* @Date2019/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<java.util.List<com.elink.esua.epdc.dto.group.result.GroupsOfMineResultDTO>>
* @author liuchuang
* @since 2019/10/21 17:26
*/
@GetMapping(value = "group/epdc-app/group/listOfMine", consumes = MediaType.APPLICATION_JSON_VALUE)
Result<List<GroupsOfMineResultDTO>> listGroupsOfMine(GroupsOfMineFormDTO formDto);
/**
*
* 推荐群列表
*
* @params [formDto]
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.group.result.GroupsOfRecommendResultDTO>>
* @author liuchuang
* @since 2019/10/22 13:51
*/
@GetMapping(value = "group/epdc-app/group/listOfRecommend", consumes = MediaType.APPLICATION_JSON_VALUE)
Result<List<GroupsOfRecommendResultDTO>> listGroupsOfRecommend(GroupsOfMineFormDTO formDto);
/**
*
* 社群详情
*
* @params [formDto]
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.group.result.GroupDetailForMobileEndResultDTO>
* @author liuchuang
* @since 2019/10/22 15:09
*/
@GetMapping(value = "group/epdc-app/group/detail", consumes = MediaType.APPLICATION_JSON_VALUE)
Result<GroupDetailForMobileEndResultDTO> 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<List<GroupUserListResultDTO>> 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<java.util.List<com.elink.esua.epdc.dto.epdc.result.EpdcUserGroupInviteResultDTO>>
* @author liuchuang
* @since 2019/10/23 16:38
*/
@GetMapping(value = "group/epdc-app/usergroup/getInviteList", consumes = MediaType.APPLICATION_JSON_VALUE)
Result<List<EpdcUserGroupInviteResultDTO>> 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);
}

35
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<EventCommentsResultDTO> listOfComments(TopicCommentsFormDTO formDto);
}

102
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;
/**
*
* 社群-话题模块调用
*
* @Authorliuchuang
* @Date2019/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<com.elink.esua.epdc.dto.topic.result.TopicDetailResultDTO>
* @author liuchuang
* @since 2019/11/7 15:37
*/
@GetMapping(value = "group/epdc-app/topic/detail/{id}", consumes = MediaType.APPLICATION_JSON_VALUE)
Result<TopicDetailResultDTO> detail(@PathVariable("id") String id);
/**
*
* 话题列表
*
* @params [formDto]
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.topic.result.TopicListResultDTO>>
* @author liuchuang
* @since 2019/11/11 15:06
*/
@GetMapping(value = "group/epdc-app/topic/list", consumes = MediaType.APPLICATION_JSON_VALUE)
Result<List<TopicListResultDTO>> 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<java.util.List<com.elink.esua.epdc.dto.group.result.TopicAuditRecordResultDTO>>
* @author liuchuang
* @since 2019/11/8 9:41
*/
@GetMapping(value = "group/epdc-app/topic/auditRecord/{topicId}", consumes = MediaType.APPLICATION_JSON_VALUE)
Result<List<TopicAuditRecordResultDTO>> 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);
}

97
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;
/**
* @Authorliuchuang
* @Date2019/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<List<GroupsOfMineResultDTO>> listGroupsOfMine(GroupsOfMineFormDTO formDto) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_GROUP_SERVER, "listGroupsOfMine", formDto);
}
@Override
public Result<List<GroupsOfRecommendResultDTO>> listGroupsOfRecommend(GroupsOfMineFormDTO formDto) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_GROUP_SERVER, "listGroupsOfRecommend", formDto);
}
@Override
public Result<GroupDetailForMobileEndResultDTO> 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<List<GroupUserListResultDTO>> 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<List<EpdcUserGroupInviteResultDTO>> 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);
}
}

32
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<EventCommentsResultDTO> listOfComments(TopicCommentsFormDTO formDto) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_GROUP_SERVER, "listOfComments", formDto);
}
}

55
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;
/**
* @Authorliuchuang
* @Date2019/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<TopicDetailResultDTO> 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<List<TopicAuditRecordResultDTO>> auditRecord(@PathVariable("topicId") String topicId) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_GROUP_SERVER, "auditRecord", topicId);
}
@Override
public Result<List<TopicListResultDTO>> 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);
}
}

176
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;
/**
*
* 社群模块
*
* @Authorliuchuang
* @Date2019/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<java.util.List<com.elink.esua.epdc.dto.group.result.GroupsOfMineResultDTO>>
* @author liuchuang
* @since 2019/10/21 17:21
*/
Result<List<GroupsOfMineResultDTO>> listGroupsOfMine(TokenDto userDetail);
/**
*
* 推荐群列表
*
* @params [userDetail]
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.group.result.GroupsOfRecommendResultDTO>>
* @author liuchuang
* @since 2019/10/22 13:54
*/
Result<List<GroupsOfRecommendResultDTO>> listGroupsOfRecommend(TokenDto userDetail);
/**
*
* 社群详情
*
* @params [userDetail, id]
* @return com.elink.esua.epdc.dto.group.result.GroupDetailForMobileEndResultDTO
* @author liuchuang
* @since 2019/10/22 15:15
*/
Result<GroupDetailForMobileEndResultDTO> 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<List<GroupUserListResultDTO>> 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<java.util.List<com.elink.esua.epdc.dto.epdc.result.EpdcUserGroupInviteResultDTO>>
* @author liuchuang
* @since 2019/10/23 16:40
*/
Result<List<EpdcUserGroupInviteResultDTO>> 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);
}

34
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<EventCommentsResultDTO> listOfComments(TokenDto userDetail, TopicCommentsFormDTO topicCommentsFormDTO);
}

100
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;
/**
*
* 话题模块
*
* @Authorliuchuang
* @Date2019/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<TopicDetailResultDTO> 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<java.util.List<com.elink.esua.epdc.dto.group.result.TopicAuditRecordResultDTO>>
* @author liuchuang
* @since 2019/11/8 9:43
*/
Result<List<TopicAuditRecordResultDTO>> listOfTopicAuditRecord(String topicId);
/**
*
* 话题列表
*
* @params [userDetail, formDto]
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.topic.result.TopicListResultDTO>>
* @author liuchuang
* @since 2019/11/11 15:05
*/
Result<List<TopicListResultDTO>> listOfTopic(TokenDto userDetail, TopicListFormDTO formDto);
/**
*
* 我的话题列表
*
* @params [userDetail, formDto]
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.topic.result.TopicListResultDTO>>
* @author liuchuang
* @since 2019/11/11 15:50
*/
Result<List<TopicListResultDTO>> 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);
}

14
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());

186
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;
/**
*
* 社群模块
*
* @Authorliuchuang
* @Date2019/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<CompleteDeptDTO> 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<List<GroupsOfMineResultDTO>> 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<List<GroupsOfRecommendResultDTO>> 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<GroupDetailForMobileEndResultDTO> 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<List<GroupUserListResultDTO>> 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<List<EpdcUserGroupInviteResultDTO>> 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);
}
}

62
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<EventCommentsResultDTO>().error("获取用户信息失败");
}
topicCommentStatementFormDTO.setUseId(userDetail.getUserId());
topicCommentStatementFormDTO.setUserName(userDetail.getNickname());
return topicCommentFeignClient.statement(topicCommentStatementFormDTO);
}
@Override
public Result<EventCommentsResultDTO> listOfComments(TokenDto userDetail, TopicCommentsFormDTO topicCommentsFormDTO) {
if (null == userDetail) {
return new Result<EventCommentsResultDTO>().error("获取用户信息失败");
}
topicCommentsFormDTO.setUserId(userDetail.getUserId());
return topicCommentFeignClient.listOfComments(topicCommentsFormDTO);
}
}

111
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;
/**
*
* 话题模块
*
* @Authorliuchuang
* @Date2019/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<CompleteDeptDTO> 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<TopicDetailResultDTO> 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<List<TopicAuditRecordResultDTO>> listOfTopicAuditRecord(String topicId) {
return topicFeignClient.auditRecord(topicId);
}
@Override
public Result<List<TopicListResultDTO>> listOfTopic(TokenDto userDetail, TopicListFormDTO formDto) {
if (null == userDetail) {
return new Result().error("获取用户信息失败");
}
formDto.setGridId(userDetail.getGridId());
return topicFeignClient.listOfTopic(formDto);
}
@Override
public Result<List<TopicListResultDTO>> 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);
}
}

28
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;
/**
*
* 话题评论评论支持反对数据
*
* @Authorliuchuang
* @Date2019/11/12 14:17
*/
@Data
public class EpdcCommentsAndAttitudeFromTopicFormDTO implements Serializable {
private static final long serialVersionUID = 8779307899428155354L;
/**
* 评论
*/
private List<EventCommentDTO> comments;
/**
* 表态
*/
private List<EventCommentUserAttitudeDTO> attitudes;
}

18
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;
}

96
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
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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;
}

21
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;
}

76
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;
}

96
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
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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;
}

86
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
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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;
}

127
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
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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;
}

58
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;
}
}

88
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;
}
}

35
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;
}
}

138
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);
}
}

2
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

15
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);
}
}

12
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<EventCommentEntity> {
* @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);
}

32
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<EventCommentDao, Ev
@Autowired
private NewsTask newsTask;
@Autowired
private EventCommentUserAttitudeService eventCommentUserAttitudeService;
@Override
public PageData<EventCommentDTO> page(Map<String, Object> params) {
IPage<EventCommentEntity> page = baseDao.selectPage(
@ -289,4 +297,28 @@ public class EventCommentServiceImpl extends BaseServiceImpl<EventCommentDao, Ev
public void updateOpposeNumSubtract(String commentId) {
baseDao.updateOpposeNumSubtract(commentId);
}
@Override
@Transactional(rollbackFor = Exception.class)
public Result saveCommentAndAttitudeFromTopic(EpdcCommentsAndAttitudeFromTopicFormDTO formDto) {
// 保存评论
List<EventCommentEntity> 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<EventCommentUserAttitudeEntity> 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();
}
}

2
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<EpdcEventsEntity> {
List<EpdcEventsCommentsDTO> selectListOfCommentsByEventId(Map<String, Object> params);
/**
* 修改评论数+1
* 评论数+1
*/
void updateCommentNum(String id);

19
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;
}

2
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:已删除")

62
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<EpdcEventsDao, EpdcEv
@Autowired
private NewsTask newsTask;
@Autowired
private DeptRespondTask deptRespondTask;
@Autowired
private AdminFeignClient adminFeignClient;
@Autowired
private ItemService itemService;
@Autowired
private GroupFeignClient groupFeignClient;
@Override
public PageData<EpdcEventsDTO> listOfPendingReviewEvents(Map<String, Object> params) {
IPage<EpdcEventsDTO> page = getPage(params);
@ -97,9 +109,9 @@ public class EpdcEventsServiceImpl extends BaseServiceImpl<EpdcEventsDao, EpdcEv
return ConvertUtils.sourceToTarget(entityList, EpdcEventsDTO.class);
}
private QueryWrapper<EpdcEventsEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
String issueCategoryId = (String)params.get("issueCategoryId");
private QueryWrapper<EpdcEventsEntity> getWrapper(Map<String, Object> params) {
String id = (String) params.get(FieldConstant.ID_HUMP);
String issueCategoryId = (String) params.get("issueCategoryId");
QueryWrapper<EpdcEventsEntity> 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<EpdcEventsDao, EpdcEv
informationFormDTO.setBusinessId(eventsEntity.getId());
// 审核通过
if (EventIssueItemState.EVENT_REVIEW_PASS== dto.getEventState()) {
if (EventIssueItemState.EVENT_REVIEW_PASS == dto.getEventState()) {
// 事件插入议题表
IssueEntity issueEntity = initIssueEntity(selectById(dto.getId()));
issueService.insert(issueEntity);
@ -195,15 +207,43 @@ public class EpdcEventsServiceImpl extends BaseServiceImpl<EpdcEventsDao, EpdcEv
// 发送菜单消息-议题待处理
issueService.sendIssueHandleMenuNotice(issueEntity.getGridId(), null);
}
// 发送消息
newsTask.insertUserInformation(informationFormDTO);
// 插入部门响应记录
deptRespondTask.saveEventDeptRespond(dto);
// 事件来源-友邻社群-话题转议题
if (StringUtils.isNotEmpty(eventsEntity.getGroupId())) {
this.reviewCallback(eventsEntity.getTopicId(), dto);
} else {
// 发送消息
newsTask.insertUserInformation(informationFormDTO);
}
// 发送菜单消息-议题待回应
this.sendMenuNoticeOfEventRespond(eventsEntity.getGridId(), null);
return new Result();
}
/**
*
* 话题转议题审核回调
*
* @params [topicId, dto]
* @return void
* @author liuchuang
* @since 2019/11/11 10:28
*/
private void reviewCallback(String topicId, EpdcEventsReviewFormDTO dto) {
Map<String, String> 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<EpdcRejectEventsDTO> listOfRejectEvents(Map<String, Object> params) {
IPage<EpdcRejectEventsDTO> page = getPage(params);
@ -231,7 +271,7 @@ public class EpdcEventsServiceImpl extends BaseServiceImpl<EpdcEventsDao, EpdcEv
}
EpdcEventsEntity epdcEventsEntity = new EpdcEventsEntity();
epdcEventsEntity.setId(entity.getId());
epdcEventsEntity.setBrowseNum(entity.getBrowseNum()+1);
epdcEventsEntity.setBrowseNum(entity.getBrowseNum() + 1);
return this.updateById(epdcEventsEntity);
}
@ -269,6 +309,7 @@ public class EpdcEventsServiceImpl extends BaseServiceImpl<EpdcEventsDao, EpdcEv
/**
* 初始化议题
*
* @Params: [entity]
* @Return: com.elink.esua.epdc.modules.issue.entity.IssueEntity
* @Author: liuchuang
@ -296,7 +337,8 @@ public class EpdcEventsServiceImpl extends BaseServiceImpl<EpdcEventsDao, EpdcEv
issueEntity.setIssueCategoryId(entity.getIssueCategoryId());
issueEntity.setIssueLatitude(entity.getIssueLatitude());
issueEntity.setIssueLongitude(entity.getIssueLongitude());
issueEntity.setFriendlyCommunityId(entity.getFriendlyCommunityId());
issueEntity.setGroupId(entity.getGroupId());
issueEntity.setGroupName(entity.getGroupName());
issueEntity.setIssueState(EventIssueItemState.ISSUE_REVIEW_PASS);
return issueEntity;
}

46
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/feign/GroupFeignClient.java

@ -0,0 +1,46 @@
package com.elink.esua.epdc.modules.feign;
import com.elink.esua.epdc.commons.tools.constant.ServiceConstant;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.modules.feign.fallback.GroupFeignClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import java.util.Map;
/**
*
* 社群模块调用
*
* @Authorliuchuang
* @Date2019/11/11 10:31
*/
@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/11/11 10:36
*/
@PostMapping(value = "group/topic/reviewCallback", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
Result reviewCallback(Map<String, String> 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<String, String> map);
}

27
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;
/**
* @Authorliuchuang
* @Date2019/11/11 10:31
*/
@Component
public class GroupFeignClientFallback implements GroupFeignClient {
@Override
public Result reviewCallback(Map<String, String> callbackMap) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_GROUP_SERVER, "reviewCallback", callbackMap);
}
@Override
public Result modifyTopicState(Map<String, String> map) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_GROUP_SERVER, "modifyTopicState", map);
}
}

94
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
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<PageData<InterfaceLogDTO>> page(@RequestParam Map<String, Object> params){
PageData<InterfaceLogDTO> page = interfaceLogService.listInterfaceLog(params);
return new Result<PageData<InterfaceLogDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<InterfaceLogDTO> get(@PathVariable("id") String id){
InterfaceLogDTO data = interfaceLogService.get(id);
return new Result<InterfaceLogDTO>().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<String, Object> params, HttpServletResponse response) throws Exception {
List<InterfaceLogDTO> list = interfaceLogService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, InterfaceLogExcel.class);
}
}

42
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
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<InterfaceLogEntity> {
/**
*
* @param params
* @return 获取接口日志列表
*/
List<InterfaceLogDTO> listInterfaceLog(Map<String, Object> params);
}

69
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
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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;
}

71
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
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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;
}

47
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
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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;
}
}

95
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
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<InterfaceLogEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<InterfaceLogDTO>
* @author generator
* @date 2019-11-14
*/
PageData<InterfaceLogDTO> listInterfaceLog(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<InterfaceLogDTO>
* @author generator
* @date 2019-11-14
*/
List<InterfaceLogDTO> list(Map<String, Object> 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);
}

101
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
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<InterfaceLogDao, InterfaceLogEntity> implements InterfaceLogService {
@Autowired
private InterfaceLogRedis interfaceLogRedis;
@Override
public PageData<InterfaceLogDTO> listInterfaceLog(Map<String, Object> params) {
IPage<InterfaceLogDTO> page = getPage(params);
List<InterfaceLogDTO> list = baseDao.listInterfaceLog(params);
return new PageData<>(list, page.getTotal());
}
@Override
public List<InterfaceLogDTO> list(Map<String, Object> params) {
List<InterfaceLogEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, InterfaceLogDTO.class);
}
private QueryWrapper<InterfaceLogEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<InterfaceLogEntity> 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));
}
}

20
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;
}

3
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;

39
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<IssueDao, IssueEntity> imp
@Autowired
private NewsTask newsTask;
@Autowired
private DeptRespondTask deptRespondTask;
@Autowired
private GroupFeignClient groupFeignClient;
@Override
public PageData<IssueWaitHandleOrClosedDTO> listOfIssues(Map<String, Object> params) {
IPage<IssueWaitHandleOrClosedDTO> page = getPage(params);
@ -107,8 +113,8 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
return ConvertUtils.sourceToTarget(entityList, IssueDTO.class);
}
private QueryWrapper<IssueEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
private QueryWrapper<IssueEntity> getWrapper(Map<String, Object> params) {
String id = (String) params.get(FieldConstant.ID_HUMP);
QueryWrapper<IssueEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
@ -171,7 +177,7 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> 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<IssueDao, IssueEntity> imp
informationFormDTO.setBusinessId(itemEntity.getId());
// 事件来源-友邻社群
if (StringUtils.isNotEmpty(entity.getGroupId())) {
// 更新话题状态
Map<String, String> 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<IssueDao, IssueEntity> imp
formDto.setSomeMonthsAgo(DateUtils.addDateMonths(new Date(), -6));
List<IssueResultDTO> 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<IssueDao, IssueEntity> imp
public Result<List<IssuesAndEventsOfMineResultDTO>> listIssuesAndEventsOfMine(IssuesAndEventsOfMineFormDTO formDTO) {
List<IssuesAndEventsOfMineResultDTO> 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<IssueDao, IssueEntity> imp
/**
* 初始化项目
*
* @Params: [issueEntity]
* @Return: com.elink.esua.epdc.modules.item.entity.ItemEntity
* @Author: liuchuang
@ -353,7 +369,8 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> 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;

112
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;
/**
* 党员标识 01
*/
private String isPartyMember;
/**
* 手机号
*/
private String mobile;
/**
* 党员标识 01
*/
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;
}

3
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;

42
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<ItemDao, ItemEntity> implem
@Autowired
private NewsTask newsTask;
@Autowired
private DeptRespondTask deptRespondTask;
@Override
public PageData<ItemDTO> page(Map<String, Object> params) {
IPage<ItemEntity> page = baseDao.selectPage(
@ -132,8 +136,8 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem
return ConvertUtils.sourceToTarget(entityList, ItemDTO.class);
}
private QueryWrapper<ItemEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
private QueryWrapper<ItemEntity> getWrapper(Map<String, Object> params) {
String id = (String) params.get(FieldConstant.ID_HUMP);
QueryWrapper<ItemEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
@ -199,7 +203,7 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> 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<ItemDao, ItemEntity> 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<ItemDao, ItemEntity> implem
/**
* 项目详情-网格-可做操作和可流转部门
*
* @Params: [resultDTO, itemDeptDTOS]
* @Return: com.elink.esua.epdc.dto.item.result.ItemDetailForPCEndResultDTO
* @Author: liuchuang
@ -268,7 +273,7 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> 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<ItemDao, ItemEntity> implem
/**
* 项目详情-社区街道部门区直部门-可做操作
*
* @Params: [resultDTO]
* @Return: com.elink.esua.epdc.dto.item.result.ItemDetailForPCEndResultDTO
* @Author: liuchuang
@ -334,13 +340,14 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> 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<ItemDeptDTO> itemDeptDTOS) {
List<ItemDeptDTO> itemDeptDTOS) {
// 可流转部门
Result<List<SysDeptDTO>> listResult = adminFeignClient.listOfItemCirculationDept(SecurityUser.getDeptId());
if (!listResult.success()) {
@ -349,14 +356,14 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem
List<SysDeptDTO> deptDTOS = listResult.getData();
// 初始化可流转部门-街道党工委:街道部门、区直部门
List<ItemCirculationDeptResultDTO> 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<ItemDao, ItemEntity> 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<ItemDao, ItemEntity> implem
itemDeptService.saveItemDepts(SecurityUser.getDeptId(), dto, handleProcessEntity.getId());
List<ItemCirculationDeptResultDTO> circulationDeptResultDTOS = dto.getDeptResultDTOS();
List<Long> newDeptIds = new ArrayList<>();
for (ItemCirculationDeptResultDTO circulationDto:
for (ItemCirculationDeptResultDTO circulationDto :
circulationDeptResultDTOS) {
newDeptIds.add(circulationDto.getDeptId());
}
@ -469,6 +476,14 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> 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<ItemDao, ItemEntity> implem
/**
* 项目流转校验
*
* @Params: [dto]
* @Return: com.elink.esua.epdc.commons.tools.utils.Result
* @Author: liuchuang
@ -508,7 +524,7 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> 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<ItemDao, ItemEntity> implem
// 获取街道党工委已流转协助部门
List<ItemDeptDTO> 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<ItemDao, ItemEntity> implem
public void sendWhistlingDeptItemHandleMenuNotice(List<Long> 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);

94
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
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<PageData<DeptRespondLogDTO>> page(@RequestParam Map<String, Object> params){
PageData<DeptRespondLogDTO> page = deptRespondLogService.page(params);
return new Result<PageData<DeptRespondLogDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<DeptRespondLogDTO> get(@PathVariable("id") String id){
DeptRespondLogDTO data = deptRespondLogService.get(id);
return new Result<DeptRespondLogDTO>().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<String, Object> params, HttpServletResponse response) throws Exception {
List<DeptRespondLogDTO> list = deptRespondLogService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, DeptRespondLogExcel.class);
}
}

33
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
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<DeptRespondLogEntity> {
}

66
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
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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;
}

71
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
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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;
}

47
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
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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;
}
}

95
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
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<DeptRespondLogEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<DeptRespondLogDTO>
* @author generator
* @date 2019-10-22
*/
PageData<DeptRespondLogDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<DeptRespondLogDTO>
* @author generator
* @date 2019-10-22
*/
List<DeptRespondLogDTO> list(Map<String, Object> 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);
}

104
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
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<DeptRespondLogDao, DeptRespondLogEntity> implements DeptRespondLogService {
@Autowired
private DeptRespondLogRedis deptRespondLogRedis;
@Override
public PageData<DeptRespondLogDTO> page(Map<String, Object> params) {
IPage<DeptRespondLogEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, DeptRespondLogDTO.class);
}
@Override
public List<DeptRespondLogDTO> list(Map<String, Object> params) {
List<DeptRespondLogEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, DeptRespondLogDTO.class);
}
private QueryWrapper<DeptRespondLogEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<DeptRespondLogEntity> 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));
}
}

94
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
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<PageData<DeptKpiConfigDTO>> page(@RequestParam Map<String, Object> params){
PageData<DeptKpiConfigDTO> page = deptKpiConfigService.page(params);
return new Result<PageData<DeptKpiConfigDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<DeptKpiConfigDTO> get(@PathVariable("id") String id){
DeptKpiConfigDTO data = deptKpiConfigService.get(id);
return new Result<DeptKpiConfigDTO>().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<String, Object> params, HttpServletResponse response) throws Exception {
List<DeptKpiConfigDTO> list = deptKpiConfigService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, DeptKpiConfigExcel.class);
}
}

33
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
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<DeptKpiConfigEntity> {
}

56
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
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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;
}

65
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
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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;
}

47
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
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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;
}
}

95
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
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<DeptKpiConfigEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<DeptKpiConfigDTO>
* @author generator
* @date 2019-10-21
*/
PageData<DeptKpiConfigDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<DeptKpiConfigDTO>
* @author generator
* @date 2019-10-21
*/
List<DeptKpiConfigDTO> list(Map<String, Object> 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);
}

104
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
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<DeptKpiConfigDao, DeptKpiConfigEntity> implements DeptKpiConfigService {
@Autowired
private DeptKpiConfigRedis deptKpiConfigRedis;
@Override
public PageData<DeptKpiConfigDTO> page(Map<String, Object> params) {
IPage<DeptKpiConfigEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, DeptKpiConfigDTO.class);
}
@Override
public List<DeptKpiConfigDTO> list(Map<String, Object> params) {
List<DeptKpiConfigEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, DeptKpiConfigDTO.class);
}
private QueryWrapper<DeptKpiConfigEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<DeptKpiConfigEntity> 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));
}
}

94
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
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<PageData<DeptRespondTimeConfigDTO>> page(@RequestParam Map<String, Object> params){
PageData<DeptRespondTimeConfigDTO> page = deptRespondTimeConfigService.page(params);
return new Result<PageData<DeptRespondTimeConfigDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<DeptRespondTimeConfigDTO> get(@PathVariable("id") String id){
DeptRespondTimeConfigDTO data = deptRespondTimeConfigService.get(id);
return new Result<DeptRespondTimeConfigDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody DeptRespondTimeConfigDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
deptRespondTimeConfigService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody DeptRespondTimeConfigDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
deptRespondTimeConfigService.update(dto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
deptRespondTimeConfigService.delete(ids);
return new Result();
}
@GetMapping("export")
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<DeptRespondTimeConfigDTO> list = deptRespondTimeConfigService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, DeptRespondTimeConfigExcel.class);
}
}

33
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/time/dao/DeptRespondTimeConfigDao.java

@ -0,0 +1,33 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.modules.time.dao;
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao;
import com.elink.esua.epdc.modules.time.entity.DeptRespondTimeConfigEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 绩效考核时间规则表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2019-10-23
*/
@Mapper
public interface DeptRespondTimeConfigDao extends BaseDao<DeptRespondTimeConfigEntity> {
}

97
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/time/entity/DeptRespondTimeConfigEntity.java

@ -0,0 +1,97 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.modules.time.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.math.BigDecimal;
import java.util.Date;
/**
* 绩效考核时间规则表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2019-10-23
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("epdc_dept_respond_time_config")
public class DeptRespondTimeConfigEntity extends BaseEpdcEntity {
private static final long serialVersionUID = 1L;
/**
* 议题或项目类别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;
}

90
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/time/excel/DeptRespondTimeConfigExcel.java

@ -0,0 +1,90 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.modules.time.excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
/**
* 绩效考核时间规则表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2019-10-23
*/
@Data
public class DeptRespondTimeConfigExcel {
@Excel(name = "ID")
private String id;
@Excel(name = "议题或项目类别ID(不可重复)")
private String categoryId;
@Excel(name = "类别名称")
private String categoryName;
@Excel(name = "网格长在多少小时内响应算是有效响应")
private Integer gridValidRespLimitHour;
@Excel(name = "网格长在多少小时内关闭算是有效关闭")
private Integer gridValidCloseLimitHour;
@Excel(name = "社区在多少小时内响应算是有效响应")
private Integer commValidRespLimitHour;
@Excel(name = "街道在多少小时内响应算是有效响应")
private Integer streetValidRespLimitHour;
@Excel(name = "区直在多少小时内响应算是有效响应")
private Integer districtValidRespLimitHour;
@Excel(name = "超过多少小时响应算是无效响应。此值应大于各部门的有效响应值。若响应发生在有效响应与无效响应之间,为超时响应。")
private Integer invalidRespLimitHour;
@Excel(name = "有效响应系数")
private BigDecimal validRespCoefficient;
@Excel(name = "超时响应系数")
private BigDecimal overtimeRespCoefficient;
@Excel(name = "无效响应系数")
private BigDecimal invalidRespCoefficient;
@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;
}

47
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/time/redis/DeptRespondTimeConfigRedis.java

@ -0,0 +1,47 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.modules.time.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-23
*/
@Component
public class DeptRespondTimeConfigRedis {
@Autowired
private RedisUtils redisUtils;
public void delete(Object[] ids) {
}
public void set(){
}
public String get(String id){
return null;
}
}

95
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/time/service/DeptRespondTimeConfigService.java

@ -0,0 +1,95 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.modules.time.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.time.DeptRespondTimeConfigDTO;
import com.elink.esua.epdc.modules.time.entity.DeptRespondTimeConfigEntity;
import java.util.List;
import java.util.Map;
/**
* 绩效考核时间规则表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2019-10-23
*/
public interface DeptRespondTimeConfigService extends BaseService<DeptRespondTimeConfigEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<DeptRespondTimeConfigDTO>
* @author generator
* @date 2019-10-23
*/
PageData<DeptRespondTimeConfigDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<DeptRespondTimeConfigDTO>
* @author generator
* @date 2019-10-23
*/
List<DeptRespondTimeConfigDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return DeptRespondTimeConfigDTO
* @author generator
* @date 2019-10-23
*/
DeptRespondTimeConfigDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2019-10-23
*/
void save(DeptRespondTimeConfigDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2019-10-23
*/
void update(DeptRespondTimeConfigDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2019-10-23
*/
void delete(String[] ids);
}

104
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/time/service/impl/DeptRespondTimeConfigServiceImpl.java

@ -0,0 +1,104 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.modules.time.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.time.dao.DeptRespondTimeConfigDao;
import com.elink.esua.epdc.dto.time.DeptRespondTimeConfigDTO;
import com.elink.esua.epdc.modules.time.entity.DeptRespondTimeConfigEntity;
import com.elink.esua.epdc.modules.time.redis.DeptRespondTimeConfigRedis;
import com.elink.esua.epdc.modules.time.service.DeptRespondTimeConfigService;
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-23
*/
@Service
public class DeptRespondTimeConfigServiceImpl extends BaseServiceImpl<DeptRespondTimeConfigDao, DeptRespondTimeConfigEntity> implements DeptRespondTimeConfigService {
@Autowired
private DeptRespondTimeConfigRedis deptRespondTimeConfigRedis;
@Override
public PageData<DeptRespondTimeConfigDTO> page(Map<String, Object> params) {
IPage<DeptRespondTimeConfigEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, DeptRespondTimeConfigDTO.class);
}
@Override
public List<DeptRespondTimeConfigDTO> list(Map<String, Object> params) {
List<DeptRespondTimeConfigEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, DeptRespondTimeConfigDTO.class);
}
private QueryWrapper<DeptRespondTimeConfigEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<DeptRespondTimeConfigEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public DeptRespondTimeConfigDTO get(String id) {
DeptRespondTimeConfigEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, DeptRespondTimeConfigDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(DeptRespondTimeConfigDTO dto) {
DeptRespondTimeConfigEntity entity = ConvertUtils.sourceToTarget(dto, DeptRespondTimeConfigEntity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(DeptRespondTimeConfigDTO dto) {
DeptRespondTimeConfigEntity entity = ConvertUtils.sourceToTarget(dto, DeptRespondTimeConfigEntity.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteBatchIds(Arrays.asList(ids));
}
}

5
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/logback-spring.xml

@ -133,7 +133,10 @@
<logger name="org.springframework.web" level="INFO"/>
<logger name="org.springboot.sample" level="INFO"/>
<logger name="com.elink.esua.epdc" level="INFO"/>
<logger name="com.elink.esua.epdc.dao" level="DEBUG"/>
<logger name="com.elink.esua.epdc.modules.item.dao" level="DEBUG"/>
<logger name="com.elink.esua.epdc.modules.comment.dao" level="DEBUG"/>
<logger name="com.elink.esua.epdc.modules.events.dao" level="DEBUG"/>
<logger name="com.elink.esua.epdc.modules.issue.dao" level="DEBUG"/>
<root level="INFO">
<appender-ref ref="DEBUG_FILE"/>
<appender-ref ref="INFO_FILE"/>

61
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/interfacelog/InterfaceLogDao.xml

@ -0,0 +1,61 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.elink.esua.epdc.modules.interfacelog.dao.InterfaceLogDao">
<resultMap type="com.elink.esua.epdc.modules.interfacelog.entity.InterfaceLogEntity" id="interfaceLogMap">
<result property="id" column="ID"/>
<result property="referenceId" column="REFERENCE_ID"/>
<result property="businessType" column="BUSINESS_TYPE"/>
<result property="interfaceName" column="INTERFACE_NAME"/>
<result property="successFlag" column="SUCCESS_FLAG"/>
<result property="callMsgBody" column="CALL_MSG_BODY"/>
<result property="returnMsgBody" column="RETURN_MSG_BODY"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
<result property="delFlag" column="DEL_FLAG"/>
</resultMap>
<!-- -->
<select id="listInterfaceLog" parameterType="map"
resultType="com.elink.esua.epdc.dto.interfacelog.InterfaceLogDTO">
select eil.id,
eil.REFERENCE_ID as referenceId,
eil.BUSINESS_TYPE as businessType,
eil.INTERFACE_NAME as interfaceName,
eil.SUCCESS_FLAG as successFlag,
eil.CALL_MSG_BODY as callMsgBody,
eil.RETURN_MSG_BODY as returnMsgBody,
eil.CREATED_BY as createdBy,
eil.CREATED_TIME as createdTime,
eil.UPDATED_BY as updatedBy,
eil.UPDATED_TIME as updatedTime,
eil.DEL_FLAG as delFlag
from epdc_interface_log eil
where eil.DEL_FLAG='0'
<if test="businessType != null and businessType != ''">
and eil.BUSINESS_TYPE=#{businessType}
</if>
<if test="interfaceName != null and interfaceName != ''">
and eil.INTERFACE_NAME like concat('%',#{interfaceName},'%')
</if>
<if test="successFlag != null and successFlag != ''">
and eil.SUCCESS_FLAG=#{successFlag}
</if>
<if test="callMsgBody != null and callMsgBody != ''">
and eil.CALL_MSG_BODY like concat('%',#{callMsgBody},'%')
</if>
<if test="returnMsgBody != null and returnMsgBody != ''">
and eil.RETURN_MSG_BODY like concat('%',#{returnMsgBody},'%')
</if>
<if test="startTime != null and startTime != ''">
and DATE_FORMAT( eil.CREATED_TIME, '%Y-%m-%d' ) &gt;=#{startTime}
</if>
<if test="endTime != null and endTime != ''">
and DATE_FORMAT( eil.CREATED_TIME, '%Y-%m-%d' ) &lt;=#{endTime}
</if>
order by eil.CREATED_TIME desc
</select>
</mapper>

22
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/log/DeptRespondLogDao.xml

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.elink.esua.epdc.modules.log.dao.DeptRespondLogDao">
<resultMap type="com.elink.esua.epdc.modules.log.entity.DeptRespondLogEntity" id="deptRespondLogMap">
<result property="id" column="ID"/>
<result property="referenceId" column="REFERENCE_ID"/>
<result property="referenceType" column="REFERENCE_TYPE"/>
<result property="respondDeptId" column="RESPOND_DEPT_ID"/>
<result property="respondTime" column="RESPOND_TIME"/>
<result property="respondType" column="RESPOND_TYPE"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
</mapper>

20
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/rule/DeptKpiConfigDao.xml

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.elink.esua.epdc.dao.DeptKpiConfigDao">
<resultMap type="com.elink.esua.epdc.modules.rule.entity.DeptKpiConfigEntity" id="deptKpiConfigMap">
<result property="id" column="ID"/>
<result property="kpiItemCode" column="KPI_ITEM_CODE"/>
<result property="kpiItemValue" column="KPI_ITEM_VALUE"/>
<result property="kpiItemDesc" column="KPI_ITEM_DESC"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
</mapper>

28
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/tiime/DeptRespondTimeConfigDao.xml

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.elink.esua.epdc.modules.time.dao.DeptRespondTimeConfigDao">
<resultMap type="com.elink.esua.epdc.modules.time.entity.DeptRespondTimeConfigEntity" id="deptRespondTimeConfigMap">
<result property="id" column="ID"/>
<result property="categoryId" column="category_id"/>
<result property="categoryName" column="category_name"/>
<result property="gridValidRespLimitHour" column="grid_valid_resp_limit_hour"/>
<result property="gridValidCloseLimitHour" column="grid_valid_close_limit_hour"/>
<result property="commValidRespLimitHour" column="comm_valid_resp_limit_hour"/>
<result property="streetValidRespLimitHour" column="street_valid_resp_limit_hour"/>
<result property="districtValidRespLimitHour" column="district_valid_resp_limit_hour"/>
<result property="invalidRespLimitHour" column="invalid_resp_limit_hour"/>
<result property="validRespCoefficient" column="valid_resp_coefficient"/>
<result property="overtimeRespCoefficient" column="overtime_resp_coefficient"/>
<result property="invalidRespCoefficient" column="invalid_resp_coefficient"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
</mapper>

42
esua-epdc/epdc-module/epdc-group/epdc-group-client/pom.xml

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>epdc-group</artifactId>
<groupId>com.esua.epdc</groupId>
<version>1.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>epdc-group-client</artifactId>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>com.esua.epdc</groupId>
<artifactId>epdc-commons-tools</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.esua.epdc</groupId>
<artifactId>epdc-admin-client</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.esua.epdc</groupId>
<artifactId>epdc-news-client</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.esua.epdc</groupId>
<artifactId>epdc-user-client</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.esua.epdc</groupId>
<artifactId>epdc-events-client</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>
</project>

141
esua-epdc/epdc-module/epdc-group/epdc-group-client/src/main/java/com.elink.esua.epdc/dto/comment/TopicCommentDTO.java

@ -0,0 +1,141 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.dto.comment;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 话题评论表 话题评论表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2019-10-23
*/
@Data
public class TopicCommentDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 话题ID
*/
private String topicId;
/**
* 评论人ID
*/
private String userId;
/**
* 评论人昵称
*/
private String username;
/**
* 评论人头像
*/
private String userFace;
/**
* 评论内容
*/
private String content;
/**
* 评论类型 0评论1回复2回复的回复
*/
private String commentType;
/**
* 回复的评论ID
*/
private String commentId;
/**
* 被回复数
*/
private Integer replyCount;
/**
* 被回复人ID
*/
private String replyUserId;
/**
* 被回复人名称
*/
private String replyUsername;
/**
* 被回复人头像
*/
private String replyUserFace;
/**
* 点赞数
*/
private Integer likeCount;
/**
* 点踩数
*/
private Integer unLikeCount;
/**
* 屏蔽标识 0未屏蔽1已屏蔽
*/
private String shieldFlag;
/**
* 删除标记 0未删除1已删除
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

48
esua-epdc/epdc-module/epdc-group/epdc-group-client/src/main/java/com.elink.esua.epdc/dto/comment/TopicCommentFormDTO.java

@ -0,0 +1,48 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
* <p>
* https://www.renren.io
* <p>
* 版权所有侵权必究
*/
package com.elink.esua.epdc.dto.comment;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
/**
* 评论议题提交评论
*
*/
@Data
public class TopicCommentFormDTO {
private static final long serialVersionUID = 1L;
private String topicId;
private String faCommentId;
@Size(min = 1, max = 500, message = "评论内容不能超过500字")
private String content;
/**
* 评论人ID
*/
@NotBlank(message = "评论人ID不能为空")
private String userId;
/**
* 评论人昵称
*/
private String userName;
/**
* 评论人头像
*/
private String userFace;
}

62
esua-epdc/epdc-module/epdc-group/epdc-group-client/src/main/java/com.elink.esua.epdc/dto/comment/TopicCommentListDTO.java

@ -0,0 +1,62 @@
package com.elink.esua.epdc.dto.comment;
import com.elink.esua.epdc.dto.topic.ReplyCommentDto;
import com.elink.esua.epdc.dto.topic.UserBaseInfoDto;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* @Authorliuchuang
* @Date2019/11/12 10:55
*/
@Data
public class TopicCommentListDTO implements Serializable {
private static final long serialVersionUID = 1678760230045285655L;
/**
* 评论ID
*/
private String commentId;
/**
* 内容
*/
private String content;
/**
* 用户是否赞过false未赞
*/
private boolean userLike;
/**
* 用户是否踩过true踩
*/
private boolean userDislike;
/**
* 评论时间
*/
private Date commentTime;
/**
* 赞数
*/
private Integer approveNum;
/**
* 踩数
*/
private Integer opposeNum;
/**
* 表态次数
*/
private Integer attitudeNum;
/**
* 用户信息
*/
private UserBaseInfoDto user;
/**
* 屏蔽标识 0未屏蔽1已屏蔽
*/
private String shieldFlag;
/**
* 回复评论信息
*/
private ReplyCommentDto replyComment;
}

47
esua-epdc/epdc-module/epdc-group/epdc-group-client/src/main/java/com.elink.esua.epdc/dto/comment/TopicCommentStatementFormDTO.java

@ -0,0 +1,47 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.dto.comment;
import java.io.Serializable;
import lombok.Data;
@Data
public class TopicCommentStatementFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 表态 0赞1踩2取消点赞3取消点踩
*/
private String attitude;
/**
* 评论ID
*/
private String commentId;
private String topicId;
private String useId;
private String userName;
}

86
esua-epdc/epdc-module/epdc-group/epdc-group-client/src/main/java/com.elink.esua.epdc/dto/comment/TopicCommentUserAttitudeDTO.java

@ -0,0 +1,86 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.dto.comment;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 话题评论用户表态表 话题评论用户表态表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2019-10-23
*/
@Data
public class TopicCommentUserAttitudeDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 评论ID
*/
private String commentId;
/**
* 用户ID
*/
private String userId;
/**
* 表态标识 0点赞1点踩
*/
private String attitudeFlag;
/**
* 删除标记 0未删除1删除
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

43
esua-epdc/epdc-module/epdc-group/epdc-group-client/src/main/java/com.elink.esua.epdc/dto/comment/TopicCommentsFormDTO.java

@ -0,0 +1,43 @@
package com.elink.esua.epdc.dto.comment;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
/**
* 移动端评论表单DTO
* @Author LC
* @Date 2019/9/9 15:09
*/
@Data
public class TopicCommentsFormDTO implements Serializable {
private static final long serialVersionUID = -3804142943077174555L;
/**
* 页码
*/
@NotNull(message = "页码不能为空")
private Integer pageIndex;
/**
* 页容量
*/
@NotNull(message = "分页数量不能为空")
private Integer pageSize;
/**
* 时间戳(yyyy-MM-dd HH:mm:ss)
*/
private String timestamp;
/**
* 列表类型 0最新1最热
*/
@NotBlank(message = "列表类型不能为空")
private String orderType;
private String topicId;
/**
* 用户ID
*/
private String userId;
}

27
esua-epdc/epdc-module/epdc-group/epdc-group-client/src/main/java/com.elink.esua.epdc/dto/comment/TopicCommentsResultDTO.java

@ -0,0 +1,27 @@
package com.elink.esua.epdc.dto.comment;
import com.elink.esua.epdc.dto.topic.TopicCommentsDTO;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 移动端评论列表DTO
* @Author LC
* @Date 2019/9/9 14:46
*/
@Data
public class TopicCommentsResultDTO implements Serializable {
private static final long serialVersionUID = -5087234859322214256L;
/**
* 表态数
*/
private long statementNum;
/**
* 评论
*/
List<TopicCommentsDTO> commentsList;
}

16
esua-epdc/epdc-module/epdc-group/epdc-group-client/src/main/java/com.elink.esua.epdc/dto/comment/TopicDeleteCommentsFormDTO.java

@ -0,0 +1,16 @@
package com.elink.esua.epdc.dto.comment;
import lombok.Data;
import java.io.Serializable;
/**
* @Authorliuchuang
* @Date2019/11/12 11:06
*/
@Data
public class TopicDeleteCommentsFormDTO implements Serializable {
private static final long serialVersionUID = -8359841146893592752L;
private String[] commentIds;
}

161
esua-epdc/epdc-module/epdc-group/epdc-group-client/src/main/java/com.elink.esua.epdc/dto/constant/GroupNoticeConstant.java

@ -0,0 +1,161 @@
package com.elink.esua.epdc.dto.constant;
/**
*
* 发送消息常量
*
* @Authorliuchuang
* @Date2019/10/21 13:41
*/
public interface GroupNoticeConstant {
/**
* 社群审核未通过
*/
String NOTICE_GROUP_NOT_PASSED = "你创建的社群【审核未通过】";
/**
* 社群审核通过
*/
String NOTICE_GROUP_PASSED = "你创建的社群【审核通过】";
/**
* 社群解散
*/
String NOTICE_GROUP_DISBAND = "你加入的社群已被解散";
/**
* 删除社群成员
*/
String NOTICE_GROUP_USER_REMOVED_MEMBER = "你已被群主移除社群";
/**
* 邀请入群
*/
String NOTICE_GROUP_USER_INVITED = "您已加入社群";
/**
* 邀请入群内容
*/
String NOTICE_GROUP_USER_INVITED_CONTENT = "您已被群主邀请加入groupName社群,快进入社群看看吧。";
/**
* 入群申请通过
*/
String NOTICE_GROUP_USER_REVIEW_PASSED = "入群申请【审核通过】";
/**
* 入群申请不通过
*/
String NOTICE_GROUP_USER_REVIEW_NOT_PASSED = "入群申请【审核不通过】";
/**
* 入群申请通过内容
*/
String NOTICE_GROUP_USER_REVIEW_PASSED_CONTENT = "您加入groupName社群的申请,审核已通过,快进入社群吧。";
/**
* 入群申请不通过内容
*/
String NOTICE_GROUP_USER_REVIEW_NOT_PASSED_CONTENT = "您加入groupName社群的申请,审核未通过,原因:auditOpinion";
/**
* 退出社群
*/
String NOTICE_GROUP_QUIT = "已退出社群";
/**
* 话题关闭
*/
String NOTICE_GROUP_TOPIC_CLOSED = "话题关闭";
/**
* 转议题-不通过
*/
String NOTICE_TOPIC_TO_ISSUE_NOT_PASS = "转议题【审核不通过】";
/**
* 转议题-通过
*/
String NOTICE_TOPIC_TO_ISSUE_PASS = "转议题【审核通过】";
/**
* 转议题-通过-内容-群主
*/
String NOTICE_TOPIC_TO_ISSUE_PASS_LORD_CONTENT = "您转报的话题已经审核通过并成为议题,可在“党群议事”查看。";
/**
* 转议题-通过-内容-发布话题用户
*/
String NOTICE_TOPIC_TO_ISSUE_PASS_TOPIC_USER_CONTENT = "您的话题已经审核通过并成为议题,可在 党群议事查看。";
/**
* 我的消息类型0审核通知
*/
String NOTICE_TYPE_AUDIT_NOTICE = "0";
/**
* 我的消息类型1互动通知
*/
String NOTICE_TYPE_INTERACTIVE_NOTICE = "1";
/**
* 我的消息类型2进度通知
*/
String NOTICE_TYPE_PROGRESS_NOTICE = "2";
/**
* 我的消息类型3社群通知
*/
String NOTICE_TYPE_GROUP_NOTICE = "3";
/**
* 消息所属业务类型社群审核通过
*/
String NOTICE_BUSINESS_TYPE_GROUP_PASSED = "groupPassed";
/**
* 消息所属业务类型社群审核未通过或解散
*/
String NOTICE_BUSINESS_TYPE_GROUP_NOT_PASSED_OR_DISBAND = "groupNotPassedOrDisband";
/**
* 消息所属业务类型移除社群成员
*/
String NOTICE_BUSINESS_TYPE_GROUP_USER_REMOVED_MEMBER = "groupRemovedMember";
/**
* 消息所属业务类型退出社群
*/
String NOTICE_BUSINESS_TYPE_GROUP_USER_QUIT = "groupQuit";
/**
* 社群邀请
*/
String NOTICE_BUSINESS_TYPE_GROUP_USER_INVITED = "groupInvited";
/**
* 入群申请通过
*/
String NOTICE_BUSINESS_TYPE_GROUP_USER_REVIEW_PASSED = "groupUserReviewPassed";
/**
* 入群申请未通过
*/
String NOTICE_BUSINESS_TYPE_GROUP_USER_REVIEW_NOT_PASS = "groupUserReviewNotPass";
/**
* 话题关闭
*/
String NOTICE_BUSINESS_TYPE_GROUP_TOPIC_CLOSED = "groupTopicClosed";
/**
* 话题转议题通过
*/
String NOTICE_BUSINESS_TYPE_TOPIC_TO_ISSUE_PASSED = "topicToIssuePass";
/**
* 话题转议题不通过
*/
String NOTICE_BUSINESS_TYPE_TOPIC_TO_ISSUE_NOT_PASSED = "topicToIssueNotPassed ";
}

16
esua-epdc/epdc-module/epdc-group/epdc-group-client/src/main/java/com.elink.esua.epdc/dto/constant/TopicImageConstant.java

@ -0,0 +1,16 @@
package com.elink.esua.epdc.dto.constant;
/**
*
* 图片类型
*
* @Authorliuchuang
* @Date2019/11/6 16:17
*/
public interface TopicImageConstant {
/**
* 图片类型-事件
*/
String TYPE_IMAGE_BIZ_TOPIC = "topic";
}

52
esua-epdc/epdc-module/epdc-group/epdc-group-client/src/main/java/com.elink.esua.epdc/dto/constant/TopicNoticeConstant.java

@ -0,0 +1,52 @@
package com.elink.esua.epdc.dto.constant;
/**
* 发送消息常量
* @Author LC
* @Date 2019/9/18 17:26
*/
public interface TopicNoticeConstant {
/**
* 话题被评论
*/
String NOTICE_TOPIC_COMMENT = "你的话题【有新评论】";
/**
* 评论被回复
*/
String NOTICE_TOPIC_COMMENT_REPLY = "你的评论【有新回复】";
/**
* 评论支持
*/
String NOTICE_COMMENT_APPROVE = "你的评论【有新的支持】";
/**
* 评论反对
*/
String NOTICE_COMMENT_OPPOSE = "你的评论【有新的反对】";
/**
* 我的消息类型1互动通知
*/
String NOTICE_TYPE_INTERACTIVE_NOTICE = "1";
/**
* 消息所属业务类型话题评论
*/
String NOTICE_BUSINESS_TYPE_TOPIC_COMMENT = "topicComment";
/**
* 消息所属业务类型话题评论回复
*/
String NOTICE_BUSINESS_TYPE_TOPIC_COMMENT_REPLY = "topicCommentReply";
/**
* 消息所属业务类型话题评论支持
*/
String NOTICE_BUSINESS_TYPE_TOPIC_COMMENT_APPROVE = "topicCommentApprove";
/**
* 消息所属业务类型话题评论反对
*/
String NOTICE_BUSINESS_TYPE_TOPIC_COMMENT_OPPOSE = "topicCommentOppose";
}

56
esua-epdc/epdc-module/epdc-group/epdc-group-client/src/main/java/com.elink.esua.epdc/dto/enums/GroupStateEnum.java

@ -0,0 +1,56 @@
package com.elink.esua.epdc.dto.enums;
/**
*
* 社群状态枚举
*
* @Authorliuchuang
* @Date2019/10/17 14:15
*/
public enum GroupStateEnum {
/**
* 0-待审核
*/
GROUP_STATE_PENDING_REVIEW(0, "待审核"),
/**
* 5-审核不通过
*/
GROUP_STATE_AUDIT_NOT_PASSED(5, "审核不通过"),
/**
* 10-审核通过
*/
GROUP_STATE_EXAMINATION_PASSED(10, "审核通过"),
/**
* 15-禁言
*/
GROUP_STATE_BANNED(15, "禁言"),
/**
* 20-已解散
*/
GROUP_STATE_DISBANDED(20, "已解散");
private Integer value;
private String name;
GroupStateEnum(Integer value, String name) {
this.value = value;
this.name = name;
}
public Integer getValue() {
return value;
}
public void setValue(Integer value) {
this.value = value;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save