Browse Source

积分埋点 接口拆分提交

feature/syp_points
songyunpeng 5 years ago
parent
commit
4890e429a6
  1. 8
      esua-epdc/epdc-commons/epdc-commons-points-tools/src/main/java/com/elink/esua/epdc/pointcommons/tools/aop/UserBehaviorAop.java
  2. 7
      esua-epdc/epdc-commons/epdc-commons-points-tools/src/main/java/com/elink/esua/epdc/pointcommons/tools/dto/PointsLogsAddFormDTO.java
  3. 11
      esua-epdc/epdc-commons/epdc-commons-points-tools/src/main/java/com/elink/esua/epdc/pointcommons/tools/dto/PointsLogsResultDTO.java
  4. 6
      esua-epdc/epdc-commons/epdc-commons-points-tools/src/main/java/com/elink/esua/epdc/pointcommons/tools/feign/PointsCommonFeignClient.java
  5. 4
      esua-epdc/epdc-commons/epdc-commons-points-tools/src/main/java/com/elink/esua/epdc/pointcommons/tools/feign/fallback/PointsCommonFeignClientFallback.java
  6. 48
      esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/enums/BehaviorEnum.java
  7. 22
      esua-epdc/epdc-module/epdc-api/epdc-api-server/pom.xml
  8. 73
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiCommentController.java
  9. 4
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiGroupController.java
  10. 53
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiIssueController.java
  11. 32
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiTopicCommentController.java
  12. 46
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiWorkIssueController.java
  13. 56
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiWorkItemController.java
  14. 4
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/NewsServiceImpl.java
  15. 8
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/resources/application.yml
  16. 6
      esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/events/EpdcEventsDetailDTO.java
  17. 5
      esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/events/form/EpdcEventsReviewFormDTO.java
  18. 5
      esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/issue/IssueWaitHandleDetailDTO.java
  19. 5
      esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/issue/form/IssueWaitHandleSubmitFormDTO.java
  20. 4
      esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/item/form/ItemHandleSubmitFormDTO.java
  21. 4
      esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/item/result/ItemDetailForPCEndResultDTO.java
  22. 31
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/controller/EpdcEventsController.java
  23. 44
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/issue/controller/IssueController.java
  24. 58
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/controller/ItemController.java
  25. 2
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/events/EpdcEventsDao.xml
  26. 2
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/issue/IssueDao.xml
  27. 2
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/item/ItemDao.xml
  28. 5
      esua-epdc/epdc-module/epdc-group/epdc-group-client/src/main/java/com.elink.esua.epdc/dto/group/GroupDetailDTO.java
  29. 7
      esua-epdc/epdc-module/epdc-group/epdc-group-client/src/main/java/com.elink.esua.epdc/dto/group/form/GroupCreateFormDTO.java
  30. 11
      esua-epdc/epdc-module/epdc-group/epdc-group-server/pom.xml
  31. 55
      esua-epdc/epdc-module/epdc-group/epdc-group-server/src/main/java/com.elink.esua.epdc/modules/group/controller/GroupController.java
  32. 5
      esua-epdc/epdc-module/epdc-group/epdc-group-server/src/main/java/com.elink.esua.epdc/modules/group/entity/GroupEntity.java
  33. 2
      esua-epdc/epdc-module/epdc-group/epdc-group-server/src/main/java/com.elink.esua.epdc/modules/group/service/impl/GroupServiceImpl.java
  34. 3
      esua-epdc/epdc-module/epdc-group/epdc-group-server/src/main/resources/application.yml
  35. 3
      esua-epdc/epdc-module/epdc-group/epdc-group-server/src/main/resources/mapper/group/GroupDao.xml
  36. 13
      esua-epdc/epdc-module/epdc-points/epdc-points-client/src/main/java/com/elink/esua/epdc/dto/PointsLogsDTO.java
  37. 6
      esua-epdc/epdc-module/epdc-points/epdc-points-client/src/main/java/com/elink/esua/epdc/dto/form/PointsLogsAddFormDTO.java
  38. 6
      esua-epdc/epdc-module/epdc-points/epdc-points-client/src/main/java/com/elink/esua/epdc/dto/form/PointsLogsFormDTO.java
  39. 13
      esua-epdc/epdc-module/epdc-points/epdc-points-client/src/main/java/com/elink/esua/epdc/dto/result/PointsLogsResultDTO.java
  40. 7
      esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/entity/PointsLogsEntity.java
  41. 1
      esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/mq/PointsModifyConsumer.java

8
esua-epdc/epdc-commons/epdc-commons-points-tools/src/main/java/com/elink/esua/epdc/pointcommons/tools/aop/UserBehaviorAop.java

@ -9,10 +9,11 @@ import com.elink.esua.epdc.commons.tools.redis.RedisUtils;
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.pointcommons.tools.dto.BehaviorResultDto;
import com.elink.esua.epdc.pointcommons.tools.feign.PointsCommonFeignClient;
import com.elink.esua.epdc.pointcommons.tools.rocketmq.dto.BehaviorDto;
import com.elink.esua.epdc.pointcommons.tools.rocketmq.producer.PointsProducer;
import com.elink.esua.epdc.pointcommons.tools.annotation.RecordUserBehavior;
import com.elink.esua.epdc.pointcommons.tools.feign.PointsFeignClient;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.aspectj.lang.JoinPoint;
@ -41,7 +42,7 @@ public class UserBehaviorAop {
private RedisUtils redisUtils;
@Autowired
private PointsFeignClient pointsFeignClient;
private PointsCommonFeignClient pointsFeignClient;
@Autowired
private PointsProducer pointsProducer;
@ -151,6 +152,9 @@ public class UserBehaviorAop {
//组装基本信息
String referenceId = this.covertData(recordUserBehavior.referenceId(), args, argNames);
String userId = this.covertData(recordUserBehavior.userId(), args, argNames);
if(StringUtils.isBlank(userId) || StringUtils.isBlank(referenceId)){
return;
}
BehaviorDto behaviorDto = new BehaviorDto();
behaviorDto.setBehavior(behaviorCode);
behaviorDto.setReferenceId(referenceId);

7
esua-epdc/epdc-commons/epdc-commons-points-tools/src/main/java/com/elink/esua/epdc/pointcommons/tools/dto/PointsLogsAddFormDTO.java

@ -42,6 +42,13 @@ public class PointsLogsAddFormDTO {
*/
private String nickname;
/**
* 用户头像
*/
private String faceImg;
/**
* 关联表ID
*/

11
esua-epdc/epdc-commons/epdc-commons-points-tools/src/main/java/com/elink/esua/epdc/pointcommons/tools/dto/PointsLogsResultDTO.java

@ -44,6 +44,17 @@ public class PointsLogsResultDTO implements Serializable {
*/
private String userId;
/**
* 用户昵称
*/
private String nickname;
/**
* 用户头像
*/
private String faceImg;
/**
* 关联表ID
*/

6
esua-epdc/epdc-commons/epdc-commons-points-tools/src/main/java/com/elink/esua/epdc/pointcommons/tools/feign/PointsFeignClient.java → esua-epdc/epdc-commons/epdc-commons-points-tools/src/main/java/com/elink/esua/epdc/pointcommons/tools/feign/PointsCommonFeignClient.java

@ -3,7 +3,7 @@ package com.elink.esua.epdc.pointcommons.tools.feign;
import com.elink.esua.epdc.commons.tools.constant.ServiceConstant;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.pointcommons.tools.dto.*;
import com.elink.esua.epdc.pointcommons.tools.feign.fallback.PointsFeignClientFallback;
import com.elink.esua.epdc.pointcommons.tools.feign.fallback.PointsCommonFeignClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PathVariable;
@ -15,8 +15,8 @@ import org.springframework.web.bind.annotation.RequestBody;
* @author songyunpeng
* @date 2020/04/28
*/
@FeignClient(name = ServiceConstant.EPDC_POINTS_SERVER, fallback = PointsFeignClientFallback.class, url = "http://127.0.0.1:9070")
public interface PointsFeignClient {
@FeignClient(name = ServiceConstant.EPDC_POINTS_SERVER, fallback = PointsCommonFeignClientFallback.class, url = "http://127.0.0.1:9070")
public interface PointsCommonFeignClient {
/**
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.lang.String>

4
esua-epdc/epdc-commons/epdc-commons-points-tools/src/main/java/com/elink/esua/epdc/pointcommons/tools/feign/fallback/PointsFeignClientFallback.java → esua-epdc/epdc-commons/epdc-commons-points-tools/src/main/java/com/elink/esua/epdc/pointcommons/tools/feign/fallback/PointsCommonFeignClientFallback.java

@ -4,7 +4,7 @@ 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.pointcommons.tools.dto.*;
import com.elink.esua.epdc.pointcommons.tools.feign.PointsFeignClient;
import com.elink.esua.epdc.pointcommons.tools.feign.PointsCommonFeignClient;
import org.springframework.stereotype.Component;
/**
@ -12,7 +12,7 @@ import org.springframework.stereotype.Component;
* @date 2020/4/28 9:30
*/
@Component
public class PointsFeignClientFallback implements PointsFeignClient {
public class PointsCommonFeignClientFallback implements PointsCommonFeignClient {
@Override

48
esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/enums/BehaviorEnum.java

@ -103,6 +103,35 @@ public enum BehaviorEnum {
* 议题转成项目
*/
ISSUE_TO_PROJECT("issue_to_project"),
/**
* 议题回应
*/
ISSUE_RESPONSE("issue_response"),
/**
* 议题关闭
*/
ISSUE_CLOSE("issue_close"),
/**
* 项目的回应
*/
PROJECT_RESPONSE("project_response"),
/**
* 项目的关闭
*/
PROJECT_CLOSE("project_close"),
/**
* 项目的吹哨
*/
PROJECT_WHISTLE("project_whistle"),
/**
* 项目的结案
*/
PROJECT_CLOSE_CASE("project_close_case"),
/**
* 项目的点赞
*/
@ -119,6 +148,15 @@ public enum BehaviorEnum {
* 项目评论的回复
*/
PROJECT_COMMENT_REPLY("project_comment_reply"),
/**
* 项目评论的点赞
*/
PROJECT_COMMENT_SUPPORT("project_comment_support"),
/**
* 项目评论的点踩
*/
PROJECT_COMMENT_OPPOSITION("project_comment_opposition"),
/**
* 项目浏览
*/
@ -191,6 +229,16 @@ public enum BehaviorEnum {
* 话题评论的回复
*/
GROUP_COMMENT_REPLY("group_comment_reply"),
/**
* 话题评论的点赞
*/
GROUP_TOPIC_COMMENT_SUPPORT("group_topic_comment_support"),
/**
* 话题评论的点踩
*/
GROUP_TOPIC_COMMENT_OPPOSITION("group_topic_comment_opposition"),
/**
* 话题浏览
*/

22
esua-epdc/epdc-module/epdc-api/epdc-api-server/pom.xml

@ -17,6 +17,11 @@
</properties>
<dependencies>
<dependency>
<groupId>com.esua.epdc</groupId>
<artifactId>epdc-commons-points-tools</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.esua.epdc</groupId>
<artifactId>epdc-api-client</artifactId>
@ -180,6 +185,11 @@
<!--工作端小程序-->
<work.wx.ma.appId>wx826a8435db9e0947</work.wx.ma.appId>
<work.wx.ma.secret>cbcb7c422f00d165105b34dc80bb825f</work.wx.ma.secret>
<!--RocketMQ-->
<rocketmq.name.server>47.104.85.99:9876;114.215.125.123:9876</rocketmq.name.server>
<rocketmq.consumer.group>jinshui-organizationGroup</rocketmq.consumer.group>
<rocketmq.producer.group>jinshui-pointsGroup</rocketmq.producer.group>
<rocketmq.consumer.points.group>jinshui-pointsGroup</rocketmq.consumer.points.group>
</properties>
</profile>
@ -219,6 +229,12 @@
<!--工作端小程序-->
<work.wx.ma.appId>wx826a8435db9e0947</work.wx.ma.appId>
<work.wx.ma.secret>cbcb7c422f00d165105b34dc80bb825f</work.wx.ma.secret>
<!--RocketMQ-->
<rocketmq.name.server>47.104.85.99:9876;114.215.125.123:9876</rocketmq.name.server>
<rocketmq.consumer.group>jinshui-organizationGroup</rocketmq.consumer.group>
<rocketmq.producer.group>jinshui-pointsGroup</rocketmq.producer.group>
<rocketmq.consumer.points.group>jinshui-pointsGroup</rocketmq.consumer.points.group>
</properties>
</profile>
@ -261,6 +277,12 @@
</spring.datasource.druid.url>
<spring.datasource.druid.username>epdc</spring.datasource.druid.username>
<spring.datasource.druid.password>Elink@833066</spring.datasource.druid.password>
<!--RocketMQ-->
<rocketmq.name.server>47.104.85.99:9876;114.215.125.123:9876</rocketmq.name.server>
<rocketmq.consumer.group>jinshui-organizationGroup</rocketmq.consumer.group>
<rocketmq.producer.group>jinshui-pointsGroup</rocketmq.producer.group>
<rocketmq.consumer.points.group>jinshui-pointsGroup</rocketmq.consumer.points.group>
</properties>
</profile>
</profiles>

73
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiCommentController.java

@ -2,11 +2,13 @@ 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.enums.BehaviorEnum;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.comment.CommentStatementFormDTO;
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;
import com.elink.esua.epdc.pointcommons.tools.annotation.RecordUserBehavior;
import com.elink.esua.epdc.service.CommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -24,21 +26,80 @@ public class ApiCommentController {
private CommentService commentService;
/**
* 提交评论或回复接口
* 提交议题评论
* @param userDetail
* @param commentFormDTO
* @return
*/
@PostMapping("submit")
public Result submit(@LoginUser TokenDto userDetail, @RequestBody CommentFormDTO commentFormDTO) {
@PostMapping("issueCom")
@RecordUserBehavior(behavior = BehaviorEnum.ISSUE_COMMENT,referenceId = "#{commentFormDTO.getIssueId}",userId = "#{userDetail.getUserId}")
public Result issueCom(@LoginUser TokenDto userDetail, @RequestBody CommentFormDTO commentFormDTO) {
return commentService.submit(userDetail,commentFormDTO);
}
/**
* 提交议题回复接口
* @param userDetail
* @param commentFormDTO
* @return
*/
@PostMapping("issueComReply")
@RecordUserBehavior(behavior = BehaviorEnum.ISSUE_COMMENT_REPLY,referenceId = "#{commentFormDTO.getIssueId}",userId = "#{userDetail.getUserId}")
public Result issueComReply(@LoginUser TokenDto userDetail, @RequestBody CommentFormDTO commentFormDTO) {
return commentService.submit(userDetail,commentFormDTO);
}
/**
* 提交项目评论接口
* @param userDetail
* @param commentFormDTO
* @return
*/
@PostMapping("itemCom")
@RecordUserBehavior(behavior = BehaviorEnum.PROJECT_COMMENT,referenceId = "#{commentFormDTO.getItemId}",userId = "#{userDetail.getUserId}")
public Result itemCom(@LoginUser TokenDto userDetail, @RequestBody CommentFormDTO commentFormDTO) {
return commentService.submit(userDetail,commentFormDTO);
}
/**
* 提交项目回复接口
* @param userDetail
* @param commentFormDTO
* @return
*/
@PostMapping("itemComReply")
@RecordUserBehavior(behavior = BehaviorEnum.PROJECT_COMMENT_REPLY,referenceId = "#{commentFormDTO.getItemId}",userId = "#{userDetail.getUserId}")
public Result itemComReply(@LoginUser TokenDto userDetail, @RequestBody CommentFormDTO commentFormDTO) {
return commentService.submit(userDetail,commentFormDTO);
}
/**
* 评论/
* 议题评论点赞
*/
@PostMapping("issueComLike")
@RecordUserBehavior(behavior = BehaviorEnum.ISSUE_COMMENT_SUPPORT,referenceId = "#{commentStatementFormDTO.getIssueId}",userId = "#{userDetail.getUserId}")
public Result issueComLike(@LoginUser TokenDto userDetail, @RequestBody CommentStatementFormDTO commentStatementFormDTO) {
return commentService.statement(userDetail,commentStatementFormDTO);
}
/**
* 议题评论点踩
*/
@PostMapping("issueComUnlike")
@RecordUserBehavior(behavior = BehaviorEnum.ISSUE_COMMENT_OPPOSITION,referenceId = "#{commentStatementFormDTO.getIssueId}",userId = "#{userDetail.getUserId}")
public Result issueComUnlike(@LoginUser TokenDto userDetail, @RequestBody CommentStatementFormDTO commentStatementFormDTO) {
return commentService.statement(userDetail,commentStatementFormDTO);
}
/**
* 项目评论点赞
*/
@PostMapping("itemComLike")
@RecordUserBehavior(behavior = BehaviorEnum.PROJECT_COMMENT_SUPPORT,referenceId = "#{commentStatementFormDTO.getItemId}",userId = "#{userDetail.getUserId}")
public Result itemComLike(@LoginUser TokenDto userDetail, @RequestBody CommentStatementFormDTO commentStatementFormDTO) {
return commentService.statement(userDetail,commentStatementFormDTO);
}
/**
* 项目评论点踩
*/
@PostMapping("statement")
public Result statement(@LoginUser TokenDto userDetail, @RequestBody CommentStatementFormDTO commentStatementFormDTO) {
@PostMapping("itemComUnlike")
@RecordUserBehavior(behavior = BehaviorEnum.PROJECT_COMMENT_OPPOSITION,referenceId = "#{commentStatementFormDTO.getItemId}",userId = "#{userDetail.getUserId}")
public Result itemComUnlike(@LoginUser TokenDto userDetail, @RequestBody CommentStatementFormDTO commentStatementFormDTO) {
return commentService.statement(userDetail,commentStatementFormDTO);
}
/**

4
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiGroupController.java

@ -2,6 +2,7 @@ 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.enums.BehaviorEnum;
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;
@ -9,6 +10,7 @@ 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.pointcommons.tools.annotation.RecordUserBehavior;
import com.elink.esua.epdc.service.GroupService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -39,6 +41,7 @@ public class ApiGroupController {
* @since 2019/10/17 13:58
*/
@PostMapping("create")
@RecordUserBehavior(behavior = BehaviorEnum.GROUP_CREATE_APPLICATION,referenceId = "#{formDto.getId}",userId = "#{userDetail.getUserId}")
public Result createGroup(@LoginUser TokenDto userDetail, @RequestBody GroupCreateFormDTO formDto) {
return groupService.saveGroup(userDetail, formDto);
}
@ -53,6 +56,7 @@ public class ApiGroupController {
* @since 2019/10/21 9:51
*/
@PostMapping("disband")
@RecordUserBehavior(behavior = BehaviorEnum.GROUP_DISSOLUTION,referenceId = "#{formDto.getId}",userId = "#{userDetail.getUserId}")
public Result disbandGroup(@LoginUser TokenDto userDetail, @RequestBody GroupSettingStateDTO formDto) {
return groupService.disbandGroup(userDetail, formDto);
}

53
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiIssueController.java

@ -2,6 +2,7 @@ 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.enums.BehaviorEnum;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.category.CategoryDTO;
import com.elink.esua.epdc.dto.events.form.EpdcEventSubmitFormDTO;
@ -10,6 +11,7 @@ import com.elink.esua.epdc.dto.issue.form.IssueFormDTO;
import com.elink.esua.epdc.dto.issue.form.IssuesAndEventsOfMineFormDTO;
import com.elink.esua.epdc.dto.issue.form.StatementFormDTO;
import com.elink.esua.epdc.dto.issue.result.*;
import com.elink.esua.epdc.pointcommons.tools.annotation.RecordUserBehavior;
import com.elink.esua.epdc.service.IssueService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
@ -73,17 +75,62 @@ public class ApiIssueController {
/**
* 议题/
* 议题赞
* @param userDetail
* @param formDto
* @return
*/
@PostMapping("statement")
public Result statement(@LoginUser TokenDto userDetail, @RequestBody StatementFormDTO formDto) {
@PostMapping("issueSupport")
@RecordUserBehavior(behavior = BehaviorEnum.ISSUE_SUPPORT,referenceId = "#{formDto.getIssueId}",userId = "#{userDetail.getUserId}")
public Result issueSupport(@LoginUser TokenDto userDetail, @RequestBody StatementFormDTO formDto) {
formDto.setUserId(userDetail.getUserId());
formDto.setUserName(userDetail.getNickname());
return issueService.statement(formDto);
}
/**
* 议题踩
* @param userDetail
* @param formDto
* @return
*/
@PostMapping("issueOpposition")
@RecordUserBehavior(behavior = BehaviorEnum.ISSUE_OPPOSITION,referenceId = "#{formDto.getIssueId}",userId = "#{userDetail.getUserId}")
public Result issueOpposition(@LoginUser TokenDto userDetail, @RequestBody StatementFormDTO formDto) {
formDto.setUserId(userDetail.getUserId());
formDto.setUserName(userDetail.getNickname());
return issueService.statement(formDto);
}
/**
* 项目赞
* @param userDetail
* @param formDto
* @return
*/
@PostMapping("itemSupport")
@RecordUserBehavior(behavior = BehaviorEnum.PROJECT_SUPPORT,referenceId = "#{formDto.getItemId}",userId = "#{userDetail.getUserId}")
public Result itemSupport(@LoginUser TokenDto userDetail, @RequestBody StatementFormDTO formDto) {
formDto.setUserId(userDetail.getUserId());
formDto.setUserName(userDetail.getNickname());
return issueService.statement(formDto);
}
/**
* 项目踩
* @param userDetail
* @param formDto
* @return
*/
@PostMapping("itemOpposition")
@RecordUserBehavior(behavior = BehaviorEnum.PROJECT_OPPOSITION,referenceId = "#{formDto.getItemId}",userId = "#{userDetail.getUserId}")
public Result itemOpposition(@LoginUser TokenDto userDetail, @RequestBody StatementFormDTO formDto) {
formDto.setUserId(userDetail.getUserId());
formDto.setUserName(userDetail.getNickname());
return issueService.statement(formDto);
}
/**
* 议题详情
* @Params: [userDetail, issueId]

32
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiTopicCommentController.java

@ -2,11 +2,13 @@ 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.enums.BehaviorEnum;
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.pointcommons.tools.annotation.RecordUserBehavior;
import com.elink.esua.epdc.service.TopicCommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -24,18 +26,36 @@ public class ApiTopicCommentController {
private TopicCommentService topicCommentService;
/**
* 提交评论或回复接口
* 提交评论接口
*/
@PostMapping("submit")
public Result submit(@LoginUser TokenDto userDetail, @RequestBody TopicCommentFormDTO topicCommentFormDTO) {
@PostMapping("topicCom")
@RecordUserBehavior(behavior = BehaviorEnum.GROUP_COMMENT,referenceId = "#{topicCommentFormDTO.getTopicId}",userId = "#{userDetail.getUserId}")
public Result topicCom(@LoginUser TokenDto userDetail, @RequestBody TopicCommentFormDTO topicCommentFormDTO) {
return topicCommentService.submit(userDetail,topicCommentFormDTO);
}
/**
* 提交回复接口
*/
@PostMapping("topicReply")
@RecordUserBehavior(behavior = BehaviorEnum.GROUP_COMMENT_REPLY,referenceId = "#{topicCommentFormDTO.getTopicId}",userId = "#{userDetail.getUserId}")
public Result topicReply(@LoginUser TokenDto userDetail, @RequestBody TopicCommentFormDTO topicCommentFormDTO) {
return topicCommentService.submit(userDetail,topicCommentFormDTO);
}
/**
* 评论/
* 评论
*/
@PostMapping("topicComLike")
@RecordUserBehavior(behavior = BehaviorEnum.GROUP_TOPIC_COMMENT_SUPPORT,referenceId = "#{topicCommentStatementFormDTO.getTopicId}",userId = "#{userDetail.getUserId}")
public Result topicComLike(@LoginUser TokenDto userDetail, @RequestBody TopicCommentStatementFormDTO topicCommentStatementFormDTO) {
return topicCommentService.statement(userDetail,topicCommentStatementFormDTO);
}
/**
* 评论
*/
@PostMapping("statement")
public Result statement(@LoginUser TokenDto userDetail, @RequestBody TopicCommentStatementFormDTO topicCommentStatementFormDTO) {
@PostMapping("topicComUnlike")
@RecordUserBehavior(behavior = BehaviorEnum.GROUP_TOPIC_COMMENT_OPPOSITION,referenceId = "#{topicCommentStatementFormDTO.getTopicId}",userId = "#{userDetail.getUserId}")
public Result topicComUnlike(@LoginUser TokenDto userDetail, @RequestBody TopicCommentStatementFormDTO topicCommentStatementFormDTO) {
return topicCommentService.statement(userDetail,topicCommentStatementFormDTO);
}

46
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiWorkIssueController.java

@ -1,6 +1,7 @@
package com.elink.esua.epdc.controller;
import com.elink.esua.epdc.commons.tools.enums.BehaviorEnum;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils;
import com.elink.esua.epdc.dto.category.EventCategoryDTO;
@ -11,6 +12,7 @@ import com.elink.esua.epdc.dto.events.form.EpdcEventsReviewFormDTO;
import com.elink.esua.epdc.dto.events.result.EventAppDetailResultDTO;
import com.elink.esua.epdc.dto.issue.form.*;
import com.elink.esua.epdc.dto.issue.result.*;
import com.elink.esua.epdc.pointcommons.tools.annotation.RecordUserBehavior;
import com.elink.esua.epdc.service.WorkIssueService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -69,12 +71,22 @@ public class ApiWorkIssueController {
}
/**
*事件审核
*事件审核 - 通过
* @return
*/
@PostMapping("event/review")
public Result review(@RequestBody EpdcEventsReviewFormDTO dto) {
@PostMapping("event/reviewPass")
@RecordUserBehavior(behavior = BehaviorEnum.ISSUE_AUDIT_PASS,referenceId = "#{dto.getId}",userId = "#{dto.getUserId}")
public Result reviewPass(@RequestBody EpdcEventsReviewFormDTO dto) {
return workIssueService.review(dto);
}
/**
*事件审核 -不通过
* @return
*/
@PostMapping("event/reviewNopass")
@RecordUserBehavior(behavior = BehaviorEnum.ISSUE_AUDIT_FAILED,referenceId = "#{dto.getId}",userId = "#{dto.getUserId}")
public Result reviewNopass(@RequestBody EpdcEventsReviewFormDTO dto) {
return workIssueService.review(dto);
}
@ -126,13 +138,35 @@ public class ApiWorkIssueController {
}
/**
* 议题待处理
* 议题待处理 - 回应
*/
@PostMapping("issue/response")
@RecordUserBehavior(behavior = BehaviorEnum.ISSUE_RESPONSE,referenceId = "#{dto.getId}",userId = "#{dto.getUserId}")
public Result response(@RequestBody IssueWaitHandleSubmitFormDTO dto) {
ValidatorUtils.validateEntity(dto);
return workIssueService.handleSubmit(dto);
}
/**
* 议题待处理 - 关闭
*/
@PostMapping("issue/handleSubmit")
public Result handleSubmit(@RequestBody IssueWaitHandleSubmitFormDTO dto) {
@PostMapping("issue/close")
@RecordUserBehavior(behavior = BehaviorEnum.ISSUE_CLOSE,referenceId = "#{dto.getId}",userId = "#{dto.getUserId}")
public Result close(@RequestBody IssueWaitHandleSubmitFormDTO dto) {
ValidatorUtils.validateEntity(dto);
return workIssueService.handleSubmit(dto);
}
/**
* 议题待处理 -- 转项目
*/
@PostMapping("issue/toItem")
@RecordUserBehavior(behavior = BehaviorEnum.ISSUE_TO_PROJECT,referenceId = "#{dto.getId}",userId = "#{dto.getUserId}")
public Result toItem(@RequestBody IssueWaitHandleSubmitFormDTO dto) {
ValidatorUtils.validateEntity(dto);
return workIssueService.handleSubmit(dto);
}
}

56
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiWorkItemController.java

@ -1,9 +1,11 @@
package com.elink.esua.epdc.controller;
import com.elink.esua.epdc.commons.tools.enums.BehaviorEnum;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.item.ItemEvaluateDeptDTO;
import com.elink.esua.epdc.dto.item.form.*;
import com.elink.esua.epdc.dto.item.result.*;
import com.elink.esua.epdc.pointcommons.tools.annotation.RecordUserBehavior;
import com.elink.esua.epdc.service.WorkItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -79,10 +81,60 @@ public class ApiWorkItemController {
return workItemService.whistlingDept();
}
@PostMapping("handleSubmit")
public Result handleSubmit(@RequestBody ItemHandleSubmitFormDTO dto) {
/**
* @Description 项目处理 - 回应
* @Author songyunpeng
* @Date 2020/5/7
* @Param [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result
**/
@PostMapping("response")
@RecordUserBehavior(behavior = BehaviorEnum.ISSUE_RESPONSE,referenceId = "#{dto.getId}",userId = "#{dto.getUserId}")
public Result response(@RequestBody ItemHandleSubmitFormDTO dto) {
return workItemService.handleSubmit(dto);
}
/**
* @Description 项目处理 - 关闭
* @Author songyunpeng
* @Date 2020/5/7
* @Param [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result
**/
@PostMapping("close")
@RecordUserBehavior(behavior = BehaviorEnum.PROJECT_CLOSE,referenceId = "#{dto.getId}",userId = "#{dto.getUserId}")
public Result close(@RequestBody ItemHandleSubmitFormDTO dto) {
return workItemService.handleSubmit(dto);
}
/**
* @Description 项目处理 - 吹哨
* @Author songyunpeng
* @Date 2020/5/7
* @Param [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result
**/
@PostMapping("whistle")
@RecordUserBehavior(behavior = BehaviorEnum.PROJECT_WHISTLE,referenceId = "#{dto.getId}",userId = "#{dto.getUserId}")
public Result whistle(@RequestBody ItemHandleSubmitFormDTO dto) {
return workItemService.handleSubmit(dto);
}
/**
* @Description 项目处理 - 结案
* @Author songyunpeng
* @Date 2020/5/7
* @Param [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result
**/
@PostMapping("closeCase")
@RecordUserBehavior(behavior = BehaviorEnum.PROJECT_CLOSE_CASE,referenceId = "#{dto.getId}",userId = "#{dto.getUserId}")
public Result closeCase(@RequestBody ItemHandleSubmitFormDTO dto) {
return workItemService.handleSubmit(dto);
}
/**
* 获取满意度评价部门
* @Params: [evaluationFormDTO]

4
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/NewsServiceImpl.java

@ -74,7 +74,9 @@ public class NewsServiceImpl implements NewsService {
@Override
public Result modifyNewsBrowse(TokenDto userDetail, EpdcNewsBrowseFromDTO newsBrowseFromDTO) {
newsBrowseFromDTO.setUserId(userDetail.getUserId());
if(userDetail!=null){
newsBrowseFromDTO.setUserId(userDetail.getUserId());
}
return newsFeignClient.modifyNewsBrowse(newsBrowseFromDTO);
}

8
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/resources/application.yml

@ -131,3 +131,11 @@ jwt:
secret: 7016867071f0ebf1c46f123eaaf4b9d6[elink.epdc]
#token有效时长,默认7天,单位秒
expire: 604800
rocketmq:
name-server: @rocketmq.name.server@
producer:
group: @rocketmq.producer.group@
consumer:
group: @rocketmq.consumer.group@
points-group: @rocketmq.consumer.points.group@

6
esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/events/EpdcEventsDetailDTO.java

@ -19,6 +19,12 @@ public class EpdcEventsDetailDTO implements Serializable {
* 事件ID
*/
private String id;
/**
* 用户ID
*/
private String userId;
/**
* 用户昵称
*/

5
esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/events/form/EpdcEventsReviewFormDTO.java

@ -38,4 +38,9 @@ public class EpdcEventsReviewFormDTO implements Serializable {
private String advice;
private List<String> images;
/**
*发布人ID
*/
private String userId;
}

5
esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/issue/IssueWaitHandleDetailDTO.java

@ -24,6 +24,11 @@ public class IssueWaitHandleDetailDTO implements Serializable {
* 发布人
*/
private String nickName;
/**
* 发布人ID
*/
private String userId;
/**
* 发布时间
*/

5
esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/issue/form/IssueWaitHandleSubmitFormDTO.java

@ -36,4 +36,9 @@ public class IssueWaitHandleSubmitFormDTO implements Serializable {
*/
private List<String> images;
/**
* 发布人
*/
private String userId;
}

4
esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/item/form/ItemHandleSubmitFormDTO.java

@ -24,6 +24,10 @@ public class ItemHandleSubmitFormDTO implements Serializable {
*/
@NotBlank(message = "项目ID不能为空")
private String id;
/**
* 发布人ID
*/
private String userId;
/**
* 处理意见内部

4
esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/item/result/ItemDetailForPCEndResultDTO.java

@ -26,6 +26,10 @@ public class ItemDetailForPCEndResultDTO implements Serializable {
* 发布人
*/
private String nickName;
/**
* 发布人Id
*/
private String userId;
/**
* 发布时间
*/

31
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/controller/EpdcEventsController.java

@ -18,6 +18,7 @@
package com.elink.esua.epdc.modules.events.controller;
import com.elink.esua.epdc.commons.mybatis.annotation.DataFilter;
import com.elink.esua.epdc.commons.tools.enums.BehaviorEnum;
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;
@ -33,6 +34,7 @@ import com.elink.esua.epdc.dto.events.EpdcEventsDetailDTO;
import com.elink.esua.epdc.dto.events.form.EpdcEventsReviewFormDTO;
import com.elink.esua.epdc.modules.events.excel.EpdcEventsExcel;
import com.elink.esua.epdc.modules.events.service.EpdcEventsService;
import com.elink.esua.epdc.pointcommons.tools.annotation.RecordUserBehavior;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -106,7 +108,7 @@ public class EpdcEventsController {
}
/**
* 事件审核
* 事件审核 /
* @Params: [dto]
* @Return: com.elink.esua.epdc.commons.tools.utils.Result
* @Author: liuchuang
@ -117,6 +119,33 @@ public class EpdcEventsController {
ValidatorUtils.validateEntity(dto);
return epdcEventsService.eventReview(dto);
}
/**
* 事件审核 -- 同意
* @Params: [dto]
* @Return: com.elink.esua.epdc.commons.tools.utils.Result
* @Author: liuchuang
* @Date: 2019/9/5 9:02
*/
@PostMapping("reviewPass")
@RecordUserBehavior(behavior = BehaviorEnum.ISSUE_AUDIT_PASS,referenceId = "#{dto.getId}",userId = "#{dto.getUserId}")
public Result reviewPass(@RequestBody EpdcEventsReviewFormDTO dto) {
ValidatorUtils.validateEntity(dto);
return epdcEventsService.eventReview(dto);
}
/**
* 事件审核 -- 驳回
* @Params: [dto]
* @Return: com.elink.esua.epdc.commons.tools.utils.Result
* @Author: liuchuang
* @Date: 2019/9/5 9:02
*/
@PostMapping("reviewNopass")
@RecordUserBehavior(behavior = BehaviorEnum.ISSUE_AUDIT_FAILED,referenceId = "#{dto.getId}",userId = "#{dto.getUserId}")
public Result reviewNopass(@RequestBody EpdcEventsReviewFormDTO dto) {
ValidatorUtils.validateEntity(dto);
return epdcEventsService.eventReview(dto);
}
/**
* 已驳回事件列表

44
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/issue/controller/IssueController.java

@ -18,6 +18,7 @@
package com.elink.esua.epdc.modules.issue.controller;
import com.elink.esua.epdc.commons.mybatis.annotation.DataFilter;
import com.elink.esua.epdc.commons.tools.enums.BehaviorEnum;
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;
@ -35,6 +36,7 @@ import com.elink.esua.epdc.dto.issue.IssueWaitHandleOrClosedDTO;
import com.elink.esua.epdc.dto.issue.form.IssueWaitHandleSubmitFormDTO;
import com.elink.esua.epdc.modules.issue.excel.IssueExcel;
import com.elink.esua.epdc.modules.issue.service.IssueService;
import com.elink.esua.epdc.pointcommons.tools.annotation.RecordUserBehavior;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -132,6 +134,48 @@ public class IssueController {
return issueService.saveIssueHandleResult(dto);
}
/**
* 议题待处理提交 - 转项目
* @Params: [dto]
* @Return: com.elink.esua.epdc.commons.tools.utils.Result
* @Author: liuchuang
* @Date: 2019/9/6 11:26
*/
@PostMapping("toItem")
@RecordUserBehavior(behavior = BehaviorEnum.ISSUE_TO_PROJECT,referenceId = "#{dto.getId}",userId = "#{dto.getUserId}")
public Result toItem(@RequestBody IssueWaitHandleSubmitFormDTO dto) {
ValidatorUtils.validateEntity(dto);
return issueService.saveIssueHandleResult(dto);
}
/**
* 议题待处理提交 - 回应
* @Params: [dto]
* @Return: com.elink.esua.epdc.commons.tools.utils.Result
* @Author: liuchuang
* @Date: 2019/9/6 11:26
*/
@PostMapping("response")
@RecordUserBehavior(behavior = BehaviorEnum.ISSUE_RESPONSE,referenceId = "#{dto.getId}",userId = "#{dto.getUserId}")
public Result response(@RequestBody IssueWaitHandleSubmitFormDTO dto) {
ValidatorUtils.validateEntity(dto);
return issueService.saveIssueHandleResult(dto);
}
/**
* 议题待处理提交 - 关闭
* @Params: [dto]
* @Return: com.elink.esua.epdc.commons.tools.utils.Result
* @Author: liuchuang
* @Date: 2019/9/6 11:26
*/
@PostMapping("close")
@RecordUserBehavior(behavior = BehaviorEnum.ISSUE_CLOSE,referenceId = "#{dto.getId}",userId = "#{dto.getUserId}")
public Result close(@RequestBody IssueWaitHandleSubmitFormDTO dto) {
ValidatorUtils.validateEntity(dto);
return issueService.saveIssueHandleResult(dto);
}
/**
* 议题内容
* @Params: [id]

58
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/controller/ItemController.java

@ -17,6 +17,7 @@
package com.elink.esua.epdc.modules.item.controller;
import com.elink.esua.epdc.commons.tools.enums.BehaviorEnum;
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;
@ -34,6 +35,7 @@ import com.elink.esua.epdc.dto.item.result.ItemContentForPCEndResultDTO;
import com.elink.esua.epdc.dto.item.result.ItemDetailForPCEndResultDTO;
import com.elink.esua.epdc.modules.item.excel.ItemExcel;
import com.elink.esua.epdc.modules.item.service.ItemService;
import com.elink.esua.epdc.pointcommons.tools.annotation.RecordUserBehavior;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -124,6 +126,62 @@ public class ItemController {
return itemService.modifyHandleResult(dto);
}
/**
* 项目处理提交 - 回应
* @Params: [dto]
* @Return: com.elink.esua.epdc.commons.tools.utils.Result
* @Author: liuchuang
* @Date: 2019/9/16 19:09
*/
@PostMapping("response")
@RecordUserBehavior(behavior = BehaviorEnum.PROJECT_RESPONSE,referenceId = "#{dto.getId}",userId = "#{dto.getUserId}")
public Result response(@RequestBody ItemHandleSubmitFormDTO dto) {
ValidatorUtils.validateEntity(dto);
return itemService.modifyHandleResult(dto);
}
/**
* 项目处理提交 -- 关闭
* @Params: [dto]
* @Return: com.elink.esua.epdc.commons.tools.utils.Result
* @Author: liuchuang
* @Date: 2019/9/16 19:09
*/
@PostMapping("close")
@RecordUserBehavior(behavior = BehaviorEnum.PROJECT_CLOSE,referenceId = "#{dto.getId}",userId = "#{dto.getUserId}")
public Result close(@RequestBody ItemHandleSubmitFormDTO dto) {
ValidatorUtils.validateEntity(dto);
return itemService.modifyHandleResult(dto);
}
/**
* 项目处理提交 - 吹哨
* @Params: [dto]
* @Return: com.elink.esua.epdc.commons.tools.utils.Result
* @Author: liuchuang
* @Date: 2019/9/16 19:09
*/
@PostMapping("whistle")
@RecordUserBehavior(behavior = BehaviorEnum.PROJECT_WHISTLE,referenceId = "#{dto.getId}",userId = "#{dto.getUserId}")
public Result whistle(@RequestBody ItemHandleSubmitFormDTO dto) {
ValidatorUtils.validateEntity(dto);
return itemService.modifyHandleResult(dto);
}
/**
* 项目处理提交 -- 结案
* @Params: [dto]
* @Return: com.elink.esua.epdc.commons.tools.utils.Result
* @Author: liuchuang
* @Date: 2019/9/16 19:09
*/
@PostMapping("closeCase")
@RecordUserBehavior(behavior = BehaviorEnum.PROJECT_CLOSE_CASE,referenceId = "#{dto.getId}",userId = "#{dto.getUserId}")
public Result closeCase(@RequestBody ItemHandleSubmitFormDTO dto) {
ValidatorUtils.validateEntity(dto);
return itemService.modifyHandleResult(dto);
}
/**
* 项目内容详情
* @Params: [id]

2
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/events/EpdcEventsDao.xml

@ -6,6 +6,7 @@
<resultMap id="eventDetailMap" type="com.elink.esua.epdc.dto.events.EpdcEventsDetailDTO">
<result property="id" column="ID"/>
<result property="eventContent" column="EVENT_CONTENT"/>
<result property="userId" column="USER_ID"/>
<result property="nickName" column="NICK_NAME"/>
<result property="mobile" column="MOBILE"/>
<result property="createdTime" column="CREATED_TIME"/>
@ -32,6 +33,7 @@
e.IS_PARTY_MEMBER,
i.IMG_URL,
ii.IMG_URL as IIMG_URL,
e.USER_ID,
e.NICK_NAME,
e.MOBILE,
e.CREATED_TIME,

2
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/issue/IssueDao.xml

@ -50,6 +50,7 @@
<resultMap id="waitHandleIssueDetailResultMap" type="com.elink.esua.epdc.dto.issue.IssueWaitHandleDetailDTO">
<result property="id" column="id"/>
<result property="nickName" column="NICK_NAME"/>
<result property="userId" column="USER_ID"/>
<result property="distributeTime" column="DISTRIBUTE_TIME"/>
<result property="mobile" column="MOBILE"/>
<result property="issueContent" column="ISSUE_CONTENT"/>
@ -67,6 +68,7 @@
<select id="selectOneOfWaitHandleIssueDetail" resultMap="waitHandleIssueDetailResultMap">
SELECT
i.id,
i.USER_ID,
i.NICK_NAME,
i.DISTRIBUTE_TIME,
i.MOBILE,

2
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/item/ItemDao.xml

@ -462,6 +462,7 @@
<resultMap id="itemDetailPCEndMap" type="com.elink.esua.epdc.dto.item.result.ItemDetailForPCEndResultDTO">
<result property="id" column="ID"/>
<result property="nickName" column="NICK_NAME"/>
<result property="userId" column="USER_ID"/>
<result property="distributeTime" column="DISTRIBUTE_TIME"/>
<result property="mobile" column="MOBILE"/>
<result property="gridId" column="GRID_ID"/>
@ -482,6 +483,7 @@
<select id="selectOneOfItemDetailForPCEnd" resultMap="itemDetailPCEndMap">
SELECT
item.ID,
item.USER_ID,
item.NICK_NAME,
item.DISTRIBUTE_TIME,
item.MOBILE,

5
esua-epdc/epdc-module/epdc-group/epdc-group-client/src/main/java/com.elink.esua.epdc/dto/group/GroupDetailDTO.java

@ -40,4 +40,9 @@ public class GroupDetailDTO implements Serializable {
* 群主
*/
private String nickname;
/**
* 群主ID
*/
private String userId;
}

7
esua-epdc/epdc-module/epdc-group/epdc-group-client/src/main/java/com.elink.esua.epdc/dto/group/form/GroupCreateFormDTO.java

@ -24,6 +24,13 @@ public class GroupCreateFormDTO implements Serializable {
@NotBlank(message = "社群名称不能为空且在10个字以内")
@Size(min = 1, max = 10, message = "社群名称不能为空且在10个字以内")
private String groupName;
/**
* 社群ID
*/
private String id;
/**
* 社群头像
*/

11
esua-epdc/epdc-module/epdc-group/epdc-group-server/pom.xml

@ -13,6 +13,11 @@
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>com.esua.epdc</groupId>
<artifactId>epdc-commons-points-tools</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.esua.epdc</groupId>
<artifactId>epdc-group-client</artifactId>
@ -141,6 +146,8 @@
<!--RocketMQ-->
<rocketmq.name.server>47.104.85.99:9876;114.215.125.123:9876</rocketmq.name.server>
<rocketmq.consumer.group>jinshui-organizationGroup</rocketmq.consumer.group>
<rocketmq.producer.group>jinshui-pointsGroup</rocketmq.producer.group>
<rocketmq.consumer.points.group>jinshui-pointsGroup</rocketmq.consumer.points.group>
</properties>
</profile>
@ -169,6 +176,8 @@
<!--RocketMQ-->
<rocketmq.name.server>47.104.85.99:9876;114.215.125.123:9876</rocketmq.name.server>
<rocketmq.consumer.group>jinshui-organizationGroup</rocketmq.consumer.group>
<rocketmq.producer.group>jinshui-pointsGroup</rocketmq.producer.group>
<rocketmq.consumer.points.group>jinshui-pointsGroup</rocketmq.consumer.points.group>
</properties>
</profile>
@ -201,6 +210,8 @@
<!--RocketMQ-->
<rocketmq.name.server>172.16.0.7:9876;172.16.0.8:9876</rocketmq.name.server>
<rocketmq.consumer.group>jinshui-organizationGroup</rocketmq.consumer.group>
<rocketmq.producer.group>jinshui-pointsGroup</rocketmq.producer.group>
<rocketmq.consumer.points.group>jinshui-pointsGroup</rocketmq.consumer.points.group>
</properties>
</profile>
</profiles>

55
esua-epdc/epdc-module/epdc-group/epdc-group-server/src/main/java/com.elink.esua.epdc/modules/group/controller/GroupController.java

@ -18,6 +18,7 @@
package com.elink.esua.epdc.modules.group.controller;
import com.elink.esua.epdc.commons.mybatis.annotation.DataFilter;
import com.elink.esua.epdc.commons.tools.enums.BehaviorEnum;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.security.user.SecurityUser;
import com.elink.esua.epdc.commons.tools.utils.ExcelUtils;
@ -30,6 +31,7 @@ import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup;
import com.elink.esua.epdc.dto.group.*;
import com.elink.esua.epdc.modules.group.excel.GroupExcel;
import com.elink.esua.epdc.modules.group.service.GroupService;
import com.elink.esua.epdc.pointcommons.tools.annotation.RecordUserBehavior;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -120,7 +122,7 @@ public class GroupController {
/**
*
* 审核禁言解禁解散社群
* 禁言
*
* @params [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result
@ -134,6 +136,57 @@ public class GroupController {
return groupService.modifyGroupState(dto);
}
/**
*
* 解散社群
*
* @params [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result
* @author liuchuang
* @since 2019/10/21 9:31
*/
@PostMapping("dissolution")
@RecordUserBehavior(behavior = BehaviorEnum.GROUP_DISSOLUTION,referenceId = "#{dto.getId}",userId = "#{dto.getUserId}")
public Result dissolution(@RequestBody GroupSettingStateDTO dto) {
//效验数据
ValidatorUtils.validateEntity(dto);
return groupService.modifyGroupState(dto);
}
/**
*
* 审核通过
*
* @params [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result
* @author liuchuang
* @since 2019/10/21 9:31
*/
@PostMapping("pass")
@RecordUserBehavior(behavior = BehaviorEnum.GROUP_CREATE_SUCCESS,referenceId = "#{dto.getId}",userId = "#{dto.getUserId}")
public Result pass(@RequestBody GroupSettingStateDTO dto) {
//效验数据
ValidatorUtils.validateEntity(dto);
return groupService.modifyGroupState(dto);
}
/**
*
* 审核不通过
*
* @params [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result
* @author liuchuang
* @since 2019/10/21 9:31
*/
@PostMapping("noPass")
@RecordUserBehavior(behavior = BehaviorEnum.GROUP_APPLICATION_FAIL,referenceId = "#{dto.getId}",userId = "#{dto.getUserId}")
public Result noPass(@RequestBody GroupSettingStateDTO dto) {
//效验数据
ValidatorUtils.validateEntity(dto);
return groupService.modifyGroupState(dto);
}
/**
*
* 获取网格下所有社群

5
esua-epdc/epdc-module/epdc-group/epdc-group-server/src/main/java/com.elink.esua.epdc/modules/group/entity/GroupEntity.java

@ -37,6 +37,11 @@ import java.util.Date;
public class GroupEntity extends BaseEpdcEntity {
private static final long serialVersionUID = 1L;
/**
* 社群Id
*/
private String id;
/**
* 社群名称

2
esua-epdc/epdc-module/epdc-group/epdc-group-server/src/main/java/com.elink.esua.epdc/modules/group/service/impl/GroupServiceImpl.java

@ -163,6 +163,8 @@ public class GroupServiceImpl extends BaseServiceImpl<GroupDao, GroupEntity> imp
userGroupDTO.setGroupId(entity.getId());
userGroupService.save(userGroupDTO);
}
//返回社区ID
formDto.setId(entity.getId());
}
return new Result();
}

3
esua-epdc/epdc-module/epdc-group/epdc-group-server/src/main/resources/application.yml

@ -90,5 +90,8 @@ mybatis-plus:
rocketmq:
name-server: @rocketmq.name.server@
producer:
group: @rocketmq.producer.group@
consumer:
group: @rocketmq.consumer.group@
points-group: @rocketmq.consumer.points.group@

3
esua-epdc/epdc-module/epdc-group/epdc-group-server/src/main/resources/mapper/group/GroupDao.xml

@ -47,7 +47,8 @@
gp.GROUP_NAME,
gp.GROUP_INTRODUCTION,
gp.CREATED_TIME,
ugp.NICKNAME
ugp.NICKNAME,
ugp.USER_ID
FROM
epdc_group gp
LEFT JOIN epdc_user_group ugp ON gp.ID = ugp.GROUP_ID

13
esua-epdc/epdc-module/epdc-points/epdc-points-client/src/main/java/com/elink/esua/epdc/dto/PointsLogsDTO.java

@ -43,6 +43,19 @@ public class PointsLogsDTO implements Serializable {
*/
private String userId;
/**
* 用户昵称
*/
private String nickname;
/**
* 用户头像
*/
private String faceImg;
/**
* 关联表ID
*/

6
esua-epdc/epdc-module/epdc-points/epdc-points-client/src/main/java/com/elink/esua/epdc/dto/form/PointsLogsAddFormDTO.java

@ -41,6 +41,12 @@ public class PointsLogsAddFormDTO {
* 用户昵称
*/
private String nickname;
/**
* 用户头像
*/
private String faceImg;
/**
* 关联表ID
*/

6
esua-epdc/epdc-module/epdc-points/epdc-points-client/src/main/java/com/elink/esua/epdc/dto/form/PointsLogsFormDTO.java

@ -46,6 +46,12 @@ public class PointsLogsFormDTO implements Serializable {
*/
private String nickName;
/**
* 用户头像
*/
private String faceImg;
/**
* 关联表ID
*/

13
esua-epdc/epdc-module/epdc-points/epdc-points-client/src/main/java/com/elink/esua/epdc/dto/result/PointsLogsResultDTO.java

@ -44,6 +44,19 @@ public class PointsLogsResultDTO implements Serializable {
*/
private String userId;
/**
* 用户昵称
*/
private String nickname;
/**
* 用户头像
*/
private String faceImg;
/**
* 关联表ID
*/

7
esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/entity/PointsLogsEntity.java

@ -47,6 +47,13 @@ public class PointsLogsEntity extends BaseEpdcEntity {
*/
private String nickname;
/**
* 用户头像
*/
private String faceImg;
/**
* 关联表ID
*/

1
esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/mq/PointsModifyConsumer.java

@ -199,6 +199,7 @@ public class PointsModifyConsumer implements RocketMQListener<MessageExt> {
PointsLogsAddFormDTO pointsLogsAddFormDTO = new PointsLogsAddFormDTO();
pointsLogsAddFormDTO.setUserId(dto.getUserId());
pointsLogsAddFormDTO.setNickname(userDTO.getNickname());
pointsLogsAddFormDTO.setFaceImg(userDTO.getFaceImg());
pointsLogsAddFormDTO.setReferenceId(dto.getReferenceId());
pointsLogsAddFormDTO.setRuleCode(pointsRuleResultDTO.getRuleCode());
pointsLogsAddFormDTO.setBehaviorCode(pointsRuleResultDTO.getBehaviorCode());

Loading…
Cancel
Save