疯狂的狮子li
2022-01-17 a43e6e06e086e778e6ac3fdba7b5e8fafa090ed8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package com.ruoyi.system.service.impl;
 
import com.ruoyi.common.core.service.SensitiveService;
import com.ruoyi.common.helper.LoginHelper;
import com.ruoyi.common.utils.SecurityUtils;
import org.springframework.stereotype.Service;
 
/**
 * 脱敏服务
 * 默认管理员不过滤
 * 需自行根据业务重写实现
 *
 * @author Lion Li
 * @version 3.6.0
 */
@Service
public class SysSensitiveServiceImpl implements SensitiveService {
 
    /**
     * 是否脱敏
     */
    @Override
    public boolean isSensitive() {
        return SecurityUtils.isAdmin(LoginHelper.getUserId());
    }
 
}