From f980e10e33bdbd84bf26914f2061a6acba22104c Mon Sep 17 00:00:00 2001 From: zzl <961867786@qq.com> Date: Tue, 9 Sep 2025 17:47:50 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=B0=E5=9B=BE=E6=9F=A5=E8=AF=A2=E6=96=B9?= =?UTF-8?q?=E6=B3=95=20fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bigscreen/ResourceBigController.java | 32 +++++++++++++++++++ .../resource/TResourceLandController.java | 10 +----- 2 files changed, 33 insertions(+), 9 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/bigscreen/ResourceBigController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/bigscreen/ResourceBigController.java index 1f3819a..38a2bf3 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/bigscreen/ResourceBigController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/bigscreen/ResourceBigController.java @@ -1,14 +1,25 @@ package com.ruoyi.web.controller.bigscreen; import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.entity.SysDept; +import com.ruoyi.common.core.domain.model.LoginUser; +import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.core.redis.RedisCache; +import com.ruoyi.common.utils.ServletUtils; +import com.ruoyi.common.utils.StringUtils; import com.ruoyi.framework.web.service.TokenService; +import com.ruoyi.resource.domain.TResourceLand; +import com.ruoyi.resource.domain.TResourceLandMap; +import com.ruoyi.resource.service.ITResourceLandService; import com.ruoyi.system.service.ISysDeptService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; +import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import java.util.List; + /** * @description: * @author: zzl @@ -23,6 +34,9 @@ public class ResourceBigController extends BaseController { @Autowired private ISysDeptService sysDeptService; + @Autowired + private ITResourceLandService tResourceLandService; + @Autowired private TokenService tokenService; @@ -34,5 +48,23 @@ public class ResourceBigController extends BaseController { private int expireTime; + /** + * 查询地块属性列表 ,用于空间字段专属查询,避免敏感泄露 + */ + @GetMapping("/query") + public TableDataInfo query(TResourceLand tResourceLand) + { + if(StringUtils.isNull(tResourceLand.getDeptId())){ + LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest()); + SysDept dept = sysDeptService.selectDeptById(loginUser.getUser().getDeptId()); + tResourceLand.setImportCode(dept.getImportCode()); + }else{ + SysDept dept = sysDeptService.selectDeptById(tResourceLand.getDeptId()); + tResourceLand.setImportCode(dept.getImportCode()); + } + + List list = tResourceLandService.selectTResourceLandQuery(tResourceLand); + return getDataTable(list); + } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/resource/TResourceLandController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/resource/TResourceLandController.java index bbacbf7..80689be 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/resource/TResourceLandController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/resource/TResourceLandController.java @@ -82,15 +82,7 @@ public class TResourceLandController extends BaseController @GetMapping("/query") public TableDataInfo query(TResourceLand tResourceLand) { - if(StringUtils.isNull(tResourceLand.getDeptId())){ - LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest()); - SysDept dept = deptService.selectDeptById(loginUser.getUser().getDeptId()); - tResourceLand.setImportCode(dept.getImportCode()); - }else{ - SysDept dept = deptService.selectDeptById(tResourceLand.getDeptId()); - tResourceLand.setImportCode(dept.getImportCode()); - } - startPage(); + List list = tResourceLandService.selectTResourceLandQuery(tResourceLand); return getDataTable(list); }