|
|
|
@@ -8,6 +8,8 @@ import com.xueyi.common.core.web.vo.DeviceTenantSourceMergeVo; |
|
|
|
import com.xueyi.common.web.entity.domain.mapper.DeviceTenantMergeMapper; |
|
|
|
import com.xueyi.system.api.device.feign.RemoteDeviceTenantMergeService; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.slf4j.Logger; |
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.web.method.HandlerMethod; |
|
|
|
import org.springframework.web.servlet.HandlerInterceptor; |
|
|
|
@@ -23,6 +25,8 @@ import javax.servlet.http.HttpServletResponse; |
|
|
|
*/ |
|
|
|
public class ApiRequestInterceptor implements HandlerInterceptor { |
|
|
|
|
|
|
|
private static final Logger logger = LoggerFactory.getLogger(ApiRequestInterceptor.class); |
|
|
|
|
|
|
|
@Autowired |
|
|
|
RemoteDeviceTenantMergeService remoteDeviceTenantMergeService; |
|
|
|
|
|
|
|
@@ -37,7 +41,14 @@ public class ApiRequestInterceptor implements HandlerInterceptor { |
|
|
|
return true; |
|
|
|
} |
|
|
|
|
|
|
|
JSONObject jsonObject = JSONObject.parseObject(DecodeRequestUtils.getRequestPostStr(request));// 解析请求参数 |
|
|
|
String str = DecodeRequestUtils.getRequestPostStr(request); |
|
|
|
|
|
|
|
logger.info("请求参数:{}", str); |
|
|
|
|
|
|
|
JSONObject jsonObject = null; |
|
|
|
if (str.indexOf("{")>-1) { |
|
|
|
jsonObject = JSONObject.parseObject(str);// 解析请求参数 |
|
|
|
} |
|
|
|
|
|
|
|
if ((request.getParameterMap().containsKey("deviceId")||request.getParameterMap().containsKey("devId")) || (jsonObject!=null && (jsonObject.containsKey("deviceId")||jsonObject.containsKey("devId")))) { |
|
|
|
String devId = request.getParameter("deviceId"); |
|
|
|
|