diff --git a/renren-admin/src/main/java/io/renren/modules/security/oauth2/Oauth2Filter.java b/renren-admin/src/main/java/io/renren/modules/security/oauth2/Oauth2Filter.java index 6a310599..4ce32253 100644 --- a/renren-admin/src/main/java/io/renren/modules/security/oauth2/Oauth2Filter.java +++ b/renren-admin/src/main/java/io/renren/modules/security/oauth2/Oauth2Filter.java @@ -104,14 +104,6 @@ public class Oauth2Filter extends AuthenticatingFilter { 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 protected boolean onLoginFailure(AuthenticationToken token, AuthenticationException e, ServletRequest request, ServletResponse response) { try { @@ -233,6 +225,8 @@ public class Oauth2Filter extends AuthenticatingFilter { request.setAttribute(Constant.TOKEN_HEADER, currentToken); return executeLogin(request, response); + }else { + send401Error(response, "未找到相关用户"); } } } diff --git a/renren-admin/src/main/java/io/renren/modules/warningList/controller/ShangTangWarningController.java b/renren-admin/src/main/java/io/renren/modules/warningList/controller/ShangTangWarningController.java index 6e3cca03..347e853a 100644 --- a/renren-admin/src/main/java/io/renren/modules/warningList/controller/ShangTangWarningController.java +++ b/renren-admin/src/main/java/io/renren/modules/warningList/controller/ShangTangWarningController.java @@ -85,11 +85,12 @@ public class ShangTangWarningController { event.setLongitude(camera.getBigDecimal("longitude")); } JSONObject image = jsonObject.getJSONObject("image"); - if(image==null){ - }else{ + // 用nginx转发解决跨域,使用相对路径(假设对方地址不变) + if(image != null){ String images = image.getString("imageUrl"); - String all = images.replaceAll(images.substring(19, 26), "7:8070"); - event.setImageUrl(all); + if (images != null) { + event.setImageUrl(images.replace("http://10.132.191.47:30080", "")); + } } event.setTaskId(jsonObject.getString("taskId")); diff --git a/renren-admin/src/main/resources/application-prod.yml b/renren-admin/src/main/resources/application-prod.yml index 3cc1c064..2c26453b 100644 --- a/renren-admin/src/main/resources/application-prod.yml +++ b/renren-admin/src/main/resources/application-prod.yml @@ -47,7 +47,8 @@ big_date: hisense: gateway: - url: http://devtest-security-app.hismarttv.com:8080 + url: http://15.72.184.7:8080 + qdyjj: ipAndPort: 15.72.178.136:9494 \ No newline at end of file diff --git a/renren-admin/src/main/resources/mapper/resource/ResourceDao.xml b/renren-admin/src/main/resources/mapper/resource/ResourceDao.xml index ef8b0d80..b4b8ff77 100644 --- a/renren-admin/src/main/resources/mapper/resource/ResourceDao.xml +++ b/renren-admin/src/main/resources/mapper/resource/ResourceDao.xml @@ -296,7 +296,7 @@ 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} 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 LEFT JOIN sys_dept sd ON tdr.dept_id = sd.id WHERE 1 = 1