This commit is contained in:
wangliwen 2022-06-10 18:01:05 +08:00
commit 657cfc0915
4 changed files with 10 additions and 14 deletions

View File

@ -104,14 +104,6 @@ public class Oauth2Filter extends AuthenticatingFilter {
return false; return false;
} }
private String getYaweiUserIdCookieInResponse(HttpServletResponse response) {
String userIdKey = "UserID=";
for (String header : response.getHeaders("set-cookie")) {
if (header.startsWith(userIdKey)) return header.substring(userIdKey.length());
}
return null;
}
@Override @Override
protected boolean onLoginFailure(AuthenticationToken token, AuthenticationException e, ServletRequest request, ServletResponse response) { protected boolean onLoginFailure(AuthenticationToken token, AuthenticationException e, ServletRequest request, ServletResponse response) {
try { try {
@ -233,6 +225,8 @@ public class Oauth2Filter extends AuthenticatingFilter {
request.setAttribute(Constant.TOKEN_HEADER, currentToken); request.setAttribute(Constant.TOKEN_HEADER, currentToken);
return executeLogin(request, response); return executeLogin(request, response);
}else {
send401Error(response, "未找到相关用户");
} }
} }
} }

View File

@ -85,11 +85,12 @@ public class ShangTangWarningController {
event.setLongitude(camera.getBigDecimal("longitude")); event.setLongitude(camera.getBigDecimal("longitude"));
} }
JSONObject image = jsonObject.getJSONObject("image"); JSONObject image = jsonObject.getJSONObject("image");
if(image==null){ // 用nginx转发解决跨域使用相对路径假设对方地址不变
}else{ if(image != null){
String images = image.getString("imageUrl"); String images = image.getString("imageUrl");
String all = images.replaceAll(images.substring(19, 26), "7:8070"); if (images != null) {
event.setImageUrl(all); event.setImageUrl(images.replace("http://10.132.191.47:30080", ""));
}
} }
event.setTaskId(jsonObject.getString("taskId")); event.setTaskId(jsonObject.getString("taskId"));

View File

@ -47,7 +47,8 @@ big_date:
hisense: hisense:
gateway: gateway:
url: http://devtest-security-app.hismarttv.com:8080 url: http://15.72.184.7:8080
qdyjj: qdyjj:
ipAndPort: 15.72.178.136:9494 ipAndPort: 15.72.178.136:9494

View File

@ -296,7 +296,7 @@
LEFT JOIN ( SELECT resource_id, user_id, ( CASE COUNT( id ) WHEN 1 THEN 'true' ELSE 'false' END ) AS "isCollect" LEFT JOIN ( SELECT resource_id, user_id, ( CASE COUNT( id ) WHEN 1 THEN 'true' ELSE 'false' END ) AS "isCollect"
FROM tb_resource_collection WHERE 1 = 1 AND del_flag = 0 AND user_id = #{dto.creator} FROM tb_resource_collection WHERE 1 = 1 AND del_flag = 0 AND user_id = #{dto.creator}
GROUP BY resource_id) trc2 ON tdr.id = trc2.resource_id GROUP BY resource_id) trc2 ON tdr.id = trc2.resource_id
LEFT JOIN ( SELECT resource_id, approve_status FROM t_ability_application WHERE 1 = 1 AND del_flag = 0 AND user_id = #{dto.creator} LEFT JOIN ( SELECT DISTINCT resource_id, approve_status FROM t_ability_application WHERE 1 = 1 AND del_flag = 0 AND user_id = #{dto.creator}
GROUP BY id) taa2 ON tdr.id = taa2.resource_id GROUP BY id) taa2 ON tdr.id = taa2.resource_id
LEFT JOIN sys_dept sd ON tdr.dept_id = sd.id LEFT JOIN sys_dept sd ON tdr.dept_id = sd.id
WHERE 1 = 1 WHERE 1 = 1