SysSensitiveServiceImpl.java 595 B

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