查询敏感数据校验
This commit is contained in:
parent
3f40fc1e91
commit
dcd598aab2
@ -93,6 +93,10 @@ public class SysIotModelController {
|
|||||||
/** 获取物模型属性列表 */
|
/** 获取物模型属性列表 */
|
||||||
@PostMapping("/attribute/list")
|
@PostMapping("/attribute/list")
|
||||||
public PageDataInfo<SysIotModelFieldVo> querySysIotModelField(@RequestBody SysIotModelFieldDto sysIotModelFieldDto) {
|
public PageDataInfo<SysIotModelFieldVo> querySysIotModelField(@RequestBody SysIotModelFieldDto sysIotModelFieldDto) {
|
||||||
|
boolean hasPermission = StpUtil.hasPermission(SysAuthorityIds.SYS_AUTHORITY_ID_VIEW_CONFIDENTIAL_DATA.toString());
|
||||||
|
if (!hasPermission){
|
||||||
|
sysIotModelFieldDto.setConfidential(0);
|
||||||
|
}
|
||||||
if (sysIotModelFieldDto.getPageNum() == null && sysIotModelFieldDto.getPageSize() == null){
|
if (sysIotModelFieldDto.getPageNum() == null && sysIotModelFieldDto.getPageSize() == null){
|
||||||
List<SysIotModelFieldVo> sysIotModelFieldVos = sysIotModelService.queryAllModelField(sysIotModelFieldDto);
|
List<SysIotModelFieldVo> sysIotModelFieldVos = sysIotModelService.queryAllModelField(sysIotModelFieldDto);
|
||||||
return PageDataInfo.build(sysIotModelFieldVos,sysIotModelFieldVos.size());
|
return PageDataInfo.build(sysIotModelFieldVos,sysIotModelFieldVos.size());
|
||||||
|
@ -31,6 +31,9 @@
|
|||||||
<if test="info.subSystem != null and info.subSystem != ''">
|
<if test="info.subSystem != null and info.subSystem != ''">
|
||||||
and t.subsystem = #{info.subSystem}
|
and t.subsystem = #{info.subSystem}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="info.subSystem != null and info.subSystem != ''">
|
||||||
|
and t.confidential = #{info.confidential}
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
<if test="info.orderColumn != null and info.orderType != ''">
|
<if test="info.orderColumn != null and info.orderType != ''">
|
||||||
order by ${info.orderColumn} ${info.orderType}
|
order by ${info.orderColumn} ${info.orderType}
|
||||||
|
Loading…
Reference in New Issue
Block a user