Procházet zdrojové kódy

Merge remote-tracking branch 'origin/master'

master
yangfuda před 1 týdnem
rodič
revize
0976c1560d
2 změnil soubory, kde provedl 33 přidání a 9 odebrání
  1. +32
    -0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/bigscreen/ResourceBigController.java
  2. +1
    -9
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/resource/TResourceLandController.java

+ 32
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/bigscreen/ResourceBigController.java Zobrazit soubor

@@ -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<TResourceLandMap> list = tResourceLandService.selectTResourceLandQuery(tResourceLand);
return getDataTable(list);
}

}

+ 1
- 9
ruoyi-admin/src/main/java/com/ruoyi/web/controller/resource/TResourceLandController.java Zobrazit soubor

@@ -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<TResourceLandMap> list = tResourceLandService.selectTResourceLandQuery(tResourceLand);
return getDataTable(list);
}


Načítá se…
Zrušit
Uložit