diff --git a/renren-admin/pom.xml b/renren-admin/pom.xml index c2f4d63c..4b929984 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("流程及相关数据已清除。");