From 951b251e2107e8fb4b229cdd2432444e6f4bc93b Mon Sep 17 00:00:00 2001 From: wangliwen Date: Thu, 10 Nov 2022 15:24:37 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=BA=9A=E5=BE=AE=E7=9A=84?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- renren-admin/pom.xml | 2 +- .../controller/ResourceController.java | 27 +++++++++++++------ 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/renren-admin/pom.xml b/renren-admin/pom.xml index 90ff4c72..c1274993 100644 --- a/renren-admin/pom.xml +++ b/renren-admin/pom.xml @@ -327,7 +327,7 @@ application-bt.yml - application-dev.yml + application-hwx.yml application-my.yml application-prod.yml diff --git a/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java b/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java index 3f9087a5..fb7434b4 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java @@ -23,12 +23,11 @@ import io.renren.modules.resource.videoPreview.AbstractVideoPreviewService; import io.renren.modules.resource.videoPreview.VideoPreviewFactory; import io.renren.modules.security.user.SecurityUser; import io.renren.modules.security.user.UserDetail; -import io.renren.modules.security.user.SecurityUser; import io.renren.modules.sys.dao.SysUserDao; import io.renren.modules.sys.dto.SysDeptDTO; -import io.renren.modules.sys.enums.SuperAdminEnum; import io.renren.modules.sys.dto.SysUserDTO; import io.renren.modules.sys.entity.SysUserEntity; +import io.renren.modules.sys.enums.SuperAdminEnum; import io.renren.modules.sys.service.SysDeptService; import io.renren.modules.sys.service.SysUserService; import io.swagger.annotations.*; @@ -339,7 +338,7 @@ public class ResourceController { @ApiOperation("查询部门企业列表及汇聚能力数量") @LogOperation("查询部门企业列表及汇聚能力数量") public Result selectDeptList(@RequestBody JSONObject jsonObject) { - return new Result().ok(resourceService.selectDeptList(jsonObject, jsonObject.getString("type"))); + return new Result().ok(resourceService.selectDeptList(jsonObject, jsonObject.containsKey("type") ? (jsonObject.getString("type") == null ? "" : jsonObject.getString("type")) : "")); } @GetMapping("/updateVisits") @@ -564,7 +563,7 @@ public class ResourceController { String.format(" %s", sysUser.getGuid()) + String.format(" %d\n", page) + String.format(" %d\n", size) + - String.format(" %s\n", title==null ? "" : title) + + String.format(" %s\n", title == null ? "" : title) + " \n" + " \n" + ""; @@ -589,14 +588,26 @@ public class ResourceController { @GetMapping("ZywMessage/yaweiApproveDetails") @ApiOperation("数据资源审批详情转发") @LogOperation("数据资源审批详情转发") - public Result yaweiApproveDetails(@ApiParam("申请guid") String applyGuid, @ApiParam("部门guid") String deptGuid) { + public Result yaweiApproveDetails(@ApiParam("申请guid") String applyGuid +// , @ApiParam("部门guid") String deptGuid + ) { + Long userId = SecurityUser.getUserId(); + if (userId == null) { + return new Result<>().error("请登录"); + } + + SysUserEntity sysUser = sysUserDao.getById(userId); + if (sysUser == null || sysUser.getGuid() == null) { + return new Result<>().error("该账号没有权限"); + } String url = "http://15.72.158.81/zyjk/ZywMessage.asmx?op=ZyShowrecord"; String parame = "\n" + "\n" + " \n" + " \n" + String.format(" %s\n", applyGuid) + - String.format(" %s\n", deptGuid) + + String.format(" %s", sysUser.getGuid()) + +// String.format(" %s\n", deptGuid) + " \n" + " \n" + ""; @@ -876,7 +887,7 @@ public class ResourceController { } else { try { resourceService.delResBySuAd(id); - }catch (Exception e) { + } catch (Exception e) { return new Result().error("清除能力及相关数据失败!"); } return new Result().ok("能力及相关数据已清除。"); @@ -894,7 +905,7 @@ public class ResourceController { } else { try { resourceService.delProcinstBySuAd(id, type, resourceId); - }catch (Exception e) { + } catch (Exception e) { return new Result().error("清除流程及相关数据失败!"); } return new Result().ok("流程及相关数据已清除。");