|
|
@ -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; |
|
|
|