Browse Source

Merge branches 'dev' and 'dev_thirdplatform' of http://git.elinkit.com.cn:7070/r/epmet-cloud into dev_thirdplatform

dev_shibei_match
wxz 5 years ago
parent
commit
6861d099f3
  1. 4
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java
  2. 11
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/IpUtils.java
  3. 2
      epmet-module/data-report/data-report-server/deploy/docker-compose-dev.yml
  4. 2
      epmet-module/data-report/data-report-server/deploy/docker-compose-prod.yml
  5. 2
      epmet-module/data-report/data-report-server/deploy/docker-compose-test.yml
  6. 2
      epmet-module/data-report/data-report-server/pom.xml
  7. 2
      epmet-module/data-report/data-report-server/src/main/resources/mapper/project/ProjectDao.xml
  8. 6
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/StatsPublicityController.java
  9. 42
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/StatsPublicityService.java
  10. 23
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsPublicityServiceImpl.java
  11. 14
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/topic/TopicDao.xml
  12. 8
      epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/StatsPublicityTaskService.java
  13. 2
      epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/PublicityTagUsedMonthlyStatsTask.java
  14. 2
      epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/PublicityTagUsedQuarterlyAndYearlyStatsTask.java
  15. 2
      epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/PublicityTagViewedMonthlyStatsTask.java
  16. 2
      epmet-module/epmet-message/epmet-message-server/deploy/docker-compose-dev.yml
  17. 2
      epmet-module/epmet-message/epmet-message-server/deploy/docker-compose-prod.yml
  18. 2
      epmet-module/epmet-message/epmet-message-server/deploy/docker-compose-test.yml
  19. 2
      epmet-module/epmet-message/epmet-message-server/pom.xml
  20. 9
      epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/SysSmsServiceImpl.java
  21. 2
      epmet-module/gov-issue/gov-issue-server/deploy/docker-compose-dev.yml
  22. 2
      epmet-module/gov-issue/gov-issue-server/deploy/docker-compose-prod.yml
  23. 2
      epmet-module/gov-issue/gov-issue-server/deploy/docker-compose-test.yml
  24. 8
      epmet-module/gov-issue/gov-issue-server/pom.xml
  25. 7
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AgencydetailFormDTO.java
  26. 2
      epmet-module/gov-org/gov-org-server/deploy/docker-compose-dev.yml
  27. 2
      epmet-module/gov-org/gov-org-server/deploy/docker-compose-prod.yml
  28. 2
      epmet-module/gov-org/gov-org-server/deploy/docker-compose-test.yml
  29. 2
      epmet-module/gov-org/gov-org-server/pom.xml
  30. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/AgencyController.java
  31. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/DepartmentController.java
  32. 2
      epmet-module/gov-project/gov-project-server/deploy/docker-compose-dev.yml
  33. 2
      epmet-module/gov-project/gov-project-server/deploy/docker-compose-prod.yml
  34. 2
      epmet-module/gov-project/gov-project-server/deploy/docker-compose-test.yml
  35. 8
      epmet-module/gov-project/gov-project-server/pom.xml
  36. 3
      epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml
  37. 2
      epmet-module/gov-voice/gov-voice-server/deploy/docker-compose-dev.yml
  38. 8
      epmet-module/gov-voice/gov-voice-server/pom.xml
  39. 2
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/DraftServiceImpl.java
  40. 2
      epmet-module/oper-crm/oper-crm-server/deploy/docker-compose-dev.yml
  41. 2
      epmet-module/oper-crm/oper-crm-server/deploy/docker-compose-prod.yml
  42. 2
      epmet-module/oper-crm/oper-crm-server/deploy/docker-compose-test.yml
  43. 2
      epmet-module/oper-crm/oper-crm-server/pom.xml
  44. 9
      epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerServiceImpl.java
  45. 14
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/GroupSummarizeResultDTO.java
  46. 13
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/invitation/result/LinkGroupInfoDTO.java
  47. 4
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/invitation/result/LinkGroupInfoResultDTO.java
  48. 2
      epmet-module/resi-group/resi-group-server/deploy/docker-compose-dev.yml
  49. 2
      epmet-module/resi-group/resi-group-server/deploy/docker-compose-prod.yml
  50. 2
      epmet-module/resi-group/resi-group-server/deploy/docker-compose-test.yml
  51. 8
      epmet-module/resi-group/resi-group-server/pom.xml
  52. 43
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java
  53. 34
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/service/impl/GroupInvitationServiceImpl.java
  54. 93
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/ResiGroupMemberServiceImpl.java
  55. 23
      epmet-module/resi-guide/resi-guide-client/src/main/java/com/epmet/dto/result/MarketContactInfoResultDTO.java
  56. 2
      epmet-module/resi-guide/resi-guide-server/deploy/docker-compose-dev.yml
  57. 2
      epmet-module/resi-guide/resi-guide-server/deploy/docker-compose-prod.yml
  58. 2
      epmet-module/resi-guide/resi-guide-server/deploy/docker-compose-test.yml
  59. 2
      epmet-module/resi-guide/resi-guide-server/pom.xml
  60. 17
      epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/controller/StrangerResiGuideController.java
  61. 2
      epmet-module/resi-mine/resi-mine-server/deploy/docker-compose-dev.yml
  62. 2
      epmet-module/resi-mine/resi-mine-server/deploy/docker-compose-prod.yml
  63. 2
      epmet-module/resi-mine/resi-mine-server/deploy/docker-compose-test.yml
  64. 2
      epmet-module/resi-mine/resi-mine-server/pom.xml
  65. 11
      epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/grid/service/impl/ResiMineGridServiceImpl.java
  66. 2
      epmet-openapi/epmet-openapi-scan/deploy/docker-compose-dev.yml
  67. 2
      epmet-openapi/epmet-openapi-scan/deploy/docker-compose-prod.yml
  68. 2
      epmet-openapi/epmet-openapi-scan/deploy/docker-compose-test.yml
  69. 2
      epmet-openapi/epmet-openapi-scan/pom.xml
  70. 4
      epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/common/enu/SuggestionEnum.java
  71. 1
      epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/common/enu/SysResponseEnum.java
  72. 104
      epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/service/impl/ScanServiceImpl.java
  73. 1
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/LatestGridInfoResultDTO.java
  74. 2
      epmet-user/epmet-user-server/deploy/docker-compose-dev.yml
  75. 2
      epmet-user/epmet-user-server/deploy/docker-compose-prod.yml
  76. 2
      epmet-user/epmet-user-server/deploy/docker-compose-test.yml
  77. 2
      epmet-user/epmet-user-server/pom.xml
  78. 14
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/GridLatestServiceImpl.java

4
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java

@ -47,8 +47,8 @@ public enum EpmetErrorCode {
IDCARDNO_ALREADY_EXITS(8109,"系统已存在相同身份证号码,请重新输入"),
IDCARDNO_ERROR(8110,"身份证号格式错误,请重新输入"),
CANNOT_DELETE_PARTY_MEMBER(8111,"该用户已注册党员,不允许删除"),
GROUP_LEADER_CAN_EDIT_GROUP_INFO(8112,"只有组长才可以修改小组信息"),
INVITE_NEW_MEMBER(8113,"只有讨论中的小组才可以邀请新成员"),
CANNOT_AUDIT_WARM(8201, "请完善居民信息"),
NOT_DEL_AGENCY(8202, "该机关存在下级机关,不允许删除"),
NOT_DEL_AGENCY_PER(8205, "该机关存在工作人员,不允许删除"),

11
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/IpUtils.java

@ -34,6 +34,7 @@ public class IpUtils {
String ip = null;
try {
ip = request.getHeader("x-forwarded-for");
logger.debug("x-forwarded-for:"+ip);
if (StringUtils.isEmpty(ip) || "unknown".equalsIgnoreCase(ip)) {
ip = request.getHeader("Proxy-Client-IP");
}
@ -46,9 +47,18 @@ public class IpUtils {
if (StringUtils.isEmpty(ip) || "unknown".equalsIgnoreCase(ip)) {
ip = request.getHeader("HTTP_X_FORWARDED_FOR");
}
if (StringUtils.isEmpty(ip) || "unknown".equalsIgnoreCase(ip)) {
ip = request.getHeader("X-Real-IP");
}
if (StringUtils.isEmpty(ip) || "unknown".equalsIgnoreCase(ip)) {
ip = request.getRemoteAddr();
}
//对于通过多个代理的情况,第一个IP为客户端真实IP,多个IP按照','分割
if (ip != null && ip.length() > 15) { //"***.***.***.***".length() = 15
if (ip.indexOf(",") > 0) {
ip = ip.substring(0, ip.indexOf(","));
}
}
} catch (Exception e) {
logger.error("IpUtils ERROR ", e);
}
@ -58,6 +68,7 @@ public class IpUtils {
/**
* desc:获取本地Ip
*
* @return
*/
public static String getServerIp() {

2
epmet-module/data-report/data-report-server/deploy/docker-compose-dev.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
data-report-server:
container_name: data-report-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/data-report-server:0.3.26
image: 192.168.1.130:10080/epmet-cloud-dev/data-report-server:0.3.27
ports:
- "8109:8109"
network_mode: host # 使用现有网络

2
epmet-module/data-report/data-report-server/deploy/docker-compose-prod.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
data-report-server:
container_name: data-report-server-prod
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/data-report-server:0.3.26
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/data-report-server:0.3.27
ports:
- "8108:8108"
network_mode: host # 使用现有网络

2
epmet-module/data-report/data-report-server/deploy/docker-compose-test.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
data-report-server:
container_name: data-report-server-test
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/data-report-server:0.3.26
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/data-report-server:0.3.27
ports:
- "8108:8108"
network_mode: host # 使用现有网络

2
epmet-module/data-report/data-report-server/pom.xml

@ -3,7 +3,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<version>0.3.26</version>
<version>0.3.27</version>
<artifactId>data-report-server</artifactId>
<parent>

2
epmet-module/data-report/data-report-server/src/main/resources/mapper/project/ProjectDao.xml

@ -113,7 +113,7 @@
)
) a
ORDER BY
a.projectTotal DESC
a.projectTotal DESC, a.type ASC
</select>
<select id="selectSubGrid" resultType="com.epmet.project.dto.result.ProjectSubGridResultDTO">

6
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/StatsPublicityController.java

@ -40,7 +40,7 @@ public class StatsPublicityController {
}
/**
* desc: 统计发表文章最多的分类 包含 机关 部门 网格
* desc: 统计标签被使用次数 包含 机关 部门 网格
*
* @param formDTO 默认为T-1天如果传 则统计的是formDTO的数据
* @return
@ -52,7 +52,7 @@ public class StatsPublicityController {
}
/**
* desc:, 统计发表文章最多的分类 包含 机关 部门 网格
* desc:, 统计标签被使用次数 包含 机关 部门 网格
*
* @param formDTO 默认为T-1天如果传 则统计的是formDTO的数据
* @return
@ -64,7 +64,7 @@ public class StatsPublicityController {
}
/**
* desc: 统计发表文章最多的分类 包含 机关 部门 网格
* desc: 统计标签被使用次数 包含 机关 部门 网格
*
* @param formDTO 默认为T-1天如果传 则统计的是formDTO的数据
* @return

42
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/StatsPublicityService.java

@ -4,74 +4,74 @@ package com.epmet.service;
import com.epmet.dto.StatsFormDTO;
public interface StatsPublicityService {
/**
* desc: 统计宣传能力的汇总信息
*
* @return: Boolean
* @date: 2020/6/17 16:11
* @author: jianjun liu
* @param statsDate
*/
Boolean articleSummaryDailyStatsjob(StatsFormDTO statsDate);
/**
* desc: 统计宣传能力的汇总信息
*
* @param formDTO
* @return: Boolean
* @date: 2020/6/17 16:11
* @author: jianjun liu
*/
Boolean articleSummaryDailyStatsjob(StatsFormDTO formDTO);
/**
* desc: 按日 统计每个标签被引用的使用文章数
*
* @param formDTO
* @return: Boolean
* @date: 2020/6/17 16:11
* @author: jianjun liu
* @param statsDate
*/
Boolean tagUsedDailyStatsjob(StatsFormDTO statsDate);
Boolean tagUsedDailyStatsjob(StatsFormDTO formDTO);
/**
* desc: 按月 统计每个标签被引用的使用文章数
*
* @param
* @param statsDate
* @param formDTO
* @return:
* @date: 2020/6/19 18:44
* @author: jianjun liu
*/
Boolean tagUsedMonthlyStatsjob(StatsFormDTO statsDate);
Boolean tagUsedMonthlyStatsjob(StatsFormDTO formDTO);
/**
* desc: 按季年统计标签被使用次数
*
* @param statsDate
* @param formDTO
* @return:
* @date: 2020/6/20 10:44
* @author: jianjun liu
*/
Boolean tagUsedQuarterlyStatsjob(StatsFormDTO statsDate);
Boolean tagUsedQuarterlyStatsjob(StatsFormDTO formDTO);
/**
* desc: 按日 统计每个标签的阅读数
*
* @param statsDate
* @param formDTO
* @return: Boolean
* @date: 2020/6/20 8:40
* @author: jianjun liu
*/
Boolean tagViewedDailyStatsjob(StatsFormDTO statsDate);
Boolean tagViewedDailyStatsjob(StatsFormDTO formDTO);
/**
* desc: 按月统计标签被查看次数
*
* @param statsDate
* @param formDTO
* @return:
* @date: 2020/6/20 10:44
* @author: jianjun liu
*/
Boolean tagViewedMonthlyStatsjob(StatsFormDTO statsDate);
Boolean tagViewedMonthlyStatsjob(StatsFormDTO formDTO);
/**
* desc: 按季年统计标签被查看次数
*
* @param statsDate
* @param formDTO
* @return:
* @date: 2020/6/20 10:44
* @author: jianjun liu
*/
Boolean tagViewedQuarterlyStatsjob(StatsFormDTO statsDate);
Boolean tagViewedQuarterlyStatsjob(StatsFormDTO formDTO);
}

23
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsPublicityServiceImpl.java

@ -198,6 +198,7 @@ public class StatsPublicityServiceImpl implements StatsPublicityService {
if (null != formDTO && StringUtils.isNotBlank(formDTO.getCustomerId())) {
try {
log.info("tagUsedMonthlyStatsjob execute by customerId:{},dateId:{}", formDTO.getCustomerId(), dimIdBean.getDateId());
statsTagUsedMonthly(dimIdBean.getMonthId(), formDTO.getCustomerId());
} catch (Exception e) {
log.error(String.format(ProjectConstant.STATS_FAILED_PREFIX, "tagUsedMonthlyStatsjob", formDTO.getCustomerId(), dimIdBean.getMonthId()), e);
@ -206,6 +207,7 @@ public class StatsPublicityServiceImpl implements StatsPublicityService {
int pageNo = NumConstant.ONE;
int pageSize = NumConstant.ONE_HUNDRED;
List<String> customerIdList = null;
log.info("tagUsedMonthlyStatsjob execute all customerId,dateId:{}", dimIdBean.getDateId());
do {
customerIdList = dimCustomerService.selectCustomerIdPage(pageNo++, pageSize);
if (!CollectionUtils.isEmpty(customerIdList)) {
@ -228,6 +230,7 @@ public class StatsPublicityServiceImpl implements StatsPublicityService {
DimIdGenerator.DimIdBean dimIdBean = DimIdGenerator.getDimIdBean(statsDate);
if (null != formDTO && StringUtils.isNotBlank(formDTO.getCustomerId())) {
try {
log.info("tagViewedDailyStatsjob execute by customerId:{},dateId:{}", formDTO.getCustomerId(), dimIdBean.getDateId());
statsTagViewedDaily(statsDate, dimIdBean, formDTO.getCustomerId());
} catch (Exception e) {
log.error(String.format(ProjectConstant.STATS_FAILED_PREFIX, "tagViewedDailyStatsjob", formDTO.getCustomerId(), dimIdBean.getMonthId()), e);
@ -236,6 +239,7 @@ public class StatsPublicityServiceImpl implements StatsPublicityService {
int pageNo = NumConstant.ONE;
int pageSize = NumConstant.ONE_HUNDRED;
List<String> customerIdList = null;
log.info("tagViewedDailyStatsjob execute all customerId,dateId:{}", dimIdBean.getDateId());
do {
customerIdList = dimCustomerService.selectCustomerIdPage(pageNo++, pageSize);
if (!CollectionUtils.isEmpty(customerIdList)) {
@ -259,6 +263,7 @@ public class StatsPublicityServiceImpl implements StatsPublicityService {
DimIdGenerator.DimIdBean dimIdBean = DimIdGenerator.getDimIdBean(statsDate);
if (null != formDTO && StringUtils.isNotBlank(formDTO.getCustomerId())) {
try {
log.info("tagViewedMonthlyStatsjob execute by customerId:{},dateId:{}", formDTO.getCustomerId(), dimIdBean.getDateId());
statsTagViewedMonthly(dimIdBean.getMonthId(), formDTO.getCustomerId());
} catch (Exception e) {
log.error(String.format(ProjectConstant.STATS_FAILED_PREFIX, "tagViewedMonthlyStatsjob", formDTO.getCustomerId(), dimIdBean.getDateId()), e);
@ -267,6 +272,7 @@ public class StatsPublicityServiceImpl implements StatsPublicityService {
int pageNo = NumConstant.ONE;
int pageSize = NumConstant.ONE_HUNDRED;
List<String> customerIdList = null;
log.info("tagViewedMonthlyStatsjob execute all customerId,dateId:{}", dimIdBean.getDateId());
do {
customerIdList = dimCustomerService.selectCustomerIdPage(pageNo++, pageSize);
if (!CollectionUtils.isEmpty(customerIdList)) {
@ -289,6 +295,7 @@ public class StatsPublicityServiceImpl implements StatsPublicityService {
DimIdGenerator.DimIdBean dimIdBean = DimIdGenerator.getDimIdBean(statsDate);
if (null != formDTO && StringUtils.isNotBlank(formDTO.getCustomerId())) {
try {
log.info("tagUsedQuarterlyStatsjob execute by customerId:{},dateId:{}", formDTO.getCustomerId(), dimIdBean.getDateId());
try {
log.debug("start === statsTagUsedQuarterly ");
statsTagUsedQuarterly(dimIdBean.getQuarterId(), formDTO.getCustomerId());
@ -305,6 +312,7 @@ public class StatsPublicityServiceImpl implements StatsPublicityService {
log.error(String.format(ProjectConstant.STATS_FAILED_PREFIX, "tagViewedMonthlyStatsjob", formDTO.getCustomerId(), dimIdBean.getDateId()), e);
}
} else {
log.info("tagUsedQuarterlyStatsjob execute all customerId,dateId:{}", dimIdBean.getDateId());
int pageNo = NumConstant.ONE;
int pageSize = NumConstant.ONE_HUNDRED;
List<String> customerIdList = null;
@ -336,6 +344,7 @@ public class StatsPublicityServiceImpl implements StatsPublicityService {
Date statsDate = getStatsDateFromParam(formDTO);
DimIdGenerator.DimIdBean dimIdBean = DimIdGenerator.getDimIdBean(statsDate);
if (null != formDTO && StringUtils.isNotBlank(formDTO.getCustomerId())) {
log.info("tagViewedQuarterlyStatsjob execute by customerId:{},dateId:{}", formDTO.getCustomerId(), dimIdBean.getDateId());
try {
log.debug("start === statsTagViewedQuarterly ");
statsTagViewedQuarterly(dimIdBean.getQuarterId(), formDTO.getCustomerId());
@ -349,6 +358,7 @@ public class StatsPublicityServiceImpl implements StatsPublicityService {
log.error(String.format(ProjectConstant.STATS_FAILED_PREFIX, "statsTagViewedQuarterly", formDTO.getCustomerId(), dimIdBean.getYearId()), e);
}
} else {
log.info("tagViewedQuarterlyStatsjob execute all customerId,dateId:{}", dimIdBean.getDateId());
int pageNo = NumConstant.ONE;
int pageSize = NumConstant.ONE_HUNDRED;
List<String> customerIdList = null;
@ -474,7 +484,6 @@ public class StatsPublicityServiceImpl implements StatsPublicityService {
}
boolean b = factArticlePublishedGridDailyService.deleteAndInsertBatch(customerId, dimIdBean.getDateId(), gridDailyEntityMap.values());
} catch (Exception e) {
e.printStackTrace();
log.error(String.format(ProjectConstant.STATS_FAILED_PREFIX, "statsPublishedGridDaily", customerId, statsDate), e);
}
}
@ -560,14 +569,10 @@ public class StatsPublicityServiceImpl implements StatsPublicityService {
*
* @param statsDate
* @param dimIdBean
* @param customerId
* @param customerId remark:获取当天发布的文章数据然后根据文章标签 进行统计加上默认标签的数量 没有则为0
*/
private void statsTagUsedDaily(Date statsDate, DimIdGenerator.DimIdBean dimIdBean, String customerId) {
//1.业务数据来源 发布时间为统计时间的
// 因为一个客户的发布文章数在同一天不会特别的多,所以以客户为单位查询今天发布的所有带有标签的文章 根据发布单位类型进行拆分
// 1.1查出今天所有的文章标签 根据网格Id
// 1.2
//获取所有网格
List<DimAgencyEntity> agencyDTOList = dimAgencyService.getAgencyListByCustomerId(customerId);
if (CollectionUtils.isEmpty(agencyDTOList)) {
@ -715,14 +720,10 @@ public class StatsPublicityServiceImpl implements StatsPublicityService {
*
* @param statsDate
* @param dimIdBean
* @param customerId
* @param customerId remark:根据统计时间的阅读文章记录然后根据文章Id获取到对应的标签 然后 进行统计
*/
private void statsTagViewedDaily(Date statsDate, DimIdGenerator.DimIdBean dimIdBean, String customerId) {
//1.业务数据来源 发布时间为统计时间的
// 因为一个客户的发布文章数在同一天不会特别的多,所以以客户为单位查询今天发布的所有带有标签的文章 根据发布单位类型进行拆分
// 1.1查出今天所有的文章标签 根据网格Id
// 1.2
//获取所有机关 用于后面想上级添加数据
List<DimAgencyEntity> agencyDTOList = dimAgencyService.getAgencyListByCustomerId(customerId);
if (CollectionUtils.isEmpty(agencyDTOList)) {

14
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/topic/TopicDao.xml

@ -49,6 +49,17 @@
<if test='null != customerId and "" != customerId'>
AND groupp.CUSTOMER_ID = #{customerId}
</if>
<choose>
<when test="null != targetDate">
AND topic.CREATED_TIME <![CDATA[<]]> DATE_SUB( #{targetDate}, INTERVAL - 1 DAY)
AND groupp.CREATED_TIME <![CDATA[<]]> DATE_SUB( #{targetDate}, INTERVAL - 1 DAY)
</when>
<otherwise>
AND topic.CREATED_TIME <![CDATA[<]]> CURDATE( )
AND groupp.CREATED_TIME <![CDATA[<]]> CURDATE( )
</otherwise>
</choose>
ORDER BY groupp.GRID_ID
</select>
@ -98,6 +109,9 @@
<if test='null != customerId and "" != customerId'>
AND groupp.CUSTOMER_ID = #{customerId}
</if>
AND topic.CREATED_TIME <![CDATA[<]]> DATE_SUB( #{endDate}, INTERVAL - 1 DAY)
AND groupp.CREATED_TIME <![CDATA[<]]> DATE_SUB( #{endDate}, INTERVAL - 1 DAY)
ORDER BY groupp.GRID_ID
</select>

8
epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/StatsPublicityTaskService.java

@ -22,7 +22,7 @@ public interface StatsPublicityTaskService {
Result articleSummaryDailyStatsjob(StatsFormDTO formDTO);
/**
* desc: 定时任务 统计文章总数及在线文章总 包含 机关 部门 网格
* desc: 定时任务 统计标签被使用次 包含 机关 部门 网格
*
* @return:
* @date: 2020/6/22 9:09
@ -31,7 +31,7 @@ public interface StatsPublicityTaskService {
Result tagUsedDailyStatsjob(StatsFormDTO formDTO);
/**
* desc: 统计发表文章最多的分类 包含 机关 部门 网格
* desc: 统计标签被使用次数包含 机关 部门 网格
*
* @date: 2020/6/22 9:09
* @author: jianjun liu
@ -39,7 +39,7 @@ public interface StatsPublicityTaskService {
Result tagUsedMonthlyStatsjob(StatsFormDTO formDTO);
/**
* desc: 统计发表文章最多的分类 包含 机关 部门 网格
* desc: 统计标签被使用次数 包含 机关 部门 网格
*
* @date: 2020/6/22 9:09
* @author: jianjun liu
@ -55,7 +55,7 @@ public interface StatsPublicityTaskService {
Result tagViewedDailyStatsjob(StatsFormDTO formDTO);
/**
* desc: 统计阅读最多的标签 包含 机关 网格
* desc: 统计阅读最多的标签 包含 机关 网格
*
* @date: 2020/6/22 9:09
* @author: jianjun liu

2
epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/PublicityTagUsedMonthlyStatsTask.java

@ -11,7 +11,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* desc:标签被使用次数 统计定时任务
* desc:标签被使用次数 统计定时任务
*/
@Component("publicityTagUsedMonthlyStatsTask")
public class PublicityTagUsedMonthlyStatsTask implements ITask {

2
epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/PublicityTagUsedQuarterlyAndYearlyStatsTask.java

@ -11,7 +11,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* desc:标签被使用次数 统计定时任务
* desc:标签被使用次数 统计定时任务
*/
@Component("publicityTagUsedQuarterlyAndYearlyStatsTask")
public class PublicityTagUsedQuarterlyAndYearlyStatsTask implements ITask {

2
epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/PublicityTagViewedMonthlyStatsTask.java

@ -11,7 +11,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* desc:标签被阅读次数 统计定时任务
* desc:标签被阅读次数 统计定时任务
*/
@Component("publicityTagViewedMonthlyStatsTask")
public class PublicityTagViewedMonthlyStatsTask implements ITask {

2
epmet-module/epmet-message/epmet-message-server/deploy/docker-compose-dev.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
epmet-message-server:
container_name: epmet-message-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-message-server:0.3.24
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-message-server:0.3.25
ports:
- "8085:8085"
network_mode: host # 使用现有网络

2
epmet-module/epmet-message/epmet-message-server/deploy/docker-compose-prod.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
epmet-message-server:
container_name: epmet-message-server-prod
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/epmet-message-server:0.3.24
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/epmet-message-server:0.3.25
ports:
- "8085:8085"
network_mode: host # 使用现有网络

2
epmet-module/epmet-message/epmet-message-server/deploy/docker-compose-test.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
epmet-message-server:
container_name: epmet-message-server-test
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/epmet-message-server:0.3.24
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/epmet-message-server:0.3.25
ports:
- "8085:8085"
network_mode: host # 使用现有网络

2
epmet-module/epmet-message/epmet-message-server/pom.xml

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<version>0.3.24</version>
<version>0.3.25</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>epmet-message</artifactId>

9
epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/SysSmsServiceImpl.java

@ -70,16 +70,19 @@ public class SysSmsServiceImpl extends BaseServiceImpl<SysSmsDao, SysSmsEntity>
@Override
public void send(SysSmsDTO sysSmsDTO) {
logger.info(String.format("发送短信接口(/message/sms/send)入参:%s", JSON.toJSONString(sysSmsDTO)));
LinkedHashMap<String, String> map;
try {
map = JSON.parseObject(sysSmsDTO.getParams(), LinkedHashMap.class);
}catch (Exception e){
logger.error(String.format("发送短信异常,ErrorCode:%s,异常%s",ErrorCode.JSON_FORMAT_ERROR,e.getMessage()));
throw new RenException(ErrorCode.JSON_FORMAT_ERROR);
}
//短信服务
AbstractSmsService service = SmsFactory.build();
if(service == null){
logger.error("发送短信异常,ErrorCode:%s,异常AbstractSmsService is null",ModuleErrorCode.SMS_CONFIG);
throw new RenException(ModuleErrorCode.SMS_CONFIG);
}
//发送短信
@ -162,13 +165,15 @@ public class SysSmsServiceImpl extends BaseServiceImpl<SysSmsDao, SysSmsEntity>
sysSmsDTO.setMobile(formDTO.getMobile());
sysSmsDTO.setParams(paramJson);
sysSmsDTO.setAliyunTemplateCode(formDTO.getAliyunTemplateCode());
Result result = epmetMessageOpenFeignClient.send(sysSmsDTO);
this.send(sysSmsDTO);
data.setCode(codeStr);
/*Result result = epmetMessageOpenFeignClient.send(sysSmsDTO);
if (result != null && result.success()) {
data.setCode(codeStr);
} else {
logger.error(String.format("短信验证码发送失败,手机号:%s。code:%d,msg:%s", formDTO.getMobile(), result.getCode(), result.getMsg()));
throw new RenException(EpmetErrorCode.MESSAGE_SMS_SEND_ERROR.getCode());
}
}*/
} catch (Exception e) {
e.printStackTrace();
logger.error(String.format("短信验证码发送失败,手机号:%s。errorMessage:%s", formDTO.getMobile(), e.getMessage()));

2
epmet-module/gov-issue/gov-issue-server/deploy/docker-compose-dev.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
gov-issue-server:
container_name: gov-issue-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/gov-issue-server:0.3.50
image: 192.168.1.130:10080/epmet-cloud-dev/gov-issue-server:0.3.51
ports:
- "8101:8101"
network_mode: host # 使用现有网络

2
epmet-module/gov-issue/gov-issue-server/deploy/docker-compose-prod.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
gov-issue-server:
container_name: gov-issue-server-prod
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/gov-issue-server:0.3.50
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/gov-issue-server:0.3.51
ports:
- "8101:8101"
network_mode: host # 使用现有网络

2
epmet-module/gov-issue/gov-issue-server/deploy/docker-compose-test.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
gov-issue-server:
container_name: gov-issue-server-test
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/gov-issue-server:0.3.50
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/gov-issue-server:0.3.51
ports:
- "8101:8101"
network_mode: host # 使用现有网络

8
epmet-module/gov-issue/gov-issue-server/pom.xml

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<version>0.3.50</version>
<version>0.3.51</version>
<parent>
<artifactId>gov-issue</artifactId>
<groupId>com.epmet</groupId>
@ -147,7 +147,7 @@
<nacos.ip/>
<spring.flyway.enabled>false</spring.flyway.enabled>
<openapi.scan.server.url>https://epmet-dev.elinkservice.cn/epmetscan/api</openapi.scan.server.url>
<openapi.scan.server.url>https://epmet-dev.elinkservice.cn/api/epmetscan/api</openapi.scan.server.url>
<!--测试钉钉 机器人地址-->
<dingTalk.robot.webHook>https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c</dingTalk.robot.webHook>
@ -184,7 +184,7 @@
<nacos.ip/>
<spring.flyway.enabled>true</spring.flyway.enabled>
<openapi.scan.server.url>https://epmet-dev.elinkservice.cn/epmetscan/api</openapi.scan.server.url>
<openapi.scan.server.url>https://epmet-dev.elinkservice.cn/api/epmetscan/api</openapi.scan.server.url>
<!--测试钉钉 机器人地址-->
<dingTalk.robot.webHook>https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c</dingTalk.robot.webHook>
@ -218,7 +218,7 @@
<nacos.ip/>
<spring.flyway.enabled>true</spring.flyway.enabled>
<openapi.scan.server.url>https://epmet-open.elinkservice.cn:7040/epmetscan/api</openapi.scan.server.url>
<openapi.scan.server.url>https://epmet-open.elinkservice.cn/api/epmetscan/api</openapi.scan.server.url>
</properties>
</profile>
</profiles>

7
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AgencydetailFormDTO.java

@ -33,10 +33,15 @@ public class AgencydetailFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 内部错误分组
* */
public interface AddUserInternalGroup{}
/**
* 机关组织Id
*/
@NotBlank(message = "机关组织ID不能为空")
@NotBlank(message = "机关组织ID不能为空" , groups = {AgencydetailFormDTO.AddUserInternalGroup.class})
private String agencyId;

2
epmet-module/gov-org/gov-org-server/deploy/docker-compose-dev.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
gov-org-server:
container_name: gov-org-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/gov-org-server:0.3.72
image: 192.168.1.130:10080/epmet-cloud-dev/gov-org-server:0.3.74
ports:
- "8092:8092"
network_mode: host # 使用现有网络

2
epmet-module/gov-org/gov-org-server/deploy/docker-compose-prod.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
gov-org-server:
container_name: gov-org-server-prod
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/gov-org-server:0.3.72
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/gov-org-server:0.3.74
ports:
- "8092:8092"
network_mode: host # 使用现有网络

2
epmet-module/gov-org/gov-org-server/deploy/docker-compose-test.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
gov-org-server:
container_name: gov-org-server-test
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/gov-org-server:0.3.72
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/gov-org-server:0.3.74
ports:
- "8092:8092"
network_mode: host # 使用现有网络

2
epmet-module/gov-org/gov-org-server/pom.xml

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<version>0.3.72</version>
<version>0.3.74</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>gov-org</artifactId>

2
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/AgencyController.java

@ -132,7 +132,7 @@ public class AgencyController {
@PostMapping("agencydetail")
@RequirePermission(requirePermission = RequirePermissionEnum.ORG_AGENCY_TRACE)
public Result<AgencysResultDTO> agencyDetail(@LoginUser TokenDto tokenDTO, @RequestBody AgencydetailFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO);
ValidatorUtils.validateEntity(formDTO, AgencydetailFormDTO.AddUserInternalGroup.class);
return agencyService.agencyDetail(formDTO);
}

2
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/DepartmentController.java

@ -88,7 +88,7 @@ public class DepartmentController {
* @Description 获取部门详情
*/
@PostMapping("departmentdetail")
@RequirePermission(requirePermission = RequirePermissionEnum.ORG_DEPARTMENT_STAFF_LIST)
@RequirePermission(requirePermission = RequirePermissionEnum.ORG_DEPARTMENT_LIST)
public Result<DepartmentDetailResultDTO> departmentDetail(@LoginUser TokenDto tokenDTO, @RequestBody DepartmentdetailFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO);
return departmentService.departmentDetail(formDTO);

2
epmet-module/gov-project/gov-project-server/deploy/docker-compose-dev.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
gov-project-server:
container_name: gov-project-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/gov-project-server:0.3.36
image: 192.168.1.130:10080/epmet-cloud-dev/gov-project-server:0.3.38
ports:
- "8102:8102"
network_mode: host # 使用现有网络

2
epmet-module/gov-project/gov-project-server/deploy/docker-compose-prod.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
gov-project-server:
container_name: gov-project-server-prod
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/gov-project-server:0.3.36
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/gov-project-server:0.3.38
ports:
- "8102:8102"
network_mode: host # 使用现有网络

2
epmet-module/gov-project/gov-project-server/deploy/docker-compose-test.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
gov-project-server:
container_name: gov-project-server-test
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/gov-project-server:0.3.36
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/gov-project-server:0.3.38
ports:
- "8102:8102"
network_mode: host # 使用现有网络

8
epmet-module/gov-project/gov-project-server/pom.xml

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<version>0.3.36</version>
<version>0.3.38</version>
<parent>
<artifactId>gov-project</artifactId>
<groupId>com.epmet</groupId>
@ -147,7 +147,7 @@
<nacos.ip/>
<spring.flyway.enabled>false</spring.flyway.enabled>
<openapi.scan.server.url>https://epmet-dev.elinkservice.cn/epmetscan/api</openapi.scan.server.url>
<openapi.scan.server.url>https://epmet-dev.elinkservice.cn/api/epmetscan/api</openapi.scan.server.url>
</properties>
</profile>
<profile>
@ -180,7 +180,7 @@
<nacos.ip/>
<spring.flyway.enabled>true</spring.flyway.enabled>
<openapi.scan.server.url>https://epmet-dev.elinkservice.cn/epmetscan/api</openapi.scan.server.url>
<openapi.scan.server.url>https://epmet-dev.elinkservice.cn/api/epmetscan/api</openapi.scan.server.url>
</properties>
</profile>
<profile>
@ -210,7 +210,7 @@
<nacos.ip/>
<spring.flyway.enabled>true</spring.flyway.enabled>
<openapi.scan.server.url>https://epmet-open.elinkservice.cn:7040/epmetscan/api</openapi.scan.server.url>
<openapi.scan.server.url>https://epmet-open.elinkservice.cn/api/epmetscan/api</openapi.scan.server.url>
</properties>
</profile>
</profiles>

3
epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml

@ -88,7 +88,8 @@
FROM
project_staff ps
INNER JOIN project_process pp ON ps.PROCESS_ID = pp.ID AND pp.DEL_FLAG = '0'
AND pp.OPERATION != 'created'
AND (pp.OPERATION != 'created'
OR (pp.OPERATION = 'created' AND pp.STAFF_ID != #{userId}))
WHERE
ps.DEL_FLAG = '0'
AND ps.STAFF_ID = #{userId}

2
epmet-module/gov-voice/gov-voice-server/deploy/docker-compose-dev.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
gov-voice-server:
container_name: gov-voice-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/gov-voice-server:0.3.58
image: 192.168.1.130:10080/epmet-cloud-dev/gov-voice-server:0.3.60
ports:
- "8105:8105"
network_mode: host # 使用现有网络

8
epmet-module/gov-voice/gov-voice-server/pom.xml

@ -3,7 +3,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<version>0.3.58</version>
<version>0.3.60</version>
<parent>
<artifactId>gov-voice</artifactId>
<groupId>com.epmet</groupId>
@ -134,7 +134,7 @@
<nacos.ip/>
<spring.flyway.enabled>false</spring.flyway.enabled>
<openapi.scan.server.url>https://epmet-dev.elinkservice.cn/epmetscan/api</openapi.scan.server.url>
<openapi.scan.server.url>https://epmet-dev.elinkservice.cn/api/epmetscan/api</openapi.scan.server.url>
</properties>
</profile>
<profile>
@ -167,7 +167,7 @@
<nacos.ip/>
<spring.flyway.enabled>true</spring.flyway.enabled>
<openapi.scan.server.url>https://epmet-dev.elinkservice.cn/epmetscan/api</openapi.scan.server.url>
<openapi.scan.server.url>https://epmet-dev.elinkservice.cn/api/epmetscan/api</openapi.scan.server.url>
</properties>
</profile>
<profile>
@ -197,7 +197,7 @@
<nacos.ip/>
<spring.flyway.enabled>true</spring.flyway.enabled>
<openapi.scan.server.url>https://epmet-open.elinkservice.cn:7040/epmetscan/api</openapi.scan.server.url>
<openapi.scan.server.url>https://epmet-open.elinkservice.cn/api/epmetscan/api</openapi.scan.server.url>
</properties>
</profile>
</profiles>

2
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/DraftServiceImpl.java

@ -150,7 +150,7 @@ public class DraftServiceImpl extends BaseServiceImpl<DraftDao, DraftEntity> imp
draftAttrResultDTO.setTagNameList(new String[0]);
}
} else {
logger.error(String.format("查询草稿属性失败,草稿id=%s", formDTO.getDraftId()));
logger.warn(String.format("查询草稿属性为空,草稿id=%s", formDTO.getDraftId()));
}
return draftAttrResultDTO;
}

2
epmet-module/oper-crm/oper-crm-server/deploy/docker-compose-dev.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
oper-crm-server:
container_name: oper-crm-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/oper-crm-server:0.3.24
image: 192.168.1.130:10080/epmet-cloud-dev/oper-crm-server:0.3.25
ports:
- "8090:8090"
network_mode: host # 使用现有网络

2
epmet-module/oper-crm/oper-crm-server/deploy/docker-compose-prod.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
oper-crm-server:
container_name: oper-crm-server-prod
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/oper-crm-server:0.3.24
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/oper-crm-server:0.3.25
ports:
- "8090:8090"
network_mode: host # 使用现有网络

2
epmet-module/oper-crm/oper-crm-server/deploy/docker-compose-test.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
oper-crm-server:
container_name: oper-crm-server-test
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/oper-crm-server:0.3.24
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/oper-crm-server:0.3.25
ports:
- "8090:8090"
network_mode: host # 使用现有网络

2
epmet-module/oper-crm/oper-crm-server/pom.xml

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<version>0.3.24</version>
<version>0.3.25</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>oper-crm</artifactId>

9
epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerServiceImpl.java

@ -17,6 +17,7 @@
package com.epmet.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;
@ -42,7 +43,6 @@ import com.epmet.feign.OperCustomizeFeignClient;
import com.epmet.redis.CustomerRedis;
import com.epmet.service.CustomerService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -257,20 +257,24 @@ public class CustomerServiceImpl extends BaseServiceImpl<CustomerDao, CustomerEn
customerRoleForm.setRoleKey(RoleKeyConstants.ROLE_KEY_MANAGER);
Result<GovStaffRoleDTO> getRoleResult = epmetUserFeignClient.getRoleOfCustomer(customerRoleForm);
if (!getRoleResult.success()) {
log.error("查询客户具有指定RoleKey的角色信息失败:".concat(getRoleResult.toString()));
throw new RenException("查询客户具有指定RoleKey的角色信息失败:".concat(getRoleResult.toString()));
}
if (getRoleResult.getData() == null) {
log.error("未查询到客户具有指定RoleKey的角色信息:".concat(getRoleResult.toString()));
throw new RenException("未查询到客户具有指定RoleKey的角色信息:".concat(getRoleResult.toString()));
}
// 查询客户根级组织
Result<CustomerAgencyDTO> customerRootAgencyResult = govOrgFeignClient.getCustomerRootAgency(form.getCustomerId());
if (!customerRootAgencyResult.success()) {
log.error("查询客户根级组织失败:".concat(getRoleResult.toString()));
throw new RenException("查询客户根级组织失败:".concat(getRoleResult.toString()));
}
if (customerRootAgencyResult.getData() == null) {
log.error("新增客户管理员失败,没有查询到客户根级组织,无法设置管理员:".concat(getRoleResult.toString()));
throw new RenException("没有查询到客户根级组织,无法设置管理员:".concat(getRoleResult.toString()));
}
@ -284,7 +288,8 @@ public class CustomerServiceImpl extends BaseServiceImpl<CustomerDao, CustomerEn
staffSubmitFrom.setRoles(Arrays.asList(getRoleResult.getData().getId()));
Result result = govOrgFeignClient.addStaff(staffSubmitFrom);
if (!result.success()) {
throw new RenException(EpmetErrorCode.OPER_ADD_CUSTOMER_MANAGER_ERROR.getCode());
log.error(String.format("新增客户管理员失败,调用gov-org-server服务异常%s", JSON.toJSONString(result)));
throw new RenException(EpmetErrorCode.OPER_ADD_CUSTOMER_MANAGER_ERROR.getCode(),result.getMsg());
}
}

14
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/GroupSummarizeResultDTO.java

@ -1,5 +1,6 @@
package com.epmet.resi.group.dto.group.result;
import com.epmet.commons.tools.constant.NumConstant;
import lombok.Data;
import java.io.Serializable;
@ -63,4 +64,17 @@ public class GroupSummarizeResultDTO implements Serializable {
* 当前用户对应的群主标识leader,member成员
*/
private String leaderFlag;
public GroupSummarizeResultDTO(){
this.setGroupId("");
this.setGroupHeadPhoto("");
this.setLeaderName("");
this.setGroupName("");
this.setGroupIntroduction("");
this.setTotalMember(NumConstant.ZERO);
this.setTotalPartyMember(NumConstant.ZERO);
this.setTotalApplyingMember(NumConstant.ZERO);
this.setTotalTopics(NumConstant.ZERO);
this.setLeaderFlag("");
}
}

13
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/invitation/result/LinkGroupInfoDTO.java

@ -1,5 +1,6 @@
package com.epmet.resi.group.dto.invitation.result;
import com.epmet.commons.tools.constant.NumConstant;
import lombok.Data;
import java.io.Serializable;
@ -58,4 +59,16 @@ public class LinkGroupInfoDTO implements Serializable {
* 党员总数
*/
private Integer totalPartyMember;
public LinkGroupInfoDTO(){
this.setGridId("");
this.setGroupId("");
this.setCustomerId("");
this.setGroupHeadPhoto("");
this.setLeaderName("");
this.setGroupName("");
this.setGroupIntroduction("");
this.setTotalMember(NumConstant.ZERO);
this.setTotalPartyMember(NumConstant.ZERO);
}
}

4
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/invitation/result/LinkGroupInfoResultDTO.java

@ -1,5 +1,6 @@
package com.epmet.resi.group.dto.invitation.result;
import com.epmet.commons.tools.constant.Constant;
import lombok.Data;
import java.io.Serializable;
@ -23,4 +24,7 @@ public class LinkGroupInfoResultDTO implements Serializable {
*/
private LinkGroupInfoDTO groupInfo;
public LinkGroupInfoResultDTO(){
this.setInGroup(Constant.NO);
}
}

2
epmet-module/resi-group/resi-group-server/deploy/docker-compose-dev.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
resi-group-server:
container_name: resi-group-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/resi-group-server:0.3.58
image: 192.168.1.130:10080/epmet-cloud-dev/resi-group-server:0.3.61
ports:
- "8095:8095"
network_mode: host # 使用现有网络

2
epmet-module/resi-group/resi-group-server/deploy/docker-compose-prod.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
resi-group-server:
container_name: resi-group-server-prod
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/resi-group-server:0.3.58
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/resi-group-server:0.3.61
ports:
- "8095:8095"
network_mode: host # 使用现有网络

2
epmet-module/resi-group/resi-group-server/deploy/docker-compose-test.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
resi-group-server:
container_name: resi-group-server-test
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/resi-group-server:0.3.58
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/resi-group-server:0.3.61
ports:
- "8095:8095"
network_mode: host # 使用现有网络

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

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<version>0.3.58</version>
<version>0.3.61</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>resi-group</artifactId>
@ -150,7 +150,7 @@
<nacos.ip/>
<spring.flyway.enabled>false</spring.flyway.enabled>
<openapi.scan.server.url>https://epmet-dev.elinkservice.cn/epmetscan/api</openapi.scan.server.url>
<openapi.scan.server.url>https://epmet-dev.elinkservice.cn/api/epmetscan/api</openapi.scan.server.url>
</properties>
</profile>
<profile>
@ -182,7 +182,7 @@
<nacos.config-enabled>false</nacos.config-enabled>
<nacos.ip/>
<spring.flyway.enabled>true</spring.flyway.enabled>
<openapi.scan.server.url>https://epmet-dev.elinkservice.cn/epmetscan/api</openapi.scan.server.url>
<openapi.scan.server.url>https://epmet-dev.elinkservice.cn/api/epmetscan/api</openapi.scan.server.url>
</properties>
</profile>
<profile>
@ -211,7 +211,7 @@
<nacos.config-enabled>false</nacos.config-enabled>
<nacos.ip/>
<spring.flyway.enabled>true</spring.flyway.enabled>
<openapi.scan.server.url>https://epmet-open.elinkservice.cn:7040/epmetscan/api</openapi.scan.server.url>
<openapi.scan.server.url>https://epmet-open.elinkservice.cn/api/epmetscan/api</openapi.scan.server.url>
</properties>
</profile>
</profiles>

43
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java

@ -185,6 +185,10 @@ public class ResiGroupServiceImpl extends BaseServiceImpl<ResiGroupDao, ResiGrou
int pageIndex = (myGroupFormDTO.getPageNo() - NumConstant.ONE) * myGroupFormDTO.getPageSize();
myGroupFormDTO.setPageNo(pageIndex);
List<MyGroupResultDTO> myGroupList = baseDao.selectListMyGroup(myGroupFormDTO);
if (null == myGroupList || myGroupList.size() < 1) {
logger.info(String.format("我的小组查询为空,selectListMyGroup入参%s", JSON.toJSONString(myGroupFormDTO)));
return new ArrayList<>();
}
return myGroupList;
}
@ -201,6 +205,10 @@ public class ResiGroupServiceImpl extends BaseServiceImpl<ResiGroupDao, ResiGrou
recommendGroupFormDTO.setPageNo(pageIndex);
//显示当前网格内所有当前用户还未加入的组,以组的人数由高到低排序;如果人数相同,以最新话题的时间有近到远排序
List<RecommendGroupResultDTO> recommendGroupList = baseDao.selectListRecommendGroup(recommendGroupFormDTO);
if (null == recommendGroupList || recommendGroupList.size() == 0) {
logger.info(String.format("推荐小组查询为空,selectListRecommendGroup入参%s", JSON.toJSONString(recommendGroupFormDTO)));
return new ArrayList<>();
}
for (RecommendGroupResultDTO recommendGroupResultDTO : recommendGroupList) {
GroupMemeberOperationDTO groupMemeberOperationDTO = groupMemeberOperationService.selectLatestRecord(recommendGroupResultDTO.getGroupId(),
recommendGroupFormDTO.getUserId());
@ -223,6 +231,10 @@ public class ResiGroupServiceImpl extends BaseServiceImpl<ResiGroupDao, ResiGrou
int pageIndex = (createdFormDTO.getPageNo() - NumConstant.ONE) * createdFormDTO.getPageSize();
createdFormDTO.setPageNo(pageIndex);
List<CreatedResultDTO> createdResultDTOList = baseDao.selectListMyCreated(createdFormDTO);
if (null == createdResultDTOList || createdResultDTOList.size() == 0) {
logger.info(String.format("我创建的小组查询为空,selectListMyCreated入参%s", JSON.toJSONString(createdFormDTO)));
return new ArrayList<>();
}
return createdResultDTOList;
}
@ -239,8 +251,8 @@ public class ResiGroupServiceImpl extends BaseServiceImpl<ResiGroupDao, ResiGrou
//校验是否是群主
ResiGroupMemberDTO groupMemberDTO = resiGroupMemberService.getResiGroupMember(modifyGroupFormDTO.getGroupId(), modifyGroupFormDTO.getUserId());
if (null == groupMemberDTO || ModuleConstant.GROUP_MEMBER.equals(groupMemberDTO.getGroupLeaderFlag())) {
logger.error(String.format("修改组信息:%s",ModuleConstant.REJECT_MODIFYGROUPINFO));
throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode());
logger.info(String.format("修改组信息异常:%s",EpmetErrorCode.GROUP_LEADER_CAN_EDIT_GROUP_INFO.getMsg()));
throw new RenException(EpmetErrorCode.GROUP_LEADER_CAN_EDIT_GROUP_INFO.getCode());
}
if (StringUtils.isBlank(modifyGroupFormDTO.getGroupHeadPhoto())
&& StringUtils.isBlank(modifyGroupFormDTO.getGroupName())
@ -250,9 +262,10 @@ public class ResiGroupServiceImpl extends BaseServiceImpl<ResiGroupDao, ResiGrou
}
int updatedRows = baseDao.modifyGroupInfo(modifyGroupFormDTO);
if (1 == updatedRows) {
logger.info(ModuleConstant.UPDATE_FAILED);
logger.info("修改小组信息成功");
}else{
logger.error(String.format("修改小组信息失败,updatedRows=%s",updatedRows));
}
logger.error(ModuleConstant.UPDATE_FAILED);
}
/**
@ -266,7 +279,7 @@ public class ResiGroupServiceImpl extends BaseServiceImpl<ResiGroupDao, ResiGrou
public GroupSummarizeResultDTO getGroupSummarize(GroupSummarizeFormDTO groupSummarizeFormDTO) {
GroupSummarizeResultDTO groupSummarizeResultDTO = baseDao.selectGroupSummarize(groupSummarizeFormDTO);
if (null == groupSummarizeResultDTO) {
logger.error(String.format("查看小组管理界面信息异常%s",ModuleConstant.GETGROUPSUMMARIZE_FAILED));
logger.warn(String.format("查看小组管理界面信息异常,userId=%s,groupId=%s",groupSummarizeFormDTO.getUserId(),groupSummarizeFormDTO.getGroupId()));
return new GroupSummarizeResultDTO();
}
//获取组长信息
@ -274,7 +287,8 @@ public class ResiGroupServiceImpl extends BaseServiceImpl<ResiGroupDao, ResiGrou
if (groupLeaderUserInfo.success() && null != groupLeaderUserInfo.getData()) {
groupSummarizeResultDTO.setLeaderName(groupLeaderUserInfo.getData().getShowName());
} else {
logger.warn("组长注册信息查询失败" + groupLeaderUserInfo.getMsg());
logger.warn(String.format("查看小组管理界面信息错误,获取组长注册信息失败,接口返参%s",JSON.toJSONString(groupLeaderUserInfo)));
groupSummarizeResultDTO.setLeaderName("");
}
return groupSummarizeResultDTO;
}
@ -315,19 +329,16 @@ public class ResiGroupServiceImpl extends BaseServiceImpl<ResiGroupDao, ResiGrou
//1、校验是否同名
List<ResiGroupEntity> resiGroupEntityList = this.getResiGroupEntityList(applyCreateGroupFormDTO);
if (null != resiGroupEntityList && resiGroupEntityList.size() > 0) {
logger.error(String.format("创建小组异常:%s",EpmetErrorCode.GROUP_ALREADY_EXISTED.getMsg()));
logger.info(String.format("创建小组异常:%s",EpmetErrorCode.GROUP_ALREADY_EXISTED.getMsg()));
throw new RenException(EpmetErrorCode.GROUP_ALREADY_EXISTED.getCode());
}
//2、插入一条待审核的组信息
ResiGroupEntity resiGroupEntity = this.structureResiGroupEntity(applyCreateGroupFormDTO);
insert(resiGroupEntity);
//3.1、查询当前申请人的身份,生成对应格式的消息内容
//2.1、查询当前申请人的身份,生成对应格式的消息内容
UserRoleDTO userRoleDTO = this.checkPartyMemberOrWarmHeated(applyCreateGroupFormDTO.getApp(),
applyCreateGroupFormDTO.getUserId(),
applyCreateGroupFormDTO.getCustomerId(),
applyCreateGroupFormDTO.getGridId());
if (!NumConstant.ONE_STR.equals(userRoleDTO.getPartymemberFlag()) && !NumConstant.ONE_STR.equals(userRoleDTO.getWarmHeartedFlag())) {
logger.error(String.format("创建小组异常:%s",EpmetErrorCode.CANNOT_CREATE_GROUP.getMsg()));
logger.info(String.format("创建小组异常:%s",EpmetErrorCode.CANNOT_CREATE_GROUP.getMsg()));
throw new RenException(EpmetErrorCode.CANNOT_CREATE_GROUP.getCode());
}
String roleName = "";
@ -336,6 +347,10 @@ public class ResiGroupServiceImpl extends BaseServiceImpl<ResiGroupDao, ResiGrou
}else if(NumConstant.ONE_STR.equals(userRoleDTO.getWarmHeartedFlag())){
roleName = ModuleConstant.WAREMHEARTED_RESI;
}
//2.2、插入一条待审核的组信息
ResiGroupEntity resiGroupEntity = this.structureResiGroupEntity(applyCreateGroupFormDTO);
insert(resiGroupEntity);
//3.获取居民注册信息
UserResiInfoFormDTO resiParam = new UserResiInfoFormDTO();
resiParam.setCustomerId(applyCreateGroupFormDTO.getCustomerId());
resiParam.setUserId(applyCreateGroupFormDTO.getUserId());
@ -435,7 +450,7 @@ public class ResiGroupServiceImpl extends BaseServiceImpl<ResiGroupDao, ResiGrou
resiUserInfoFormDTO.setCustomerId(initApplyGroupFormDTO.getCustomerId());
Result<UserResiInfoResultDTO> result = epmetUserFeignClient.getUserResiInfoDTO(resiUserInfoFormDTO);
if (!result.success() || null == result.getData() || StringUtils.isBlank(result.getData().getRegMobile())) {
logger.error("加入小组界面初始化,居民注册信息查询失败");
logger.info(String.format("加入小组界面初始化查询成功,当前用户非注册居民,epmet-user-server接口入参%s,返回%s",JSON.toJSONString(resiUserInfoFormDTO),JSON.toJSONString(result)));
throw new RenException(EpmetErrorCode.CANNOT_JOIN_GROUP.getCode());
}
}
@ -466,7 +481,7 @@ public class ResiGroupServiceImpl extends BaseServiceImpl<ResiGroupDao, ResiGrou
initApplyCreatedGroupFormDTO.getCustomerId(),
initApplyCreatedGroupFormDTO.getGridId());
if (!NumConstant.ONE_STR.equals(userRoleDTO.getPartymemberFlag()) && !NumConstant.ONE_STR.equals(userRoleDTO.getWarmHeartedFlag())) {
logger.error(String.format("创建小组界面初始化,用户非党员、非热心居民,请求参数%S",initApplyCreatedGroupFormDTO.toString()));
logger.info(String.format("创建小组界面初始化查询成功,用户角色列表%s",JSON.toJSONString(userRoleDTO)));
throw new RenException(EpmetErrorCode.CANNOT_CREATE_GROUP.getCode());
}
}

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

@ -17,6 +17,7 @@
package com.epmet.modules.invitation.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;
@ -47,7 +48,6 @@ import com.epmet.modules.invitation.service.GroupInvitationService;
import com.epmet.modules.member.dao.ResiGroupMemberDao;
import com.epmet.modules.member.service.GroupMemeberOperationService;
import com.epmet.modules.member.service.ResiGroupMemberService;
import com.epmet.modules.utils.ModuleConstant;
import com.epmet.resi.group.constant.EnterGroupTypeConstant;
import com.epmet.resi.group.constant.GroupStateConstant;
import com.epmet.resi.group.constant.LeaderFlagConstant;
@ -171,8 +171,8 @@ public class GroupInvitationServiceImpl extends BaseServiceImpl<GroupInvitationD
//2、审核通过(讨论中)的群才可以分享邀请连接
ResiGroupDTO resiGroupDTO = resiGroupService.get(formDTO.getGroupId());
if (!GroupStateConstant.GROUP_APPROVED.equals(resiGroupDTO.getState())) {
logger.error(ModuleConstant.CANNOT_SHARED);
throw new RenException(ModuleConstant.CANNOT_SHARED);
logger.error(String.format("生成群成员链接失败,原因:%s",EpmetErrorCode.INVITE_NEW_MEMBER.getMsg()));
throw new RenException(EpmetErrorCode.INVITE_NEW_MEMBER.getCode());
}
//3、插入一条邀请记录
GroupInvitationEntity groupInvitationEntity = new GroupInvitationEntity();
@ -199,6 +199,7 @@ public class GroupInvitationServiceImpl extends BaseServiceImpl<GroupInvitationD
**/
@Override
public LinkGroupInfoResultDTO getLinkGroupInfo(LinkGroupInfoFormDTO formDTO) {
logger.info(String.format("用户(userId=%s)点击群邀请链接(invitationId=%)",formDTO.getUserId(),formDTO.getInvitationId()));
//0、校验是否存在该邀请连接(判断是会否被删除连接、是否失效、群状态)
GroupInvitationDTO groupInvitationDTO=this.checkLinkValid(formDTO.getInvitationId());
LinkGroupInfoResultDTO linkGroupInfoResultDTO = new LinkGroupInfoResultDTO();
@ -211,14 +212,23 @@ public class GroupInvitationServiceImpl extends BaseServiceImpl<GroupInvitationD
}
//2、查询组信息
LinkGroupInfoDTO groupInfo = baseDao.selectLinkGroupInfo(groupInvitationDTO.getResiGroupId());
//3、获取组长信息
Result<UserResiInfoResultDTO> groupLeaderUserInfo = this.getGroupLeaderUserInfo(groupInfo.getGroupId());
if (groupLeaderUserInfo.success() && null != groupLeaderUserInfo.getData()) {
groupInfo.setLeaderName(groupLeaderUserInfo.getData().getShowName());
} else {
logger.error(String.format("居民端用户【%s】根据链接【%s】查看群邀请信息调用%s服务,获取组长信息异常,错误码:%s,错误提示:%s",formDTO.getUserId(),formDTO.getInvitationId(), ServiceConstant.EPMET_USER_SERVER,groupLeaderUserInfo.getCode(), groupLeaderUserInfo.getMsg()));
if(null!=groupInfo){
linkGroupInfoResultDTO.setGroupInfo(groupInfo);
//3、获取组长信息
Result<UserResiInfoResultDTO> groupLeaderUserInfo = this.getGroupLeaderUserInfo(groupInfo.getGroupId());
if (groupLeaderUserInfo.success() && null != groupLeaderUserInfo.getData()) {
groupInfo.setLeaderName(groupLeaderUserInfo.getData().getShowName());
} else {
logger.error(String.format("居民端用户【%s】根据链接【%s】查看群邀请信息调用epmet-user-server服务,获取组长信息异常,返参%s",
formDTO.getUserId(),
formDTO.getInvitationId(),
JSON.toJSONString(groupLeaderUserInfo)));
groupInfo.setLeaderName("");
}
}else{
logger.error(String.format("根据群邀请连接查询群基本信息异常,groupInfo is null,selectLinkGroupInfo入参groupId=%s",groupInvitationDTO.getResiGroupId()));
linkGroupInfoResultDTO.setGroupInfo(new LinkGroupInfoDTO());
}
linkGroupInfoResultDTO.setGroupInfo(groupInfo);
//4、记录用户邀请关系
this.saveUserInvitation(groupInvitationDTO,formDTO);
return linkGroupInfoResultDTO;
@ -244,7 +254,7 @@ public class GroupInvitationServiceImpl extends BaseServiceImpl<GroupInvitationD
if (!result.success()) {
logger.error("人员邀请关系记录失败" + result.getMsg());
} else {
logger.error("人员邀请关系记录成功");
logger.info(String.format("人员邀请关系记录成功%s", JSON.toJSONString(userInvitationFormDTO)));
}
return result;
}
@ -260,10 +270,12 @@ public class GroupInvitationServiceImpl extends BaseServiceImpl<GroupInvitationD
//群主名称需要调用feign查询
ResiGroupEntity resiGroupEntity = resiGroupDao.selectById(groupId);
if (null == resiGroupEntity) {
logger.error(String.format("查询小组信息为空,groupId=%s",groupId));
return new Result<>();
}
ResiGroupMemberDTO groupMemberDTO = resiGroupDao.selectGroupLeader(groupId);
if (null == groupMemberDTO) {
logger.error("查询小组组长信息为空,selectGroupLeader入参groupId=%s",groupId);
return new Result<>();
}
UserResiInfoFormDTO resiUserInfoFormDTO = new UserResiInfoFormDTO();

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

@ -218,11 +218,11 @@ public class ResiGroupMemberServiceImpl extends BaseServiceImpl<ResiGroupMemberD
GroupMemeberOperationDTO groupMember = baseDao.selectGroupMemberOperationLatest(applyJoinGroupFormDTO.getUserId(),applyJoinGroupFormDTO.getGroupId());
if(null!=groupMember&&MemberStateConstant.UNDER_AUDITTING.equals(groupMember.getOperateStatus())){
logger.error(String.format("居民端用户【%s】申请加入小组【%s】失败,错误提示:%s",applyJoinGroupFormDTO.getUserId(),applyJoinGroupFormDTO.getGroupId(),ModuleConstant.ALREADY_APPLIED_GROUP));
throw new RenException(ModuleConstant.ALREADY_APPLIED_GROUP);
return;
}
if(null!=groupMember&&MemberStateConstant.APPROVED.equals(groupMember.getOperateStatus())){
logger.error(String.format("居民端用户【%s】申请加入小组【%s】失败,错误提示:%s",applyJoinGroupFormDTO.getUserId(),applyJoinGroupFormDTO.getGroupId(),ModuleConstant.ALREADY_IN_GROUP));
throw new RenException(ModuleConstant.ALREADY_IN_GROUP);
return;
}
//插入一条待审核的记录
GroupMemeberOperationDTO groupMemeberOperation = new GroupMemeberOperationDTO();
@ -287,27 +287,33 @@ public class ResiGroupMemberServiceImpl extends BaseServiceImpl<ResiGroupMemberD
int pageIndex = (groupMemberListFormDTO.getPageNo() - NumConstant.ONE) * groupMemberListFormDTO.getPageSize();
groupMemberListFormDTO.setPageNo(pageIndex);
List<GroupMemberListResultDTO> list = baseDao.selectListGroupMember(groupMemberListFormDTO);
if (null != list && list.size() > 0) {
List<String> userIdList=new ArrayList<>();
for (GroupMemberListResultDTO groupMemberListResultDTO : list) {
userIdList.add(groupMemberListResultDTO.getUserId());
}
UserResiInfoListFormDTO formDTO=new UserResiInfoListFormDTO();
formDTO.setUserIdList(userIdList);
Result<List<UserResiInfoResultDTO>> userResiInfoDTOListResult=epmetUserFeignClient.getUserResiInfoList(formDTO);
if(userResiInfoDTOListResult.success()){
for(UserResiInfoResultDTO userResiInfo:userResiInfoDTOListResult.getData()){
for (GroupMemberListResultDTO groupMember : list) {
if(groupMember.getUserId().equals(userResiInfo.getUserId())){
groupMember.setUserShowName(userResiInfo.getShowName());
groupMember.setHeadPhoto(userResiInfo.getHeadPhoto());
break;
}
if (null == list || list.size() == 0) {
logger.error(String.format("群成员列表查询列表为空,selectListGroupMember入参%s",JSON.toJSONString(groupMemberListFormDTO)));
return new ArrayList<>();
}
List<String> userIdList=new ArrayList<>();
for (GroupMemberListResultDTO groupMemberListResultDTO : list) {
userIdList.add(groupMemberListResultDTO.getUserId());
}
UserResiInfoListFormDTO formDTO=new UserResiInfoListFormDTO();
formDTO.setUserIdList(userIdList);
Result<List<UserResiInfoResultDTO>> userResiInfoDTOListResult=epmetUserFeignClient.getUserResiInfoList(formDTO);
if(userResiInfoDTOListResult.success()){
for(UserResiInfoResultDTO userResiInfo:userResiInfoDTOListResult.getData()){
for (GroupMemberListResultDTO groupMember : list) {
if(groupMember.getUserId().equals(userResiInfo.getUserId())){
groupMember.setUserShowName(userResiInfo.getShowName());
groupMember.setHeadPhoto(userResiInfo.getHeadPhoto());
break;
}
}
}else{
logger.error(String.format("居民端用户【%s】查看群成员列表调用%s服务,获取用户头像显示昵称失败,错误码%s,错误提示%s", groupMemberListFormDTO.getUserId(), ServiceConstant.EPMET_USER_SERVER, userResiInfoDTOListResult.getCode(), userResiInfoDTOListResult.getMsg()));
}
}else{
logger.warn(String.format("居民端用户【%s】查看群成员列表调用%s服务,获取用户头像显示昵称失败,错误码%s,错误提示%s",
groupMemberListFormDTO.getUserId(),
ServiceConstant.EPMET_USER_SERVER,
userResiInfoDTOListResult.getCode(),
userResiInfoDTOListResult.getMsg()));
}
return list;
}
@ -324,28 +330,29 @@ public class ResiGroupMemberServiceImpl extends BaseServiceImpl<ResiGroupMemberD
int pageIndex = (applyingMemberFormDTO.getPageNo() - NumConstant.ONE) * applyingMemberFormDTO.getPageSize();
applyingMemberFormDTO.setPageNo(pageIndex);
List<ApplyingMemberResultDTO> list = baseDao.selectListApplyingMember(applyingMemberFormDTO);
if (null != list && list.size() > 0) {
List<String> userIdList=new ArrayList<>();
for (ApplyingMemberResultDTO applyingMemberResultDTO : list) {
userIdList.add(applyingMemberResultDTO.getApplyUserId());
}
UserResiInfoListFormDTO formDTO=new UserResiInfoListFormDTO();
formDTO.setUserIdList(userIdList);
Result<List<UserResiInfoResultDTO>> userResiInfoDTOListResult=epmetUserFeignClient.getUserResiInfoList(formDTO);
if(userResiInfoDTOListResult.success()){
for (ApplyingMemberResultDTO memberInfo : list) {
for(UserResiInfoResultDTO userResiInfo:userResiInfoDTOListResult.getData()){
if(memberInfo.getApplyUserId().equals(userResiInfo.getUserId())){
memberInfo.setApplyUserName(userResiInfo.getShowName());
memberInfo.setApplyUserHeadPhoto(userResiInfo.getHeadPhoto());
break;
}
if (null == list || list.size() == 0) {
logger.info(String.format("查看入群待审核列表返回为空,selectListApplyingMember入参%s",JSON.toJSONString(applyingMemberFormDTO)));
return new ArrayList<>();
}
List<String> userIdList=new ArrayList<>();
for (ApplyingMemberResultDTO applyingMemberResultDTO : list) {
userIdList.add(applyingMemberResultDTO.getApplyUserId());
}
UserResiInfoListFormDTO formDTO=new UserResiInfoListFormDTO();
formDTO.setUserIdList(userIdList);
Result<List<UserResiInfoResultDTO>> userResiInfoDTOListResult=epmetUserFeignClient.getUserResiInfoList(formDTO);
if(userResiInfoDTOListResult.success()){
for (ApplyingMemberResultDTO memberInfo : list) {
for(UserResiInfoResultDTO userResiInfo:userResiInfoDTOListResult.getData()){
if(memberInfo.getApplyUserId().equals(userResiInfo.getUserId())){
memberInfo.setApplyUserName(userResiInfo.getShowName());
memberInfo.setApplyUserHeadPhoto(userResiInfo.getHeadPhoto());
break;
}
}
}else{
logger.error(String.format("居民端组长【%s】查看入群待审核列表调用%s服务,获取用户头像显示昵称失败,错误码%s,错误提示%s",applyingMemberFormDTO.getUserId(), ServiceConstant.EPMET_USER_SERVER, userResiInfoDTOListResult.getCode(), userResiInfoDTOListResult.getMsg()));
}
}else{
logger.warn(String.format("居民端组长【%s】查看入群待审核列表调用%s服务,获取用户头像显示昵称失败,错误码%s,错误提示%s",applyingMemberFormDTO.getUserId(), ServiceConstant.EPMET_USER_SERVER, userResiInfoDTOListResult.getCode(), userResiInfoDTOListResult.getMsg()));
}
return list;
}
@ -363,13 +370,13 @@ public class ResiGroupMemberServiceImpl extends BaseServiceImpl<ResiGroupMemberD
//1、当前申请单是否是待审核
if (null == groupMemeberOperationDTO || !MemberStateConstant.UNDER_AUDITTING.equals(groupMemeberOperationDTO.getOperateStatus())) {
logger.error(String.format("居民端组长【%s】同意用户入群申请applyId【%s】失败,错误提示:%s",agreeApplyFormDTO.getUserId(),agreeApplyFormDTO.getApplyId(),ModuleConstant.APPLY_NOEXISTS));
throw new RenException(ModuleConstant.APPLY_NOEXISTS);
return;
}
//2、只有群主才可以审批入群申请
ResiGroupMemberDTO leaderMember = baseDao.selectGroupMemberInfo(groupMemeberOperationDTO.getGroupId(), agreeApplyFormDTO.getUserId());
if (!LeaderFlagConstant.GROUP_LEADER.equals(leaderMember.getGroupLeaderFlag())) {
logger.error(String.format("居民端组长【%s】同意用户入群申请applyId【%s】失败,错误提示:%s",agreeApplyFormDTO.getUserId(),agreeApplyFormDTO.getApplyId(),ModuleConstant.CANNOT_AUDIT_APPLY));
throw new RenException(ModuleConstant.CANNOT_AUDIT_APPLY);
return;
}
//3、修改操作状态
groupMemeberOperationDTO.setOperateStatus(MemberStateConstant.APPROVED);
@ -460,13 +467,13 @@ public class ResiGroupMemberServiceImpl extends BaseServiceImpl<ResiGroupMemberD
//1、当前申请单是否是待审核
if (null == groupMemeberOperationDTO || !MemberStateConstant.UNDER_AUDITTING.equals(groupMemeberOperationDTO.getOperateStatus())) {
logger.error(String.format("居民端组长【%s】拒绝用户入群申请applyId【%s】失败,错误提示:%s",disagreeApplyFormDTO.getUserId(),disagreeApplyFormDTO.getApplyId(),ModuleConstant.APPLY_NOEXISTS));
throw new RenException(ModuleConstant.APPLY_NOEXISTS);
return;
}
//2、只有群主才可以审批入群申请
ResiGroupMemberDTO leaderMember = baseDao.selectGroupMemberInfo(groupMemeberOperationDTO.getGroupId(), disagreeApplyFormDTO.getUserId());
if (!LeaderFlagConstant.GROUP_LEADER.equals(leaderMember.getGroupLeaderFlag())) {
logger.error(String.format("居民端组长【%s】拒绝用户入群申请applyId【%s】失败,错误提示:%s",disagreeApplyFormDTO.getUserId(),disagreeApplyFormDTO.getApplyId(),ModuleConstant.CANNOT_AUDIT_APPLY));
throw new RenException(ModuleConstant.CANNOT_AUDIT_APPLY);
return;
}
//3、修改操作状态
groupMemeberOperationDTO.setOperateStatus(MemberStateConstant.REJECTED);

23
epmet-module/resi-guide/resi-guide-client/src/main/java/com/epmet/dto/result/MarketContactInfoResultDTO.java

@ -0,0 +1,23 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* @author zhaoqifeng
* @dscription
* @date 2020/7/6 14:06
*/
@Data
public class MarketContactInfoResultDTO implements Serializable {
private static final long serialVersionUID = -2735824905956943035L;
/**
* 手机号
*/
private String phone;
/**
* 二维码图片连接
*/
private String qrUrl;
}

2
epmet-module/resi-guide/resi-guide-server/deploy/docker-compose-dev.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
resi-guide-server:
container_name: resi-guide-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/resi-guide-server:0.3.16
image: 192.168.1.130:10080/epmet-cloud-dev/resi-guide-server:0.3.17
ports:
- "8091:8091"
network_mode: host # 使用现有网络

2
epmet-module/resi-guide/resi-guide-server/deploy/docker-compose-prod.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
resi-guide-server:
container_name: resi-guide-server-prod
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/resi-guide-server:0.3.16
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/resi-guide-server:0.3.17
ports:
- "8091:8091"
network_mode: host # 使用现有网络

2
epmet-module/resi-guide/resi-guide-server/deploy/docker-compose-test.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
resi-guide-server:
container_name: resi-guide-server-test
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/resi-guide-server:0.3.16
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/resi-guide-server:0.3.17
ports:
- "8091:8091"
network_mode: host # 使用现有网络

2
epmet-module/resi-guide/resi-guide-server/pom.xml

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<version>0.3.16</version>
<version>0.3.17</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>resi-guide</artifactId>

17
epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/controller/StrangerResiGuideController.java

@ -25,6 +25,7 @@ import com.epmet.dto.form.CustomerGridListFormDTO;
import com.epmet.dto.form.StrangerFormDTO;
import com.epmet.dto.result.CustomerGridForStrangerResultDTO;
import com.epmet.dto.result.HomeDesignByCustomerResultDTO;
import com.epmet.dto.result.MarketContactInfoResultDTO;
import com.epmet.service.StrangerAccessRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
@ -91,4 +92,20 @@ public class StrangerResiGuideController {
return strangerAccessRecordService.listCustomerGrid(customerGridListFormDTO);
}
/**
* 获取市场联系方式
*
* @param
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.result.MarketContactInfoResultDTO>
* @author zhaoqifeng
* @date 2020/7/6 14:11
*/
@PostMapping("marketcontactinfo")
public Result<MarketContactInfoResultDTO> marketContactInfo() {
MarketContactInfoResultDTO dto = new MarketContactInfoResultDTO();
dto.setPhone("13853211795");
dto.setQrUrl("");
return new Result<MarketContactInfoResultDTO>().ok(dto);
}
}

2
epmet-module/resi-mine/resi-mine-server/deploy/docker-compose-dev.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
resi-mine-server:
container_name: resi-mine-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/resi-mine-server:0.3.26
image: 192.168.1.130:10080/epmet-cloud-dev/resi-mine-server:0.3.29
ports:
- "8094:8094"
network_mode: host # 使用现有网络

2
epmet-module/resi-mine/resi-mine-server/deploy/docker-compose-prod.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
resi-mine-server:
container_name: resi-mine-server-prod
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/resi-mine-server:0.3.26
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/resi-mine-server:0.3.28
ports:
- "8094:8094"
network_mode: host # 使用现有网络

2
epmet-module/resi-mine/resi-mine-server/deploy/docker-compose-test.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
resi-mine-server:
container_name: resi-mine-server-test
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/resi-mine-server:0.3.26
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/resi-mine-server:0.3.28
ports:
- "8094:8094"
network_mode: host # 使用现有网络

2
epmet-module/resi-mine/resi-mine-server/pom.xml

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<version>0.3.26</version>
<version>0.3.29</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>resi-mine</artifactId>

11
epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/grid/service/impl/ResiMineGridServiceImpl.java

@ -1,8 +1,8 @@
package com.epmet.modules.grid.service.impl;
import com.alibaba.fastjson.JSON;
import com.epmet.commons.tools.constant.AppClientConstant;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
@ -44,19 +44,20 @@ public class ResiMineGridServiceImpl implements ResiMineGridService {
@Override
public LatestGridInfoResultDTO getLatestGridInfo(TokenDto tokenDto) {
if (null == tokenDto || StringUtils.isBlank(tokenDto.getUserId())) {
logger.error(String.format("居民端【%s】获取用户最近访问的网格失败:错误提示:%s",tokenDto.getUserId(),ModuleConstant.USER_NOT_NULL));
logger.error(String.format("居民端获取用户最近访问的网格失败:tokenDto is null or userId is null"));
throw new RenException(ModuleConstant.USER_NOT_NULL);
}
if(!AppClientConstant.APP_RESI.equals(tokenDto.getApp())){
logger.error(String.format("居民端【%s】获取用户最近访问的网格失败,错误提示:%s",tokenDto.getUserId(),ModuleConstant.FOR_RESI_CALL));
logger.error(String.format("居民端获取用户最近访问的网格失败,userId:%s,错误提示:%s",tokenDto.getUserId(),ModuleConstant.FOR_RESI_CALL));
throw new RenException(ModuleConstant.FOR_RESI_CALL);
}
logger.info(String.format("居民端获取用户最近访问网格入参%s", JSON.toJSONString(tokenDto)));
Result<LatestGridInfoResultDTO> userResult=epmetUserFeignClient.getLatestGridInfoByUserId(tokenDto.getUserId());
if(userResult.success()&&null!=userResult.getData()){
return userResult.getData();
}
logger.error(String.format("居民端用户【%s】获取用户最近访问网格失败,调用%s服务入参userId:%s,错误码:%s,错误提示:%s", tokenDto.getUserId(),ServiceConstant.EPMET_USER_SERVER,tokenDto.getUserId(),userResult.getCode(),userResult.getMsg()));
return null;
logger.warn(String.format("居民端获取用户最近访问网格失败,调用epmet-user-server服务返回%s",JSON.toJSONString(userResult)));
return null ;
}
/**

2
epmet-openapi/epmet-openapi-scan/deploy/docker-compose-dev.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
epmet-openapi-scan:
container_name: epmet-openapi-scan-dev
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-openapi-scan:0.3.14
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-openapi-scan:0.3.16
ports:
- "8107:8107"
network_mode: host # 不会创建新的网络

2
epmet-openapi/epmet-openapi-scan/deploy/docker-compose-prod.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
epmet-openapi-scan:
container_name: epmet-openapi-scan-prod
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/epmet-openapi-scan:0.3.14
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/epmet-openapi-scan:0.3.16
ports:
- "8107:8107"
network_mode: host # 不会创建新的网络

2
epmet-openapi/epmet-openapi-scan/deploy/docker-compose-test.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
epmet-openapi-scan:
container_name: epmet-openapi-scan-test
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/epmet-openapi-scan:0.3.14
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/epmet-openapi-scan:0.3.16
ports:
- "8107:8107"
network_mode: host # 不会创建新的网络

2
epmet-openapi/epmet-openapi-scan/pom.xml

@ -4,7 +4,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<version>0.3.14</version>
<version>0.3.16</version>
<artifactId>epmet-openapi-scan</artifactId>
<packaging>jar</packaging>

4
epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/common/enu/SuggestionEnum.java

@ -4,14 +4,14 @@ import java.util.ArrayList;
import java.util.List;
/**
* desc:文本检测建议
* desc:检测建议
* @author jianjun liu
* @date 2020-06-04 21:39
**/
public enum SuggestionEnum {
PASS("pass", "正常"),
REVIEW("review", "需要人工审核"),
BLOCK("block", "文本违规");
BLOCK("block", "内容违规");
private String code;
private String desc;

1
epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/common/enu/SysResponseEnum.java

@ -2,7 +2,6 @@ package com.epmet.openapi.scan.common.enu;
/**
* @author jianjun liu
* @email liujianjun@yunzongnet.com
* @date 2020-06-04 21:39
**/
public enum SysResponseEnum {

104
epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/service/impl/ScanServiceImpl.java

@ -4,8 +4,6 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.aliyuncs.AcsRequest;
import com.aliyuncs.exceptions.ClientException;
import com.aliyuncs.exceptions.ServerException;
import com.aliyuncs.green.model.v20180509.ImageAsyncScanRequest;
import com.aliyuncs.green.model.v20180509.ImageSyncScanRequest;
import com.aliyuncs.green.model.v20180509.TextScanRequest;
@ -162,7 +160,7 @@ public class ScanServiceImpl implements ScanService {
imageAsyncScanRequest.setReadTimeout(6000);
try {
ImgAsyncScanResult scanResult = executeAsyncImg(imageAsyncScanRequest);
ImgAsyncScanResult scanResult = null;//executeAsyncImg(imageAsyncScanRequest);
return new Result<ImgAsyncScanResult>().ok(scanResult);
} catch (Exception e) {
log.error("sendImgScan execute Exception", e);
@ -177,98 +175,52 @@ public class ScanServiceImpl implements ScanService {
if (httpResponse.isSuccess()) {
JSONObject scrResponse = JSON.parseObject(new String(httpResponse.getHttpContent(), SysConstant.UTF8));
//System.out.println(JSON.toJSONString(scrResponse, true));
if (HttpStatus.SC_OK == scrResponse.getInteger(SysConstant.CODE)) {
//任务 列表
List<ScanTaskResult> scanTaskResults = scrResponse.getJSONArray(SysConstant.DATA).toJavaList(ScanTaskResult.class);
for (ScanTaskResult taskResult : scanTaskResults) {
result.getDetails().add(taskResult);
//又根据场景不同
if (HttpStatus.SC_OK == taskResult.getCode()) {
//如果是多个场景 则为对个 BaseScanResult
List<SceneDetailResult> sceneResults = taskResult.getResults();
//是文本检测 目前就一种场景
boolean isSuccess = true;
for (SceneDetailResult sceneResult : sceneResults) {
String suggestion = sceneResult.getSuggestion();
if (SuggestionEnum.PASS.getCode().equals(suggestion)) {
isSuccess = false;
break;
}
}
if (isSuccess){
if (HttpStatus.SC_OK != taskResult.getCode()) {
if (!result.getFailDataIds().contains(taskResult.getDataId())) {
result.getFailDataIds().add(taskResult.getDataId());
} else {
result.getSuccessDataIds().add(taskResult.getDataId());
log.warn("executeSyncText task process fail:code:{},result:{}", taskResult.getCode(), JSON.toJSONString(taskResult));
}
continue;
}
//如果是多个场景 则为对个 BaseScanResult
List<SceneDetailResult> sceneResults = taskResult.getResults();
//是文本检测 目前就一种场景
boolean isSuccess = true;
for (SceneDetailResult sceneResult : sceneResults) {
String suggestion = sceneResult.getSuggestion();
if (SuggestionEnum.BLOCK.getCode().equals(suggestion)) {
isSuccess = false;
break;
}
}
if (isSuccess) {
result.getSuccessDataIds().add(taskResult.getDataId());
} else {
log.warn("executeSyncText dataId:{} block:{}", taskResult.getDataId(), JSON.toJSONString(taskResult.getResults()));
result.getFailDataIds().add(taskResult.getDataId());
log.warn("executeSyncText task process fail:code:{},msg:{}", taskResult.getCode(), taskResult.getMsg());
throw new ExeCuteHttpException(" executeSyncTexttask process fail:code:" + taskResult.getCode() + ",msg:" + taskResult.getMsg());
}
}
return result;
} else {
log.warn("executeSyncText response not success. code:{}", scrResponse.getInteger(SysConstant.CODE));
throw new ExeCuteHttpException("executeSyncText detect not success. code:" + scrResponse.getInteger(SysConstant.CODE));
}
} else {
log.warn("executeSyncText response not success. status:" + httpResponse.getStatus());
log.warn("executeSyncText response not success. status:{}", httpResponse.getStatus());
throw new ExeCuteHttpException("response not success. status:" + httpResponse.getStatus());
}
} catch (Exception e) {
log.warn("executeSyncImg exception", e);
log.warn("executeSyncText exception", e);
throw new ExeCuteHttpException(SysResponseEnum.EXCEPTION.getCode(), SysResponseEnum.EXCEPTION.getMsg());
}
}
/**
* desc:异步 检查图片 TODO 结果处理
*
* @param request
* @return
*/
private ImgAsyncScanResult executeAsyncImg(AcsRequest<?> request) {
ImgAsyncScanResult result = new ImgAsyncScanResult();
try {
HttpResponse httpResponse = IAcsClientUtil.getIAcsClient().doAction(request);
if (httpResponse.isSuccess()) {
JSONObject scrResponse = JSON.parseObject(new String(httpResponse.getHttpContent(), SysConstant.UTF8));
//System.out.println(JSON.toJSONString(scrResponse, true));
if (HttpStatus.SC_OK == scrResponse.getInteger(SysConstant.CODE)) {
JSONArray taskResults = scrResponse.getJSONArray(SysConstant.DATA);
for (Object taskResult : taskResults) {
if (HttpStatus.SC_OK == ((JSONObject) taskResult).getInteger(SysConstant.CODE)) {
String taskId = ((JSONObject) taskResult).getString("taskId");
// 将taskId 保存下来,间隔一段时间来轮询结果, 参照ImageAsyncScanResultsRequest
result.getSuccessTaskIds().add(taskId);
} else {
String taskId = ((JSONObject) taskResult).getString("taskId");
result.getFailTaskIds().add(taskId);
log.warn("task process fail:{}", ((JSONObject) taskResult).getInteger(SysConstant.CODE));
continue;
}
}
return result;
} else {
System.out.println("detect not success. code:" + scrResponse.getInteger(SysConstant.CODE));
throw new ExeCuteHttpException("detect not success. code:" + scrResponse.getInteger(SysConstant.CODE));
}
} else {
System.out.println("response not success. status:" + httpResponse.getStatus());
throw new ExeCuteHttpException("response not success. status:" + httpResponse.getStatus());
}
} catch (ServerException e) {
e.printStackTrace();
} catch (ClientException e) {
e.printStackTrace();
} catch (Exception e) {
e.printStackTrace();
}
return result;
}
private SyncScanResult executeSyncImg(AcsRequest<?> request) {
SyncScanResult result = new SyncScanResult();
try {
@ -283,6 +235,7 @@ public class ScanServiceImpl implements ScanService {
if (HttpStatus.SC_OK != taskResult.getCode()) {
if (!result.getFailDataIds().contains(taskResult.getDataId())) {
result.getFailDataIds().add(taskResult.getDataId());
log.warn("executeSyncImg detect not success. code:{},result:{}", taskResult.getCode(), JSON.toJSONString(taskResult));
}
continue;
}
@ -297,19 +250,20 @@ public class ScanServiceImpl implements ScanService {
break;
}
}
if (isSuccess){
if (isSuccess) {
result.getSuccessDataIds().add(taskResult.getDataId());
}else{
} else {
log.warn("executeSyncImg dataId:{} block:{}", taskResult.getDataId(), JSON.toJSONString(taskResult.getResults()));
result.getFailDataIds().add(taskResult.getDataId());
}
}
return result;
} else {
log.warn("executeSyncImg detect not success. code:", scrResponse.getInteger(SysConstant.CODE));
log.warn("executeSyncImg detect not success. code:{}", scrResponse.getInteger(SysConstant.CODE));
throw new ExeCuteHttpException("detect not success. code:" + scrResponse.getInteger(SysConstant.CODE));
}
} else {
log.warn("executeSyncImg response not success. status:" + httpResponse.getStatus());
log.warn("executeSyncImg response not success. status:{}", httpResponse.getStatus());
throw new ExeCuteHttpException("response not success. status:" + httpResponse.getStatus());
}
} catch (Exception e) {

1
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/LatestGridInfoResultDTO.java

@ -22,4 +22,5 @@ public class LatestGridInfoResultDTO implements Serializable {
* 用户最后一次访问的网格
*/
private String gridId;
}

2
epmet-user/epmet-user-server/deploy/docker-compose-dev.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
epmet-user-server:
container_name: epmet-user-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-user-server:0.3.73
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-user-server:0.3.75
ports:
- "8087:8087"
network_mode: host # 不会创建新的网络

2
epmet-user/epmet-user-server/deploy/docker-compose-prod.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
epmet-user-server:
container_name: epmet-user-server-prod
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/epmet-user-server:0.3.73
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/epmet-user-server:0.3.75
ports:
- "8087:8087"
network_mode: host # 不会创建新的网络

2
epmet-user/epmet-user-server/deploy/docker-compose-test.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
epmet-user-server:
container_name: epmet-user-server-test
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/epmet-user-server:0.3.73
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/epmet-user-server:0.3.75
ports:
- "8087:8087"
network_mode: host # 不会创建新的网络

2
epmet-user/epmet-user-server/pom.xml

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<version>0.3.73</version>
<version>0.3.75</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>epmet-user</artifactId>

14
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/GridLatestServiceImpl.java

@ -22,11 +22,9 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.constant.GridVisitedConstant;
import com.epmet.dao.GridLatestDao;
import com.epmet.dto.CustomerGridDTO;
import com.epmet.dto.GridLatestDTO;
@ -149,14 +147,10 @@ public class GridLatestServiceImpl extends BaseServiceImpl<GridLatestDao, GridLa
**/
@Override
public Result<LatestGridInfoResultDTO> getLatestGridInfoByUserId(String userId) {
if(StringUtils.isBlank(userId)){
logger.error(GridVisitedConstant.USER_ID_NOTNULL);
throw new RenException(GridVisitedConstant.USER_ID_NOTNULL);
}
LatestGridInfoResultDTO latestGridInfoResultDTO = baseDao.selectLatestGridInfoByUserId(userId);
if (null == latestGridInfoResultDTO) {
return new Result<>();
}
LatestGridInfoResultDTO latestGridInfoResultDTO= baseDao.selectLatestGridInfoByUserId(userId);
/*if (null == latestGridInfoResultDTO) {
return new Result<LatestGridInfoResultDTO>().ok(new LatestGridInfoResultDTO());
}*/
return new Result<LatestGridInfoResultDTO>().ok(latestGridInfoResultDTO);
}

Loading…
Cancel
Save