数据
This commit is contained in:
@@ -109,19 +109,16 @@ public class YxNotifyController {
|
|||||||
String md5 = request.getHeader("MD5");
|
String md5 = request.getHeader("MD5");
|
||||||
String checkSum = request.getHeader("CheckSum");
|
String checkSum = request.getHeader("CheckSum");
|
||||||
String requestBody = readBody(request);
|
String requestBody = readBody(request);
|
||||||
log.warn("收到云信");
|
|
||||||
boolean check = yunxinManager.checkNotify(requestBody, curTime, checkSum,md5);
|
boolean check = yunxinManager.checkNotify(requestBody, curTime, checkSum,md5);
|
||||||
if(!check){
|
if(!check){
|
||||||
log.info("检验失败!");
|
log.info("检验失败!");
|
||||||
return ImCheckResp.ok();
|
return ImCheckResp.ok();
|
||||||
}
|
}
|
||||||
log.warn("检验云信");
|
|
||||||
JSONObject body = JSON.parseObject(requestBody);
|
JSONObject body = JSON.parseObject(requestBody);
|
||||||
if(body == null){
|
if(body == null){
|
||||||
return ImCheckResp.ok();
|
return ImCheckResp.ok();
|
||||||
}
|
}
|
||||||
boolean message = imManager.filterMessage(body);
|
boolean message = imManager.filterMessage(body);
|
||||||
log.warn("完成云信 me{}",message);
|
|
||||||
if(message){
|
if(message){
|
||||||
return ImCheckResp.ok();
|
return ImCheckResp.ok();
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
@@ -160,7 +160,14 @@ public class ImManager {
|
|||||||
if(filterSet.contains(RECORD_ID_FILTER)){
|
if(filterSet.contains(RECORD_ID_FILTER)){
|
||||||
String ext = body.getString("ext");
|
String ext = body.getString("ext");
|
||||||
JSONObject extJson = JSON.parseObject(ext);
|
JSONObject extJson = JSON.parseObject(ext);
|
||||||
|
if(extJson == null){
|
||||||
|
log.error("IM拦截成功! 拦截到用户脚本请求数据={}",body.toJSONString());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
String recordId = extJson.getString("recordId");
|
String recordId = extJson.getString("recordId");
|
||||||
|
if(StringUtils.isBlank(recordId)){
|
||||||
|
recordId = extJson.getString("record_id");
|
||||||
|
}
|
||||||
if(StringUtils.isEmpty(recordId) || "0".equals(recordId)){
|
if(StringUtils.isEmpty(recordId) || "0".equals(recordId)){
|
||||||
log.error("IM拦截成功! 拦截到用户脚本请求数据={}",body.toJSONString());
|
log.error("IM拦截成功! 拦截到用户脚本请求数据={}",body.toJSONString());
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user