临时提交

This commit is contained in:
648540858
2024-08-15 17:45:24 +08:00
parent 1cbd8d677c
commit abed3ecbec
32 changed files with 472 additions and 971 deletions

View File

@@ -1,12 +1,9 @@
package com.genersoft.iot.vmp.conf;
import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.support.spring.http.converter.FastJsonHttpMessageConverter;
import com.genersoft.iot.vmp.vmanager.bean.ErrorCode;
import com.genersoft.iot.vmp.vmanager.bean.WVPResult;
import org.jetbrains.annotations.NotNull;
import org.springframework.boot.autoconfigure.http.HttpMessageConverters;
import org.springframework.context.annotation.Bean;
import org.springframework.core.MethodParameter;
import org.springframework.http.MediaType;
import org.springframework.http.converter.HttpMessageConverter;
@@ -15,6 +12,8 @@ import org.springframework.http.server.ServerHttpResponse;
import org.springframework.web.bind.annotation.RestControllerAdvice;
import org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice;
import java.util.LinkedHashMap;
/**
* 全局统一返回结果
* @author lin
@@ -52,6 +51,13 @@ public class GlobalResponseAdvice implements ResponseBodyAdvice<Object> {
return JSON.toJSONString(WVPResult.success(body));
}
if (body instanceof LinkedHashMap) {
LinkedHashMap<String, Object> bodyMap = (LinkedHashMap<String, Object>) body;
if (bodyMap.get("status") != null && (Integer)bodyMap.get("status") != 200) {
return body;
}
}
return WVPResult.success(body);
}

View File

@@ -46,7 +46,7 @@ public class SipPlatformRunner implements CommandLineRunner {
// 更新缓存
PlatformCatch parentPlatformCatch = new PlatformCatch();
parentPlatformCatch.setParentPlatform(parentPlatform);
parentPlatformCatch.setPlatform(parentPlatform);
parentPlatformCatch.setId(parentPlatform.getServerGBId());
redisCatchStorage.updatePlatformCatchInfo(parentPlatformCatch);
if (parentPlatformCatchOld != null) {