Browse Source

Merge remote-tracking branch 'origin/dev' into release

master
zxc 5 years ago
parent
commit
d5c26b2637
  1. 2
      epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-dev.yml
  2. 2
      epmet-module/epmet-third/epmet-third-server/pom.xml
  3. 4
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PreAuthTokenDao.java
  4. 2
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ComponentVerifyTicketServiceImpl.java
  5. 19
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/WarrantServiceImpl.java
  6. 8
      epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/PreAuthTokenDao.xml

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.104
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-third-server:0.0.105
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.104</version>
<version>0.0.105</version>
<parent>
<groupId>com.epmet</groupId>

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

@ -39,10 +39,10 @@ public interface PreAuthTokenDao extends BaseDao<PreAuthTokenEntity> {
void insertPreAuthToken(PreAuthTokenFormDTO formDTO);
/**
* @Description 逻辑 pre_auth_code
* @Description pre_auth_code
* @param
* @author zxc
*/
void updateOldPreAuthCode();
void deleteOldPreAuthCode();
}

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

@ -265,7 +265,7 @@ public class ComponentVerifyTicketServiceImpl implements ComponentVerifyTicketSe
formDTO.setPreAuthToken(preAuthCode);
formDTO.setExpiresInTime(expiresInTime);
//先逻辑删除,在插入DB
preAuthTokenDao.updateOldPreAuthCode();
preAuthTokenDao.deleteOldPreAuthCode();
preAuthTokenDao.insertPreAuthToken(formDTO);
//预授权码 放入缓存
redisThird.setPreAuthCode(preAuthCode);

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

@ -166,6 +166,7 @@ public class WarrantServiceImpl implements WarrantService {
}
String codeCustomerId = codeCustomerDao.selectCodeCustomerId(codeAuditRecord);
codeAuditResultDao.updateAuditResult(customerId, codeCustomerId, codeResult);
log.info("消息与事件接收URL【代码审核结果】结束......");
}else {
this.replyEventMessage(request,response,event,toUserName,fromUserName);
}
@ -178,31 +179,23 @@ public class WarrantServiceImpl implements WarrantService {
// 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());
}*/
this.processTextMessage(request,response,content,toUserName,fromUserName);
}
log.info("消息与事件接收URL【代码审核结果】结束......");
return ModuleConstant.SUCCESS;
}
/**
* @Description 钉钉机器人报警
* @author zxc
* @date 2020/8/5 4:33 下午
*/
public void dingDingRobot(String result,String event,String customerName,String clientType){
DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/robot/send?access_token=5b48fcbc3fde24b8ba4696aa062b7f8146479a9d3467dbb1f9cf132ec36b955a");
OapiRobotSendRequest request = new OapiRobotSendRequest();

8
epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/PreAuthTokenDao.xml

@ -30,9 +30,9 @@
)
</insert>
<!-- 逻辑删pre_auth_code -->
<update id="updateOldPreAuthCode">
update pre_auth_token set del_flag = 1
</update>
<!-- 删pre_auth_code -->
<delete id="deleteOldPreAuthCode">
delete from pre_auth_token where del_flag = 0
</delete>
</mapper>
Loading…
Cancel
Save