feat:通知
This commit is contained in:
@@ -33,10 +33,6 @@
|
||||
<groupId>com.aliyun.oss</groupId>
|
||||
<artifactId>aliyun-sdk-oss</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.dataformat</groupId>
|
||||
<artifactId>jackson-dataformat-xml</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
|
||||
@@ -46,7 +46,6 @@ import com.cool.store.utils.RedisConstantUtil;
|
||||
import com.cool.store.utils.RedisUtilPool;
|
||||
import com.cool.store.utils.poi.StringUtils;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.dataformat.xml.XmlMapper;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -562,7 +561,6 @@ public class PCTestController {
|
||||
}
|
||||
return request;
|
||||
}
|
||||
private final XmlMapper xmlMapper = new XmlMapper();
|
||||
@Autowired
|
||||
WeChatHandler weChatHandler;
|
||||
|
||||
@@ -582,14 +580,9 @@ public class PCTestController {
|
||||
System.out.println("echostr: " + echostr);
|
||||
System.out.println("requestBody: " + requestBody);
|
||||
|
||||
// 验证签名
|
||||
// if (!verifySignature(signature, timestamp, nonce, TOKEN)) {
|
||||
// return "signature verification failed";
|
||||
// }
|
||||
if (StringUtils.isNotEmpty(requestBody)) {
|
||||
try {
|
||||
CallbackMessageDTO message = xmlMapper.readValue(requestBody, CallbackMessageDTO.class);
|
||||
return weChatHandler.processMessage(message);
|
||||
return weChatHandler.processMessage(weChatHandler.parseXmlToMap(requestBody));
|
||||
} catch (Exception e) {
|
||||
log.info("回调处理失败 e:{}",e.getMessage());
|
||||
return "success";
|
||||
|
||||
Reference in New Issue
Block a user