Browse Source

Merge branch 'dev_voice_share_point' into dev_temp

# Conflicts:
#	epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java
#	epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/service/OssService.java
#	epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/service/impl/OssServiceImpl.java
#	epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java
#	epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java
#	epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/fallback/ResiGroupOpenFeignClientFallback.java
#	epmet-module/resi-group/resi-group-server/src/main/resources/bootstrap.yml
dev
sunyuchao 5 years ago
parent
commit
dfa6ec4a6d
  1. 14
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/mq/eventmsg/BasePointEventMsg.java
  2. 7
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/EventEnum.java
  3. 4
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisUtils.java
  4. 35
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/scan/param/VoiceScanParamDTO.java
  5. 31
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/scan/param/VoiceTaskDTO.java
  6. 49
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/scan/result/AsyncScanResult.java
  7. 25
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/scan/result/AsyncScanTaskDTO.java
  8. 56
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/scan/result/VoiceResultDTO.java
  9. 109
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ScanContentUtils.java
  10. 1
      epmet-gateway/src/main/resources/bootstrap.yml
  11. 17
      epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java
  12. 2
      epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/service/OssService.java
  13. 32
      epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/service/impl/OssServiceImpl.java
  14. 30
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/MqPointCallbackController.java
  15. 2
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/UserPointActionLogDao.java
  16. 25
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointActionLogServiceImpl.java
  17. 66
      epmet-module/epmet-point/epmet-point-server/src/main/resources/db/migration/V0.0.4__addNewRuleTemplate.sql
  18. 4
      epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/UserPointActionLogDao.xml
  19. 17
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/constant/IssueShareConstant.java
  20. 97
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueShareLinkRecordDTO.java
  21. 101
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueShareLinkVisitRecordDTO.java
  22. 21
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/IssueCreateUrlFormDTO.java
  23. 24
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/IssueVisitFormDTO.java
  24. 29
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/SharableIssueAndInviteeFormDTO.java
  25. 22
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueCreateUrlResultDTO.java
  26. 34
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueVisitResultDTO.java
  27. 35
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java
  28. 17
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java
  29. 128
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueShareLinkRecordController.java
  30. 98
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueShareLinkVisitRecordController.java
  31. 51
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueShareLinkRecordDao.java
  32. 65
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueShareLinkVisitRecordDao.java
  33. 70
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueShareLinkRecordEntity.java
  34. 70
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueShareLinkVisitRecordEntity.java
  35. 118
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueShareLinkRecordService.java
  36. 113
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueShareLinkVisitRecordService.java
  37. 167
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueShareLinkRecordServiceImpl.java
  38. 126
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueShareLinkVisitRecordServiceImpl.java
  39. 39
      epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.7__issue_share.sql
  40. 25
      epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueShareLinkRecordDao.xml
  41. 47
      epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueShareLinkVisitRecordDao.xml
  42. 25
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/constant/TopicConstant.java
  43. 15
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/constant/TopicShareConstant.java
  44. 2
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/member/GroupMemeberOperationDTO.java
  45. 2
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/member/ResiGroupMemberDTO.java
  46. 32
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/member/form/JoinGroupByShareLinkFormDTO.java
  47. 2
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/member/result/ApplyingMemberResultDTO.java
  48. 21
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/member/result/JoinGroupApplyRealTimeResultDTO.java
  49. 97
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/scanapicallback/VoiceScanCallBackContentFormDTO.java
  50. 10
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/ResiTopicAttachmentDTO.java
  51. 122
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/TopicDraftAttachmentDTO.java
  52. 146
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/TopicDraftDTO.java
  53. 96
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/TopicDraftOperationDTO.java
  54. 104
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/TopicDraftScanTaskDTO.java
  55. 102
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/TopicShareLinkRecordDTO.java
  56. 96
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/TopicShareLinkVisitRecordDTO.java
  57. 33
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/AuditDraftTopicFormDTO.java
  58. 78
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/CreateTopicFormDTO.java
  59. 24
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/CreateUrlFormDTO.java
  60. 18
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/DraftDetailFormDTO.java
  61. 37
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/MyAuditingListFormDTO.java
  62. 22
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/MyAuditingTopicFormDTO.java
  63. 27
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/SharableTopicAndInviteeFormDTO.java
  64. 23
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/TopicAttachmentFormDTO.java
  65. 30
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/TopicAuditFormDTO.java
  66. 17
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/TopicBelongGroupFormDTO.java
  67. 24
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/TopicVisitFormDTO.java
  68. 22
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/CreateUrlResultDTO.java
  69. 59
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/DraftDetailResultDTO.java
  70. 49
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/MyAuditingListResultDTO.java
  71. 22
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/MyAuditingTopicResultDTO.java
  72. 30
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/TopicAttachmentResultDTO.java
  73. 31
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/TopicAuditResultDTO.java
  74. 21
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/TopicBelongGroupResultDTO.java
  75. 50
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/TopicVisitResultDTO.java
  76. 36
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/ResiGroupOpenFeignClient.java
  77. 11
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/fallback/ResiGroupOpenFeignClientFallback.java
  78. 28
      epmet-module/resi-group/resi-group-server/pom.xml
  79. 1
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/service/GroupInvitationService.java
  80. 4
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/service/impl/GroupInvitationServiceImpl.java
  81. 17
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/controller/ResiGroupMemberController.java
  82. 9
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/dao/GroupMemeberOperationDao.java
  83. 9
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/dao/ResiGroupMemberDao.java
  84. 2
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/entity/GroupMemeberOperationEntity.java
  85. 2
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/entity/ResiGroupMemberEntity.java
  86. 11
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/GroupMemeberOperationService.java
  87. 11
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/ResiGroupMemberService.java
  88. 259
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/GroupMemeberOperationServiceImpl.java
  89. 71
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/ResiGroupMemberServiceImpl.java
  90. 54
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/controller/ResiTopicController.java
  91. 183
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/controller/TopicDraftController.java
  92. 111
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/controller/TopicShareLinkRecordController.java
  93. 83
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/controller/TopicShareLinkVisitRecordController.java
  94. 8
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/ResiTopicAttachmentDao.java
  95. 9
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/ResiTopicDao.java
  96. 45
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/TopicDraftAttachmentDao.java
  97. 68
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/TopicDraftDao.java
  98. 33
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/TopicDraftOperationDao.java
  99. 33
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/TopicDraftScanTaskDao.java
  100. 35
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/TopicShareLinkRecordDao.java

14
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/mq/eventmsg/BasePointEventMsg.java

@ -3,6 +3,7 @@ package com.epmet.commons.tools.dto.form.mq.eventmsg;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* desc积分相关事件消息体
@ -57,4 +58,15 @@ public class BasePointEventMsg implements Serializable {
* 业务id eg活动id
*/
private String sourceId;
}
/**
* 计算积分上限时的计算日期可以为空
* 场景 通过分享链接申请入组在组长审核完成后要给邀请人添加积分若被邀请人是已注册居民
* 给邀请人添加积分有上限计算上限的日期不能是组长审核的日期而是被邀请人发送入组审核的日期
* 对应的事件编码为invite_resident_into_group
* 只针对[邀请已注册的用户入组]事件生效
*/
private Date targetDate;
private String eventTag;
}

7
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/EventEnum.java

@ -10,6 +10,13 @@ public enum EventEnum {
ACTIVE_SEND_POINT("active_send_point", "epmet_heart", "活动发放积分"),
REGISTER_VOLUNTEER("register_volunteer", "epmet_heart", "认证志愿者"),
ACTIVE_INSERT_LIVE("active_insert_live", "epmet_heart", "添加活动实况"),
INVITE_NEW_RESIDENT_INTO_GROUP("invite_new_into_group","resi_group","拉新用户入组"),
INVITE_RESIDENT_INTO_GROUP("invite_resi_into_group","resi_group","邀请已注册的用户入组"),
PUBLISH_ONE_TOPIC("publish_one_topic","resi_group","发布话题"),
PARTICIPATE_ONE_TOPIC("participate_one_topic","resi_group","对小组内话题进行15字以上评论"),
TOPIC_SHIFTED_TO_ISSUE("topic_to_issue","resi_group","话题被转为议题(小组中发布的话题被组长转为议题)"),
SHIFT_TOPIC_TO_ISSUE("shift_topic_to_issue","resi_group","转话题为议题(将自建小组中话题转为议题)"),
TOPIC_SHIFTED_TO_PROJECT("topic_to_project","resi_group","话题被转为项目"),
;
private String eventClass;

4
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisUtils.java

@ -50,6 +50,10 @@ public class RedisUtils {
* 过期时长为1小时单位
*/
public final static long HOUR_ONE_EXPIRE = 60 * 60 * 1L;
/**
* 过期时长为4小时单位
*/
public final static long HOUR_FOUR_EXPIRE = 60 * 60 * 4L;
/**
* 过期时长为6小时单位
*/

35
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/scan/param/VoiceScanParamDTO.java

@ -0,0 +1,35 @@
package com.epmet.commons.tools.scan.param;
import lombok.Data;
import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;
/**
* 语音检测入参DTO
*
* @author yinzuomei@elink-cn.com
* @date 2020/12/18 10:15
*/
@Data
public class VoiceScanParamDTO implements Serializable {
/**
* 是否开启回调
*/
@NotNull(message = "openCallBack必填,true开启;false不开启")
private Boolean openCallBack;
/**
* 异步检测结果回调地址,执行异步审查内容时 必填
* openCallBack=true时,callback必填
*/
private String callback;
@Valid
@NotEmpty(message = "任务列表不能为空")
private List<VoiceTaskDTO> tasks;
}

31
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/scan/param/VoiceTaskDTO.java

@ -0,0 +1,31 @@
package com.epmet.commons.tools.scan.param;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 语音异步检测对象
*
* @author yinzuomei@elink-cn.com
* @date 2020/12/18 10:21
*/
@Data
public class VoiceTaskDTO implements Serializable {
/**
* 不必填
* 要检测的数据id 非必填
* 检测对象对应的数据ID
* 由大小写英文字母数字下划线_短划线-英文句号.组成不超过128个字符可以用于唯一标识您的业务数据
* */
@NotBlank(message = "dataId不能为空")
private String dataId;
/**
* 必填
* 需要检测的音频文件或语音流的下载地址
*/
@NotBlank(message = "音频URL不能为空")
private String url;
}

49
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/scan/result/AsyncScanResult.java

@ -0,0 +1,49 @@
package com.epmet.commons.tools.scan.result;
import lombok.Data;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
* 语音异步检测 返参
*
* @author yinzuomei@elink-cn.com
* @date 2020/12/18 10:09
*/
@Data
public class AsyncScanResult implements Serializable {
private static final long serialVersionUID = -939433332419948118L;
/**
* 随机字符串该值用于回调通知请求中的签名
*/
private String seed;
/**
* 提交成功的失败对象
*/
private List<AsyncScanTaskDTO> successTasks=new ArrayList<>();
/**
* 提交失败的检测对象
*/
private List<AsyncScanTaskDTO> failTasks=new ArrayList<>();
/**
* 是否全部提交成功
*/
private boolean isAllSuccess;
public boolean isAllSuccess() {
if (failTasks.isEmpty() && !successTasks.isEmpty()) {
return true;
}
return isAllSuccess;
}
public void setAllSuccess(boolean allSuccess) {
isAllSuccess = allSuccess;
}
}

25
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/scan/result/AsyncScanTaskDTO.java

@ -0,0 +1,25 @@
package com.epmet.commons.tools.scan.result;
import lombok.Data;
import java.io.Serializable;
/**
* 语音异步检测 -返回的task集合
*
* @author yinzuomei@elink-cn.com
* @date 2020/12/18 10:31
*/
@Data
public class AsyncScanTaskDTO implements Serializable {
/**
* 检测对象对应的数据ID
* 由大小写英文字母数字下划线_短划线-英文句号.组成不超过128个字符可以用于唯一标识您的业务数据
*/
private String dataId;
/**
* 任务id
*/
private String taskId;
}

56
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/scan/result/VoiceResultDTO.java

@ -0,0 +1,56 @@
package com.epmet.commons.tools.scan.result;
import lombok.Data;
import java.io.Serializable;
/**
* 检测成功检测成功+检测失败的的任务详情
* 处理中的该接口不返回继续轮询即可
* @author yinzuomei@elink-cn.com
* @date 2020/12/18 13:10
*/
@Data
public class VoiceResultDTO implements Serializable {
private static final long serialVersionUID = 8006827312407034344L;
/**
* 检测对象对应的数据ID
*/
private String dataId;
/**
* 检测任务的ID
*/
private String taskId;
/**
* 建议您执行的后续操作取值
* pass结果正常无需进行其余操作
* review结果不确定需要进行人工审核
* block结果违规建议直接删除或者限制公开
*/
private String suggestion;
/**
* 检测结果的分类取值
* normal正常文本
* spam含垃圾信息
* ad广告
* politics涉政
* terrorism暴恐
* abuse辱骂
* porn色情
* flood灌水
* contraband违禁
* meaningless无意义
* customized自定义例如命中自定义关键词
*/
private String label;
/**
* labelDesc是对label的说明包含两种特殊说明:
* 1如果检测任务失败labelDesc:智能检测任务失败,结果已失效,需要人工审核
* 2如果检测结果失效labelDesc:智能检测任务失败,需要人工审核
*/
private String labelDesc;
}

109
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ScanContentUtils.java

@ -2,14 +2,16 @@ package com.epmet.commons.tools.utils;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.TypeReference;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.scan.param.ImgScanParamDTO;
import com.epmet.commons.tools.scan.param.TextScanParamDTO;
import com.epmet.commons.tools.scan.param.TextTaskDTO;
import com.epmet.commons.tools.scan.param.*;
import com.epmet.commons.tools.scan.result.AsyncScanResult;
import com.epmet.commons.tools.scan.result.SyncScanResult;
import com.epmet.commons.tools.scan.result.VoiceResultDTO;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.util.CollectionUtils;
import java.util.ArrayList;
import java.util.List;
@ -75,7 +77,76 @@ public class ScanContentUtils {
}
}
/**
* desc:语音异步检测任务提交
*
* @return 返回检测对象对应的任务id
*/
public static Result<AsyncScanResult> voiceAsyncScan(String url, VoiceScanParamDTO param){
log.debug("voiceAsyncScan param:{}", JSON.toJSONString(param));
if (StringUtils.isBlank(url) || param == null) {
throw new RenException("参数错误");
}
if (param.getOpenCallBack() && StringUtils.isBlank(param.getCallback())) {
throw new RenException("参数错误,开启回调,callback必填");
}
try {
Result<String> result = HttpClientManager.getInstance().sendPostByJSON(url, JSON.toJSONString(param));
log.debug("voiceAsyncScan result:{}", JSON.toJSONString(result));
if (result.success()) {
return JSON.parseObject(result.getData(),new TypeReference<Result<AsyncScanResult>>(){});
}
Result<AsyncScanResult> resultResult = new Result<>();
resultResult.error(result.getCode(),result.getMsg());
resultResult.setInternalMsg(result.getInternalMsg());
return resultResult;
} catch (Exception e) {
log.error("voiceAsyncScan exception:", e);
throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode(), e.getMessage());
}
}
/**
* desc:语音异步检测结果查询
*
* @param taskIds 数组中的元素个数不超过100个
* @return 注意该接口只返回检测任务完成的即检测成功或失败的任务正在处理中的不返回继续轮询即可
*/
public static Result<List<VoiceResultDTO>> voiceResults(String url, List<String> taskIds) {
if (StringUtils.isBlank(url) || CollectionUtils.isEmpty(taskIds)) {
throw new RenException("参数错误");
}
if (taskIds.size() > NumConstant.ONE_HUNDRED) {
throw new RenException("参数错误,查询检测任务最大不能超过100");
}
try {
Result<String> result = HttpClientManager.getInstance().sendPostByJSON(url, JSON.toJSONString(taskIds));
log.debug("voiceResults result:{}", JSON.toJSONString(result));
if (result.success()) {
return JSON.parseObject(result.getData(), new TypeReference<Result<List<VoiceResultDTO>>>() {
});
}
Result<List<VoiceResultDTO>> resultResult = new Result<>();
resultResult.error(result.getCode(), result.getMsg());
resultResult.setInternalMsg(result.getInternalMsg());
return resultResult;
} catch (Exception e) {
log.error("voiceResults exception:", e);
throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode(), e.getMessage());
}
}
public static void main(String[] args) {
//测试文本检测
// testTextSyncScan();
//测试语音检测
// testVoiceAsyncScan();
//语音检测结果
testVoiceResults();
}
public static void testTextSyncScan(){
String url = "http://localhost:8107/epmetscan/api/textSyncScan";
TextTaskDTO p = new TextTaskDTO();
p.setDataId("1");
@ -95,6 +166,38 @@ public class ScanContentUtils {
result.getFailDataIds().addAll(imgSyncScanResultData.getFailDataIds());
System.out.println("================"+JSON.toJSONString(result));
}
}
}
public static void testVoiceAsyncScan(){
String url = "http://localhost:8107/epmetscan/api/voiceAsyncScan";
VoiceTaskDTO p = new VoiceTaskDTO();
p.setDataId("1");
p.setUrl("https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet/test/20201208/6480bd6be9f14a458162218cea84dfa5.aac");
List<VoiceTaskDTO> list = new ArrayList<>();
list.add(p);
VoiceScanParamDTO param = new VoiceScanParamDTO();
param.setTasks(list);
param.setOpenCallBack(false);
Result<AsyncScanResult> asyncScanResultResult = ScanContentUtils.voiceAsyncScan(url, param);
System.out.println(JSON.toJSONString(asyncScanResultResult));
AsyncScanResult result = new AsyncScanResult();
if (asyncScanResultResult != null) {
AsyncScanResult asyncScanResult = asyncScanResultResult.getData();
if (asyncScanResultResult.success()) {
result.setAllSuccess(asyncScanResult.isAllSuccess());
result.getSuccessTasks().addAll(asyncScanResult.getSuccessTasks());
result.getFailTasks().addAll(asyncScanResult.getFailTasks());
System.out.println("================" + JSON.toJSONString(result));
}
}
}
public static void testVoiceResults(){
String url = "http://localhost:8107/epmetscan/api/voiceResults";
List<String> taskIds=new ArrayList<>();
taskIds.add("vc_f_6CXRk1VcAwM6u0FMA@CfoW-1tDgIp");
Result<List<VoiceResultDTO>> asyncScanResultResult = ScanContentUtils.voiceResults(url, taskIds);
System.out.println("================" + JSON.toJSONString(asyncScanResultResult));
}
}

1
epmet-gateway/src/main/resources/bootstrap.yml

@ -442,6 +442,7 @@ epmet:
# 内部认证url白名单(在白名单中的,就不会再校验登录了)
internalAuthUrlsWhiteList:
- /epmetuser/customerstaff/customerlist
- /resi/group/topic/callBackPublishTopic
# 外部应用认证,使用AccessToken等头进行认证
externalOpenUrls:

17
epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java

@ -305,4 +305,21 @@ public class OssController {
return ossService.uploadVariedFile(file);
}
/**
* @param file
* @Description 上传语音文件
* @Author sun
**/
@PostMapping("uploadvoice")
public Result<UploadImgResultDTO> uploadVoice(@RequestParam("file") MultipartFile file) {
// 校验文件体积,不超过20M
long maxSize = 20 * 1024 * 1024;
long size = file.getSize();
if (size > maxSize) {
throw new RenException(EpmetErrorCode.OPER_UPLOAD_FILE_OVER_SIZE.getCode(),
EpmetErrorCode.OPER_UPLOAD_FILE_OVER_SIZE.getMsg());
}
return ossService.uploadVoice(file);
}
}

2
epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/service/OssService.java

@ -33,4 +33,6 @@ public interface OssService extends BaseService<OssEntity> {
Result<UploadImgResultDTO> extUpload(MultipartFile file, String fileName);
Result<UploadImgResultDTO> uploadVariedFile(MultipartFile file);
Result<UploadImgResultDTO> uploadVoice(MultipartFile file);
}

32
epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/service/impl/OssServiceImpl.java

@ -130,4 +130,36 @@ public class OssServiceImpl extends BaseServiceImpl<OssDao, OssEntity> implement
return new Result<UploadImgResultDTO>().ok(dto);
}
/**
* @param file
* @Description 上传语音
* @Author sun
**/
@Override
public Result<UploadImgResultDTO> uploadVoice(MultipartFile file) {
if (file.isEmpty()) {
return new Result<UploadImgResultDTO>().error(ModuleErrorCode.UPLOAD_FILE_EMPTY);
}
//上传文件
String extension = FilenameUtils.getExtension(file.getOriginalFilename());
String url = null;
try {
url = OssFactory.build().uploadSuffix(file.getBytes(), extension);
} catch (IOException e) {
e.printStackTrace();
logger.error("语音上传异常");
throw new RenException("语音上传异常");
}
//保存文件信息
OssEntity ossEntity = new OssEntity();
ossEntity.setUrl(url);
baseDao.insert(ossEntity);
//文件信息
UploadImgResultDTO dto = new UploadImgResultDTO();
dto.setUrl(url);
return new Result<UploadImgResultDTO>().ok(dto);
}
}

30
epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/MqPointCallbackController.java

@ -117,5 +117,35 @@ public class MqPointCallbackController {
log.info("pubActiveLive consumer success,formDTO:{}", JSON.toJSONString(formList));
return new Result<Boolean>().ok(true);
}
/**
* @Description 楼院小组积分事件统一回调入口
* @param mqMsg
* @return com.epmet.commons.tools.utils.Result<java.lang.Boolean>
* @author wangc
* @date 2020.12.23 09:33
*/
@RequestMapping("resigrouppointcallback")
public Result<Boolean> resiGroupPointCallback(@RequestBody ReceiveMqMsg mqMsg){
log.debug("resi_group point event callback receive mqMsg:{}", JSON.toJSONString(mqMsg));
if (mqMsg == null || StringUtils.isBlank(mqMsg.getMsg())) {
log.warn("resi_group point event mqMsg is empty");
return new Result<Boolean>().ok(true);
}
List<BasePointEventMsg> formList = JSON.parseArray(mqMsg.getMsg(), BasePointEventMsg.class);
try {
formList.forEach(obj -> {
userPointActionLogService.grantPointByEvent(obj.getEventTag(),obj);
});
} catch (Exception e) {
logger.error("resi_group point event callback fail", e);
throw new RenException(EpmetErrorCode.SERVER_ERROR.getMsg());
}
log.info("resi_group point event callback success,formDTO:{}", JSON.toJSONString(formList));
return new Result<Boolean>().ok(true);
}
}

2
epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/UserPointActionLogDao.java

@ -52,5 +52,5 @@ public interface UserPointActionLogDao extends BaseDao<UserPointActionLogEntity>
* @author wangc
* @date 2020.07.31 15:11
**/
Integer selectSumByEvent(@Param("userId") String userId, @Param("eventId") String eventId, @Param("sourceId") String sourceId, @Param("customerId") String customerId, @Param("dateCheck") Date dateCheck);
Integer selectSumByEvent(@Param("userId") String userId, @Param("eventId") String eventId, @Param("sourceId") String sourceId, @Param("customerId") String customerId, @Param("dateCheck") Date dateCheck,@Param("right")Date right);
}

25
epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointActionLogServiceImpl.java

@ -189,8 +189,7 @@ public class UserPointActionLogServiceImpl extends BaseServiceImpl<UserPointActi
@Override
@Transactional(rollbackFor = Exception.class)
public void grantPointByEvent(String eventCode,BasePointEventMsg event) {
if(!StringUtils.equals(EventEnum.REGISTER_VOLUNTEER.getEventTag(),eventCode) && !StringUtils.equals(EventEnum.ACTIVE_INSERT_LIVE.getEventTag(),eventCode)){
if(null == EventEnum.getEnum(eventCode)){
logger.error(String.format("无法识别事件类型与积分规则,消息体->【%s】", JSON.toJSON(event)));
throw new RenException("无法识别事件类型与积分规则");
}
@ -198,10 +197,13 @@ public class UserPointActionLogServiceImpl extends BaseServiceImpl<UserPointActi
if(null != ruleInfo && StringUtils.equals(NumConstant.ONE_STR,ruleInfo.getEnabledFlag())){
Date dateCheck = null;
Calendar calendar = Calendar.getInstance();
calendar.setTime(new Date());
calendar.setTime(null == event.getTargetDate() ? new Date() : event.getTargetDate());
calendar.set(Calendar.HOUR_OF_DAY, NumConstant.ZERO);
calendar.set(Calendar.MINUTE, NumConstant.ZERO);
calendar.set(Calendar.SECOND, NumConstant.ZERO);
Date right = null;
//先判断周期,是否超过限值
RuleCycleEnum cycle = RuleCycleEnum.getEnum(ruleInfo.getRulePeriod());
switch(cycle){
@ -215,24 +217,33 @@ public class UserPointActionLogServiceImpl extends BaseServiceImpl<UserPointActi
case DAILY:
//今天零点
dateCheck = calendar.getTime();
calendar.add(Calendar.DATE,1);
right = calendar.getTime();
break;
case WEEKLY:
//本周第一天零点
calendar.add(Calendar.WEEK_OF_MONTH, 0);
calendar.set(Calendar.DAY_OF_WEEK, 2);
dateCheck = calendar.getTime();
calendar.add(Calendar.DAY_OF_MONTH,7);
right = calendar.getTime();
break;
case MONTHLY:
//本月第一天零点
calendar.add(Calendar.MONTH, 0);
calendar.set(Calendar.DAY_OF_MONTH, 1);
dateCheck = calendar.getTime();
calendar.add(Calendar.MONTH, 1);
right = calendar.getTime();
break;
case YEARLY:
//本年第一天零点
int dayOfYear = Calendar.getInstance().get(Calendar.DAY_OF_YEAR);
calendar.add(Calendar.DAY_OF_YEAR, -dayOfYear + 1);
calendar.set(Calendar.DAY_OF_YEAR,1);
dateCheck = calendar.getTime();
calendar.add(Calendar.YEAR,1);
right = calendar.getTime();
break;
default:
}
@ -251,7 +262,7 @@ public class UserPointActionLogServiceImpl extends BaseServiceImpl<UserPointActi
//校验是否达到上限
if(ruleInfo.getUpLimit() > NumConstant.ZERO){
//不按照sourceId查询,查询指定日期内的相关积分规则的总和
Integer sum = baseDao.selectSumByEvent(event.getUserId(),eventCode,null,event.getCustomerId(),dateCheck);
Integer sum = baseDao.selectSumByEvent(event.getUserId(),eventCode,null,event.getCustomerId(),dateCheck,right);
if(null == sum) sum = NumConstant.ZERO;
if(StringUtils.equals(ModuleConstant.OPERATION_TYPE_PLUS,ruleInfo.getOperateType())){
if(ruleInfo.getPoint() < NumConstant.ZERO){
@ -270,7 +281,7 @@ public class UserPointActionLogServiceImpl extends BaseServiceImpl<UserPointActi
}
//这里sum一定是正数
if(ruleInfo.getUpLimit() < sum){
log.info(String.format("该用户获取此类事件的积分已达上限,详细数据->【%s】", JSON.toJSON(event)));
log.warn(String.format("该用户获取此类事件的积分已达上限,详细数据->【%s】", JSON.toJSON(event)));
return ;
}
}
@ -290,7 +301,7 @@ public class UserPointActionLogServiceImpl extends BaseServiceImpl<UserPointActi
}else{
//如果不是添加实况和志愿者注册
//则统一使用EventEnum中的eventDesc作为eventStatement,eventTag作为eventId
eventName = EventEnum.getEnum(eventCode).getEventDesc();
eventName = ruleInfo.getRuleName();
eventStatement = event.getRemark();
}
@ -391,6 +402,4 @@ public class UserPointActionLogServiceImpl extends BaseServiceImpl<UserPointActi
point.setUpdatedBy(grantPoint.getOperatorId());
userPointTotalService.insertOrUpdate(point);
}
}

66
epmet-module/epmet-point/epmet-point-server/src/main/resources/db/migration/V0.0.4__addNewRuleTemplate.sql

@ -0,0 +1,66 @@
INSERT INTO point_rule_default (
`ID`,
`RULE_NAME`,
`RULE_DESC`,
`EVENT_CODE`,
`FUNCTION_ID`,
`OPERATE_TYPE`,
`UP_LIMIT`,
`UP_LIMIT_DESC`,
`UP_LIMIT_PREFIX`,
`RULE_PERIOD`,
`POINT`,
`POINT_UNIT`,
`ENABLED_FLAG`,
`DEL_FLAG`,
`REVISION`,
`CREATED_BY`,
`CREATED_TIME`,
`UPDATED_BY`,
`UPDATED_TIME`
)
VALUES
(
'3','发布话题',
'对小组内话题进行15字以上评论','publish_one_topic',
'43addd0735230c01eedbb38d721076b0','plus',
15,'每天上限为15分',null,'day',5,'time','0','0',0,'APP_USER',now(),'APP_USER',now()
),
(
'4','参与话题',
'楼院小组内通过我有话说功能发布话题','participate_one_topic',
'43addd0735230c01eedbb38d721076b0','plus',
6,'每天上限为6分',null,'day',2,'time','0','0',0,'APP_USER',now(),'APP_USER',now()
),
(
'5','话题被转为议题',
'小组中发布的话题被组长转为议题','topic_shifted_to_issue',
'43addd0735230c01eedbb38d721076b0','plus',
0,'无上限',null,'day',15,'time','0','0',0,'APP_USER',now(),'APP_USER',now()
),
(
'6','话题被转为项目',
'小组中发布的话题被组长转为议题 又被网格员转为项目','topic_shifted_to_project',
'43addd0735230c01eedbb38d721076b0','plus',
0,'无上限',null,'day',30,'time','0','0',0,'APP_USER',now(),'APP_USER',now()
),
(
'7','转话题为议题',
'将自建小组中话题转为议题','shift_topic_to_issue',
'43addd0735230c01eedbb38d721076b0','plus',
15,'每天上限为15分',null,'day',5,'time','0','0',0,'APP_USER',now(),'APP_USER',now()
),
(
'8','邀请新人入组',
'通过话题/议题分享链接邀请新用户入组,需注册居民成功入组方能获得','invite_new_resident_into_group',
'43addd0735230c01eedbb38d721076b0','plus',
0,'无上限',null,'day',30,'time','0','0',0,'APP_USER',now(),'APP_USER',now()
),
(
'9','邀请入组',
'通过话题/议题分享链接邀请已注册用户入组,需通过入组审核方能获得','invite_resident_into_group',
'43addd0735230c01eedbb38d721076b0','plus',
25,'每天上限为25分',null,'day',5,'time','0','0',0,'APP_USER',now(),'APP_USER',now()
)

4
epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/UserPointActionLogDao.xml

@ -61,6 +61,8 @@
<if test="null != dateCheck">
AND CREATED_TIME <![CDATA[ >= ]]> #{dateCheck}
</if>
<if test="null != right">
AND CREATED_TIME <![CDATA[ < ]]> #{right}
</if>
</select>
</mapper>

17
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/constant/IssueShareConstant.java

@ -0,0 +1,17 @@
package com.epmet.constant;
/**
* @Author zxc
* @DateTime 2020/12/18 下午1:59
*/
public interface IssueShareConstant {
String NOT_EXIST_ISSUE_INFO = "未查询到此议题相关信息";
String TOPIC_BELONG_GROUP_FAILURE = "查询话题所属小组失败......";
String TOPIC_BELONG_GROUP_NULL = "查询话题所属小组为空......";
String NOT_EXIST_INVITE_ISSUE_RECORD = "未查询到该邀请记录【议题】......";
}

97
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueShareLinkRecordDTO.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.epmet.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 议题分享链接表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-12-18
*/
@Data
public class IssueShareLinkRecordDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* 议题所属网格ID
*/
private String gridId;
/**
* 议题ID
*/
private String issueId;
/**
* 分享人当前用户id
*/
private String shareUserId;
/**
* 邀请内容
*/
private String inviteContent;
/**
* 删除状态 0正常1:删除
*/
private Integer delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

101
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueShareLinkVisitRecordDTO.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.epmet.dto;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 议题分享链接访问记录表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-12-18
*/
@Data
public class IssueShareLinkVisitRecordDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* 分享人邀请人ID
*/
private String shareUserId;
/**
* 被邀请人ID
*/
private String inviteeUserId;
/**
* 议题分享链接表.id
*/
private String shareLinkRecId;
/**
* 是否邀请注册0:1:不是
*/
private Integer isInviteRegister;
/**
* 是否同意进组,1是0否在注册完居民之后是否同意入组如果同意发送入组申请不同意此项默认为0
*/
private Boolean ifJoinGroup;
/**
* 删除状态0:正常1删除
*/
private Integer delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

21
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/IssueCreateUrlFormDTO.java

@ -0,0 +1,21 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2020/12/18 下午1:23
*/
@Data
public class IssueCreateUrlFormDTO implements Serializable {
private static final long serialVersionUID = -7269328640568283013L;
public interface IssueCreateUrlForm{}
@NotBlank(message = "议题ID不能为空",groups = {IssueCreateUrlForm.class})
private String issueId;
}

24
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/IssueVisitFormDTO.java

@ -0,0 +1,24 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2020/12/18 下午3:12
*/
@Data
public class IssueVisitFormDTO implements Serializable {
private static final long serialVersionUID = -7901684507046042401L;
public interface IssueVisitForm{}
/**
* 分享ID
*/
@NotBlank(message = "分享ID不能为空",groups = {IssueVisitForm.class})
private String shareLinkId;
}

29
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/SharableIssueAndInviteeFormDTO.java

@ -0,0 +1,29 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Description 议题分享链接和被邀请人传参DTO
* @ClassName SharableIssueAndInviteeFormDTO
* @Auth wangc
* @Date 2020-12-18 15:10
*/
@Data
public class SharableIssueAndInviteeFormDTO implements Serializable {
private static final long serialVersionUID = -2777459178190245842L;
/**
* 议题分享链接
*/
@NotBlank(message = "分享链接不能为空")
private String shareLinkId;
/**
* 通过链接进入议题页面用户的Id
*/
@NotBlank(message = "用户Id不能为空")
private String inviteeId;
}

22
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueCreateUrlResultDTO.java

@ -0,0 +1,22 @@
package com.epmet.dto.result;
import lombok.AllArgsConstructor;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2020/12/18 下午1:30
*/
@Data
@AllArgsConstructor
public class IssueCreateUrlResultDTO implements Serializable {
private static final long serialVersionUID = 552194128388715353L;
/**
* 议题分享链接ID
*/
private String shareLinkId;
}

34
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueVisitResultDTO.java

@ -0,0 +1,34 @@
package com.epmet.dto.result;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2020/12/18 下午5:13
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class IssueVisitResultDTO implements Serializable {
private static final long serialVersionUID = -5079228371448105954L;
/**
* 议题ID
*/
private String issueId;
/**
* 网格ID
*/
private String gridId;
/**
* 客户ID
*/
private String customerId;
}

35
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java

@ -5,6 +5,7 @@ import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.IssueApplicationDTO;
import com.epmet.dto.IssueDTO;
import com.epmet.dto.IssueSuggestionDTO;
import com.epmet.dto.*;
import com.epmet.dto.form.*;
import com.epmet.dto.result.*;
import com.epmet.feign.fallback.GovIssueOpenFeignClientFallBack;
@ -234,4 +235,38 @@ public interface GovIssueOpenFeignClient {
@PostMapping("/gov/issue/issueprojecttagdict/updatecitations")
Result updateCitations(@RequestBody TagDifferentSetFormDTO param);
/**
* @Description 检查邀请关系如果确实存在邀请关系则返回邀请人Id
* 符合条件
* 链接Id对应
* 邀请人Id对应
* 邀请人在被邀请时的状态为陌生人
* @param param
* @return com.epmet.commons.tools.utils.Result<java.lang.String>
* @author wangc
* @date 2020.12.18 14:53
*/
@PostMapping("/gov/issue/issuesharelinkvisitrecord/checkinviterelationship")
Result<String> checkInviteRelationship(@RequestBody SharableIssueAndInviteeFormDTO param);
/**
* @Description 通过链接Id查询分享人和被邀请人的信息
* @param
* @return
* @author wangc
* @date 2020.12.21 16:27
*/
@PostMapping("/gov/issue/issuesharelinkvisitrecord/visitrecord")
Result<IssueShareLinkVisitRecordDTO> visitRecord(@RequestParam("linkId")String linkId,@RequestParam("invitee")String invitee);
/**
* @Description 根据议题分享链接Id查询链接详情
* @param shareLinkId
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.IssueShareLinkRecordDTO>
* @author wangc
* @date 2020.12.22 10:53
*/
@PostMapping("/gov/issue/issuesharelink/sharelinkinfo")
Result<IssueShareLinkRecordDTO> shareLinkInfo(@RequestParam String shareLinkId);
}

17
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java

@ -6,6 +6,7 @@ import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.IssueApplicationDTO;
import com.epmet.dto.IssueDTO;
import com.epmet.dto.IssueSuggestionDTO;
import com.epmet.dto.*;
import com.epmet.dto.form.*;
import com.epmet.dto.result.*;
import com.epmet.feign.GovIssueOpenFeignClient;
@ -20,6 +21,7 @@ import com.epmet.resi.group.dto.group.result.*;
import com.epmet.resi.mine.dto.from.MyShiftIssueTopicsFormDTO;
import com.epmet.resi.mine.dto.result.MyShiftIssueTopicsResultDTO;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
import java.util.Map;
@ -216,4 +218,19 @@ public class GovIssueOpenFeignClientFallBack implements GovIssueOpenFeignClient
public Result updateCitations(TagDifferentSetFormDTO param) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "updateCitations", param);
}
@Override
public Result<String> checkInviteRelationship(SharableIssueAndInviteeFormDTO param) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "checkInviteRelationship", param);
}
@Override
public Result<IssueShareLinkVisitRecordDTO> visitRecord(String linkId,String invitee) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "visitRecord", linkId,invitee);
}
@Override
public Result<IssueShareLinkRecordDTO> shareLinkInfo(String shareLinkId) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "shareLinkInfo", shareLinkId);
}
}

128
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueShareLinkRecordController.java

@ -0,0 +1,128 @@
/**
* 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.epmet.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.IssueShareLinkRecordDTO;
import com.epmet.dto.form.IssueCreateUrlFormDTO;
import com.epmet.dto.form.IssueVisitFormDTO;
import com.epmet.dto.result.IssueCreateUrlResultDTO;
import com.epmet.dto.result.IssueVisitResultDTO;
import com.epmet.service.IssueShareLinkRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
/**
* 议题分享链接表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-12-18
*/
@RestController
@RequestMapping("issuesharelink")
public class IssueShareLinkRecordController {
@Autowired
private IssueShareLinkRecordService issueShareLinkRecordService;
@GetMapping("page")
public Result<PageData<IssueShareLinkRecordDTO>> page(@RequestParam Map<String, Object> params){
PageData<IssueShareLinkRecordDTO> page = issueShareLinkRecordService.page(params);
return new Result<PageData<IssueShareLinkRecordDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<IssueShareLinkRecordDTO> get(@PathVariable("id") String id){
IssueShareLinkRecordDTO data = issueShareLinkRecordService.get(id);
return new Result<IssueShareLinkRecordDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody IssueShareLinkRecordDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
issueShareLinkRecordService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody IssueShareLinkRecordDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
issueShareLinkRecordService.update(dto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
issueShareLinkRecordService.delete(ids);
return new Result();
}
/**
* @Description 议题分享链接ID
* @Param formDTO
* @Param tokenDto
* @author zxc
* @date 2020/12/18 下午1:36
*/
@PostMapping("createurl")
public Result<IssueCreateUrlResultDTO> getIssueShareLinkId(@RequestBody IssueCreateUrlFormDTO formDTO, @LoginUser TokenDto tokenDto){
ValidatorUtils.validateEntity(formDTO, IssueCreateUrlFormDTO.IssueCreateUrlForm.class);
return new Result<IssueCreateUrlResultDTO>().ok(issueShareLinkRecordService.getIssueShareLinkId(formDTO,tokenDto));
}
/**
* @Description 分享议题id获取信息
* @Param formDTO
* @Param tokenDto
* @author zxc
* @date 2020/12/18 下午5:22
*/
@PostMapping("visit")
public Result<IssueVisitResultDTO> issueVisit(@RequestBody IssueVisitFormDTO formDTO,@LoginUser TokenDto tokenDto){
ValidatorUtils.validateEntity(formDTO, IssueVisitFormDTO.IssueVisitForm.class);
return new Result<IssueVisitResultDTO>().ok(issueShareLinkRecordService.issueVisit(formDTO,tokenDto));
}
/**
* @Description 根据议题分享链接Id查询链接详情
* @param shareLinkId
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.IssueShareLinkRecordDTO>
* @author wangc
* @date 2020.12.22 10:53
*/
@PostMapping("sharelinkinfo")
public Result<IssueShareLinkRecordDTO> shareLinkInfo(@RequestParam String shareLinkId){
return null;
}
}

98
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueShareLinkVisitRecordController.java

@ -0,0 +1,98 @@
package com.epmet.controller;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.IssueShareLinkVisitRecordDTO;
import com.epmet.dto.form.SharableIssueAndInviteeFormDTO;
import com.epmet.service.IssueShareLinkVisitRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
/**
* 议题分享链接访问记录表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-12-18
*/
@RestController
@RequestMapping("issuesharelinkvisitrecord")
public class IssueShareLinkVisitRecordController {
@Autowired
private IssueShareLinkVisitRecordService issueShareLinkVisitRecordService;
@GetMapping("page")
public Result<PageData<IssueShareLinkVisitRecordDTO>> page(@RequestParam Map<String, Object> params){
PageData<IssueShareLinkVisitRecordDTO> page = issueShareLinkVisitRecordService.page(params);
return new Result<PageData<IssueShareLinkVisitRecordDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<IssueShareLinkVisitRecordDTO> get(@PathVariable("id") String id){
IssueShareLinkVisitRecordDTO data = issueShareLinkVisitRecordService.get(id);
return new Result<IssueShareLinkVisitRecordDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody IssueShareLinkVisitRecordDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
issueShareLinkVisitRecordService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody IssueShareLinkVisitRecordDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
issueShareLinkVisitRecordService.update(dto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
issueShareLinkVisitRecordService.delete(ids);
return new Result();
}
/**
* @Description 检查邀请关系如果确实存在邀请关系则返回邀请人Id
* 符合条件
* 链接Id对应
* 邀请人Id对应
* 邀请人在被邀请时的状态为陌生人
* @param param
* @return com.epmet.commons.tools.utils.Result<java.lang.String>
* @author wangc
* @date 2020.12.18 14:53
*/
@PostMapping("checkinviterelationship")
public Result<String> checkInviteRelationship(@RequestBody SharableIssueAndInviteeFormDTO param){
ValidatorUtils.validateEntity(param);
return new Result<String>().ok(issueShareLinkVisitRecordService.checkInviteRelationship(param));
}
/**
* @Description 通过链接Id查询分享人和被邀请人的信息
* @param
* @return
* @author wangc
* @date 2020.12.21 16:27
*/
@PostMapping("visitrecord")
public Result<IssueShareLinkVisitRecordDTO> visitRecord(@RequestParam("linkId")String linkId,@RequestParam("invitee")String invitee){
return new Result<IssueShareLinkVisitRecordDTO>().ok(issueShareLinkVisitRecordService.getVisitRecord(linkId,invitee));
}
}

51
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueShareLinkRecordDao.java

@ -0,0 +1,51 @@
/**
* 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.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.IssueShareLinkRecordEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 议题分享链接表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-12-18
*/
@Mapper
public interface IssueShareLinkRecordDao extends BaseDao<IssueShareLinkRecordEntity> {
/**
* @Description 校验此人此议题是否存在分享记录
* @Param issueId
* @Param userId
* @author zxc
* @date 2020/12/18 下午1:47
*/
String checkIssueRecord(@Param("issueId") String issueId, @Param("userId") String userId);
/**
* @Description 根据issueId查询议题信息
* @Param issueId
* @author zxc
* @date 2020/12/18 下午1:55
*/
IssueShareLinkRecordEntity selectIssueInfoById(@Param("issueId") String issueId);
}

65
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueShareLinkVisitRecordDao.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.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.IssueShareLinkVisitRecordDTO;
import com.epmet.entity.IssueShareLinkVisitRecordEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 议题分享链接访问记录表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-12-18
*/
@Mapper
public interface IssueShareLinkVisitRecordDao extends BaseDao<IssueShareLinkVisitRecordEntity> {
/**
* @Description 根据邀请Id和邀请人Id查询邀请人的Id
* @param linkId
* @param invitee
* @return java.lang.String
* @author wangc
* @date 2020.12.18 15:50
*/
String selectInviterIdByLinkIdAndInvitee(@Param("linkId") String linkId, @Param("invitee") String invitee);
/**
* @Description 修改是否通过链接注册居民由0改为1
* @param linkId
* @param invitee
* @return int
* @author wangc
* @date 2020.12.18 15:50
*/
int updateInviteRegister(@Param("linkId") String linkId, @Param("invitee") String invitee);
/**
* @Description 根据邀请Id和被邀请人Id查询查询链接浏览记录
* @param
* @return com.epmet.dto.IssueShareLinkVisitRecordDTO
* @author wangc
* @date 2020.12.22 09:53
*/
IssueShareLinkVisitRecordDTO selectRecordByLinkIdAndInvitee(@Param("linkId") String linkId, @Param("invitee") String invitee);
}

70
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueShareLinkRecordEntity.java

@ -0,0 +1,70 @@
/**
* 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.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 议题分享链接表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-12-18
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("issue_share_link_record")
public class IssueShareLinkRecordEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户ID
*/
private String customerId;
/**
* 议题所属网格ID
*/
private String gridId;
/**
* 议题ID
*/
private String issueId;
/**
* 分享人当前用户id
*/
private String shareUserId;
/**
* 邀请内容
*/
private String inviteContent;
/**
* 话题ID
*/
@TableField(exist = false)
private String topicId;
}

70
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueShareLinkVisitRecordEntity.java

@ -0,0 +1,70 @@
/**
* 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.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 议题分享链接访问记录表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-12-18
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("issue_share_link_visit_record")
public class IssueShareLinkVisitRecordEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户ID
*/
private String customerId;
/**
* 分享人邀请人ID
*/
private String shareUserId;
/**
* 被邀请人ID
*/
private String inviteeUserId;
/**
* 议题分享链接表.id
*/
private String shareLinkRecId;
/**
* 是否邀请注册0:1:不是
*/
private Integer isInviteRegister;
/**
* 是否同意进组,1是0否在注册完居民之后是否同意入组如果同意发送入组申请不同意此项默认为0
*/
private Boolean ifJoinGroup;
}

118
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueShareLinkRecordService.java

@ -0,0 +1,118 @@
/**
* 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.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.dto.IssueShareLinkRecordDTO;
import com.epmet.dto.form.IssueCreateUrlFormDTO;
import com.epmet.dto.form.IssueVisitFormDTO;
import com.epmet.dto.result.IssueCreateUrlResultDTO;
import com.epmet.dto.result.IssueVisitResultDTO;
import com.epmet.entity.IssueShareLinkRecordEntity;
import java.util.List;
import java.util.Map;
/**
* 议题分享链接表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-12-18
*/
public interface IssueShareLinkRecordService extends BaseService<IssueShareLinkRecordEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<IssueShareLinkRecordDTO>
* @author generator
* @date 2020-12-18
*/
PageData<IssueShareLinkRecordDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<IssueShareLinkRecordDTO>
* @author generator
* @date 2020-12-18
*/
List<IssueShareLinkRecordDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return IssueShareLinkRecordDTO
* @author generator
* @date 2020-12-18
*/
IssueShareLinkRecordDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2020-12-18
*/
void save(IssueShareLinkRecordDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2020-12-18
*/
void update(IssueShareLinkRecordDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2020-12-18
*/
void delete(String[] ids);
/**
* @Description 议题分享链接ID
* @Param formDTO
* @Param tokenDto
* @author zxc
* @date 2020/12/18 下午1:36
*/
IssueCreateUrlResultDTO getIssueShareLinkId(IssueCreateUrlFormDTO formDTO, TokenDto tokenDto);
/**
* @Description 分享议题id获取信息
* @Param formDTO
* @Param tokenDto
* @author zxc
* @date 2020/12/18 下午5:22
*/
IssueVisitResultDTO issueVisit( IssueVisitFormDTO formDTO, TokenDto tokenDto);
}

113
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueShareLinkVisitRecordService.java

@ -0,0 +1,113 @@
/**
* 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.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.IssueShareLinkVisitRecordDTO;
import com.epmet.dto.form.SharableIssueAndInviteeFormDTO;
import com.epmet.entity.IssueShareLinkVisitRecordEntity;
import java.util.List;
import java.util.Map;
/**
* 议题分享链接访问记录表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-12-18
*/
public interface IssueShareLinkVisitRecordService extends BaseService<IssueShareLinkVisitRecordEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<IssueShareLinkVisitRecordDTO>
* @author generator
* @date 2020-12-18
*/
PageData<IssueShareLinkVisitRecordDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<IssueShareLinkVisitRecordDTO>
* @author generator
* @date 2020-12-18
*/
List<IssueShareLinkVisitRecordDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return IssueShareLinkVisitRecordDTO
* @author generator
* @date 2020-12-18
*/
IssueShareLinkVisitRecordDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2020-12-18
*/
void save(IssueShareLinkVisitRecordDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2020-12-18
*/
void update(IssueShareLinkVisitRecordDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2020-12-18
*/
void delete(String[] ids);
/**
* @Description
* @param param
* @return java.lang.String
* @author wangc
* @date 2020.12.18 15:24
*/
String checkInviteRelationship(SharableIssueAndInviteeFormDTO param);
/**
* @Description 通过链接Id查询分享人和被邀请人的信息
* @param
* @return
* @author wangc
* @date 2020.12.21 16:27
*/
IssueShareLinkVisitRecordDTO getVisitRecord(String linkId,String invitee);
}

167
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueShareLinkRecordServiceImpl.java

@ -0,0 +1,167 @@
package com.epmet.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.constant.IssueShareConstant;
import com.epmet.dao.IssueShareLinkRecordDao;
import com.epmet.dao.IssueShareLinkVisitRecordDao;
import com.epmet.dto.IssueShareLinkRecordDTO;
import com.epmet.dto.form.IssueCreateUrlFormDTO;
import com.epmet.dto.form.IssueVisitFormDTO;
import com.epmet.dto.result.IssueCreateUrlResultDTO;
import com.epmet.dto.result.IssueVisitResultDTO;
import com.epmet.entity.IssueShareLinkRecordEntity;
import com.epmet.entity.IssueShareLinkVisitRecordEntity;
import com.epmet.resi.group.dto.topic.form.TopicBelongGroupFormDTO;
import com.epmet.resi.group.dto.topic.result.TopicBelongGroupResultDTO;
import com.epmet.resi.group.feign.ResiGroupOpenFeignClient;
import com.epmet.service.IssueShareLinkRecordService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* 议题分享链接表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-12-18
*/
@Service
public class IssueShareLinkRecordServiceImpl extends BaseServiceImpl<IssueShareLinkRecordDao, IssueShareLinkRecordEntity> implements IssueShareLinkRecordService {
@Autowired
private ResiGroupOpenFeignClient resiGroupOpenFeignClient;
@Autowired
private IssueShareLinkVisitRecordDao visitRecordDao;
@Override
public PageData<IssueShareLinkRecordDTO> page(Map<String, Object> params) {
IPage<IssueShareLinkRecordEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, IssueShareLinkRecordDTO.class);
}
@Override
public List<IssueShareLinkRecordDTO> list(Map<String, Object> params) {
List<IssueShareLinkRecordEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, IssueShareLinkRecordDTO.class);
}
private QueryWrapper<IssueShareLinkRecordEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<IssueShareLinkRecordEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public IssueShareLinkRecordDTO get(String id) {
IssueShareLinkRecordEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, IssueShareLinkRecordDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(IssueShareLinkRecordDTO dto) {
IssueShareLinkRecordEntity entity = ConvertUtils.sourceToTarget(dto, IssueShareLinkRecordEntity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(IssueShareLinkRecordDTO dto) {
IssueShareLinkRecordEntity entity = ConvertUtils.sourceToTarget(dto, IssueShareLinkRecordEntity.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteBatchIds(Arrays.asList(ids));
}
/**
* @Description 议题分享链接ID
* @Param formDTO
* @Param tokenDto
* @author zxc
* @date 2020/12/18 下午1:36
*/
@Override
public IssueCreateUrlResultDTO getIssueShareLinkId(IssueCreateUrlFormDTO formDTO, TokenDto tokenDto) {
// 校验此人此议题是否存在分享记录
String shareLinkId = baseDao.checkIssueRecord(formDTO.getIssueId(), tokenDto.getUserId());
if (StringUtils.isNotBlank(shareLinkId)){
return new IssueCreateUrlResultDTO(shareLinkId);
}
// 查询议题信息
IssueShareLinkRecordEntity issueInfo = baseDao.selectIssueInfoById(formDTO.getIssueId());
if (null == issueInfo){
throw new RenException(IssueShareConstant.NOT_EXIST_ISSUE_INFO);
}
TopicBelongGroupFormDTO topicBelongGroupFormDTO = new TopicBelongGroupFormDTO();
topicBelongGroupFormDTO.setTopicId(issueInfo.getTopicId());
// 查询议题来源所属小组【话题所属小组】
Result<TopicBelongGroupResultDTO> topicInfo = resiGroupOpenFeignClient.selectTopicBelongGroup(topicBelongGroupFormDTO);
if (!topicInfo.success()){
throw new RenException(IssueShareConstant.TOPIC_BELONG_GROUP_FAILURE);
}
IssueShareLinkRecordEntity entity = new IssueShareLinkRecordEntity();
entity.setCustomerId(issueInfo.getCustomerId());
if (StringUtils.isBlank(topicInfo.getData().getGroupId())){
throw new RenException(IssueShareConstant.TOPIC_BELONG_GROUP_NULL);
}
entity.setGridId(topicInfo.getData().getGroupId());
entity.setIssueId(formDTO.getIssueId());
entity.setShareUserId(tokenDto.getUserId());
entity.setInviteContent(null);
// 插入分享记录
baseDao.insert(entity);
return new IssueCreateUrlResultDTO(entity.getId());
}
/**
* @Description 分享议题id获取信息
* @Param formDTO
* @Param tokenDto
* @author zxc
* @date 2020/12/18 下午5:22
*/
@Override
public IssueVisitResultDTO issueVisit(IssueVisitFormDTO formDTO, TokenDto tokenDto) {
// 查询记录信息
IssueShareLinkRecordEntity linkRecord = baseDao.selectById(formDTO.getShareLinkId());
if (null == linkRecord){
throw new RenException(IssueShareConstant.NOT_EXIST_INVITE_ISSUE_RECORD);
}
IssueShareLinkVisitRecordEntity entity = new IssueShareLinkVisitRecordEntity();
entity.setCustomerId(linkRecord.getCustomerId());
entity.setShareUserId(linkRecord.getShareUserId());
entity.setInviteeUserId(tokenDto.getUserId());
entity.setShareLinkRecId(formDTO.getShareLinkId());
entity.setIsInviteRegister(NumConstant.ONE);
// 插入访问记录
visitRecordDao.insert(entity);
return new IssueVisitResultDTO(linkRecord.getIssueId(),linkRecord.getGridId(),linkRecord.getCustomerId());
}
}

126
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueShareLinkVisitRecordServiceImpl.java

@ -0,0 +1,126 @@
/**
* 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.epmet.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.dao.IssueShareLinkVisitRecordDao;
import com.epmet.dto.IssueShareLinkVisitRecordDTO;
import com.epmet.dto.form.SharableIssueAndInviteeFormDTO;
import com.epmet.entity.IssueShareLinkVisitRecordEntity;
import com.epmet.service.IssueShareLinkVisitRecordService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 议题分享链接访问记录表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-12-18
*/
@Service
public class IssueShareLinkVisitRecordServiceImpl extends BaseServiceImpl<IssueShareLinkVisitRecordDao, IssueShareLinkVisitRecordEntity> implements IssueShareLinkVisitRecordService {
@Override
public PageData<IssueShareLinkVisitRecordDTO> page(Map<String, Object> params) {
IPage<IssueShareLinkVisitRecordEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, IssueShareLinkVisitRecordDTO.class);
}
@Override
public List<IssueShareLinkVisitRecordDTO> list(Map<String, Object> params) {
List<IssueShareLinkVisitRecordEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, IssueShareLinkVisitRecordDTO.class);
}
private QueryWrapper<IssueShareLinkVisitRecordEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<IssueShareLinkVisitRecordEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public IssueShareLinkVisitRecordDTO get(String id) {
IssueShareLinkVisitRecordEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, IssueShareLinkVisitRecordDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(IssueShareLinkVisitRecordDTO dto) {
IssueShareLinkVisitRecordEntity entity = ConvertUtils.sourceToTarget(dto, IssueShareLinkVisitRecordEntity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(IssueShareLinkVisitRecordDTO dto) {
IssueShareLinkVisitRecordEntity entity = ConvertUtils.sourceToTarget(dto, IssueShareLinkVisitRecordEntity.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteBatchIds(Arrays.asList(ids));
}
/**
* @Description
* @param param
* @return java.lang.String
* @author wangc
* @date 2020.12.18 15:18
*/
@Override
public String checkInviteRelationship(SharableIssueAndInviteeFormDTO param) {
String inviterId = baseDao.selectInviterIdByLinkIdAndInvitee(param.getShareLinkId(),param.getInviteeId());
if(StringUtils.isNotBlank(inviterId)) baseDao.updateInviteRegister(param.getShareLinkId(),param.getInviteeId());
return inviterId;
}
/**
* @Description 通过链接Id查询分享人和被邀请人的信息
* @param
* @return
* @author wangc
* @date 2020.12.21 16:27
*/
@Override
public IssueShareLinkVisitRecordDTO getVisitRecord(String linkId, String invitee) {
return baseDao.selectRecordByLinkIdAndInvitee(linkId, invitee);
}
}

39
epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.7__issue_share.sql

@ -0,0 +1,39 @@
DROP TABLE IF EXISTS `issue_share_link_record`;
CREATE TABLE `issue_share_link_record`
(
`ID` varchar(64) NOT NULL,
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID',
`GRID_ID` varchar(64) NOT NULL COMMENT '议题所属网格ID',
`ISSUE_ID` varchar(64) NOT NULL COMMENT '议题ID',
`SHARE_USER_ID` varchar(64) NOT NULL COMMENT '分享人(当前用户id)',
`INVITE_CONTENT` varchar(255) DEFAULT NULL COMMENT '邀请内容',
`DEL_FLAG` int(11) NOT NULL COMMENT '删除状态 0:正常,1:删除',
`REVISION` int(11) NOT NULL 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 '更新时间',
PRIMARY KEY (`ID`)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4 COMMENT ='议题分享链接表';
#=================================================================================
DROP TABLE IF EXISTS `issue_share_link_visit_record`;
CREATE TABLE `issue_share_link_visit_record`
(
`ID` varchar(64) NOT NULL,
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID',
`SHARE_USER_ID` varchar(64) NOT NULL COMMENT '分享人【邀请人】ID',
`INVITEE_USER_ID` varchar(64) NOT NULL COMMENT '被邀请人ID',
`SHARE_LINK_REC_ID` varchar(64) NOT NULL COMMENT '议题分享链接表.id',
`IS_INVITE_REGISTER` int(11) NOT NULL COMMENT '是否邀请注册:0:是,1:不是',
`DEL_FLAG` int(11) NOT NULL COMMENT '删除状态,0:正常,1:删除',
`REVISION` int(11) NOT NULL 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 '更新时间',
PRIMARY KEY (`ID`)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4 COMMENT ='议题分享链接访问记录表 ';

25
epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueShareLinkRecordDao.xml

@ -0,0 +1,25 @@
<?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.epmet.dao.IssueShareLinkRecordDao">
<!-- 校验此人此议题是否存在分享记录 -->
<select id="checkIssueRecord" resultType="java.lang.String">
SELECT
ID
FROM issue_share_link_record
WHERE DEL_FLAG = 0
AND SHARE_USER_ID = #{userId}
AND ISSUE_ID = #{issueId}
</select>
<!-- 根据issueId查询议题信息 -->
<select id="selectIssueInfoById" resultType="com.epmet.entity.IssueShareLinkRecordEntity">
SELECT
CUSTOMER_ID,
SOURCE_ID AS topicId
FROM issue
WHERE DEL_FLAG = 0
AND ID = #{issueId}
</select>
</mapper>

47
epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueShareLinkVisitRecordDao.xml

@ -0,0 +1,47 @@
<?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.epmet.dao.IssueShareLinkVisitRecordDao">
<select id="selectInviterIdByLinkIdAndInvitee" resultType="string">
SELECT
share_user_id
FROM issue_share_link_visit_record
WHERE
del_flag = '0'
AND
share_link_rec_id = #{linkId}
AND
invitee_user_id = #{invitee}
AND
is_invite_register = 1
LIMIT 1
</select>
<update id="updateInviteRegister">
UPDATE
issue_share_link_visit_record
SET
is_invite_register = 0
WHERE
del_flag = '0'
AND
share_link_rec_id = #{linkId}
AND
invitee_user_id = #{invitee}
</update>
<select id="selectRecordByLinkIdAndInvitee"
resultType="com.epmet.dto.IssueShareLinkVisitRecordDTO">
SELECT
*
FROM issue_share_link_visit_record
WHERE
del_flag = '0'
AND
share_link_rec_id = #{linkId}
AND
invitee_user_id = #{invitee}
LIMIT 1
</select>
</mapper>

25
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/constant/TopicConstant.java

@ -78,4 +78,29 @@ public interface TopicConstant {
String CREATE_TOPIC = "创建话题失败,话题内容为:%s";
String SHIFT_ISSUE = "转议题失败,标题为:%s , 建议为:%s";
/**
* 附件文件类型
* 图片 - image文档 - doc语音 - voice视频 - video
*/
String FILE_IMAGE = "image";
String FILE_DOC = "doc";
String FILE_VOICE = "voice";
String FILE_VIDEO = "video";
String AUDITING = "auditing";
String AUTO_PASSED = "auto_passed";
String REVIEW = "review";
String BLOCK = "block";
String REJECTED = "rejected";
String APPROVED = "approved";
String SUBMIT = "submit";
String IMAGE = " image";
String VIDEO = " video";
String VOICE = " voice";
String DOC = " doc";
String GROUP_INFO_FAILURE = "根据groupId未查询到组信息......";
String CREATE_TOPIC_FAILURE = "发布话题加分失败......";
}

15
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/constant/TopicShareConstant.java

@ -0,0 +1,15 @@
package com.epmet.resi.group.constant;
/**
* @Author zxc
* @DateTime 2020/12/18 上午10:53
*/
public interface TopicShareConstant {
String NOT_EXIST_TOPIC_INFO = "未查到该话题信息......";
String NOT_EXIST_TOPIC_BELONG_GROUP = "未查询到话题所属小组......";
String NOT_EXIST_INVITE_RECORD = "未查询到该邀请记录......";
}

2
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/member/GroupMemeberOperationDTO.java

@ -62,7 +62,7 @@ public class GroupMemeberOperationDTO implements Serializable {
private String operateStatus;
/**
* 入群方式受邀请入群 - invited 主动加入 - joincreated群主创建群自动进入群扫码入群 - scancode
* 入群方式受邀请入群 - invited 主动加入 - joincreated群主创建群自动进入群扫码入群 - scancode话题分享链接 - topic_share_link议题分享链接 - issue_share_link
*/
private String enterGroupType;

2
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/member/ResiGroupMemberDTO.java

@ -54,7 +54,7 @@ public class ResiGroupMemberDTO implements Serializable {
private String groupLeaderFlag;
/**
* 入群方式受邀请入群 - invited 主动加入 - joincreated群主创建群自动进入群扫码入群 - scancode
* 入群方式受邀请入群 - invited 主动加入 - joincreated群主创建群自动进入群扫码入群 - scancode话题分享链接 - topic_share_link议题分享链接 - issue_share_link
*/
private String enterGroupType;

32
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/member/form/JoinGroupByShareLinkFormDTO.java

@ -0,0 +1,32 @@
package com.epmet.resi.group.dto.member.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Description 通过链接入组申请传参DTO
* @ClassName JoinGroupByShareLinkFormDTO
* @Auth wangc
* @Date 2020-12-22 10:34
*/
@Data
public class JoinGroupByShareLinkFormDTO implements Serializable {
private static final long serialVersionUID = -4402483318595770636L;
/**
* 分享链接Id
*/
@NotBlank(message = "分享链接Id不能为空")
private String shareLinkId;
/**
* topic | issue
*/
@NotBlank(message = "链接类型不能为空")
private String shareLinkType;
@NotBlank(message = "用户Id不能为空")
private String userId;
}

2
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/member/result/ApplyingMemberResultDTO.java

@ -48,7 +48,7 @@ public class ApplyingMemberResultDTO implements Serializable {
private String status;
/**
* invited通过链接加入 join申请加入scancode通过扫码加入
* invited通过链接加入 join申请加入scancode通过扫码加入话题分享链接 - topic_share_link议题分享链接 - issue_share_link
*/
private String enterGroupType;

21
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/member/result/JoinGroupApplyRealTimeResultDTO.java

@ -0,0 +1,21 @@
package com.epmet.resi.group.dto.member.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Description 申请入群实时结果
* @ClassName JoinGroupApplyRealTimeResultDTO
* @Auth wangc
* @Date 2020-12-22 10:32
*/
@Data
public class JoinGroupApplyRealTimeResultDTO implements Serializable {
private static final long serialVersionUID = 6251288539242747659L;
/**
* entered(已入组) auditing(审核中)
*/
private String status;
}

97
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/scanapicallback/VoiceScanCallBackContentFormDTO.java

@ -0,0 +1,97 @@
package com.epmet.resi.group.dto.scanapicallback;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 语音检测callBack入参
*
* @author yinzuomei@elink-cn.com
* @date 2020/12/10 10:47
*/
@Data
public class VoiceScanCallBackContentFormDTO implements Serializable {
/**
* 错误码和HTTP状态码一致
* 200表示检测成功
* 280表示处理中需要继续轮询
* 其他表示任务失败
* 更多信息请参见公共错误码
*
* 说明 只有返回280表示任务还在进行需要继续轮询该任务的检测结果返回其他值均表示该语音检测任务已结束如果实际上该语音检测没有结束而是因为网络异常等原因异常结束您可以重新提交语音异步检测任务
*/
private Integer code;
/**
* 请求参数的响应信息
*/
private String msg;
/**
* 检测对象对应的数据ID
* 说明 如果在检测请求参数中传入了dataId则此处返回对应的dataId
*/
private String dataId;
/**
* 该检测任务的ID
*/
private String taskId;
/**
* 检测对象的URL
*/
private String url;
/**
* 检测成功code=200返回的检测结果该结果包含一个或多个元素每个元素是个结构体对应一个场景关于每个元素的结构描述请参见result
*/
private List<ResultDTO> results;
@Data
private static class ResultDTO{
/**
* 检测结果的分类取值
* normal正常文本
* spam含垃圾信息
* ad广告
* politics涉政
* terrorism暴恐
* abuse辱骂
* porn色情
* flood灌水
* contraband违禁
* meaningless无意义
* customized自定义例如命中自定义关键词
*/
private String label;
/**
* 检测场景和调用请求中的场景对应唯一取值antispam
*/
private String scene;
/**
* 建议您执行的后续操作取值
* pass结果正常无需进行其余操作
* review结果不确定需要进行人工审核
* block结果违规建议直接删除或者限制公开
*/
private String suggestion;
/**
* 置信度分数取值范围0表示置信度最低~100表示置信度最高
* 如果suggestion为pass则置信度越高表示内容正常的可能性越高如果suggestion为review或block则置信度越高表示内容违规的可能性越高
* 注意 该值仅作为参考强烈建议您不要在业务中使用建议您参考suggestion和label或者部分接口返回的sublabel结果用于内容违规判定
*/
private Float rate;
//下面还有个details 语音对应的文本详情。每一句文本对应一个元素,包含一个或者多个元素。关于每个元素的结构描述,请参见detail。
//暂时不解析了。
}
}

10
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/ResiTopicAttachmentDTO.java

@ -63,6 +63,16 @@ public class ResiTopicAttachmentDTO implements Serializable {
*/
private String attachmentUrl;
/**
* 排序字段解决多张图片的createdTime相同时的排序问题
* */
private Integer sort;
/**
* 语音或视频时长
* */
private Integer duration;
/**
* 删除标记 0未删除1已删除
*/

122
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/TopicDraftAttachmentDTO.java

@ -0,0 +1,122 @@
/**
* 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.epmet.resi.group.dto.topic;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 话题草稿附件表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-12-17
*/
@Data
public class TopicDraftAttachmentDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 附件id
*/
private String id;
/**
* 话题草稿id
*/
private String topicDraftId;
/**
* 客户id
*/
private String customerId;
/**
* 附件名uuid随机生成
*/
private String attachmentName;
/**
* 文件格式JPGPNGPDFJPEGBMPMP4WMAM4AMP3DOCDOCXXLS
*/
private String attachmentFormat;
/**
* 附件类型图片 - image视频 - video 语音 - voice 文档 - doc
*/
private String attachmentType;
/**
* 附件地址url
*/
private String attachmentUrl;
/**
* 排序字段(按附件类型分组排序)
*/
private Integer sort;
/**
* 附件状态审核中auditing
auto_passed: 自动通过
review结果不确定需要人工审核
block: 结果违规
rejected人工审核驳回;
approved人工审核通过
现在图片是同步审核的所以图片只有auto_passed一种状态
*/
private String status;
/**
* 语音或视频时长
* */
private Integer duration;
/**
* 删除标记 0未删除1已删除
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

146
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/TopicDraftDTO.java

@ -0,0 +1,146 @@
/**
* 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.epmet.resi.group.dto.topic;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 话题草稿内容表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-12-17
*/
@Data
public class TopicDraftDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 话题草稿id
*/
private String id;
/**
* 客户id
*/
private String customerId;
/**
* 网格ID
*/
private String gridId;
/**
* 小组Id
*/
private String groupId;
/**
* 话题内容
*/
private String topicContent;
/**
* 话题草稿状态审核中auditing
auto_passed: 自动通过
review结果不确定需要人工审核
block: 结果违规
rejected人工审核驳回;
approved人工审核通过
*/
private String draftStatus;
/**
* 草稿审核理由
*/
private String draftReason;
/**
*
*/
private String province;
/**
*
*/
private String city;
/**
*
*/
private String area;
/**
* 地址
*/
private String address;
/**
* 经度
*/
private String longitude;
/**
* 维度
*/
private String dimension;
/**
* 发布成功后的话题id
*/
private String topicId;
/**
* 创建者是否可见0是 1否
*/
private String isSee;
/**
* 删除标记 0未删除1已删除
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 话题发布人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

96
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/TopicDraftOperationDTO.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.epmet.resi.group.dto.topic;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 话题草稿操作日志表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-12-17
*/
@Data
public class TopicDraftOperationDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 话题草稿操作日志id
*/
private String id;
/**
* 客户id
*/
private String customerId;
/**
* 话题草稿id
*/
private String topicDraftId;
/**
* 操作类型submit提交发布
auto_passed: 自动审核-通过
review自动审核-结果不确定需要人工审核
block: 自动审核-结果违规
rejected人工审核驳回;
approved人工审核通过
*/
private String operateType;
/**
* 操作时的备注比如驳回理由
*/
private String remark;
/**
* 删除标记 0未删除1已删除
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 操作人API审核结果存储为SCAN_USER或者APP_USER
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

104
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/TopicDraftScanTaskDTO.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.epmet.resi.group.dto.topic;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 话题附件检测任务表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-12-18
*/
@Data
public class TopicDraftScanTaskDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 客户id
*/
private String customerId;
/**
* 话题草稿Id
*/
private String topicDraftId;
/**
* 话题草稿附件表Id对应dataId
*/
private String topicDraftAttachmentId;
/**
* 阿里云审核任务Id
*/
private String taskId;
/**
* 审核状态auditing: 审核中
auto_passed: 自动通过
review结果不确定需要人工审核
block: 结果违规
*/
private String status;
/**
* 附件类型视频 - video 语音 - voice
*/
private String attachmentType;
/**
* 删除标记 0未删除1已删除
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 操作人API审核结果存储为SCAN_USER或者APP_USER
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

102
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/TopicShareLinkRecordDTO.java

@ -0,0 +1,102 @@
/**
* 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.epmet.resi.group.dto.topic;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 话题分享链接表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-12-18
*/
@Data
public class TopicShareLinkRecordDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 邀请ID
*/
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* 话题所属网格ID
*/
private String gridId;
/**
* 小组ID
*/
private String groupId;
/**
* 话题ID
*/
private String topicId;
/**
* 分享人ID当前登录用户
*/
private String shareUserId;
/**
* 邀请内容
*/
private String inviteContent;
/**
* 删除状态 0正常1:删除
*/
private Integer delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

96
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/TopicShareLinkVisitRecordDTO.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.epmet.resi.group.dto.topic;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 话题分享链接访问记录表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-12-18
*/
@Data
public class TopicShareLinkVisitRecordDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* 分享人邀请人ID
*/
private String shareUserId;
/**
* 被邀请人ID
*/
private String inviteeUserId;
/**
* 话题分享链接表id
*/
private String shareLinkRecId;
/**
* 是否邀请注册0:1:不是
*/
private Integer isInviteRegister;
/**
* 删除状态0:正常1删除
*/
private Integer delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

33
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/AuditDraftTopicFormDTO.java

@ -0,0 +1,33 @@
package com.epmet.resi.group.dto.topic.form;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @author zhaoqifeng
* @dscription
* @date 2020/12/18 15:03
*/
@NoArgsConstructor
@Data
public class AuditDraftTopicFormDTO implements Serializable {
private static final long serialVersionUID = -4766725540339231386L;
/**
* 草稿话题Id
*/
@NotBlank(message = "话题id不能为空")
private String topicDraftId;
/**
* 审核状态(通过:approved 驳回:rejected)
*/
@NotBlank(message = "审核状态不能为空")
private String auditType;
/**
* 审核原因
*/
private String reason;
}

78
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/CreateTopicFormDTO.java

@ -0,0 +1,78 @@
package com.epmet.resi.group.dto.topic.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.List;
/**
* @author zhaoqifeng
* @dscription
* @date 2020/12/17 15:08
*/
@Data
public class CreateTopicFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
private String customerId;
private String gridId;
/**
* 小组Id
* */
@NotBlank(message = "小组Id不能为空")
private String groupId;
private String topicDraftId;
private String topicContent;
/**
* 经度
* */
private String longitude;
/**
* 纬度
* */
private String dimension;
/**
* 地址
* */
@NotBlank(message = "地址信息不能为空")
private String address;
/**
* 省份
* */
private String province;
/**
* 城市
* */
private String city;
/**
* 地区
* */
private String area;
/**
* 图片附件
*/
private List<String> imageList;
/**
* 文件附件
*/
private List<String> docList;
/**
* 语音附件
*/
private List<String> voiceList;
/**
* 视频附件
*/
private List<String> videoList;
}

24
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/CreateUrlFormDTO.java

@ -0,0 +1,24 @@
package com.epmet.resi.group.dto.topic.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2020/12/18 上午10:02
*/
@Data
public class CreateUrlFormDTO implements Serializable {
private static final long serialVersionUID = -7661839148530902018L;
public interface CreateUrlForm{}
/**
* 话题ID
*/
@NotBlank(message = "话题ID不能为空",groups = {CreateUrlForm.class})
private String topicId;
}

18
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/DraftDetailFormDTO.java

@ -0,0 +1,18 @@
package com.epmet.resi.group.dto.topic.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @author zhaoqifeng
* @dscription
* @date 2020/12/18 14:53
*/
@Data
public class DraftDetailFormDTO implements Serializable {
private static final long serialVersionUID = -240658534604688292L;
@NotBlank(message = "话题id不能为空")
private String topicDraftId;
}

37
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/MyAuditingListFormDTO.java

@ -0,0 +1,37 @@
package com.epmet.resi.group.dto.topic.form;
import lombok.Data;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
/**
* @Author sun
* @Description 个人中心-我发表的话题-审核中列表-接口入参
*/
@Data
public class MyAuditingListFormDTO {
/**
* 客户Id
*/
@NotBlank(message = "客户ID不能为空",groups = {MyAuditingListFormDTO.AuditingTopicForm.class})
private String customerId;
/**
* 页码从1开始
*/
@Min(value = 1, message = "页码必须大于0", groups = { MyAuditingListFormDTO.AuditingTopicForm.class })
private Integer pageNo;
/**
* 页容量默认10页
*/
@Min(value = 1, message = "每页条数必须大于0", groups = { MyAuditingListFormDTO.AuditingTopicForm.class })
private Integer pageSize;
/**
* token中用户Id
*/
private String userId;
public interface AuditingTopicForm{}
}

22
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/MyAuditingTopicFormDTO.java

@ -0,0 +1,22 @@
package com.epmet.resi.group.dto.topic.form;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @author zhaoqifeng
* @dscription
* @date 2020/12/18 14:44
*/
@NoArgsConstructor
@Data
public class MyAuditingTopicFormDTO implements Serializable {
private static final long serialVersionUID = 9154103669944393282L;
private String customerId;
private String userId;
private Integer pageNo = 1;
private Integer pageSize = 20;
}

27
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/SharableTopicAndInviteeFormDTO.java

@ -0,0 +1,27 @@
package com.epmet.resi.group.dto.topic.form;
import lombok.Data;
import java.io.Serializable;
/**
* @Description 话题分享链接和被邀请人入参Dto
* @ClassName SharableTopicAndInviteeFormDTO
* @Auth wangc
* @Date 2020-12-18 13:43
*/
@Data
public class SharableTopicAndInviteeFormDTO implements Serializable {
private static final long serialVersionUID = 4943940805360726855L;
/**
* 话题分享链接
*/
private String shareLinkId;
/**
* 通过链接进入话题页面用户的Id
*/
private String inviteeId;
}

23
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/TopicAttachmentFormDTO.java

@ -0,0 +1,23 @@
package com.epmet.resi.group.dto.topic.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Author sun
* @Description 获取话题附件信息-接口入参
*/
@Data
public class TopicAttachmentFormDTO implements Serializable {
private static final long serialVersionUID = -7661839148530902018L;
/**
* 话题ID
*/
@NotBlank(message = "话题ID不能为空",groups = {TopicForm.class})
private String topicId;
public interface TopicForm{}
}

30
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/TopicAuditFormDTO.java

@ -0,0 +1,30 @@
package com.epmet.resi.group.dto.topic.form;
import com.epmet.commons.tools.dto.form.PageFormDTO;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @author zhaoqifeng
* @dscription
* @date 2020/12/18 14:22
*/
@NoArgsConstructor
@Data
public class TopicAuditFormDTO extends PageFormDTO implements Serializable {
private static final long serialVersionUID = 2013373278734345918L;
/**
* 小组ID
*/
@NotBlank(message = "小组id不能为空")
private String groupId;
/**
* 审核状态(待审核:review 已驳回:rejected)
*/
@NotBlank(message = "审核状态不能为空")
private String status;
}

17
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/TopicBelongGroupFormDTO.java

@ -0,0 +1,17 @@
package com.epmet.resi.group.dto.topic.form;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2020/12/18 下午2:06
*/
@Data
public class TopicBelongGroupFormDTO implements Serializable {
private static final long serialVersionUID = -1257699096393262959L;
private String topicId;
}

24
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/TopicVisitFormDTO.java

@ -0,0 +1,24 @@
package com.epmet.resi.group.dto.topic.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2020/12/18 下午3:12
*/
@Data
public class TopicVisitFormDTO implements Serializable {
private static final long serialVersionUID = -7231684507046042401L;
public interface TopicVisitForm{}
/**
* 分享ID
*/
@NotBlank(message = "分享ID不能为空",groups = {TopicVisitForm.class})
private String shareLinkId;
}

22
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/CreateUrlResultDTO.java

@ -0,0 +1,22 @@
package com.epmet.resi.group.dto.topic.result;
import lombok.AllArgsConstructor;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2020/12/18 上午10:01
*/
@Data
@AllArgsConstructor
public class CreateUrlResultDTO implements Serializable {
private static final long serialVersionUID = -8606257390921799432L;
/**
* 分享链接ID
*/
private String shareLinkId;
}

59
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/DraftDetailResultDTO.java

@ -0,0 +1,59 @@
package com.epmet.resi.group.dto.topic.result;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.List;
/**
* @author zhaoqifeng
* @dscription
* @date 2020/12/18 14:50
*/
@NoArgsConstructor
@Data
public class DraftDetailResultDTO implements Serializable {
private static final long serialVersionUID = -7445417689558651158L;
/**
* 话题草稿id
*/
private String topicDraftId;
/**
* 话题内容
*/
private String topicContent;
/**
* 发布时间yyyy-MM-dd HH:mm
*/
private String releaseTime;
/**
* 发布人头像
*/
private String releaseUserHeadPhoto;
/**
* 发布人名称
*/
private String releaseUserName;
/**
* 发布地址
*/
private String releaseAddress;
/**
* 驳回理由
*/
private String reason;
private String status;
private String topicId;
/**
* 图片附件集合
*/
private List<String> imageList;
private List<String> docList;
/**
* 音频附件集合
*/
private List<String> voiceList;
private List<String> videoList;
}

49
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/MyAuditingListResultDTO.java

@ -0,0 +1,49 @@
package com.epmet.resi.group.dto.topic.result;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import java.io.Serializable;
/**
* @Author sun
* @Description 个人中心-我发表的话题-审核中列表-接口返参
*/
@Data
public class MyAuditingListResultDTO implements Serializable {
private static final long serialVersionUID = -703102629653169023L;
/**
* 话题草稿id
*/
private String topicDraftId;
/**
* 话题来源网格名称
*/
private String releaseGridName;
@JsonIgnore
private String gridId;
/**
* 发布时间戳
*/
private Long releaseTime;
/**
* 话题内容
*/
private String topicContent;
/**
* 小组名称
*/
private String releaseGroupName;
/**
* 状态
*/
private String status;
}

22
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/MyAuditingTopicResultDTO.java

@ -0,0 +1,22 @@
package com.epmet.resi.group.dto.topic.result;
import lombok.Data;
import java.io.Serializable;
/**
* @author zhaoqifeng
* @dscription
* @date 2020/12/18 14:41
*/
@Data
public class MyAuditingTopicResultDTO implements Serializable {
private static final long serialVersionUID = -2876904175308968430L;
private String topicDraftId;
private String groupId;
private Long releaseTime;
private String topicContent;
private String releaseGroupName;
private String releaseGridId;
private String releaseGridName;
}

30
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/TopicAttachmentResultDTO.java

@ -0,0 +1,30 @@
package com.epmet.resi.group.dto.topic.result;
import lombok.Data;
import java.io.Serializable;
import java.util.LinkedList;
/**
* @Author sun
* @Description 获取话题附件信息-接口返参
*/
@Data
public class TopicAttachmentResultDTO implements Serializable {
private static final long serialVersionUID = -8606257390921799432L;
/**
* 文件附件Url集合
*/
private LinkedList<String> docList;
/**
* 语音附件Url集合
*/
private LinkedList<String> voiceList;
/**
* 视频附件Url集合
*/
private LinkedList<String> videoList;
}

31
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/TopicAuditResultDTO.java

@ -0,0 +1,31 @@
package com.epmet.resi.group.dto.topic.result;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author zhaoqifeng
* @dscription
* @date 2020/12/18 14:28
*/
@NoArgsConstructor
@Data
public class TopicAuditResultDTO {
/**
* 话题草稿id
*/
private String topicDraftId;
/**
* 话题内容
*/
private String topicContent;
/**
* 组成员显示名称
*/
private String userName;
/**
* 话题草稿的发布时间戳
*/
private Long releaseTime;
}

21
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/TopicBelongGroupResultDTO.java

@ -0,0 +1,21 @@
package com.epmet.resi.group.dto.topic.result;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2020/12/18 下午2:12
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class TopicBelongGroupResultDTO implements Serializable {
private static final long serialVersionUID = 8180287697221964032L;
private String groupId;
}

50
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/TopicVisitResultDTO.java

@ -0,0 +1,50 @@
package com.epmet.resi.group.dto.topic.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2020/12/18 下午3:15
*/
@Data
public class TopicVisitResultDTO implements Serializable {
private static final long serialVersionUID = -8053248999188056579L;
/**
* 是否存在入组待审核记录true存在false不存在
*/
private Boolean awaitAudit;
/**
* 是否在群内标志已经在群内:true, 不在群内:false
*/
private Boolean inGroup;
/**
* 小组ID
*/
private String groupId;
/**
* 网格ID
*/
private String gridId;
/**
* 话题ID
*/
private String topicId;
/**
* 客户ID
*/
private String customerId;
/**
* 话题屏蔽状态true已屏蔽false未屏蔽
*/
private Boolean shieldStatus;
}

36
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/ResiGroupOpenFeignClient.java

@ -12,24 +12,17 @@ import com.epmet.resi.group.dto.group.result.GroupEditionDetailResultDTO;
import com.epmet.resi.group.dto.group.result.GroupInfoResultDTO;
import com.epmet.resi.group.dto.topic.MyCreateTopicsFormDTO;
import com.epmet.resi.group.dto.topic.form.*;
import com.epmet.resi.group.dto.topic.result.IssueGridResultDTO;
import com.epmet.resi.group.dto.topic.result.MyCreateTopicsResultDTO;
import com.epmet.resi.group.dto.topic.result.MyPartIssueResultDTO;
import com.epmet.resi.group.dto.topic.result.ParticipatedTopicUnitResultDTO;
import com.epmet.resi.group.dto.topic.result.*;
import com.epmet.resi.group.feign.fallback.ResiGroupOpenFeignClientFallback;
import com.epmet.resi.mine.dto.from.MyPartProjectsFormDTO;
import com.epmet.commons.tools.utils.Result;
import com.epmet.resi.group.dto.group.form.CreateGroupCodeFormDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.HashMap;
import java.util.List;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
/**
* 本服务对外开放的API,其他服务通过引用此client调用该服务
@ -149,4 +142,27 @@ public interface ResiGroupOpenFeignClient {
*/
@PostMapping("resi/group/topic/fetchtopicinfowhenauditissue")
Result<IssueShiftedFromTopicFormDTO> fetchTopicInfoWhenAuditIssue(@RequestBody ResiTopicTurnIssueFromDTO param);
/**
* @Description 查询话题所属小组
* @Param formDTO
* @author zxc
* @date 2020/12/18 下午2:08
*/
@PostMapping("resi/group/topicsharelink/topicbelonggroup")
Result<TopicBelongGroupResultDTO> selectTopicBelongGroup(@RequestBody TopicBelongGroupFormDTO formDTO);
/**
* @Description 检查邀请关系如果确实存在邀请关系则返回邀请人Id
* 符合条件
* 链接Id对应
* 邀请人Id对应
* 邀请人在被邀请时的状态为陌生人
* @param param
* @return com.epmet.commons.tools.utils.Result<java.lang.String>
* @author wangc
* @date 2020.12.18 14:53
*/
@PostMapping("resi/group/topicsharelinkvisitrecord/checkinviterelationship")
Result<String> checkInviteRelationship(@RequestBody SharableTopicAndInviteeFormDTO param);
}

11
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/fallback/ResiGroupOpenFeignClientFallback.java

@ -17,6 +17,7 @@ import com.epmet.resi.group.dto.topic.result.IssueGridResultDTO;
import com.epmet.resi.group.dto.topic.result.MyPartIssueResultDTO;
import com.epmet.resi.group.dto.topic.result.ParticipatedTopicUnitResultDTO;
import com.epmet.resi.group.dto.group.form.CreateGroupCodeFormDTO;
import com.epmet.resi.group.dto.topic.result.TopicBelongGroupResultDTO;
import com.epmet.resi.group.feign.ResiGroupOpenFeignClient;
import com.epmet.resi.mine.dto.from.MyPartProjectsFormDTO;
import org.springframework.stereotype.Component;
@ -102,4 +103,14 @@ public class ResiGroupOpenFeignClientFallback implements ResiGroupOpenFeignClien
public Result<IssueShiftedFromTopicFormDTO> fetchTopicInfoWhenAuditIssue(ResiTopicTurnIssueFromDTO param) {
return ModuleUtils.feignConError(ServiceConstant.RESI_GROUP_SERVER, "fetchTopicInfoWhenAuditIssue",param);
}
@Override
public Result<TopicBelongGroupResultDTO> selectTopicBelongGroup(TopicBelongGroupFormDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.RESI_GROUP_SERVER, "selectTopicBelongGroup",formDTO);
}
@Override
public Result<String> checkInviteRelationship(SharableTopicAndInviteeFormDTO param) {
return ModuleUtils.feignConError(ServiceConstant.RESI_GROUP_SERVER, "selectTopicBelongGroup", param);
}
}

28
epmet-module/resi-group/resi-group-server/pom.xml

@ -159,6 +159,13 @@
<nacos.ip/>
<spring.flyway.enabled>false</spring.flyway.enabled>
<!--亿联云消息网关配置-->
<elink.mq.host>https://epmet-dev.elinkservice.cn/estos/</elink.mq.host>
<elink.mq.sendMsgPath>producerService/producer/sendMsg</elink.mq.sendMsgPath>
<elink.mq.appId>202007161443499985fa2d397436d10356542134c8f008c48</elink.mq.appId>
<elink.mq.token>52d9d9b0e7d0eb5b8b81c205b579e07c</elink.mq.token>
<openapi.scan.server.url>https://epmet-dev.elinkservice.cn/api/epmetscan/api</openapi.scan.server.url>
<!--线程池配置-->
<thread.pool.core-pool-size>5</thread.pool.core-pool-size>
@ -204,6 +211,13 @@
<nacos.ip/>
<spring.flyway.enabled>false</spring.flyway.enabled>
<!--亿联云消息网关配置-->
<elink.mq.host>https://epmet-dev.elinkservice.cn/estos/</elink.mq.host>
<elink.mq.sendMsgPath>producerService/producer/sendMsg</elink.mq.sendMsgPath>
<elink.mq.appId>202007161443499985fa2d397436d10356542134c8f008c48</elink.mq.appId>
<elink.mq.token>52d9d9b0e7d0eb5b8b81c205b579e07c</elink.mq.token>
<openapi.scan.server.url>https://epmet-dev.elinkservice.cn/api/epmetscan/api</openapi.scan.server.url>
<!--线程池配置-->
<thread.pool.core-pool-size>5</thread.pool.core-pool-size>
@ -248,6 +262,13 @@
<nacos.config-enabled>false</nacos.config-enabled>
<nacos.ip/>
<spring.flyway.enabled>true</spring.flyway.enabled>
<!--亿联云消息网关配置-->
<elink.mq.host>https://epmet-dev.elinkservice.cn/estos/</elink.mq.host>
<elink.mq.sendMsgPath>producerService/producer/sendMsg</elink.mq.sendMsgPath>
<elink.mq.appId>20200804181646184507453a2e9aab76edc550405f80920af</elink.mq.appId>
<elink.mq.token>96d788191a10ff57a125157183413004</elink.mq.token>
<openapi.scan.server.url>https://epmet-dev.elinkservice.cn/api/epmetscan/api</openapi.scan.server.url>
<!--线程池配置-->
<thread.pool.core-pool-size>5</thread.pool.core-pool-size>
@ -289,6 +310,13 @@
<nacos.config-enabled>false</nacos.config-enabled>
<nacos.ip/>
<spring.flyway.enabled>true</spring.flyway.enabled>
<!--亿联云消息网关配置-->
<elink.mq.host>https://estos.elinkservice.cn:7519/estos/</elink.mq.host>
<elink.mq.sendMsgPath>producerService/producer/sendMsg</elink.mq.sendMsgPath>
<elink.mq.appId>202008141820598348026098a1b5dd0bc63a1e2418e275d1b</elink.mq.appId>
<elink.mq.token>7ce17f65826539ff3e8616dccd4b70fc</elink.mq.token>
<openapi.scan.server.url>https://epmet-open.elinkservice.cn/api/epmetscan/api</openapi.scan.server.url>
<!--线程池配置-->
<thread.pool.core-pool-size>5</thread.pool.core-pool-size>

1
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/service/GroupInvitationService.java

@ -21,6 +21,7 @@ import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.Result;
import com.epmet.modules.invitation.entity.GroupInvitationEntity;
import com.epmet.resi.group.dto.UserRoleDTO;
import com.epmet.resi.group.dto.invitation.GroupInvitationDTO;
import com.epmet.resi.group.dto.invitation.form.AccetInvitationFormDTO;
import com.epmet.resi.group.dto.invitation.form.CreateGroupInvitationFormDTO;

4
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/service/impl/GroupInvitationServiceImpl.java

@ -602,6 +602,10 @@ public class GroupInvitationServiceImpl extends BaseServiceImpl<GroupInvitationD
//扫码进组
if(GroupStateConstant.GROUP_SCANCODE.equals(groupInvitationDTO.getInvitationType())){
messageContent = String.format(UserMessageConstant.SCANCODE_JOIN_GROUP, userResiInfoDTOResult.getData().getShowName(), resiGroupDTO.getGroupName());
}
//分享链接
if(StringUtils.equals(groupInvitationDTO.getInvitationType(),"sharableLink")){
}
// end
userMessage.setMessageContent(messageContent);

17
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/controller/ResiGroupMemberController.java

@ -21,11 +21,13 @@ import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.modules.member.service.GroupMemeberOperationService;
import com.epmet.modules.member.service.ResiGroupMemberService;
import com.epmet.resi.group.dto.member.form.*;
import com.epmet.resi.group.dto.member.result.ApplyingMemberResultDTO;
import com.epmet.resi.group.dto.member.result.GridVotableCountResultDTO;
import com.epmet.resi.group.dto.member.result.GroupMemberListResultDTO;
import com.epmet.resi.group.dto.member.result.JoinGroupApplyRealTimeResultDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -43,6 +45,8 @@ import java.util.List;
public class ResiGroupMemberController {
@Autowired
private ResiGroupMemberService resiGroupMemberService;
@Autowired
private GroupMemeberOperationService operationService;
/**
* @param tokenDto
@ -183,4 +187,17 @@ public class ResiGroupMemberController {
return new Result<GridVotableCountResultDTO>().ok(resiGroupMemberService.votableCount(gridList));
}
/**
* @Description 通过话题/议题分享链接申请入组
* @param param
* @return com.epmet.resi.group.dto.member.result.JoinGroupApplyRealTimeResultDTO
* @author wangc
* @date 2020.12.22 10:36
*/
@PostMapping("applyenterbylink")
public Result<JoinGroupApplyRealTimeResultDTO> applyEnterByLink(@LoginUser TokenDto token,@RequestBody JoinGroupByShareLinkFormDTO param){
param.setUserId(token.getUserId());
ValidatorUtils.validateEntity(param);
return new Result<JoinGroupApplyRealTimeResultDTO>().ok(operationService.applyEnterByLink(param));
}
}

9
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/dao/GroupMemeberOperationDao.java

@ -50,4 +50,13 @@ public interface GroupMemeberOperationDao extends BaseDao<GroupMemeberOperationE
* @Date 2020/4/11 10:47
**/
GroupMemeberOperationDTO selectLatestRecord(@Param("groupId")String groupId, @Param("userId") String userId);
/**
* @Description 校验此人是不是存在入此组待审核记录
* @Param userId
* @Param groupId
* @author zxc
* @date 2020/12/18 下午4:40
*/
Integer checkAwaitAudit(@Param("userId")String userId,@Param("groupId")String groupId);
}

9
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/dao/ResiGroupMemberDao.java

@ -119,4 +119,13 @@ public interface ResiGroupMemberDao extends BaseDao<ResiGroupMemberEntity> {
* @date 2020.05.26 14:22
**/
List<String> getGroupIdByUserIdAndGridId(@Param("gridId")String gridId,@Param("userId")String userId,@Param("roleFlag")String roleFlag);
/**
* @Description 校验此人是不是在组内
* @Param userId
* @Param groupId
* @author zxc
* @date 2020/12/18 下午4:33
*/
Integer checkUserInGroup(@Param("userId")String userId,@Param("groupId")String groupId);
}

2
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/entity/GroupMemeberOperationEntity.java

@ -62,7 +62,7 @@ Ps: 1) 入群被拒绝之后,如果再申请是插入一条新的审核中的
private String operateStatus;
/**
* 入群方式受邀请入群 - invited 主动加入 - join扫码入群 - scancode
* 入群方式受邀请入群 - invited 主动加入 - join扫码入群 - scancode话题分享链接 - topic_share_link议题分享链接 - issue_share_link
*/
private String enterGroupType;

2
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/entity/ResiGroupMemberEntity.java

@ -54,7 +54,7 @@ public class ResiGroupMemberEntity extends BaseEpmetEntity {
private String groupLeaderFlag;
/**
* 入群方式受邀请入群 - invited 主动加入 - join扫码入群 - scancode
* 入群方式受邀请入群 - invited 主动加入 - join扫码入群 - scancode话题分享链接 - topic_share_link议题分享链接 - issue_share_link
*/
private String enterGroupType;

11
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/GroupMemeberOperationService.java

@ -23,7 +23,9 @@ import com.epmet.commons.tools.utils.Result;
import com.epmet.modules.member.entity.GroupMemeberOperationEntity;
import com.epmet.modules.member.entity.ResiGroupMemberEntity;
import com.epmet.resi.group.dto.member.GroupMemeberOperationDTO;
import com.epmet.resi.group.dto.member.form.JoinGroupByShareLinkFormDTO;
import com.epmet.resi.group.dto.member.form.RemoveMemberFormDTO;
import com.epmet.resi.group.dto.member.result.JoinGroupApplyRealTimeResultDTO;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -122,4 +124,13 @@ public interface GroupMemeberOperationService extends BaseService<GroupMemeberOp
* @param groupMemeberOperation
*/
void accetInvitation(GroupMemeberOperationDTO groupMemeberOperation);
/**
* @Description 通过话题/议题分享链接申请入组
* @param param
* @return com.epmet.resi.group.dto.member.result.JoinGroupApplyRealTimeResultDTO
* @author wangc
* @date 2020.12.22 10:36
*/
JoinGroupApplyRealTimeResultDTO applyEnterByLink(JoinGroupByShareLinkFormDTO param);
}

11
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/ResiGroupMemberService.java

@ -21,6 +21,7 @@ import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.Result;
import com.epmet.modules.member.entity.ResiGroupMemberEntity;
import com.epmet.resi.group.dto.group.ResiGroupDTO;
import com.epmet.resi.group.dto.member.ResiGroupMemberDTO;
import com.epmet.resi.group.dto.member.form.*;
import com.epmet.resi.group.dto.member.result.ApplyingMemberResultDTO;
@ -195,4 +196,14 @@ public interface ResiGroupMemberService extends BaseService<ResiGroupMemberEntit
* @date 2020.05.22 09:23
**/
GridVotableCountResultDTO votableCount(CommonGridIdListFormDTO gridList);
/**
* @Description 给组长发送消息有人申请入群
* @param resiGroupDTO
* @param currentUserId
* @return void
* @author wangc
* @date 2020.12.22 13:48
*/
void sendMessageToGroupLeader(ResiGroupDTO resiGroupDTO, String currentUserId);
}

259
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/GroupMemeberOperationServiceImpl.java

@ -17,29 +17,65 @@
package com.epmet.modules.member.service.impl;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.EpmetRoleKeyConstant;
import com.epmet.commons.tools.constant.MqConstant;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.dto.form.mq.MqBaseMsgDTO;
import com.epmet.commons.tools.dto.form.mq.eventmsg.BasePointEventMsg;
import com.epmet.commons.tools.enums.EventEnum;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.utils.SendMqMsgUtils;
import com.epmet.dto.IssueShareLinkRecordDTO;
import com.epmet.dto.IssueShareLinkVisitRecordDTO;
import com.epmet.dto.form.GetRoleKeyListFormDTO;
import com.epmet.feign.EpmetUserOpenFeignClient;
import com.epmet.feign.GovIssueOpenFeignClient;
import com.epmet.modules.group.dao.ResiGroupDao;
import com.epmet.modules.group.entity.ResiGroupEntity;
import com.epmet.modules.group.redis.ResiGroupRedis;
import com.epmet.modules.group.service.ResiGroupService;
import com.epmet.modules.member.dao.GroupMemeberOperationDao;
import com.epmet.modules.member.dao.ResiGroupMemberDao;
import com.epmet.modules.member.entity.GroupMemeberOperationEntity;
import com.epmet.modules.member.entity.ResiGroupMemberEntity;
import com.epmet.modules.member.redis.GroupMemeberOperationRedis;
import com.epmet.modules.member.service.GroupMemeberOperationService;
import com.epmet.modules.member.service.ResiGroupMemberService;
import com.epmet.modules.topic.dao.ResiTopicDao;
import com.epmet.modules.topic.dao.TopicShareLinkRecordDao;
import com.epmet.modules.topic.dao.TopicShareLinkVisitRecordDao;
import com.epmet.modules.topic.entity.TopicShareLinkRecordEntity;
import com.epmet.modules.topic.entity.TopicShareLinkVisitRecordEntity;
import com.epmet.modules.utils.ModuleConstant;
import com.epmet.resi.group.constant.GroupStateConstant;
import com.epmet.resi.group.constant.LeaderFlagConstant;
import com.epmet.resi.group.constant.MemberStateConstant;
import com.epmet.resi.group.dto.UserRoleDTO;
import com.epmet.resi.group.dto.group.ResiGroupDTO;
import com.epmet.resi.group.dto.group.ResiGroupInfoRedisDTO;
import com.epmet.resi.group.dto.member.GroupMemeberOperationDTO;
import com.epmet.resi.group.dto.member.ResiGroupMemberDTO;
import com.epmet.resi.group.dto.member.form.JoinGroupByShareLinkFormDTO;
import com.epmet.resi.group.dto.member.form.RemoveMemberFormDTO;
import com.epmet.resi.group.dto.member.result.JoinGroupApplyRealTimeResultDTO;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.*;
/**
* 组成员出入群记录表
@ -48,10 +84,31 @@ import java.util.Map;
* @since v1.0.0 2020-03-29
*/
@Service
@Slf4j
public class GroupMemeberOperationServiceImpl extends BaseServiceImpl<GroupMemeberOperationDao, GroupMemeberOperationEntity> implements GroupMemeberOperationService {
@Autowired
private GroupMemeberOperationRedis groupMemeberOperationRedis;
@Autowired
private ResiGroupMemberDao resiGroupMemberDao;
@Autowired
private TopicShareLinkRecordDao topicShareLinkRecordDao;
@Autowired
private GovIssueOpenFeignClient issueOpenFeignClient;
@Autowired
private ResiTopicDao topicDao;
@Autowired
private GroupMemeberOperationDao operationDao;
@Autowired
private ResiGroupService groupService;
@Autowired
private ResiGroupMemberService memberService;
@Autowired
private ResiGroupRedis groupRedis;
@Autowired
private EpmetUserOpenFeignClient userClient;
@Autowired
private TopicShareLinkVisitRecordDao topicShareLinkVisitRecordDao;
@Override
public PageData<GroupMemeberOperationDTO> page(Map<String, Object> params) {
@ -143,4 +200,200 @@ public class GroupMemeberOperationServiceImpl extends BaseServiceImpl<GroupMemeb
this.save(groupMemeberOperation);
}
/**
* @Description 通过话题/议题分享链接申请入组
* @param param
* @return com.epmet.resi.group.dto.member.result.JoinGroupApplyRealTimeResultDTO
* @author wangc
* @date 2020.12.22 10:36
*/
@Override
@Transactional(rollbackFor = Exception.class)
public JoinGroupApplyRealTimeResultDTO applyEnterByLink(JoinGroupByShareLinkFormDTO param) {
JoinGroupApplyRealTimeResultDTO result = new JoinGroupApplyRealTimeResultDTO();
Date current = new Date();
//根据链接查询群Id
String groupId = null;
String inviter = null;
if(StringUtils.equals("topic",param.getShareLinkType())){
TopicShareLinkRecordEntity topicShareLink = topicShareLinkRecordDao.selectById(param.getShareLinkId());
if(null == topicShareLink){
throw new RenException("没有找到分享链接");
}
groupId = topicShareLink.getGroupId();
inviter = topicShareLink.getShareUserId();
}else {
Result<IssueShareLinkRecordDTO> response = issueOpenFeignClient.shareLinkInfo(param.getShareLinkId());
if(response.success() && null != response.getData()){
groupId = topicDao.selectGroupIdByIssueId(response.getData().getIssueId());
inviter = response.getData().getShareUserId();
}
}
if(StringUtils.isBlank(groupId)){
throw new RenException("没有找到分享链接对应的组Id");
}
if(StringUtils.isBlank(inviter)){
throw new RenException("没有找到邀请人Id");
}
//查询是否在群内
ResiGroupMemberDTO groupMember = resiGroupMemberDao.selectGroupMemberInfo(groupId, param.getUserId());
if (null != groupMember && !MemberStateConstant.REMOVED.equals(groupMember.getStatus())) {
log.info("已经在群内,直接返回成功,但是不发送积分事件");
result.setStatus("entered");
return result;
}
//先判断用户是否有在审核的入组申请,有的话直接给提示
GroupMemeberOperationDTO groupMemeberOperationDTO = operationDao.selectLatestRecord(groupId, param.getUserId());
if (null != groupMemeberOperationDTO && MemberStateConstant.UNDER_AUDITTING.equals(groupMemeberOperationDTO.getOperateStatus())) {
log.info("已存在待审核入组申请,不能重复审核");
result.setStatus("auditing");
return result;
}
ResiGroupDTO resiGroupDTO = groupService.get(groupId);
if(null == resiGroupDTO){
log.error("没有找到对应的组,组Id:{}",groupId);
throw new RenException("没有找到对应的组");
}
GetRoleKeyListFormDTO roleParam = new GetRoleKeyListFormDTO();
roleParam.setFromApp("resi");
roleParam.setUserId(param.getUserId());
roleParam.setGridId(resiGroupDTO.getGridId());
Result<List<String>> userRoleResponse = userClient.getUserRoleKeyList(roleParam);
if(!userRoleResponse.success() || CollectionUtils.isEmpty(userRoleResponse.getData())){
throw new RenException("未找到当前用户的有效身份信息");
}
//进组是否需要审核的逻辑
GroupMemeberOperationDTO groupMemeberOperation = new GroupMemeberOperationDTO();
groupMemeberOperation.setGroupId(groupId);
groupMemeberOperation.setCustomerUserId(param.getUserId());
groupMemeberOperation.setEnterGroupType(StringUtils.equals("topic",param.getShareLinkType()) ? ModuleConstant.ENTER_GROUP_TYPE_TOPIC_LINK : ModuleConstant.ENTER_GROUP_TYPE_ISSUE_LINK);
groupMemeberOperation.setGroupInvitationId(param.getShareLinkId());
groupMemeberOperation.setOperateUserId(param.getUserId());
groupMemeberOperation.setOperateDes(StringUtils.equals("topic",param.getShareLinkType()) ? "通过话题分享链接申请入组" : "通过议题分享链接申请入组");
//入组审核开关是开启状态则需要组长审核
if (StringUtils.equals(GroupStateConstant.AUDIT_SWITCH_OPEN , resiGroupDTO.getAuditSwitch())) {
groupMemeberOperation.setOperateStatus(MemberStateConstant.UNDER_AUDITTING);
save(groupMemeberOperation);
//给组长推送站内信
//memberService.sendMessageToGroupLeader(resiGroupDTO, param.getUserId());
result.setStatus("auditing");
return result;
}
UserRoleDTO userRoleDTO = getUserRoleDTO(userRoleResponse.getData());
//新增一条邀请入群、直接审核通过的入群记录
groupMemeberOperation.setOperateStatus(MemberStateConstant.APPROVED);
groupMemeberOperation.setOperateDes("通过分享链接入组,入组审核开关关闭,直接入组");
save(groupMemeberOperation);
result.setStatus("entered");
//发送积分事件
boolean isNew = false;
if(StringUtils.equals("topic",param.getShareLinkType())){
TopicShareLinkVisitRecordEntity record = topicShareLinkVisitRecordDao.selectRecordByLinkIdAndInvitee(param.getShareLinkId(), param.getUserId());
if(null == record){
log.error("【{}】该用户入组方式为话题分享链接入组,但未查询到链接访问记录,链接Id【{}】",param.getUserId(),param.getShareLinkId());
throw new RenException("未找到链接访问记录");
}
if(NumConstant.ZERO == record.getIsInviteRegister()) isNew = true;
}else{
Result<IssueShareLinkVisitRecordDTO> visitRecordResult = issueOpenFeignClient.visitRecord(param.getShareLinkId(), param.getUserId());
if(!visitRecordResult.success() || null == visitRecordResult.getData()){
log.error("【{}】该用户入组方式为议题分享链接入组,但未查询到链接访问记录,链接Id【{}】",param.getUserId(),param.getShareLinkId());
throw new RenException("未找到链接访问记录");
}
if(!visitRecordResult.getData().getIfJoinGroup()){
log.error("【{}】该用户入组方式为议题分享链接入组,但并不是通过该链接发起的入群申请,链接Id【{}】",param.getUserId(),param.getShareLinkId());
throw new RenException("用户并非通过当前链接申请入组");
}
if(NumConstant.ZERO == visitRecordResult.getData().getIsInviteRegister()) isNew = true;
}
if(StringUtils.isNotBlank(inviter)){
//mq的事件类型
MqBaseMsgDTO mqBaseMsgDTO = new MqBaseMsgDTO();
//事件code
mqBaseMsgDTO.setEventTag(isNew ? EventEnum.INVITE_NEW_RESIDENT_INTO_GROUP.getEventTag() : EventEnum.INVITE_RESIDENT_INTO_GROUP.getEventTag());
mqBaseMsgDTO.setEventClass("resi_group");
List<BasePointEventMsg> pointEventMsgList = new ArrayList<>();
BasePointEventMsg pointEventMsg = new BasePointEventMsg();
pointEventMsg.setCustomerId(resiGroupDTO.getCustomerId());
pointEventMsg.setUserId(inviter);
pointEventMsg.setActionFlag(MqConstant.PLUS);
pointEventMsg.setIsCommon(false);
pointEventMsg.setTargetDate(current);
pointEventMsg.setEventTag(mqBaseMsgDTO.getEventTag());
pointEventMsg.setRemark("通过".concat(StringUtils.equals(param.getShareLinkType(),"topic")
? "话题":"议题").concat("分享链接邀请").concat(isNew ? "新" : "").concat("用户进组"));
pointEventMsgList.add(pointEventMsg);
mqBaseMsgDTO.setMsg(JSON.toJSONString(pointEventMsgList));
Result sendResult = SendMqMsgUtils.sendMsg(mqBaseMsgDTO);
if(!sendResult.success()){
log.error((isNew ? "拉新用户入组事件发送失败" : "邀请已注册用户入组事件发送失败").concat(",参数:{}"),JSON.toJSONString(param));
}
}
//直接加入群成员关系表
//如果是之前被移除的,则修改resi_group_member记录
ResiGroupMemberDTO resiGroupMemberDTO = new ResiGroupMemberDTO();
ResiGroupMemberDTO resiGroupMember = resiGroupMemberDao.selectGroupMemberInfo(groupId, param.getUserId());
if (null != resiGroupMember) {
resiGroupMemberDTO.setId(resiGroupMember.getId());
}
resiGroupMemberDTO.setCustomerUserId(groupMemeberOperation.getCustomerUserId());
resiGroupMemberDTO.setResiGroupId(groupMemeberOperation.getGroupId());
resiGroupMemberDTO.setGroupLeaderFlag(LeaderFlagConstant.GROUP_MEMBER);
resiGroupMemberDTO.setEnterGroupType(groupMemeberOperation.getEnterGroupType());
resiGroupMemberDTO.setStatus(MemberStateConstant.APPROVED);
resiGroupMemberDTO.setCreatedBy(groupMemeberOperation.getCustomerUserId());
memberService.saveOrUpdate(resiGroupMemberDTO);
//修改群统计值
resiGroupMemberDao.updateResiGroupStatistical(groupMemeberOperation.getGroupId(), userRoleDTO);
ResiGroupInfoRedisDTO groupCache =
groupRedis.get(groupId);
if(null != groupCache && null != groupCache.getGroupStatisticalInfo()){
groupCache.getGroupStatisticalInfo().setTotalMembers(
null == groupCache.getGroupStatisticalInfo().getTotalMembers() ? NumConstant.TWO : groupCache.getGroupStatisticalInfo().getTotalMembers() +NumConstant.ONE
);
if(StringUtils.equals(userRoleDTO.getPartymemberFlag(),NumConstant.ONE_STR)) groupCache.getGroupStatisticalInfo().setTotalPartyMembers(
null == groupCache.getGroupStatisticalInfo().getTotalPartyMembers() ? NumConstant.ONE : groupCache.getGroupStatisticalInfo().getTotalPartyMembers()+NumConstant.ONE
);
if(StringUtils.equals(userRoleDTO.getRegisteredResiFlag(),NumConstant.ONE_STR)) groupCache.getGroupStatisticalInfo().setTotalNormalMembers(
null == groupCache.getGroupStatisticalInfo().getTotalNormalMembers() ? NumConstant.TWO : groupCache.getGroupStatisticalInfo().getTotalNormalMembers()+NumConstant.ONE
);
if(StringUtils.equals(userRoleDTO.getWarmHeartedFlag(),NumConstant.ONE_STR)) groupCache.getGroupStatisticalInfo().setTotalEarnestMembers(
null == groupCache.getGroupStatisticalInfo().getTotalEarnestMembers() ? NumConstant.ONE : groupCache.getGroupStatisticalInfo().getTotalEarnestMembers()+NumConstant.ONE
);
groupRedis.set(groupCache);
}
//发送消息
//this.sendMessageToLeader(formDTO, resiGroupDTO,groupInvitationDTO);
return result;
}
private UserRoleDTO getUserRoleDTO(List<String> userRoleList) {
UserRoleDTO userRoleDTO=new UserRoleDTO();
for (String roleKey : userRoleList) {
if (EpmetRoleKeyConstant.PARTYMEMBER.equals(roleKey)) {
userRoleDTO.setPartymemberFlag(NumConstant.ONE_STR);
}
if (EpmetRoleKeyConstant.WARMHEARTED.equals(roleKey)) {
userRoleDTO.setWarmHeartedFlag(NumConstant.ONE_STR);
}
if (EpmetRoleKeyConstant.REGISTERED_RESI.equals(roleKey)) {
userRoleDTO.setRegisteredResiFlag(NumConstant.ONE_STR);
}
}
return userRoleDTO;
}
}

71
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/ResiGroupMemberServiceImpl.java

@ -21,20 +21,23 @@ import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.AppClientConstant;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.constant.*;
import com.epmet.commons.tools.dto.form.mq.MqBaseMsgDTO;
import com.epmet.commons.tools.dto.form.mq.eventmsg.BasePointEventMsg;
import com.epmet.commons.tools.enums.EventEnum;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.utils.SendMqMsgUtils;
import com.epmet.constant.ReadFlagConstant;
import com.epmet.dto.IssueShareLinkVisitRecordDTO;
import com.epmet.dto.form.*;
import com.epmet.dto.result.UserResiInfoResultDTO;
import com.epmet.feign.EpmetMessageOpenFeignClient;
import com.epmet.feign.EpmetUserOpenFeignClient;
import com.epmet.feign.GovIssueOpenFeignClient;
import com.epmet.modules.constant.GroupMemberConstant;
import com.epmet.modules.constant.UserMessageConstant;
import com.epmet.modules.feign.EpmetUserFeignClient;
@ -48,7 +51,10 @@ import com.epmet.modules.member.entity.ResiGroupMemberEntity;
import com.epmet.modules.member.redis.ResiGroupMemberRedis;
import com.epmet.modules.member.service.GroupMemeberOperationService;
import com.epmet.modules.member.service.ResiGroupMemberService;
import com.epmet.modules.topic.dao.ResiTopicDao;
import com.epmet.modules.topic.entity.TopicShareLinkVisitRecordEntity;
import com.epmet.modules.topic.service.ResiTopicService;
import com.epmet.modules.topic.service.TopicShareLinkVisitRecordService;
import com.epmet.modules.utils.ModuleConstant;
import com.epmet.resi.group.constant.EnterGroupTypeConstant;
import com.epmet.resi.group.constant.LeaderFlagConstant;
@ -111,7 +117,6 @@ public class ResiGroupMemberServiceImpl extends BaseServiceImpl<ResiGroupMemberD
@Autowired
private ResiTopicService resiTopicService;
@Autowired
private ResiGroupMemberRedis resiGroupMemberRedis;
@ -121,6 +126,10 @@ public class ResiGroupMemberServiceImpl extends BaseServiceImpl<ResiGroupMemberD
private ResiGroupDao resiGroupDao;
@Autowired
private EpmetUserOpenFeignClient userOpenFeignClient;
@Autowired
private GovIssueOpenFeignClient issueClient;
@Autowired
private TopicShareLinkVisitRecordService topicShareLinkVisitRecordService;
@Override
public PageData<ResiGroupMemberDTO> page(Map<String, Object> params) {
@ -245,6 +254,7 @@ public class ResiGroupMemberServiceImpl extends BaseServiceImpl<ResiGroupMemberD
}
//给组长发送消息,有人申请入群
@Override
public void sendMessageToGroupLeader(ResiGroupDTO resiGroupDTO, String currentUserId) {
try {
ResiGroupMemberDTO groupLeader = resiGroupDao.selectGroupLeader(resiGroupDTO.getId());
@ -484,6 +494,57 @@ public class ResiGroupMemberServiceImpl extends BaseServiceImpl<ResiGroupMemberD
}
resiGroupRedis.set(groupCache);
}
//9、查询当前入组申请人是否是通过话题/议题链接入组,如果是,要给邀请人发送积分事件
String inviter = null;
boolean isNew = false;
//通过链接和访问记录查询出被邀请人是新用户还是已注册用户
if(StringUtils.equals(groupMemeberOperationDTO.getEnterGroupType(),ModuleConstant.ENTER_GROUP_TYPE_TOPIC_LINK)){
TopicShareLinkVisitRecordEntity visitRecord = topicShareLinkVisitRecordService.getByLinkIdAndInvitee(groupMemeberOperationDTO.getGroupInvitationId(), groupMemeberOperationDTO.getCustomerUserId());
if(null == visitRecord){
logger.error("【{}】该用户入组方式为话题分享链接入组,但未查询到链接访问记录,链接Id【{}】",groupMemeberOperationDTO.getCustomerUserId(),groupMemeberOperationDTO.getGroupInvitationId());
return;
}
if(NumConstant.ZERO == visitRecord.getIsInviteRegister()) isNew = true;
inviter = visitRecord.getShareUserId();
}else if(StringUtils.equals(groupMemeberOperationDTO.getEnterGroupType(),ModuleConstant.ENTER_GROUP_TYPE_ISSUE_LINK)){
Result<IssueShareLinkVisitRecordDTO> response = issueClient.visitRecord(groupMemeberOperationDTO.getGroupInvitationId(), groupMemeberOperationDTO.getCustomerUserId());
if(response.success() && null != response){
if(!response.getData().getIfJoinGroup()){
logger.error("【{}】该用户入组方式为议题分享链接入组,但并不是通过该链接发起的入群申请,链接Id【{}】",groupMemeberOperationDTO.getCustomerUserId(),groupMemeberOperationDTO.getGroupInvitationId());
return;
}
if(NumConstant.ZERO == response.getData().getIsInviteRegister()) isNew = true;
inviter = response.getData().getShareUserId();
}else{
logger.error("【{}】该用户入组方式为议题分享链接入组,但未查询到链接访问记录,链接Id【{}】",groupMemeberOperationDTO.getCustomerUserId(),groupMemeberOperationDTO.getGroupInvitationId());
return;
}
}
if(StringUtils.isNotBlank(inviter)){
//mq的事件类型
MqBaseMsgDTO mqBaseMsgDTO = new MqBaseMsgDTO();
mqBaseMsgDTO.setEventClass("resi_group");
//事件code
mqBaseMsgDTO.setEventTag(isNew ? EventEnum.INVITE_NEW_RESIDENT_INTO_GROUP.getEventTag() : EventEnum.INVITE_RESIDENT_INTO_GROUP.getEventTag());
List<BasePointEventMsg> pointEventMsgList = new ArrayList<>();
BasePointEventMsg pointEventMsg = new BasePointEventMsg();
pointEventMsg.setCustomerId(groupCache.getCustomerId());
pointEventMsg.setUserId(inviter);
pointEventMsg.setActionFlag(MqConstant.PLUS);
pointEventMsg.setIsCommon(false);
pointEventMsg.setTargetDate(groupMemeberOperationDTO.getCreatedTime());
pointEventMsg.setEventTag(mqBaseMsgDTO.getEventTag());
pointEventMsg.setRemark("通过".concat(StringUtils.equals(groupMemeberOperationDTO.getEnterGroupType(),ModuleConstant.ENTER_GROUP_TYPE_TOPIC_LINK)
? "话题":"议题").concat("分享链接邀请").concat(isNew ? "新" : "").concat("用户进组"));
pointEventMsgList.add(pointEventMsg);
mqBaseMsgDTO.setMsg(JSON.toJSONString(pointEventMsgList));
Result result= SendMqMsgUtils.sendMsg(mqBaseMsgDTO);
if(!result.success()){
logger.error((isNew ? "拉新用户入组事件发送失败" : "邀请已注册用户入组事件发送失败").concat(",参数:{}"),JSON.toJSONString(agreeApplyFormDTO));
}
}
}
/**

54
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/controller/ResiTopicController.java

@ -1,19 +1,27 @@
package com.epmet.modules.topic.controller;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dto.result.FirstTopicShiftedToIssueApplicationResultDTO;
import com.epmet.modules.topic.service.ResiTopicService;
import com.epmet.resi.group.dto.scanapicallback.VoiceScanCallBackContentFormDTO;
import com.epmet.resi.group.dto.topic.MyCreateTopicsFormDTO;
import com.epmet.resi.group.dto.topic.ResiTopicDTO;
import com.epmet.resi.group.dto.topic.TopicInfoDTO;
import com.epmet.resi.group.dto.topic.form.*;
import com.epmet.resi.group.dto.topic.result.*;
import lombok.extern.slf4j.Slf4j;
import org.apache.http.HttpStatus;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;
/**
@ -22,7 +30,7 @@ import java.util.List;
* @Author wangc
* @date 2020.03.31 13:03
*/
@Slf4j
@RestController
@RequestMapping("topic")
public class ResiTopicController {
@ -350,4 +358,48 @@ public class ResiTopicController {
}
/**
* @return com.epmet.commons.tools.utils.Result
* @param checksum 字符串格式由用户uid + seed + content拼成字符串通过SHA256算法生成用户UID即阿里云账号ID可以在阿里云控制台查询为防篡改您可以在获取到推送结果时按上述算法生成字符串与checksum做一次校验说明 用户UID必须是阿里云账号的UID而不是RAM用户的UID
* @param content contentJSON字符串格式请自行解析反转成JSON对象关于content结果的示例请参见查询异步检测结果的返回示例
* @author yinzuomei
* @description 测试语音异步检测回调方法
* @Date 2020/12/11 9:07
**/
@PostMapping("callBackPublishTopic")
public Result callBackPublishTopic(@RequestParam("checksum") String checksum, @RequestParam("content") String content, HttpServletResponse response){
// 原因是因为传参的关系,使字符串中保留这"\"线,可以使用String.replaceAll("\\\\","");将所有的"\"线替换为空串
String contentStr=content.replaceAll("\\\\","");
List<VoiceScanCallBackContentFormDTO> formDTOList=new ArrayList<>();
if(contentStr.startsWith("[")){
log.info("入参content为数组:"+ JSON.toJSONString(contentStr,true));
List<VoiceScanCallBackContentFormDTO> list= JSONArray.parseArray(content.replaceAll("\\\\",""), VoiceScanCallBackContentFormDTO.class);
if(!CollectionUtils.isEmpty(list)){
formDTOList.addAll(list);
}
}else if(contentStr.startsWith("{")){
VoiceScanCallBackContentFormDTO formDTO= JSON.parseObject(contentStr, VoiceScanCallBackContentFormDTO.class);
log.info("入参content为对象:"+JSON.toJSONString(formDTO,true));
formDTOList.add(formDTO);
}
formDTOList.forEach(dto->{
log.info(dto.toString());
});
//TODO 判断检测任务结果,执行后续任务
response.setStatus(HttpStatus.SC_OK);
return new Result<>();
}
/**
* @param formDTO
* @return
* @Author sun
* @Description 获取话题附件信息
**/
@PostMapping(value = "topicattachmentlist")
public Result<TopicAttachmentResultDTO> topicAttachmentList(@RequestBody TopicAttachmentFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO, TopicAttachmentFormDTO.TopicForm.class);
return new Result<TopicAttachmentResultDTO>().ok(topicService.topicAttachmentList(formDTO));
}
}

183
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/controller/TopicDraftController.java

@ -0,0 +1,183 @@
/**
* 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.epmet.modules.topic.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ExcelUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.modules.topic.excel.TopicDraftExcel;
import com.epmet.modules.topic.service.TopicDraftService;
import com.epmet.resi.group.dto.topic.TopicDraftDTO;
import com.epmet.resi.group.dto.topic.form.*;
import com.epmet.resi.group.dto.topic.result.DraftDetailResultDTO;
import com.epmet.resi.group.dto.topic.result.MyAuditingListResultDTO;
import com.epmet.resi.group.dto.topic.result.TopicAuditResultDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 话题草稿内容表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-12-17
*/
@RestController
@RequestMapping("topicdraft")
public class TopicDraftController {
@Autowired
private TopicDraftService topicDraftService;
@GetMapping("page")
public Result<PageData<TopicDraftDTO>> page(@RequestParam Map<String, Object> params){
PageData<TopicDraftDTO> page = topicDraftService.page(params);
return new Result<PageData<TopicDraftDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<TopicDraftDTO> get(@PathVariable("id") String id){
TopicDraftDTO data = topicDraftService.get(id);
return new Result<TopicDraftDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody TopicDraftDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
topicDraftService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody TopicDraftDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
topicDraftService.update(dto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
topicDraftService.delete(ids);
return new Result();
}
@GetMapping("export")
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<TopicDraftDTO> list = topicDraftService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, TopicDraftExcel.class);
}
/**
* 发布话题
* @author zhaoqifeng
* @date 2020/12/17 15:49
* @param tokenDto
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
*/
@PostMapping("createtopic")
public Result createTopic(@LoginUser TokenDto tokenDto, @RequestBody CreateTopicFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO);
topicDraftService.createTopic(tokenDto, formDTO);
return new Result();
}
/**
* 组管理界面-待审核/已驳回列表
* @author zhaoqifeng
* @date 2020/12/18 14:32
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<com.epmet.resi.group.dto.topic.result.TopicAuditResultDTO>
*/
@PostMapping("auditlist")
public Result<List<TopicAuditResultDTO>> auditList(@RequestBody TopicAuditFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO);
List<TopicAuditResultDTO> result = topicDraftService.auditList(formDTO);
return new Result<List<TopicAuditResultDTO>>().ok(result);
}
/**
* 话题草稿详情
* @author zhaoqifeng
* @date 2020/12/18 14:55
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<com.epmet.resi.group.dto.topic.result.DraftDetailResultDTO>
*/
@PostMapping("detail")
public Result<DraftDetailResultDTO> detail(@RequestBody DraftDetailFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO);
DraftDetailResultDTO result = topicDraftService.detail(formDTO);
return new Result<DraftDetailResultDTO>().ok(result);
}
/**
* 删除已驳回话题
* @author zhaoqifeng
* @date 2020/12/18 14:57
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
*/
@PostMapping("del")
public Result deleteDraft(@RequestBody DraftDetailFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO);
topicDraftService.deleteDraft(formDTO);
return new Result();
}
/**
* 组长审核
* @author zhaoqifeng
* @date 2020/12/18 15:06
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
*/
@PostMapping("audit")
public Result audit(@LoginUser TokenDto tokenDto, @RequestBody AuditDraftTopicFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO);
topicDraftService.audit(tokenDto, formDTO);
return new Result();
}
/**
* @param formDTO
* @return
* @Author sun
* @Description 个人中心-我发表的话题-审核中列表
**/
@PostMapping(value = "myauditinglist")
public Result<List<MyAuditingListResultDTO>> myAuditingList(@LoginUser TokenDto tokenDto, @RequestBody MyAuditingListFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO, MyAuditingListFormDTO.AuditingTopicForm.class);
formDTO.setUserId(tokenDto.getUserId());
return new Result<List<MyAuditingListResultDTO>>().ok(topicDraftService.myAuditingList(formDTO));
}
}

111
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/controller/TopicShareLinkRecordController.java

@ -0,0 +1,111 @@
package com.epmet.modules.topic.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.modules.topic.service.TopicShareLinkRecordService;
import com.epmet.resi.group.dto.topic.TopicShareLinkRecordDTO;
import com.epmet.resi.group.dto.topic.form.CreateUrlFormDTO;
import com.epmet.resi.group.dto.topic.form.TopicBelongGroupFormDTO;
import com.epmet.resi.group.dto.topic.form.TopicVisitFormDTO;
import com.epmet.resi.group.dto.topic.result.CreateUrlResultDTO;
import com.epmet.resi.group.dto.topic.result.TopicBelongGroupResultDTO;
import com.epmet.resi.group.dto.topic.result.TopicVisitResultDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
/**
* 话题分享链接表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-12-18
*/
@RestController
@RequestMapping("topicsharelink")
public class TopicShareLinkRecordController {
@Autowired
private TopicShareLinkRecordService topicShareLinkRecordService;
@GetMapping("page")
public Result<PageData<TopicShareLinkRecordDTO>> page(@RequestParam Map<String, Object> params){
PageData<TopicShareLinkRecordDTO> page = topicShareLinkRecordService.page(params);
return new Result<PageData<TopicShareLinkRecordDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<TopicShareLinkRecordDTO> get(@PathVariable("id") String id){
TopicShareLinkRecordDTO data = topicShareLinkRecordService.get(id);
return new Result<TopicShareLinkRecordDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody TopicShareLinkRecordDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
topicShareLinkRecordService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody TopicShareLinkRecordDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
topicShareLinkRecordService.update(dto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
topicShareLinkRecordService.delete(ids);
return new Result();
}
/**
* @Description 分享话题邀请ID
* @Param createUrlFormDTO
* @author zxc
* @date 2020/12/18 上午10:14
*/
@PostMapping("createurl")
public Result<CreateUrlResultDTO> getCreateUrlId(@RequestBody CreateUrlFormDTO createUrlFormDTO, @LoginUser TokenDto tokenDto){
ValidatorUtils.validateEntity(createUrlFormDTO, CreateUrlFormDTO.CreateUrlForm.class);
return new Result<CreateUrlResultDTO>().ok(topicShareLinkRecordService.getCreateUrlId(createUrlFormDTO,tokenDto));
}
/**
* @Description 查询话题所属小组
* @Param formDTO
* @author zxc
* @date 2020/12/18 下午2:08
*/
@PostMapping("topicbelonggroup")
public Result<TopicBelongGroupResultDTO> selectTopicBelongGroup(@RequestBody TopicBelongGroupFormDTO formDTO){
return new Result<TopicBelongGroupResultDTO>().ok(topicShareLinkRecordService.selectTopicBelongGroup(formDTO));
}
/**
* @Description 分享话题id获取信息
* @Param formDTO
* @Param tokenDto
* @author zxc
* @date 2020/12/18 下午3:34
*/
@PostMapping("visit")
public Result<TopicVisitResultDTO> topicVisit(@RequestBody TopicVisitFormDTO formDTO,@LoginUser TokenDto tokenDto){
ValidatorUtils.validateEntity(formDTO, TopicVisitFormDTO.TopicVisitForm.class);
return new Result<TopicVisitResultDTO>().ok(topicShareLinkRecordService.topicVisit(formDTO,tokenDto));
}
}

83
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/controller/TopicShareLinkVisitRecordController.java

@ -0,0 +1,83 @@
package com.epmet.modules.topic.controller;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.modules.topic.service.TopicShareLinkVisitRecordService;
import com.epmet.resi.group.dto.topic.TopicShareLinkVisitRecordDTO;
import com.epmet.resi.group.dto.topic.form.SharableTopicAndInviteeFormDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
/**
* 话题分享链接访问记录表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-12-18
*/
@RestController
@RequestMapping("topicsharelinkvisitrecord")
public class TopicShareLinkVisitRecordController {
@Autowired
private TopicShareLinkVisitRecordService topicShareLinkVisitRecordService;
@GetMapping("page")
public Result<PageData<TopicShareLinkVisitRecordDTO>> page(@RequestParam Map<String, Object> params){
PageData<TopicShareLinkVisitRecordDTO> page = topicShareLinkVisitRecordService.page(params);
return new Result<PageData<TopicShareLinkVisitRecordDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<TopicShareLinkVisitRecordDTO> get(@PathVariable("id") String id){
TopicShareLinkVisitRecordDTO data = topicShareLinkVisitRecordService.get(id);
return new Result<TopicShareLinkVisitRecordDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody TopicShareLinkVisitRecordDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
topicShareLinkVisitRecordService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody TopicShareLinkVisitRecordDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
topicShareLinkVisitRecordService.update(dto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
topicShareLinkVisitRecordService.delete(ids);
return new Result();
}
/**
* @Description 检查邀请关系如果确实存在邀请关系则返回邀请人Id
* 符合条件
* 链接Id对应
* 邀请人Id对应
* 邀请人在被邀请时的状态为陌生人
* @param param
* @return com.epmet.commons.tools.utils.Result<java.lang.String>
* @author wangc
* @date 2020.12.18 14:53
*/
@PostMapping("checkinviterelationship")
public Result<String> checkInviteRelationship(@RequestBody SharableTopicAndInviteeFormDTO param){
return new Result<String>().ok(topicShareLinkVisitRecordService.checkInviteRelationship(param));
}
}

8
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/ResiTopicAttachmentDao.java

@ -20,7 +20,9 @@ package com.epmet.modules.topic.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.modules.topic.entity.ResiTopicAttachmentEntity;
import com.epmet.resi.group.dto.topic.ResiTopicAttachmentDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -51,4 +53,10 @@ public interface ResiTopicAttachmentDao extends BaseDao<ResiTopicAttachmentEntit
**/
int insertOne(ResiTopicAttachmentEntity attachmentEntity);
/**
* @Author sun
* @Description 根据话题id查询所有的附件数据
**/
List<ResiTopicAttachmentDTO> selectTopicAttachmentList(@Param("topicId") String topicId);
}

9
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/ResiTopicDao.java

@ -193,4 +193,13 @@ public interface ResiTopicDao extends BaseDao<ResiTopicEntity> {
*/
List<String> selectTopicIdsByGroup(@Param("groupId") String groupId);
String selectGroupIdByIssueId(@Param("issueId") String issueId);
/**
* @Description 查询此人今日发表话题数量
* @Param userId
* @author zxc
* @date 2020/12/23 上午10:02
*/
Integer selectPublishTopicCountByUserId(@Param("userId")String userId);
}

45
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/TopicDraftAttachmentDao.java

@ -0,0 +1,45 @@
/**
* 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.epmet.modules.topic.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.modules.topic.entity.TopicDraftAttachmentEntity;
import com.epmet.resi.group.dto.topic.TopicDraftAttachmentDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 话题草稿附件表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-12-17
*/
@Mapper
public interface TopicDraftAttachmentDao extends BaseDao<TopicDraftAttachmentEntity> {
/**
* 获取附件列表
* @author zhaoqifeng
* @date 2020/12/18 16:44
* @param topicDraftId
* @param type
* @return java.util.List<java.lang.String>
*/
List<TopicDraftAttachmentDTO> selectFileList(@Param("topicDraftId") String topicDraftId, @Param("type") String type);
}

68
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/TopicDraftDao.java

@ -0,0 +1,68 @@
/**
* 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.epmet.modules.topic.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.modules.topic.entity.TopicDraftEntity;
import com.epmet.resi.group.dto.topic.TopicDraftDTO;
import com.epmet.resi.group.dto.topic.result.DraftDetailResultDTO;
import com.epmet.resi.group.dto.topic.result.TopicAuditResultDTO;
import com.epmet.resi.group.dto.topic.form.MyAuditingListFormDTO;
import com.epmet.resi.group.dto.topic.result.MyAuditingListResultDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.List;
/**
* 话题草稿内容表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-12-17
*/
@Mapper
public interface TopicDraftDao extends BaseDao<TopicDraftEntity> {
/**
* 获取小组待审核/已驳回列表
* @author zhaoqifeng
* @date 2020/12/18 15:47
* @param groupId
* @param status
* @return com.epmet.resi.group.dto.topic.TopicDraftDTO
*/
List<TopicAuditResultDTO> selectTopicDraftByGroup(@Param("groupId") String groupId, @Param("status") String status);
/**
* 话题草稿详情
* @author zhaoqifeng
* @date 2020/12/18 16:19
* @param topicDraftId
* @return com.epmet.resi.group.dto.topic.result.DraftDetailResultDTO
*/
DraftDetailResultDTO selectTopicDraftDetail(@Param("topicDraftId") String topicDraftId);
/**
* @param formDTO
* @return
* @Author sun
* @Description 个人中心-我发表的话题-审核中列表
**/
List<MyAuditingListResultDTO> selectAuditingList(MyAuditingListFormDTO formDTO);
}

33
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/TopicDraftOperationDao.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.epmet.modules.topic.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.modules.topic.entity.TopicDraftOperationEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 话题草稿操作日志表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-12-17
*/
@Mapper
public interface TopicDraftOperationDao extends BaseDao<TopicDraftOperationEntity> {
}

33
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/TopicDraftScanTaskDao.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.epmet.modules.topic.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.modules.topic.entity.TopicDraftScanTaskEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 话题附件检测任务表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-12-18
*/
@Mapper
public interface TopicDraftScanTaskDao extends BaseDao<TopicDraftScanTaskEntity> {
}

35
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/TopicShareLinkRecordDao.java

@ -0,0 +1,35 @@
package com.epmet.modules.topic.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.modules.topic.entity.TopicShareLinkRecordEntity;
import com.epmet.resi.group.dto.topic.result.TopicVisitResultDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 话题分享链接表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-12-18
*/
@Mapper
public interface TopicShareLinkRecordDao extends BaseDao<TopicShareLinkRecordEntity> {
/**
* @Description 根据话题ID查询对应信息
* @Param topicId
* @author zxc
* @date 2020/12/18 上午10:28
*/
TopicVisitResultDTO selectTopicInfoById(@Param("topicId") String topicId);
/**
* @Description 校验此人此话题是否存在邀请记录
* @Param topicId
* @Param userId
* @author zxc
* @date 2020/12/18 上午11:10
*/
String checkRecord(@Param("topicId") String topicId,@Param("userId") String userId);
}

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

Loading…
Cancel
Save