待做权限隔离
This commit is contained in:
parent
2beddf0e90
commit
77d3a20530
|
@ -65,9 +65,11 @@ public class DataScopeUtil {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mybatis直接使用的方法
|
* Mybatis直接使用的方法
|
||||||
* @param deptAlias
|
* @param deptAlias 部门别名
|
||||||
* @param userAlias
|
* @param userAlias 用户别名
|
||||||
* @param needScope
|
* @param deptSetAlias 部门逗号分隔字段别名
|
||||||
|
* @param userSetAlias 用户逗号分隔字段别名
|
||||||
|
* @param needScope 是否需要数据隔离
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public static String dataScope(String deptAlias, String userAlias, String deptSetAlias, String userSetAlias, boolean needScope) {
|
public static String dataScope(String deptAlias, String userAlias, String deptSetAlias, String userSetAlias, boolean needScope) {
|
||||||
|
|
|
@ -37,6 +37,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</if>
|
</if>
|
||||||
<if test="query.faultDetail != null and query.faultDetail != ''"> and bf.fault_detail = #{query.faultDetail}</if>
|
<if test="query.faultDetail != null and query.faultDetail != ''"> and bf.fault_detail = #{query.faultDetail}</if>
|
||||||
<if test="query.appealStatus != null and query.appealStatus != ''"> and bf.appeal_status = #{query.appealStatus}</if>
|
<if test="query.appealStatus != null and query.appealStatus != ''"> and bf.appeal_status = #{query.appealStatus}</if>
|
||||||
|
${@com.ruoyi.framework.util.datascopeutil@dataScope(
|
||||||
|
null,
|
||||||
|
"ba.user_id,ba.create_id",
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
query.scope
|
||||||
|
)}
|
||||||
${query.params.dataScope}
|
${query.params.dataScope}
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
|
|
|
@ -35,12 +35,6 @@ public class AppFaultController extends BaseController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private FaultService faultService;
|
private FaultService faultService;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private DeviceService deviceService;
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private OrderService orderService;
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private FaultConverter faultConverter;
|
private FaultConverter faultConverter;
|
||||||
|
|
||||||
|
|
|
@ -42,6 +42,7 @@ public class FaultController extends BaseController
|
||||||
{
|
{
|
||||||
startPage();
|
startPage();
|
||||||
startOrderBy();
|
startOrderBy();
|
||||||
|
query.setScope(true);
|
||||||
List<FaultVO> list = faultService.selectFaultList(query);
|
List<FaultVO> list = faultService.selectFaultList(query);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user