查询敏感数据校验

This commit is contained in:
huguanghan 2024-12-17 09:41:56 +08:00
parent 3f40fc1e91
commit dcd598aab2
2 changed files with 7 additions and 0 deletions

View File

@ -93,6 +93,10 @@ public class SysIotModelController {
/** 获取物模型属性列表 */
@PostMapping("/attribute/list")
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){
List<SysIotModelFieldVo> sysIotModelFieldVos = sysIotModelService.queryAllModelField(sysIotModelFieldDto);
return PageDataInfo.build(sysIotModelFieldVos,sysIotModelFieldVos.size());

View File

@ -31,6 +31,9 @@
<if test="info.subSystem != null and info.subSystem != ''">
and t.subsystem = #{info.subSystem}
</if>
<if test="info.subSystem != null and info.subSystem != ''">
and t.confidential = #{info.confidential}
</if>
</where>
<if test="info.orderColumn != null and info.orderType != ''">
order by ${info.orderColumn} ${info.orderType}