From 2bf3d0b73d84a3c4d63ca77c55f9229ee0f71c0e Mon Sep 17 00:00:00 2001 From: huangweixiong Date: Wed, 9 Nov 2022 10:07:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=9A=E5=A8=81=E8=B5=84=E6=BA=90=E7=94=B3?= =?UTF-8?q?=E8=AF=B7=E5=88=97=E8=A1=A8=E5=8F=82=E6=95=B0=E5=8A=A8=E6=80=81?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/ResourceController.java | 26 ++++++++++++++++--- 1 file changed, 22 insertions(+), 4 deletions(-) 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 9fe3bd84..147eb93c 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 @@ -19,8 +19,13 @@ import io.renren.modules.resource.excel.ResourceExcelImportListener; import io.renren.modules.resource.service.ResourceService; 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.sys.dao.SysUserDao; import io.renren.modules.sys.dto.SysDeptDTO; +import io.renren.modules.sys.dto.SysUserDTO; +import io.renren.modules.sys.entity.SysUserEntity; import io.renren.modules.sys.service.SysDeptService; +import io.renren.modules.sys.service.SysUserService; import io.swagger.annotations.*; import org.apache.commons.lang.StringUtils; import org.slf4j.Logger; @@ -109,6 +114,8 @@ public class ResourceController { @Autowired private SysDeptService sysDeptService; + private SysUserDao sysUserDao; + @Resource(name = "${hisense.gateway.name}") private ApiGateway apiGateway; @@ -450,15 +457,26 @@ public class ResourceController { if (page == null) page = 1; if (size == null) size = 10; + 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"; String parame = "\n" + "\n" + " \n" + " \n" + - " e8d2fb43-f512-4918-ab47-1141b925af10\n" + - " 1\n" + - " 10\n" + - " \n" + +// " e8d2fb43-f512-4918-ab47-1141b925af10\n" + + String.format("%s", sysUser.getGuid()) + + String.format("%d", page) + + String.format("%d", size) + + title != null ? String.format("%s", title) : "" + " \n" + " \n" + "";