From c283299fc84ba2999c0627bf5efe225003411516 Mon Sep 17 00:00:00 2001 From: huangweixiong Date: Fri, 3 Jun 2022 18:05:06 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E3=80=90=E5=8D=95=E7=82=B9=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E3=80=91=E6=9C=AA=E6=89=BE=E5=88=B0=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../renren/modules/security/oauth2/Oauth2Filter.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) 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, "未找到相关用户"); } } } From 43524dc5d97da39eeee08e81baddd9609e2027db Mon Sep 17 00:00:00 2001 From: huangweixiong Date: Thu, 9 Jun 2022 16:27:29 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E7=94=B3=E8=AF=B7=E5=8D=95=E5=8E=BB?= =?UTF-8?q?=E9=87=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- renren-admin/src/main/resources/mapper/resource/ResourceDao.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From a0749f2573aa45b7de6c82520ee084a40c806bdc Mon Sep 17 00:00:00 2001 From: huangweixiong Date: Fri, 10 Jun 2022 09:57:18 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=94=9F=E4=BA=A7?= =?UTF-8?q?=E7=8E=AF=E5=A2=83=E7=9A=84=E7=BD=91=E5=85=B3=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- renren-admin/src/main/resources/application-prod.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 From a5acf770735fbf9edb980c52852d930ea2860ff2 Mon Sep 17 00:00:00 2001 From: huangweixiong Date: Fri, 10 Jun 2022 14:45:39 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E5=95=86=E6=B1=A4=E7=AE=97=E6=B3=95?= =?UTF-8?q?=E5=9B=BE=E7=89=87=E8=A7=A3=E5=86=B3=E8=B7=A8=E5=9F=9F=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/ShangTangWarningController.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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"));