Browse Source

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

dev_shibei_match
yinzuomei 5 years ago
parent
commit
83428b5f33
  1. 2
      epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-dev.yml
  2. 2
      epmet-module/epmet-heart/epmet-heart-server/pom.xml
  3. 28
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java
  4. 2
      epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-dev.yml
  5. 2
      epmet-module/epmet-third/epmet-third-server/pom.xml
  6. 2
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/constant/ThirdRunTimeInfoConstant.java
  7. 4
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PaUserDao.java
  8. 3
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ComponentVerifyTicketServiceImpl.java
  9. 35
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/WarrantServiceImpl.java
  10. 7
      epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/PaUserDao.xml

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

@ -2,7 +2,7 @@ version: "3.7"
services:
epmet-heart-server:
container_name: epmet-heart-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-heart-server:0.0.32
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-heart-server:0.0.34
ports:
- "8111:8111"
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"
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.0.32</version>
<version>0.0.34</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>epmet-heart</artifactId>

28
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java

@ -413,8 +413,10 @@ public class WorkActServiceImpl implements WorkActService {
textScanParamDTO.getTasks().add(taskDTO);
});
Result<SyncScanResult> contentSyncScanRes = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScanParamDTO);
logger.info("内容审核入参:"+JSON.toJSONString(textScanParamDTO));
logger.info("内容审核返参:"+JSON.toJSONString(contentSyncScanRes));
if (!contentSyncScanRes.success()) {
logger.error("活动详情内容审核接口失败,返参:", JSON.toJSONString(contentSyncScanRes));
logger.warn("活动详情内容审核接口失败,返参:", JSON.toJSONString(contentSyncScanRes));
throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode());
} else {
if (!contentSyncScanRes.getData().isAllPass()) {
@ -433,8 +435,10 @@ public class WorkActServiceImpl implements WorkActService {
imgScanParamDTO.getTasks().add(task);
});
Result<SyncScanResult> imgScanResult = ScanContentUtils.imgSyncScan(scanApiUrl.concat(imgSyncScanMethod), imgScanParamDTO);
logger.info("图片审核入参:"+JSON.toJSONString(imgScanParamDTO));
logger.info("图片审核返参:"+JSON.toJSONString(imgScanResult));
if (!imgScanResult.success()){
logger.error("活动详情图片审核接口失败,返参:", JSON.toJSONString(imgScanResult));
logger.warn("活动详情图片审核接口失败,返参:", JSON.toJSONString(imgScanResult));
throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode());
} else {
if (!imgScanResult.getData().isAllPass()) {
@ -459,12 +463,14 @@ public class WorkActServiceImpl implements WorkActService {
taskDTO.setDataId(UUID.randomUUID().toString().replace("-", ""));
textScanParamDTO.getTasks().add(taskDTO);
Result<SyncScanResult> textSyncScanResult = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScanParamDTO);
logger.info("活动报名条件审核入参:"+JSON.toJSONString(textScanParamDTO));
logger.info("活动报名条件审核返参:"+JSON.toJSONString(textSyncScanResult));
if (!textSyncScanResult.success()) {
logger.error("活动报名条件审核接口返回失败,返参:", JSON.toJSONString(textSyncScanResult));
logger.warn("活动报名条件审核接口返回失败,返参:", JSON.toJSONString(textSyncScanResult));
throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode());
} else {
if (!textSyncScanResult.getData().isAllPass()) {
logger.error("活动报名条件审核失败,报名条件:",requirement);
logger.warn("活动报名条件审核失败,报名条件:",requirement);
throw new RenException(EpmetErrorCode.ACT_REQ_SCAN_FAILED.getCode());
}
}
@ -485,16 +491,18 @@ public class WorkActServiceImpl implements WorkActService {
coverImgtask.setUrl(coverPic);
coverPicScanParamDTO.getTasks().add(coverImgtask);
Result<SyncScanResult> coverPicScanRes = ScanContentUtils.imgSyncScan(scanApiUrl.concat(imgSyncScanMethod), coverPicScanParamDTO);
logger.info("活动封面图审核入参:"+JSON.toJSONString(coverPicScanParamDTO));
logger.info("活动封面图审核返参:"+JSON.toJSONString(coverPicScanRes));
if (!coverPicScanRes.success()){
logger.error("活动封面审核失败接口返回失败,返参:", JSON.toJSONString(coverPicScanRes));
logger.warn("活动封面审核失败接口返回失败,返参:", JSON.toJSONString(coverPicScanRes));
throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode());
} else {
if (!coverPicScanRes.getData().isAllPass()) {
logger.error("活动封面审核失败,封面图片地址:",coverPic);
logger.warn("活动封面审核失败,封面图片地址:",coverPic);
throw new RenException(EpmetErrorCode.ACT_COVER_PIC_SCAN_FAILED.getCode());
}
}
logger.info("活动封面审核成功");
logger.info("活动封面审核成功");
}
/**
@ -511,12 +519,14 @@ public class WorkActServiceImpl implements WorkActService {
taskDTO.setDataId(UUID.randomUUID().toString().replace("-", ""));
textScanParamDTO.getTasks().add(taskDTO);
Result<SyncScanResult> textSyncScanResult = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScanParamDTO);
logger.info("活动标题审核入参:"+JSON.toJSONString(textScanParamDTO));
logger.info("活动标题审核返参:"+JSON.toJSONString(textSyncScanResult));
if (!textSyncScanResult.success()) {
logger.error("活动标题审核接口返回失败,返参:", JSON.toJSONString(textSyncScanResult));
logger.warn("活动标题审核接口返回失败,返参:", JSON.toJSONString(textSyncScanResult));
throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode());
} else {
if (!textSyncScanResult.getData().isAllPass()) {
logger.error("活动标题审核失败,标题内容:",title);
logger.warn("活动标题审核失败,标题内容:",title);
throw new RenException(EpmetErrorCode.ACT_TITLE_SCAN_FAILED.getCode());
}
}

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

@ -2,7 +2,7 @@ version: "3.7"
services:
epmet-third-server:
container_name: epmet-third-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-third-server:0.0.96
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-third-server:0.0.98
ports:
- "8110:8110"
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"
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>
<version>0.0.96</version>
<version>0.0.98</version>
<parent>
<groupId>com.epmet</groupId>

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

@ -107,4 +107,6 @@ public interface ThirdRunTimeInfoConstant {
String TEXT_MESSAGE_LOG_INFO = "content:%s,content[1]:%s,fromUserName:%s,toUserName:%s";
String SEND_MESSAGE_XML = "要发送的xml内容为:%s";
String CONTENT = "content为:%s";
}

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

@ -62,9 +62,9 @@ public interface PaUserDao extends BaseDao<PaUserEntity> {
/**
* @Description 查询管理员基本信息
* @param customerId
* @param userId
* @author zxc
* @date 2020/8/3 5:21 下午
*/
CustomerManagerFormDTO selectManagerInfo(@Param("customerId") String customerId);
CustomerManagerFormDTO selectManagerInfo(@Param("userId") String userId);
}

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

@ -397,6 +397,7 @@ public class ComponentVerifyTicketServiceImpl implements ComponentVerifyTicketSe
String expiresIn = authCodeAndTime.getExpiresIn();
// 公众号创建客户的id
String customerId = this.getLoginUserCustomerId(tokenDto);
String userId = tokenDto.getUserId();
Date expiresInTime = this.countExpirationTime(expiresIn);
@ -438,7 +439,7 @@ public class ComponentVerifyTicketServiceImpl implements ComponentVerifyTicketSe
paCustomerServiceImpl.modifyCustomer(modifyCustomer);
// 管理员授权
CustomerManagerFormDTO customerManager = paUserDao.selectManagerInfo(finalCustomerId);
CustomerManagerFormDTO customerManager = paUserDao.selectManagerInfo(userId);
log.info("=======================公众号的客户id为:"+finalCustomerId);
customerManager.setCustomerId(finalCustomerId);
operCrmOpenFeignClient.addManager(customerManager);

35
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/WarrantServiceImpl.java

@ -147,21 +147,26 @@ public class WarrantServiceImpl implements WarrantService {
Object createTime = xml.get(ModuleConstant.CREATE_TIME);
Date date = componentVerifyTicketServiceImpl.sToDate(createTime.toString());
messagePushTextFormDTO.setWeChatCreateTime(date);
messagePushTextDao.insertMessageText(messagePushTextFormDTO);
// switch (messagePushTextFormDTO.getContent()){
// //测试公众号处理用户消息
// case ModuleConstant.TESTCOMPONENT_MSG_TYPE_TEXT:
//
//
// }
// if (messagePushTextFormDTO.getContent().startsWith(ModuleConstant.QUERY_AUTH_CODE)){
// // 测试公众号使用客服消息接口处理用户消息
// String content = messagePushTextFormDTO.getContent();
// String contentBefore = content.substring(NumConstant.ZERO, content.indexOf(ThirdRedisKeyConstant.COLON));
// //auth_code
// String queryAuthCode = content.substring(contentBefore.length() + NumConstant.ONE, content.length());
//
// }
// messagePushTextDao.insertMessageText(messagePushTextFormDTO);
String content = messagePushTextFormDTO.getContent();
log.info(String.format(ThirdRunTimeInfoConstant.CONTENT,content));
/**
* 测试公众号处理用户消息
* 模拟粉丝发送文本消息给专用测试公众号第三方平台方需根据文本消息的内容进行相应的响应
* 1微信模推送给第三方平台方文本消息其中 Content 字段的内容固定为TESTCOMPONENT_MSG_TYPE_TEXT
* 2第三方平台方立马回应文本消息并最终触达粉丝Content 必须固定为TESTCOMPONENT_MSG_TYPE_TEXT_callback
*/
if (content.equals(ModuleConstant.TESTCOMPONENT_MSG_TYPE_TEXT)){
}else if (content.startsWith(ModuleConstant.QUERY_AUTH_CODE)){
// 测试公众号使用客服消息接口处理用户消息
String contentBefore = content.substring(NumConstant.ZERO, content.indexOf(ThirdRedisKeyConstant.COLON));
//auth_code
String queryAuthCode = content.substring(contentBefore.length() + NumConstant.ONE, content.length());
}
}
log.info("消息与事件接收URL【代码审核结果】结束......");
return ModuleConstant.SUCCESS;

7
epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/PaUserDao.xml

@ -58,12 +58,11 @@
pu.phone AS mobile
FROM
pa_user pu
LEFT JOIN customer_mp cm ON cm.created_by = pu.id
LEFT JOIN pa_customer_user_agency pcua ON pcua.user_id = pu.id
WHERE
pu.del_flag = '0'
AND cm.CUSTOMER_ID = #{customerId}
AND CM.DEL_FLAG = '0'
LIMIT 1
AND pu.id = #{userId}
AND pcua.DEL_FLAG = '0'
</select>
</mapper>
Loading…
Cancel
Save