Browse Source

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

dev_shibei_match
wangchao 5 years ago
parent
commit
f5cd01843f
  1. 2
      epmet-auth/deploy/docker-compose-dev.yml
  2. 2
      epmet-auth/pom.xml
  3. 21
      epmet-auth/src/main/java/com/epmet/service/impl/PublicUserLoginServiceImpl.java
  4. 3
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ConvertUtils.java
  5. 2
      epmet-gateway/deploy/docker-compose-dev.yml
  6. 2
      epmet-gateway/pom.xml
  7. 17
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/AuditingUserDetailResultDTO.java
  8. 16
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/UserHistoricalActResultDTO.java
  9. 2
      epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-dev.yml
  10. 2
      epmet-module/epmet-heart/epmet-heart-server/pom.xml
  11. 4
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiActListController.java
  12. 8
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/ActSummaryDao.java
  13. 4
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/ActSummaryService.java
  14. 4
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActSummaryServiceImpl.java
  15. 16
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActUserRelationServiceImpl.java
  16. 2
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/HeartUserInfoServiceImpl.java
  17. 22
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActUserServiceImpl.java
  18. 31
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml
  19. 2
      epmet-module/epmet-point/epmet-point-server/deploy/docker-compose-dev.yml
  20. 2
      epmet-module/epmet-point/epmet-point-server/pom.xml
  21. 5
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/CodeCustomerDTO.java
  22. 4
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/UploadListFormDTO.java
  23. 6
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/result/CustomerUserResultDTO.java
  24. 6
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/result/InitCustomerResultDTO.java
  25. 2
      epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-dev.yml
  26. 2
      epmet-module/epmet-third/epmet-third-server/pom.xml
  27. 9
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/AppLetAuthorizationController.java
  28. 7
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/BusinessInfoDao.java
  29. 4
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/CodeCustomerDao.java
  30. 7
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/MiniCategoryInfoDao.java
  31. 7
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/MiniInfoDao.java
  32. 7
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/MiniNetworkInfoDao.java
  33. 5
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/CodeCustomerEntity.java
  34. 2
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/AppLetAuthorizationService.java
  35. 2
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/CodeCustomerService.java
  36. 6
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/AppLetAuthorizationServiceImpl.java
  37. 4
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeCustomerServiceImpl.java
  38. 3
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeServiceImpl.java
  39. 7
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ComponentVerifyTicketServiceImpl.java
  40. 2
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/PaCustomerServiceImpl.java
  41. 2
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/constant/WxMaCodeConstant.java
  42. 3
      epmet-module/epmet-third/epmet-third-server/src/main/resources/db/migration/V0.0.3__thirdUpdate.sql
  43. 11
      epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/BusinessInfoDao.xml
  44. 3
      epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/CodeCustomerDao.xml
  45. 2
      epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/CustomerMpDao.xml
  46. 11
      epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/MiniCategoryInfoDao.xml
  47. 13
      epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/MiniInfoDao.xml
  48. 11
      epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/MiniNetworkInfoDao.xml
  49. 2
      epmet-module/oper-crm/oper-crm-server/deploy/docker-compose-dev.yml
  50. 2
      epmet-module/oper-crm/oper-crm-server/pom.xml
  51. 11
      epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerServiceImpl.java
  52. 2
      epmet-module/resi-mine/resi-mine-server/deploy/docker-compose-dev.yml
  53. 2
      epmet-module/resi-mine/resi-mine-server/pom.xml

2
epmet-auth/deploy/docker-compose-dev.yml

@ -2,7 +2,7 @@ version: "3.7"
services: services:
epmet-auth-server: epmet-auth-server:
container_name: epmet-auth-server-dev container_name: epmet-auth-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-auth:0.3.59 image: 192.168.1.130:10080/epmet-cloud-dev/epmet-auth:0.3.62
ports: ports:
- "8081:8081" - "8081:8081"
network_mode: host # 使用现有网络 network_mode: host # 使用现有网络

2
epmet-auth/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" <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"> 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> <modelVersion>4.0.0</modelVersion>
<version>0.3.59</version> <version>0.3.62</version>
<parent> <parent>
<groupId>com.epmet</groupId> <groupId>com.epmet</groupId>
<artifactId>epmet-cloud</artifactId> <artifactId>epmet-cloud</artifactId>

21
epmet-auth/src/main/java/com/epmet/service/impl/PublicUserLoginServiceImpl.java

@ -171,13 +171,14 @@ public class PublicUserLoginServiceImpl implements PublicUserLoginService {
} }
Object RegisterResult = result.getData(); Object RegisterResult = result.getData();
JSONObject jsonObject = JSON.parseObject(RegisterResult.toString()); JSONObject jsonObject = JSON.parseObject(RegisterResult.toString());
CustomerUserResultDTO resultDTO = ConvertUtils.mapToEntity(jsonObject, CustomerUserResultDTO.class); Map<String,Object> map = (Map)jsonObject.get("paUserResult");
PaUserDTO userDTO = ConvertUtils.mapToEntity(map, PaUserDTO.class);
//登陆 //登陆
if (formDTO.getIsLogon() && null == resultDTO.getPaUserResult()) { if (formDTO.getIsLogon() && null == userDTO) {
throw new RenException(EpmetErrorCode.PUBLIC_NOT_EXISTS.getCode()); throw new RenException(EpmetErrorCode.PUBLIC_NOT_EXISTS.getCode());
} }
//注册 //注册
if (!formDTO.getIsLogon() && null != resultDTO.getPaUserResult()) { if (!formDTO.getIsLogon() && null != userDTO) {
throw new RenException(EpmetErrorCode.MOBILE_USED.getCode()); throw new RenException(EpmetErrorCode.MOBILE_USED.getCode());
} }
//3、发送短信验证码 //3、发送短信验证码
@ -216,10 +217,12 @@ public class PublicUserLoginServiceImpl implements PublicUserLoginService {
} }
Object RegisterResult = result.getData(); Object RegisterResult = result.getData();
JSONObject jsonObject = JSON.parseObject(RegisterResult.toString()); JSONObject jsonObject = JSON.parseObject(RegisterResult.toString());
CustomerUserResultDTO resultDTO = ConvertUtils.mapToEntity(jsonObject, CustomerUserResultDTO.class);
//2.用户不存在时不允许登陆 //2.用户不存在时不允许登陆
PaUserDTO userDTO = resultDTO.getPaUserResult(); Map<String,Object> map1 = (Map)jsonObject.get("paUserResult");
PaUserDTO userDTO = ConvertUtils.mapToEntity(map1, PaUserDTO.class);
logger.info("map1的值:"+map1);
logger.info("userDTO的值:"+userDTO);
if (null == userDTO || StringUtils.isBlank(userDTO.getId())) { if (null == userDTO || StringUtils.isBlank(userDTO.getId())) {
throw new RenException(EpmetErrorCode.PUBLIC_NOT_EXISTS.getCode()); throw new RenException(EpmetErrorCode.PUBLIC_NOT_EXISTS.getCode());
} }
@ -236,13 +239,17 @@ public class PublicUserLoginServiceImpl implements PublicUserLoginService {
//4-1.生成token //4-1.生成token
String token = this.generateGovWxmpToken(userDTO.getId()); String token = this.generateGovWxmpToken(userDTO.getId());
//4-2.判断是否存在信息,给customerId赋值 //4-2.判断是否存在信息,给customerId赋值
PaCustomerDTO customerDTO = resultDTO.getPaCustomerResult(); Map<String,Object> map2 = (Map)jsonObject.get("paCustomerResult");
logger.info("map2的值:"+map2);
PaCustomerDTO customerDTO = ConvertUtils.mapToEntity(map2, PaCustomerDTO.class);
String customerId = ""; String customerId = "";
if (null != customerDTO && !StringUtils.isBlank(customerDTO.getId())) { if (null != customerDTO && !StringUtils.isBlank(customerDTO.getId())) {
customerId = customerDTO.getId(); customerId = customerDTO.getId();
} }
//4-3.token存入redis //4-3.token存入redis
PaUserWechatDTO wechatDTO = resultDTO.getPaUserWechatResult(); Map<String,Object> map3 = (Map)jsonObject.get("paUserWechatResult");
logger.info("map3的值:"+map3);
PaUserWechatDTO wechatDTO = ConvertUtils.mapToEntity(map3, PaUserWechatDTO.class);
String openid = wechatDTO.getWxOpenId(); String openid = wechatDTO.getWxOpenId();
String unionId = (null == wechatDTO.getUnionId() ? "" : wechatDTO.getUnionId()); String unionId = (null == wechatDTO.getUnionId() ? "" : wechatDTO.getUnionId());
this.saveLatestGovTokenDto(customerId, userDTO.getId(), openid, unionId, token); this.saveLatestGovTokenDto(customerId, userDTO.getId(), openid, unionId, token);

3
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ConvertUtils.java

@ -62,6 +62,9 @@ public class ConvertUtils {
} }
public static <T> T mapToEntity(Map<String, Object> map, Class<T> entity) { public static <T> T mapToEntity(Map<String, Object> map, Class<T> entity) {
if (null == map){
return null;
}
T t = null; T t = null;
try { try {
t = entity.newInstance(); t = entity.newInstance();

2
epmet-gateway/deploy/docker-compose-dev.yml

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

2
epmet-gateway/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" <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"> 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> <modelVersion>4.0.0</modelVersion>
<version>0.3.28</version> <version>0.3.29</version>
<parent> <parent>
<groupId>com.epmet</groupId> <groupId>com.epmet</groupId>
<artifactId>epmet-cloud</artifactId> <artifactId>epmet-cloud</artifactId>

17
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/AuditingUserDetailResultDTO.java

@ -1,6 +1,7 @@
package com.epmet.dto.result.work; package com.epmet.dto.result.work;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
@ -65,22 +66,6 @@ public class AuditingUserDetailResultDTO implements Serializable {
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date signUpTime; private Date signUpTime;
/**
* 返回文本已拒绝5次
*/
private String refusedCountDesc;
/**
* 最近一次拒绝原因
*/
private String latestRefusedReason;
/**
* 最近一次拒绝的时间yyyy-MM-dd HH:mm:ss
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date latestAuditTime;
/** /**
* 历史活动情况 * 历史活动情况
*/ */

16
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/UserHistoricalActResultDTO.java

@ -1,12 +1,15 @@
package com.epmet.dto.result.work; package com.epmet.dto.result.work;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
* 描述一下 * 报名审核-人员历史活动情况 返参DTO
* *
* @author yinzuomei@elink-cn.com * @author yinzuomei@elink-cn.com
* @date 2020/7/23 16:15 * @date 2020/7/23 16:15
@ -51,4 +54,15 @@ public class UserHistoricalActResultDTO implements Serializable {
*历史活动列表 *历史活动列表
*/ */
private List<UserHistoricalActInfoDTO> actInfoList; private List<UserHistoricalActInfoDTO> actInfoList;
public UserHistoricalActResultDTO() {
userId = StrConstant.EPMETY_STR;
headImgUrl = StrConstant.EPMETY_STR;
nickName = StrConstant.EPMETY_STR;
realName = StrConstant.EPMETY_STR;
signInActNum = NumConstant.ZERO;
signUpActNum = NumConstant.ZERO;
obtainPointsActNum = NumConstant.ZERO;
actInfoList = new ArrayList<>();
}
} }

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

@ -2,7 +2,7 @@ version: "3.7"
services: services:
epmet-heart-server: epmet-heart-server:
container_name: epmet-heart-server-dev container_name: epmet-heart-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-heart-server:0.0.18 image: 192.168.1.130:10080/epmet-cloud-dev/epmet-heart-server:0.0.23
ports: ports:
- "8111:8111" - "8111:8111"
network_mode: host # 使用现有网络 network_mode: host # 使用现有网络

2
epmet-module/epmet-heart/epmet-heart-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" <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"> 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> <modelVersion>4.0.0</modelVersion>
<version>0.0.18</version> <version>0.0.23</version>
<parent> <parent>
<groupId>com.epmet</groupId> <groupId>com.epmet</groupId>
<artifactId>epmet-heart</artifactId> <artifactId>epmet-heart</artifactId>

4
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiActListController.java

@ -192,12 +192,12 @@ public class ResiActListController {
* 活动详情-已结束-回顾稿 * 活动详情-已结束-回顾稿
* *
* @param formDto * @param formDto
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.result.resi.ResiActSummaryResultDTO> * @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.dto.result.resi.ResiActSummaryResultDTO>>
* @Author zhangyong * @Author zhangyong
* @Date 13:39 2020-07-21 * @Date 13:39 2020-07-21
**/ **/
@PostMapping("summary/list") @PostMapping("summary/list")
public Result<ResiActSummaryResultDTO> summaryList(@RequestBody ResiActContentFormDTO formDto) { public Result<List<ResiActSummaryResultDTO>> summaryList(@RequestBody ResiActContentFormDTO formDto) {
ValidatorUtils.validateEntity(formDto, ResiActContentFormDTO.AddUserInternalGroup.class); ValidatorUtils.validateEntity(formDto, ResiActContentFormDTO.AddUserInternalGroup.class);
return actSummaryService.summaryList(formDto); return actSummaryService.summaryList(formDto);
} }

8
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/ActSummaryDao.java

@ -23,6 +23,8 @@ import com.epmet.dto.result.resi.ResiActSummaryResultDTO;
import com.epmet.entity.ActSummaryEntity; import com.epmet.entity.ActSummaryEntity;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/** /**
* 活动回顾表 * 活动回顾表
* *
@ -36,9 +38,9 @@ public interface ActSummaryDao extends BaseDao<ActSummaryEntity> {
* 活动详情-已结束-回顾稿 * 活动详情-已结束-回顾稿
* *
* @param formDto * @param formDto
* @return com.epmet.dto.result.resi.ResiActSummaryResultDTO * @return java.util.List<com.epmet.dto.result.resi.ResiActSummaryResultDTO>
* @Author zhangyong * @Author zhangyong
* @Date 15:11 2020-07-22 * @Date 15:03 2020-07-31
**/ **/
ResiActSummaryResultDTO selectListSummary(ResiActContentFormDTO formDto); List<ResiActSummaryResultDTO> selectListSummary(ResiActContentFormDTO formDto);
} }

4
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/ActSummaryService.java

@ -100,9 +100,9 @@ public interface ActSummaryService extends BaseService<ActSummaryEntity> {
* 活动详情-已结束-回顾稿 * 活动详情-已结束-回顾稿
* *
* @param formDto * @param formDto
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.result.resi.ResiActSummaryResultDTO> * @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.dto.result.resi.ResiActSummaryResultDTO>>
* @Author zhangyong * @Author zhangyong
* @Date 13:39 2020-07-21 * @Date 13:39 2020-07-21
**/ **/
Result<ResiActSummaryResultDTO> summaryList(ResiActContentFormDTO formDto); Result<List<ResiActSummaryResultDTO>> summaryList(ResiActContentFormDTO formDto);
} }

4
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActSummaryServiceImpl.java

@ -106,8 +106,8 @@ public class ActSummaryServiceImpl extends BaseServiceImpl<ActSummaryDao, ActSum
} }
@Override @Override
public Result<ResiActSummaryResultDTO> summaryList(ResiActContentFormDTO formDto) { public Result<List<ResiActSummaryResultDTO>> summaryList(ResiActContentFormDTO formDto) {
return new Result<ResiActSummaryResultDTO>().ok(baseDao.selectListSummary(formDto)); return new Result<List<ResiActSummaryResultDTO>>().ok(baseDao.selectListSummary(formDto));
} }
} }

16
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActUserRelationServiceImpl.java

@ -264,8 +264,12 @@ public class ActUserRelationServiceImpl extends BaseServiceImpl<ActUserRelationD
this.insertHeartUserInfo(formDTO, volunteerFlag); this.insertHeartUserInfo(formDTO, volunteerFlag);
} }
if (signUp){ if (signUp){
// 4.插入活动日志表 // 4.插入用户参加活动-待审核的活动日志表
this.insertActUserLog(formDTO); this.insertActUserLog(formDTO, ActConstant.ACT_USER_LOG_OPER_AUDITING);
if (!actInfoDTO.getAuditSwitch()){
// 自动审核通过,插入用户参加活动-审核通过的日志信息
this.insertActUserLog(formDTO, ActConstant.ACT_USER_LOG_OPER_PASSED);
}
} }
// 5.插入 用户活动关系表 // 5.插入 用户活动关系表
this.insertActUserRelation(formDTO, actInfoDTO); this.insertActUserRelation(formDTO, actInfoDTO);
@ -334,15 +338,16 @@ public class ActUserRelationServiceImpl extends BaseServiceImpl<ActUserRelationD
/** /**
* 每次成功报名活动都需要插入用户活动关系日志表 * 每次成功报名活动都需要插入用户活动关系日志表
* @param formDTO * @param formDTO
* @param userOperationType 用户审核类型待审核通过不通过取消
* @return void * @return void
* @Author zhangyong * @Author zhangyong
* @Date 09:37 2020-07-28 * @Date 09:37 2020-07-28
**/ **/
private void insertActUserLog(ResiActRegistrationFormDTO formDTO){ private void insertActUserLog(ResiActRegistrationFormDTO formDTO, String userOperationType){
ActUserLogEntity userLogEntity = new ActUserLogEntity(); ActUserLogEntity userLogEntity = new ActUserLogEntity();
userLogEntity.setActId(formDTO.getActId()); userLogEntity.setActId(formDTO.getActId());
userLogEntity.setUserId(formDTO.getUserId()); userLogEntity.setUserId(formDTO.getUserId());
userLogEntity.setOperationType(ActConstant.ACT_USER_LOG_OPER_AUDITING); userLogEntity.setOperationType(userOperationType);
actUserLogService.insert(userLogEntity); actUserLogService.insert(userLogEntity);
} }
@ -359,11 +364,12 @@ public class ActUserRelationServiceImpl extends BaseServiceImpl<ActUserRelationD
ActUserRelationEntity entity = new ActUserRelationEntity(); ActUserRelationEntity entity = new ActUserRelationEntity();
entity.setActId(formDTO.getActId()); entity.setActId(formDTO.getActId());
entity.setUserId(formDTO.getUserId()); entity.setUserId(formDTO.getUserId());
entity.setStatus(ActConstant.ACT_USER_STATUS_AUDITING);
// 审核开关:1报名人员需要人工审核(true) 0不需要(false) // 审核开关:1报名人员需要人工审核(true) 0不需要(false)
if (actInfoDTO.getAuditSwitch()){ if (actInfoDTO.getAuditSwitch()){
entity.setStatus(ActConstant.ACT_USER_STATUS_AUDITING);
entity.setPassedType(ActConstant.PASSEDTYPE_MANUAL); entity.setPassedType(ActConstant.PASSEDTYPE_MANUAL);
} else { } else {
entity.setStatus(ActConstant.ACT_USER_STATUS_PASSED);
entity.setPassedType(ActConstant.PASSEDTYPE_AUTO); entity.setPassedType(ActConstant.PASSEDTYPE_AUTO);
entity.setAuditTime(new Date()); entity.setAuditTime(new Date());
} }

2
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/HeartUserInfoServiceImpl.java

@ -128,6 +128,8 @@ public class HeartUserInfoServiceImpl extends BaseServiceImpl<HeartUserInfoDao,
@Override @Override
public Result<List<ResiLeaderboardResultDTO>> leaderboard(ResiActBaseFormDTO formDTO) { public Result<List<ResiLeaderboardResultDTO>> leaderboard(ResiActBaseFormDTO formDTO) {
List<ResiLeaderboardResultDTO> resultDtoS = new ArrayList<>(); List<ResiLeaderboardResultDTO> resultDtoS = new ArrayList<>();
int pageIndex = (formDTO.getPageNo() - NumConstant.ONE) * formDTO.getPageSize();
formDTO.setPageNo(pageIndex);
// 获取排好序的 排行榜 // 获取排好序的 排行榜
List<HeartUserInfoDTO> leaderboardList = baseDao.selectListLeaderboard(formDTO); List<HeartUserInfoDTO> leaderboardList = baseDao.selectListLeaderboard(formDTO);
if (leaderboardList.size() > NumConstant.ZERO){ if (leaderboardList.size() > NumConstant.ZERO){

22
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActUserServiceImpl.java

@ -320,10 +320,24 @@ public class WorkActUserServiceImpl implements WorkActUserService {
resultDTO.setActUserRelationId(actUserRelationDTO.getId()); resultDTO.setActUserRelationId(actUserRelationDTO.getId());
resultDTO.setActId(actUserRelationDTO.getActId()); resultDTO.setActId(actUserRelationDTO.getActId());
resultDTO.setUserId(actUserRelationDTO.getUserId()); resultDTO.setUserId(actUserRelationDTO.getUserId());
if (StringUtils.isNotBlank(userBaseInfo.getRealName())) {
resultDTO.setRealName(userBaseInfo.getRealName()); resultDTO.setRealName(userBaseInfo.getRealName());
} else {
resultDTO.setRealName(StrConstant.EPMETY_STR);
}
if (StringUtils.isNotBlank(userBaseInfo.getGender())) {
resultDTO.setGender(userBaseInfo.getGender()); resultDTO.setGender(userBaseInfo.getGender());
} else {
resultDTO.setGender(StrConstant.EPMETY_STR);
}
if (StringUtils.isNotBlank(userBaseInfo.getMobile())) {
resultDTO.setMobile(userBaseInfo.getMobile()); resultDTO.setMobile(userBaseInfo.getMobile());
} else {
resultDTO.setMobile(StrConstant.EPMETY_STR);
}
if (StringUtils.isNotBlank(userBaseInfo.getIdNum())) {
resultDTO.setIdNum(userBaseInfo.getIdNum()); resultDTO.setIdNum(userBaseInfo.getIdNum());
}
resultDTO.setAddress(userBaseInfo.getStreet()+userBaseInfo.getDistrict()+userBaseInfo.getBuildingAddress()); resultDTO.setAddress(userBaseInfo.getStreet()+userBaseInfo.getDistrict()+userBaseInfo.getBuildingAddress());
resultDTO.setSignUpTime(actUserRelationDTO.getCreatedTime()); resultDTO.setSignUpTime(actUserRelationDTO.getCreatedTime());
/** /**
@ -345,8 +359,6 @@ public class WorkActUserServiceImpl implements WorkActUserService {
historicalAuditResult.setLatestAuditTime(latestRefused.getCreatedTime()); historicalAuditResult.setLatestAuditTime(latestRefused.getCreatedTime());
historicalAuditResult.setLatestRefusedReason(latestRefused.getReason()); historicalAuditResult.setLatestRefusedReason(latestRefused.getReason());
historicalAuditResult.setRefusedCountDesc(String.format("已拒绝%s次",refusedCount)); historicalAuditResult.setRefusedCountDesc(String.format("已拒绝%s次",refusedCount));
resultDTO.setLatestAuditTime(latestRefused.getCreatedTime());
resultDTO.setLatestRefusedReason(latestRefused.getReason());
resultDTO.setHistoricalAuditResult(historicalAuditResult); resultDTO.setHistoricalAuditResult(historicalAuditResult);
} }
}else if(ActConstant.ACT_USER_STATUS_PASSED.equals(resultDTO.getStatus())||ActConstant.ACT_USER_STATUS_REFUSED.equals(resultDTO.getStatus())){ }else if(ActConstant.ACT_USER_STATUS_PASSED.equals(resultDTO.getStatus())||ActConstant.ACT_USER_STATUS_REFUSED.equals(resultDTO.getStatus())){
@ -377,9 +389,15 @@ public class WorkActUserServiceImpl implements WorkActUserService {
UserBaseInfoResultDTO userBaseInfoResultDTO=this.queryUserBaseInfo(formDTO.getUserId()); UserBaseInfoResultDTO userBaseInfoResultDTO=this.queryUserBaseInfo(formDTO.getUserId());
//基本信息 //基本信息
resultDTO.setUserId(formDTO.getUserId()); resultDTO.setUserId(formDTO.getUserId());
if(StringUtils.isNotBlank(userBaseInfoResultDTO.getHeadImgUrl())){
resultDTO.setHeadImgUrl(userBaseInfoResultDTO.getHeadImgUrl()); resultDTO.setHeadImgUrl(userBaseInfoResultDTO.getHeadImgUrl());
}
if(StringUtils.isNotBlank(userBaseInfoResultDTO.getNickname())){
resultDTO.setNickName(userBaseInfoResultDTO.getNickname()); resultDTO.setNickName(userBaseInfoResultDTO.getNickname());
}
if(StringUtils.isNotBlank(userBaseInfoResultDTO.getRealName())){
resultDTO.setRealName(userBaseInfoResultDTO.getRealName()); resultDTO.setRealName(userBaseInfoResultDTO.getRealName());
}
//参与活动统计值 //参与活动统计值
HistoricalActInfo historicalActInfo=getHistoricalActInfo(formDTO.getUserId()); HistoricalActInfo historicalActInfo=getHistoricalActInfo(formDTO.getUserId());
resultDTO.setSignInActNum(historicalActInfo.getSignInActNum()); resultDTO.setSignInActNum(historicalActInfo.getSignInActNum());

31
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml

@ -65,7 +65,7 @@
'signing_up' AS actCurrentState, -- 活动状态:报名中,未报满 'signing_up' AS actCurrentState, -- 活动状态:报名中,未报满
IF(u.USER_ID = #{userId},'signed_up','no_signed_up') as signupFlag IF(u.USER_ID = #{userId},'signed_up','no_signed_up') as signupFlag
FROM act_info i FROM act_info i
LEFT JOIN act_user_relation u ON i.ID = u.ACT_ID AND U.DEL_FLAG = '0' LEFT JOIN act_user_relation u ON i.ID = u.ACT_ID AND U.DEL_FLAG = '0' AND u.`STATUS` != 'refused' AND u.`STATUS` != 'canceled'
LEFT JOIN (SELECT count(1) signupNum, re.ACT_ID from act_user_relation re WHERE re.DEL_FLAG = '0' AND re.`STATUS` != 'refused' AND re.`STATUS` != 'canceled' GROUP BY re.ACT_ID) c ON c.ACT_ID = i.ID LEFT JOIN (SELECT count(1) signupNum, re.ACT_ID from act_user_relation re WHERE re.DEL_FLAG = '0' AND re.`STATUS` != 'refused' AND re.`STATUS` != 'canceled' GROUP BY re.ACT_ID) c ON c.ACT_ID = i.ID
WHERE i.DEL_FLAG = '0' WHERE i.DEL_FLAG = '0'
AND i.ACT_STATUS = 'published' AND i.ACT_STATUS = 'published'
@ -92,7 +92,7 @@
'enough' AS actCurrentState, -- 活动状态:报名中,已报满 'enough' AS actCurrentState, -- 活动状态:报名中,已报满
IF(u.USER_ID = #{userId},'signed_up','no_signed_up') as signupFlag IF(u.USER_ID = #{userId},'signed_up','no_signed_up') as signupFlag
FROM act_info i FROM act_info i
LEFT JOIN act_user_relation u ON i.ID = u.ACT_ID AND U.DEL_FLAG = '0' LEFT JOIN act_user_relation u ON i.ID = u.ACT_ID AND U.DEL_FLAG = '0' AND u.`STATUS` != 'refused' AND u.`STATUS` != 'canceled'
LEFT JOIN (SELECT count(1) signupNum, re.ACT_ID from act_user_relation re WHERE re.DEL_FLAG = '0' AND re.`STATUS` != 'refused' AND re.`STATUS` != 'canceled' GROUP BY re.ACT_ID) c ON c.ACT_ID = i.ID LEFT JOIN (SELECT count(1) signupNum, re.ACT_ID from act_user_relation re WHERE re.DEL_FLAG = '0' AND re.`STATUS` != 'refused' AND re.`STATUS` != 'canceled' GROUP BY re.ACT_ID) c ON c.ACT_ID = i.ID
WHERE i.DEL_FLAG = '0' WHERE i.DEL_FLAG = '0'
AND i.ACT_STATUS = 'published' AND i.ACT_STATUS = 'published'
@ -120,12 +120,12 @@
'end_sign_up' AS actCurrentState, -- 活动状态:未开始 'end_sign_up' AS actCurrentState, -- 活动状态:未开始
IF(u.USER_ID = #{userId},'signed_up','no_signed_up') as signupFlag IF(u.USER_ID = #{userId},'signed_up','no_signed_up') as signupFlag
FROM act_info i FROM act_info i
LEFT JOIN act_user_relation u ON i.ID = u.ACT_ID AND U.DEL_FLAG = '0' LEFT JOIN act_user_relation u ON i.ID = u.ACT_ID AND U.DEL_FLAG = '0' AND u.`STATUS` != 'refused' AND u.`STATUS` != 'canceled'
LEFT JOIN (SELECT count(1) signupNum, re.ACT_ID from act_user_relation re WHERE re.DEL_FLAG = '0' AND re.`STATUS` != 'refused' AND re.`STATUS` != 'canceled' GROUP BY re.ACT_ID) c ON c.ACT_ID = i.ID LEFT JOIN (SELECT count(1) signupNum, re.ACT_ID from act_user_relation re WHERE re.DEL_FLAG = '0' AND re.`STATUS` != 'refused' AND re.`STATUS` != 'canceled' GROUP BY re.ACT_ID) c ON c.ACT_ID = i.ID
WHERE i.DEL_FLAG = '0' WHERE i.DEL_FLAG = '0'
-- 活动开始时间 > 当前时间 并且 报名截止时间 &lt; 当前时间 报名已结束,活动未开始 未开始 -- 活动开始时间 > 当前时间 并且 报名截止时间 &lt; 当前时间 报名已结束,活动未开始 未开始
AND ( <![CDATA[ DATE_FORMAT(i.ACT_START_TIME,'%Y-%m-%d %H:%i:%s') > ]]> NOW() AND <![CDATA[ DATE_FORMAT(i.SIGN_UP_END_TIME,'%Y-%m-%d %H:%i:%s') < ]]> NOW() ) AND ( <![CDATA[ DATE_FORMAT(i.ACT_START_TIME,'%Y-%m-%d %H:%i:%s') > ]]> NOW() AND <![CDATA[ DATE_FORMAT(i.SIGN_UP_END_TIME,'%Y-%m-%d %H:%i:%s') < ]]> NOW() )
AND i.ACT_STATUS != 'canceled' AND i.ACT_STATUS = 'published'
AND i.CUSTOMER_ID = #{customerId} AND i.CUSTOMER_ID = #{customerId}
GROUP BY i.ID GROUP BY i.ID
ORDER BY i.CREATED_TIME DESC ORDER BY i.CREATED_TIME DESC
@ -147,12 +147,12 @@
'in_progress' AS actCurrentState, -- 活动状态:进行中 'in_progress' AS actCurrentState, -- 活动状态:进行中
IF(u.USER_ID = #{userId},'signed_up','no_signed_up') as signupFlag IF(u.USER_ID = #{userId},'signed_up','no_signed_up') as signupFlag
FROM act_info i FROM act_info i
LEFT JOIN act_user_relation u ON i.ID = u.ACT_ID AND U.DEL_FLAG = '0' LEFT JOIN act_user_relation u ON i.ID = u.ACT_ID AND U.DEL_FLAG = '0' AND u.`STATUS` != 'refused' AND u.`STATUS` != 'canceled'
LEFT JOIN (SELECT count(1) signupNum, re.ACT_ID from act_user_relation re WHERE re.DEL_FLAG = '0' AND re.`STATUS` = 'passed' GROUP BY re.ACT_ID) c ON c.ACT_ID = i.ID LEFT JOIN (SELECT count(1) signupNum, re.ACT_ID from act_user_relation re WHERE re.DEL_FLAG = '0' AND re.`STATUS` = 'passed' GROUP BY re.ACT_ID) c ON c.ACT_ID = i.ID
WHERE i.DEL_FLAG = '0' WHERE i.DEL_FLAG = '0'
-- 活动开始时间 &lt;= 当前时间 并且活动结束时间 >= 当前时间 进行中 -- 活动开始时间 &lt;= 当前时间 进行中
AND ( <![CDATA[ DATE_FORMAT(i.ACT_START_TIME,'%Y-%m-%d %H:%i:%s') <= ]]> NOW() AND <![CDATA[ DATE_FORMAT(i.ACT_END_TIME,'%Y-%m-%d %H:%i:%s') >= ]]> NOW() ) AND <![CDATA[ DATE_FORMAT(i.ACT_START_TIME,'%Y-%m-%d %H:%i:%s') <= ]]> NOW()
AND i.ACT_STATUS != 'canceled' AND i.ACT_STATUS = 'published'
AND i.CUSTOMER_ID = #{customerId} AND i.CUSTOMER_ID = #{customerId}
GROUP BY i.ID GROUP BY i.ID
ORDER BY i.CREATED_TIME DESC ORDER BY i.CREATED_TIME DESC
@ -174,11 +174,10 @@
'finished' AS actCurrentState, -- 活动状态:已结束 'finished' AS actCurrentState, -- 活动状态:已结束
IF(u.USER_ID = #{userId},'signed_up','no_signed_up') as signupFlag IF(u.USER_ID = #{userId},'signed_up','no_signed_up') as signupFlag
FROM act_info i FROM act_info i
LEFT JOIN act_user_relation u ON i.ID = u.ACT_ID AND U.DEL_FLAG = '0' LEFT JOIN act_user_relation u ON i.ID = u.ACT_ID AND U.DEL_FLAG = '0' AND u.`STATUS` != 'refused' AND u.`STATUS` != 'canceled'
LEFT JOIN (SELECT count(1) signupNum, re.ACT_ID from act_user_relation re WHERE re.DEL_FLAG = '0' AND re.`STATUS` = 'passed' GROUP BY re.ACT_ID) c ON c.ACT_ID = i.ID LEFT JOIN (SELECT count(1) signupNum, re.ACT_ID from act_user_relation re WHERE re.DEL_FLAG = '0' AND re.`STATUS` = 'passed' GROUP BY re.ACT_ID) c ON c.ACT_ID = i.ID
WHERE i.DEL_FLAG = '0' WHERE i.DEL_FLAG = '0'
AND i.ACT_STATUS != 'canceled' AND i.ACT_STATUS = 'finished'
AND <![CDATA[ DATE_FORMAT(i.ACT_END_TIME,'%Y-%m-%d %H:%i:%s') < ]]> NOW()
AND i.CUSTOMER_ID = #{customerId} AND i.CUSTOMER_ID = #{customerId}
GROUP BY i.ID GROUP BY i.ID
ORDER BY i.CREATED_TIME DESC ORDER BY i.CREATED_TIME DESC
@ -205,7 +204,7 @@
AND u.DEL_FLAG = '0' AND u.DEL_FLAG = '0'
AND u.USER_ID = #{userId} AND u.USER_ID = #{userId}
AND u.`STATUS` = 'auditing' AND u.`STATUS` = 'auditing'
AND <![CDATA[ DATE_FORMAT(i.ACT_END_TIME,'%Y-%m-%d %H:%i:%s') > ]]> NOW() -- 活动结束时间 > 当前时间, 活动未结束 AND i.ACT_STATUS = 'published'
ORDER BY i.CREATED_TIME DESC ORDER BY i.CREATED_TIME DESC
LIMIT #{pageNo}, #{pageSize} LIMIT #{pageNo}, #{pageSize}
</select> </select>
@ -230,7 +229,7 @@
AND u.DEL_FLAG = '0' AND u.DEL_FLAG = '0'
AND u.USER_ID = #{userId} AND u.USER_ID = #{userId}
AND u.`STATUS` = 'passed' AND u.`STATUS` = 'passed'
AND <![CDATA[ DATE_FORMAT(i.ACT_END_TIME,'%Y-%m-%d %H:%i:%s') > ]]> NOW() -- 活动结束时间 > 当前时间, 活动未结束 AND i.ACT_STATUS = 'published'
ORDER BY i.CREATED_TIME DESC ORDER BY i.CREATED_TIME DESC
LIMIT #{pageNo}, #{pageSize} LIMIT #{pageNo}, #{pageSize}
</select> </select>
@ -255,7 +254,7 @@
AND u.DEL_FLAG = '0' AND u.DEL_FLAG = '0'
AND u.USER_ID = #{userId} AND u.USER_ID = #{userId}
AND u.`STATUS` = 'refused' AND u.`STATUS` = 'refused'
AND <![CDATA[ DATE_FORMAT(i.ACT_END_TIME,'%Y-%m-%d %H:%i:%s') > ]]> NOW() -- 活动结束时间 > 当前时间, 活动未结束 AND i.ACT_STATUS = 'published'
ORDER BY i.CREATED_TIME DESC ORDER BY i.CREATED_TIME DESC
LIMIT #{pageNo}, #{pageSize} LIMIT #{pageNo}, #{pageSize}
</select> </select>
@ -279,7 +278,8 @@
WHERE i.DEL_FLAG = '0' WHERE i.DEL_FLAG = '0'
AND u.DEL_FLAG = '0' AND u.DEL_FLAG = '0'
AND u.USER_ID = #{userId} AND u.USER_ID = #{userId}
AND <![CDATA[ DATE_FORMAT(i.ACT_END_TIME,'%Y-%m-%d %H:%i:%s') < ]]> NOW() -- 活动结束时间 &lt; 当前时间, 活动已结束 AND u.`STATUS` = 'passed'
AND i.ACT_STATUS = 'finished'
ORDER BY i.CREATED_TIME DESC ORDER BY i.CREATED_TIME DESC
LIMIT #{pageNo}, #{pageSize} LIMIT #{pageNo}, #{pageSize}
</select> </select>
@ -337,6 +337,7 @@
AND r.DEL_FLAG = '0' AND r.DEL_FLAG = '0'
AND r.USER_ID = #{userId} AND r.USER_ID = #{userId}
AND NOW() BETWEEN DATE_SUB(i.ACT_START_TIME, INTERVAL 1 HOUR) AND i.ACT_END_TIME AND NOW() BETWEEN DATE_SUB(i.ACT_START_TIME, INTERVAL 1 HOUR) AND i.ACT_END_TIME
AND i.ACT_STATUS = 'published'
</select> </select>
<!--活动回顾列表--> <!--活动回顾列表-->

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

@ -2,7 +2,7 @@ version: "3.7"
services: services:
epmet-point-server: epmet-point-server:
container_name: epmet-point-server-dev container_name: epmet-point-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-point-server:0.0.11 image: 192.168.1.130:10080/epmet-cloud-dev/epmet-point-server:0.0.13
ports: ports:
- "8112:8112" - "8112:8112"
network_mode: host # 使用现有网络 network_mode: host # 使用现有网络

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

@ -3,7 +3,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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"> 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> <modelVersion>4.0.0</modelVersion>
<version>0.0.11</version> <version>0.0.13</version>
<parent> <parent>
<artifactId>epmet-point</artifactId> <artifactId>epmet-point</artifactId>
<groupId>com.epmet</groupId> <groupId>com.epmet</groupId>

5
epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/CodeCustomerDTO.java

@ -78,6 +78,11 @@ public class CodeCustomerDTO implements Serializable {
*/ */
private String userDesc; private String userDesc;
/**
* 数据来源(dev:开发 test:体验 prod:生产)
*/
private String source;
/** /**
* 状态 未审核:unaudited审核中:auditing审核成功audit_success审核被拒绝audit_failed已撤回:withdrawn审核延后:delay发布成功release_success, 发布失败release_failed * 状态 未审核:unaudited审核中:auditing审核成功audit_success审核被拒绝audit_failed已撤回:withdrawn审核延后:delay发布成功release_success, 发布失败release_failed
*/ */

4
epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/UploadListFormDTO.java

@ -43,4 +43,8 @@ public class UploadListFormDTO implements Serializable {
* 页面条数 * 页面条数
*/ */
private Integer pageSize; private Integer pageSize;
/**
* 数据来源(dev:开发 test:体验 prod:生产)
*/
private String source;
} }

6
epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/result/CustomerUserResultDTO.java

@ -16,15 +16,15 @@ public class CustomerUserResultDTO implements Serializable {
private static final long serialVersionUID = 5214475907074876716L; private static final long serialVersionUID = 5214475907074876716L;
/** /**
* 用户信息 * 用户信息 别名不能随便修改 否则影响程序
*/ */
private PaUserDTO paUserResult; private PaUserDTO paUserResult;
/** /**
* 用户对应的客户信息 * 用户对应的客户信息 别名不能随便修改 否则影响程序
*/ */
private PaCustomerDTO paCustomerResult; private PaCustomerDTO paCustomerResult;
/** /**
* 用户对应的微信基本信息 * 用户对应的微信基本信息 别名不能随便修改 否则影响程序
*/ */
private PaUserWechatDTO paUserWechatResult; private PaUserWechatDTO paUserWechatResult;
} }

6
epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/result/InitCustomerResultDTO.java

@ -17,15 +17,15 @@ public class InitCustomerResultDTO implements Serializable {
private static final long serialVersionUID = 3253989119352850315L; private static final long serialVersionUID = 3253989119352850315L;
/** /**
* 注册客户信息 * 注册客户信息 别名不能随便修改 否则影响程序
*/ */
private PaCustomerDTO paCustomer; private PaCustomerDTO paCustomer;
/** /**
* 注册客户组织信息 * 注册客户组织信息 别名不能随便修改 否则影响程序
*/ */
private PaCustomerAgencyDTO paAgency; private PaCustomerAgencyDTO paAgency;
/** /**
* 注册客户管理员信息 * 注册客户管理员信息 别名不能随便修改 否则影响程序
*/ */
private PaUserDTO paUser; private PaUserDTO paUser;

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

@ -2,7 +2,7 @@ version: "3.7"
services: services:
epmet-third-server: epmet-third-server:
container_name: epmet-third-server-dev container_name: epmet-third-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-third-server:0.0.82 image: 192.168.1.130:10080/epmet-cloud-dev/epmet-third-server:0.0.91
ports: ports:
- "8110:8110" - "8110:8110"
network_mode: host # 使用现有网络 network_mode: host # 使用现有网络

2
epmet-module/epmet-third/epmet-third-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" <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 https://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<version>0.0.82</version> <version>0.0.91</version>
<parent> <parent>
<groupId>com.epmet</groupId> <groupId>com.epmet</groupId>

9
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/AppLetAuthorizationController.java

@ -10,10 +10,7 @@ import com.epmet.dto.form.RemoveBindFormDTO;
import com.epmet.dto.result.GoToAuthResultDTO; import com.epmet.dto.result.GoToAuthResultDTO;
import com.epmet.service.AppLetAuthorizationService; import com.epmet.service.AppLetAuthorizationService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/** /**
* @Author zxc * @Author zxc
@ -32,9 +29,9 @@ public class AppLetAuthorizationController {
* @author zxc * @author zxc
*/ */
@PostMapping("gotoauth") @PostMapping("gotoauth")
public Result<GoToAuthResultDTO> goToAuth(@LoginUser TokenDto tokenDto, @RequestBody GoToAuthFormDTO formDTO){ public Result<GoToAuthResultDTO> goToAuth(@LoginUser TokenDto tokenDto, @RequestBody GoToAuthFormDTO formDTO, @RequestHeader("source")String source){
ValidatorUtils.validateEntity(formDTO); ValidatorUtils.validateEntity(formDTO);
GoToAuthResultDTO goToAuthResultDTO = appLetAuthorizationService.goToAuth(tokenDto,formDTO); GoToAuthResultDTO goToAuthResultDTO = appLetAuthorizationService.goToAuth(tokenDto,formDTO,source);
return new Result().ok(goToAuthResultDTO); return new Result().ok(goToAuthResultDTO);
} }

7
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/BusinessInfoDao.java

@ -41,4 +41,11 @@ public interface BusinessInfoDao extends BaseDao<BusinessInfoEntity> {
*/ */
void insertBusinessInfo(@Param("businessInfoList") List<BusinessInfoFormDTO> businessInfoList); void insertBusinessInfo(@Param("businessInfoList") List<BusinessInfoFormDTO> businessInfoList);
/**
* @Description 功能开通信息删除
* @param
* @author zxc
*/
void deleteBusinessInfo(@Param("customerId")String customerId,@Param("clientType")String clientType);
} }

4
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/CodeCustomerDao.java

@ -76,9 +76,9 @@ public interface CodeCustomerDao extends BaseDao<CodeCustomerEntity> {
* 获取审核中代码列表 * 获取审核中代码列表
* @author zhaoqifeng * @author zhaoqifeng
* @date 2020/7/15 18:17 * @date 2020/7/15 18:17
* @param * @param source
* @return java.util.List<com.epmet.dto.CodeCustomerDTO> * @return java.util.List<com.epmet.dto.CodeCustomerDTO>
*/ */
List<CodeCustomerDTO> selectAuditingCodeList(); List<CodeCustomerDTO> selectAuditingCodeList(@Param("source") String source);
} }

7
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/MiniCategoryInfoDao.java

@ -41,4 +41,11 @@ public interface MiniCategoryInfoDao extends BaseDao<MiniCategoryInfoEntity> {
*/ */
void insertCategoryInfo(@Param("miniCategoryInfoList") List<MiniCategoryInfoFormDTO> miniCategoryInfoList); void insertCategoryInfo(@Param("miniCategoryInfoList") List<MiniCategoryInfoFormDTO> miniCategoryInfoList);
/**
* @Description 小程序配置的类目信息删除
* @param
* @author zxc
*/
void deleteCategoryInfo(@Param("customerId")String customerId,@Param("clientType")String clientType);
} }

7
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/MiniInfoDao.java

@ -40,6 +40,13 @@ public interface MiniInfoDao extends BaseDao<MiniInfoEntity> {
*/ */
void insertMiniInfo(MiniInfoFormDTO formDTO); void insertMiniInfo(MiniInfoFormDTO formDTO);
/**
* @Description 删除小程序信息
* @param formDTO
* @author zxc
*/
void deleteMiniInfo(MiniInfoFormDTO formDTO);
/** /**
* @Description 根据原始ID查询 customerId clientType * @Description 根据原始ID查询 customerId clientType
* @param toUserName * @param toUserName

7
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/MiniNetworkInfoDao.java

@ -41,4 +41,11 @@ public interface MiniNetworkInfoDao extends BaseDao<MiniNetworkInfoEntity> {
*/ */
void insertNetworkInfo(@Param("networkInfoList") List<MiniNetworkInfoFormDTO> networkInfoList); void insertNetworkInfo(@Param("networkInfoList") List<MiniNetworkInfoFormDTO> networkInfoList);
/**
* @Description 小程序配置的合法域名信息删除
* @param
* @author zxc
*/
void deleteNetworkInfo(@Param("customerId")String customerId,@Param("clientType")String clientType);
} }

5
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/CodeCustomerEntity.java

@ -78,6 +78,11 @@ public class CodeCustomerEntity extends BaseEpmetEntity {
*/ */
private String userDesc; private String userDesc;
/**
* 数据来源(dev:开发 test:体验 prod:生产)
*/
private String source;
/** /**
* 状态 未审核:unaudited审核中:auditing审核成功audit_success审核被拒绝audit_failed已撤回:withdrawn审核延后:delay发布成功release_success, 发布失败release_failed * 状态 未审核:unaudited审核中:auditing审核成功audit_success审核被拒绝audit_failed已撤回:withdrawn审核延后:delay发布成功release_success, 发布失败release_failed
*/ */

2
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/AppLetAuthorizationService.java

@ -17,7 +17,7 @@ public interface AppLetAuthorizationService {
* @param tokenDto * @param tokenDto
* @author zxc * @author zxc
*/ */
GoToAuthResultDTO goToAuth(TokenDto tokenDto, GoToAuthFormDTO formDTO); GoToAuthResultDTO goToAuth(TokenDto tokenDto, GoToAuthFormDTO formDTO,String source);
/** /**
* @Description 将公众号/小程序从开放平台帐号下解绑 * @Description 将公众号/小程序从开放平台帐号下解绑

2
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/CodeCustomerService.java

@ -110,7 +110,7 @@ public interface CodeCustomerService extends BaseService<CodeCustomerEntity> {
* @param * @param
* @return java.util.List<com.epmet.dto.CodeCustomerDTO> * @return java.util.List<com.epmet.dto.CodeCustomerDTO>
*/ */
List<CodeCustomerDTO> getAuditingCodeList(); List<CodeCustomerDTO> getAuditingCodeList(String source);
/** /**
* 删除旧代码记录 * 删除旧代码记录

6
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/AppLetAuthorizationServiceImpl.java

@ -55,14 +55,16 @@ public class AppLetAuthorizationServiceImpl implements AppLetAuthorizationServic
* @author zxc * @author zxc
*/ */
@Override @Override
public GoToAuthResultDTO goToAuth(TokenDto tokenDto, GoToAuthFormDTO formDTO) { public GoToAuthResultDTO goToAuth(TokenDto tokenDto, GoToAuthFormDTO formDTO,String source) {
GoToAuthResultDTO result = new GoToAuthResultDTO(); GoToAuthResultDTO result = new GoToAuthResultDTO();
String userId = tokenDto.getUserId(); String userId = tokenDto.getUserId();
//获取预授权码 //获取预授权码
String preAuthCode = componentVerifyTicketService.preAuthCode(); String preAuthCode = componentVerifyTicketService.preAuthCode();
String redirectUrl = WxMaCodeConstant.WEB_URL + formDTO.getClientType(); // String redirectUrl = WxMaCodeConstant.WEB_URL + formDTO.getClientType();
String redirectUrl = String.format(WxMaCodeConstant.WEB_URL,source,formDTO.getClientType());
String authUrl = String.format(WxMaCodeConstant.API_AUTH_REGISTER_URL, componentAppId, preAuthCode, redirectUrl); String authUrl = String.format(WxMaCodeConstant.API_AUTH_REGISTER_URL, componentAppId, preAuthCode, redirectUrl);
result.setUrl(authUrl); result.setUrl(authUrl);
log.info("返回URL:"+result.getUrl());
return result; return result;
} }

4
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeCustomerServiceImpl.java

@ -115,8 +115,8 @@ public class CodeCustomerServiceImpl extends BaseServiceImpl<CodeCustomerDao, Co
} }
@Override @Override
public List<CodeCustomerDTO> getAuditingCodeList() { public List<CodeCustomerDTO> getAuditingCodeList(String source) {
return baseDao.selectAuditingCodeList(); return baseDao.selectAuditingCodeList(source);
} }
@Override @Override

3
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeServiceImpl.java

@ -152,6 +152,7 @@ public class CodeServiceImpl implements CodeService {
//将上传信息存入表中 //将上传信息存入表中
CodeCustomerDTO codeCustomerDTO = ConvertUtils.sourceToTarget(formDTO, CodeCustomerDTO.class); CodeCustomerDTO codeCustomerDTO = ConvertUtils.sourceToTarget(formDTO, CodeCustomerDTO.class);
codeCustomerDTO.setCustomerName(paCustomerDTO.getCustomerName()); codeCustomerDTO.setCustomerName(paCustomerDTO.getCustomerName());
codeCustomerDTO.setSource(paCustomerDTO.getSource());
codeCustomerDTO.setExtJson(extJson); codeCustomerDTO.setExtJson(extJson);
codeCustomerDTO.setAppId(authInfo.getAuthorizerAppid()); codeCustomerDTO.setAppId(authInfo.getAuthorizerAppid());
codeCustomerDTO.setStatus(CodeConstant.UNAUDITED); codeCustomerDTO.setStatus(CodeConstant.UNAUDITED);
@ -162,7 +163,7 @@ public class CodeServiceImpl implements CodeService {
@Override @Override
public PageData uploadList(UploadListFormDTO formDTO) { public PageData uploadList(UploadListFormDTO formDTO) {
List<CodeCustomerDTO> auditingList = codeCustomerService.getAuditingCodeList(); List<CodeCustomerDTO> auditingList = codeCustomerService.getAuditingCodeList(formDTO.getSource());
if (null != auditingList && auditingList.size() > NumConstant.ZERO) { if (null != auditingList && auditingList.size() > NumConstant.ZERO) {
auditingList.forEach(code -> { auditingList.forEach(code -> {
//获取小程序调用令牌 //获取小程序调用令牌

7
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ComponentVerifyTicketServiceImpl.java

@ -125,7 +125,7 @@ public class ComponentVerifyTicketServiceImpl implements ComponentVerifyTicketSe
switch (infotype){ switch (infotype){
case ModuleConstant.TICKET_UNDERLINE_KEY: //接收票据 【component_verify_ticket】 case ModuleConstant.TICKET_UNDERLINE_KEY: //接收票据 【component_verify_ticket】
String ComponentVerifyTicket = result.get(ModuleConstant.TICKET_KEY); String ComponentVerifyTicket = result.get(ModuleConstant.TICKET_KEY);
log.info(String.format(COMPONENT_VERIFY_TICKET)); log.info(String.format(COMPONENT_VERIFY_TICKET,ComponentVerifyTicket));
// 缓存 ticket // 缓存 ticket
redisThird.setComponentVerifyTicket(ComponentVerifyTicket); redisThird.setComponentVerifyTicket(ComponentVerifyTicket);
// 存数据库 // 存数据库
@ -437,6 +437,7 @@ public class ComponentVerifyTicketServiceImpl implements ComponentVerifyTicketSe
miniInfoFormDTO.setCustomerId(customerId); miniInfoFormDTO.setCustomerId(customerId);
miniInfoFormDTO.setClientType(clientType); miniInfoFormDTO.setClientType(clientType);
//基础信息插入 //基础信息插入
miniInfoDao.deleteMiniInfo(miniInfoFormDTO);
miniInfoDao.insertMiniInfo(miniInfoFormDTO); miniInfoDao.insertMiniInfo(miniInfoFormDTO);
String primaryId = miniInfoFormDTO.getId(); String primaryId = miniInfoFormDTO.getId();
//todo 功能的开通状况信息插入 //todo 功能的开通状况信息插入
@ -451,6 +452,7 @@ public class ComponentVerifyTicketServiceImpl implements ComponentVerifyTicketSe
businessInfoForm.setPrimaryId(primaryId); businessInfoForm.setPrimaryId(primaryId);
businessInfoList.add(businessInfoForm); businessInfoList.add(businessInfoForm);
}); });
businessInfoDao.deleteBusinessInfo(customerId,clientType);
businessInfoDao.insertBusinessInfo(businessInfoList); businessInfoDao.insertBusinessInfo(businessInfoList);
//todo 小程序配置的合法域名信息插入 //todo 小程序配置的合法域名信息插入
Map miniProgramInfo = (Map) authorizerInfo.get(ModuleConstant.MINI_PROGRAM_INFO); Map miniProgramInfo = (Map) authorizerInfo.get(ModuleConstant.MINI_PROGRAM_INFO);
@ -465,6 +467,7 @@ public class ComponentVerifyTicketServiceImpl implements ComponentVerifyTicketSe
miniNetworkInfoForm.setPrimaryId(primaryId); miniNetworkInfoForm.setPrimaryId(primaryId);
networkInfoList.add(miniNetworkInfoForm); networkInfoList.add(miniNetworkInfoForm);
}); });
miniNetworkInfoDao.deleteNetworkInfo(customerId,clientType);
miniNetworkInfoDao.insertNetworkInfo(networkInfoList); miniNetworkInfoDao.insertNetworkInfo(networkInfoList);
//todo 小程序配置的类目信息插入 //todo 小程序配置的类目信息插入
List<MiniCategoryInfoFormDTO> categoryInfoList = new ArrayList<>(); List<MiniCategoryInfoFormDTO> categoryInfoList = new ArrayList<>();
@ -481,6 +484,7 @@ public class ComponentVerifyTicketServiceImpl implements ComponentVerifyTicketSe
categoryInfoList.add(categoryInfo); categoryInfoList.add(categoryInfo);
}); });
}); });
miniCategoryInfoDao.deleteCategoryInfo(customerId, clientType);
miniCategoryInfoDao.insertCategoryInfo(categoryInfoList); miniCategoryInfoDao.insertCategoryInfo(categoryInfoList);
} }
}else { }else {
@ -501,6 +505,7 @@ public class ComponentVerifyTicketServiceImpl implements ComponentVerifyTicketSe
businessInfoForm.setPrimaryId(primaryId); businessInfoForm.setPrimaryId(primaryId);
businessInfoList.add(businessInfoForm); businessInfoList.add(businessInfoForm);
}); });
businessInfoDao.deleteBusinessInfo(customerId,clientType);
businessInfoDao.insertBusinessInfo(businessInfoList); businessInfoDao.insertBusinessInfo(businessInfoList);
} }
log.info("保存授权方基本信息结束"); log.info("保存授权方基本信息结束");

2
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/PaCustomerServiceImpl.java

@ -210,6 +210,7 @@ public class PaCustomerServiceImpl extends BaseServiceImpl<PaCustomerDao, PaCust
visitedEntity.setWxOpenId(wechatEntity.getWxOpenId()); visitedEntity.setWxOpenId(wechatEntity.getWxOpenId());
visitedEntity.setOpenId(wechatEntity.getWxOpenId()); visitedEntity.setOpenId(wechatEntity.getWxOpenId());
visitedEntity.setPhone(formDTO.getPhone()); visitedEntity.setPhone(formDTO.getPhone());
visitedEntity.setSource(formDTO.getSource());
if (paUserVisitedDao.insert(visitedEntity) < NumConstant.ONE) { if (paUserVisitedDao.insert(visitedEntity) < NumConstant.ONE) {
throw new RenException(PaConstant.SAVE_VISITED_EXCEPTION); throw new RenException(PaConstant.SAVE_VISITED_EXCEPTION);
} }
@ -240,6 +241,7 @@ public class PaCustomerServiceImpl extends BaseServiceImpl<PaCustomerDao, PaCust
visitedEntity.setWxOpenId(wechatEntity.getWxOpenId()); visitedEntity.setWxOpenId(wechatEntity.getWxOpenId());
visitedEntity.setOpenId(wechatEntity.getWxOpenId()); visitedEntity.setOpenId(wechatEntity.getWxOpenId());
visitedEntity.setPhone(formDTO.getPhone()); visitedEntity.setPhone(formDTO.getPhone());
visitedEntity.setSource(formDTO.getSource());
if (paUserVisitedDao.insert(visitedEntity) < NumConstant.ONE) { if (paUserVisitedDao.insert(visitedEntity) < NumConstant.ONE) {
throw new RenException(PaConstant.SAVE_VISITED_EXCEPTION); throw new RenException(PaConstant.SAVE_VISITED_EXCEPTION);
} }

2
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/constant/WxMaCodeConstant.java

@ -33,7 +33,7 @@ public interface WxMaCodeConstant {
/** /**
* 前端地址 授权之后的跳转的地址 * 前端地址 授权之后的跳转的地址
*/ */
String WEB_URL = "https://epmet-cloud.elinkservice.cn/third/mpweb/page/#/info?clientType="; String WEB_URL = "https://epmet-cloud.elinkservice.cn/third/mpweb/page/%s/#/info?clientType=%s";
/** /**
* 授权注册页面扫码授权 * 授权注册页面扫码授权

3
epmet-module/epmet-third/epmet-third-server/src/main/resources/db/migration/V0.0.3__thirdUpdate.sql

@ -0,0 +1,3 @@
alter table pa_user add SOURCE varchar(32) comment '数据来源(dev:开发 test:体验 prod:生产)' NOT NULL;
alter table pa_user_visited add SOURCE varchar(32) comment '数据来源(dev:开发 test:体验 prod:生产)' NOT NULL;
alter table pa_customer add SOURCE varchar(32) comment '数据来源(dev:开发 test:体验 prod:生产)' NOT NULL;

11
epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/BusinessInfoDao.xml

@ -24,4 +24,15 @@
) )
</foreach> </foreach>
</insert> </insert>
<!-- 功能开通信息删除 -->
<delete id="deleteBusinessInfo">
DELETE
FROM
business_info
WHERE
del_flag = 0
AND customer_id = #{customerId}
AND client_type = #{clientType}
</delete>
</mapper> </mapper>

3
epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/CodeCustomerDao.xml

@ -38,6 +38,7 @@
LEFT JOIN code_audit_result car ON cc.ID = car.CODE_ID AND car.DEL_FLAG = '0' LEFT JOIN code_audit_result car ON cc.ID = car.CODE_ID AND car.DEL_FLAG = '0'
WHERE WHERE
cc.DEL_FLAG = '0' cc.DEL_FLAG = '0'
AND cc.SOURCE = #{source}
<if test="customerId != null and customerId.trim() != ''"> <if test="customerId != null and customerId.trim() != ''">
AND cc.CUSTOMER_ID = #{customerId} AND cc.CUSTOMER_ID = #{customerId}
</if> </if>
@ -85,7 +86,7 @@
AND template_id = #{templateId} AND template_id = #{templateId}
</select> </select>
<select id="selectAuditingCodeList" resultType="com.epmet.dto.CodeCustomerDTO"> <select id="selectAuditingCodeList" resultType="com.epmet.dto.CodeCustomerDTO">
select * FROM code_customer WHERE DEL_FLAG = '0' AND STATUS = 'auditing' select * FROM code_customer WHERE DEL_FLAG = '0' AND STATUS = 'auditing' AND SOURCE = #{source}
</select> </select>
<update id="deleteCode"> <update id="deleteCode">
UPDATE code_customer UPDATE code_customer

2
epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/CustomerMpDao.xml

@ -72,7 +72,7 @@
WHERE WHERE
cm.del_flag = '0' cm.del_flag = '0'
AND pc.del_flag = '0' AND pc.del_flag = '0'
AND pc.source = '#{source}' AND pc.source = #{source}
ORDER BY ORDER BY
cm.customer_id ASC, cm.customer_id ASC,
cm.client ASC cm.client ASC

11
epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/MiniCategoryInfoDao.xml

@ -24,4 +24,15 @@
) )
</foreach> </foreach>
</insert> </insert>
<!-- 小程序配置的类目信息删除 -->
<delete id="deleteCategoryInfo">
DELETE
FROM
mini_category_info
WHERE
del_flag = 0
AND customer_id = #{customerId}
AND client_type = #{clientType}
</delete>
</mapper> </mapper>

13
epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/MiniInfoDao.xml

@ -6,7 +6,7 @@
<!-- 插入小程序信息 --> <!-- 插入小程序信息 -->
<insert id="insertMiniInfo"> <insert id="insertMiniInfo">
<selectKey keyProperty="id" order="AFTER" resultType="String"> <selectKey keyProperty="id" order="AFTER" resultType="String">
SELECT LAST_INSERT_ID() AS id SELECT id AS id from mini_info where del_flag = 0 and customer_id = #{customerId} and client_type = #{clientType} order by created_time desc limit 1
</selectKey> </selectKey>
INSERT INTO mini_info ( ID, CUSTOMER_ID, CLIENT_TYPE, NICK_NAME, HEAD_IMG, SERVICE_TYPE_INFO, VERIFY_TYPE_INFO, USER_NAME, INSERT INTO mini_info ( ID, CUSTOMER_ID, CLIENT_TYPE, NICK_NAME, HEAD_IMG, SERVICE_TYPE_INFO, VERIFY_TYPE_INFO, USER_NAME,
PRINCIPAL_NAME, SIGNATURE, QRCODE_URL, DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME) PRINCIPAL_NAME, SIGNATURE, QRCODE_URL, DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME)
@ -32,6 +32,17 @@
) )
</insert> </insert>
<!-- 删除小程序信息 -->
<delete id="deleteMiniInfo">
DELETE
FROM
mini_info
WHERE
del_flag = 0
AND customer_id = #{customerId}
AND client_type = #{clientType}
</delete>
<!-- 根据原始ID查询 customerId 和 clientType --> <!-- 根据原始ID查询 customerId 和 clientType -->
<select id="selectCustomerIdAndClientByToUserName" resultType="com.epmet.dto.result.CustomerIdAndClientResultDTO"> <select id="selectCustomerIdAndClientByToUserName" resultType="com.epmet.dto.result.CustomerIdAndClientResultDTO">
SELECT SELECT

11
epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/MiniNetworkInfoDao.xml

@ -24,4 +24,15 @@
) )
</foreach> </foreach>
</insert> </insert>
<!-- 小程序配置的合法域名信息删除 -->
<delete id="deleteNetworkInfo">
DELETE
FROM
mini_network_info
WHERE
del_flag = 0
AND customer_id = #{customerId}
AND client_type = #{clientType}
</delete>
</mapper> </mapper>

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

@ -2,7 +2,7 @@ version: "3.7"
services: services:
oper-crm-server: oper-crm-server:
container_name: oper-crm-server-dev container_name: oper-crm-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/oper-crm-server:0.3.57 image: 192.168.1.130:10080/epmet-cloud-dev/oper-crm-server:0.3.58
ports: ports:
- "8090:8090" - "8090:8090"
network_mode: host # 使用现有网络 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" <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"> 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> <modelVersion>4.0.0</modelVersion>
<version>0.3.57</version> <version>0.3.58</version>
<parent> <parent>
<groupId>com.epmet</groupId> <groupId>com.epmet</groupId>
<artifactId>oper-crm</artifactId> <artifactId>oper-crm</artifactId>

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

@ -414,11 +414,12 @@ public class CustomerServiceImpl extends BaseServiceImpl<CustomerDao, CustomerEn
} }
Object RegisterResult = thirdResult.getData(); Object RegisterResult = thirdResult.getData();
JSONObject jsonObject = JSON.parseObject(RegisterResult.toString()); JSONObject jsonObject = JSON.parseObject(RegisterResult.toString());
InitCustomerResultDTO initCustomer = ConvertUtils.mapToEntity(jsonObject, InitCustomerResultDTO.class); Map<String,Object> map1 = (Map)jsonObject.get("paCustomer");
PaCustomerDTO paCustomer = ConvertUtils.mapToEntity(map1, PaCustomerDTO.class);
PaCustomerDTO paCustomer = initCustomer.getPaCustomer(); Map<String,Object> map2 = (Map)jsonObject.get("paAgency");
PaCustomerAgencyDTO paAgency = initCustomer.getPaAgency(); PaCustomerAgencyDTO paAgency = ConvertUtils.mapToEntity(map2, PaCustomerAgencyDTO.class);
PaUserDTO paUser = initCustomer.getPaUser(); Map<String,Object> map3 = (Map)jsonObject.get("paUser");
PaUserDTO paUser = ConvertUtils.mapToEntity(map3, PaUserDTO.class);
//2.校验当前客户是否已初始化,不存在则初始客户信息 //2.校验当前客户是否已初始化,不存在则初始客户信息
CustomerEntity entity = baseDao.selectById(formDTO.getCustomerId()); CustomerEntity entity = baseDao.selectById(formDTO.getCustomerId());

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

@ -2,7 +2,7 @@ version: "3.7"
services: services:
resi-mine-server: resi-mine-server:
container_name: resi-mine-server-dev container_name: resi-mine-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/resi-mine-server:0.3.32 image: 192.168.1.130:10080/epmet-cloud-dev/resi-mine-server:0.3.33
ports: ports:
- "8094:8094" - "8094:8094"
network_mode: host # 使用现有网络 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" <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"> 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> <modelVersion>4.0.0</modelVersion>
<version>0.3.32</version> <version>0.3.33</version>
<parent> <parent>
<groupId>com.epmet</groupId> <groupId>com.epmet</groupId>
<artifactId>resi-mine</artifactId> <artifactId>resi-mine</artifactId>

Loading…
Cancel
Save