This commit is contained in:
77
2024-08-01 15:36:12 +08:00
parent a872a3d26c
commit cb1ccccd4d
2 changed files with 4 additions and 0 deletions

View File

@@ -109,16 +109,19 @@ public class YxNotifyController {
String md5 = request.getHeader("MD5");
String checkSum = request.getHeader("CheckSum");
String requestBody = readBody(request);
log.warn("收到云信");
boolean check = yunxinManager.checkNotify(requestBody, curTime, checkSum,md5);
if(!check){
log.info("检验失败!");
return ImCheckResp.ok();
}
log.warn("检验云信");
JSONObject body = JSON.parseObject(requestBody);
if(body == null){
return ImCheckResp.ok();
}
boolean message = imManager.filterMessage(body);
log.warn("完成云信 me{}",message);
if(message){
return ImCheckResp.ok();
}else{

View File

@@ -22,6 +22,7 @@ public class EncryptionFilter implements Filter {
IGNORE_URL.add("/api/pay/ali/notify");
IGNORE_URL.add("/api/pay/wx/notify");
IGNORE_URL.add("/api/yx/im/notify");
IGNORE_URL.add("/api/yx/im/check");
}
private static final AntPathMatcher ANT_PATH_MATCHER = new AntPathMatcher();