代码优化

This commit is contained in:
yanglei 2026-02-27 09:03:13 +08:00
parent 057a45d065
commit 159bde0779

View File

@ -64,7 +64,7 @@ public class EbikeStatisticsController {
boolean isSuperAdmin = Optional.ofNullable(staffInfo.getRoles())
.orElse(Collections.emptyList())
.stream()
.anyMatch(role -> "super_admin".equals(role.getRoleCode()));
.anyMatch(CommonEbikeRole::getSysAdmin);
// 判断是否超级管理员
if (!isSuperAdmin) {
dto.setOperatorId(staffInfo.getOperatorId());