Browse Source

超级管理员可以看到渠道下所有账号

master
nili 8 months ago
parent
commit
72eac91f88
  1. 10
      game-service/src/main/java/awesome/group/game/service/AdminService.java

10
game-service/src/main/java/awesome/group/game/service/AdminService.java

@ -169,9 +169,15 @@ public class AdminService {
}
public List<MatrixAdminBo> adminList(int adminId, String channel) {
MatrixAdmin admin = adminMapper.selectById(adminId);
LambdaQueryWrapper<MatrixAdmin> query = Wrappers.lambdaQuery();
query.eq(MatrixAdmin::getChannel, channel);
query.eq(MatrixAdmin::getParentAdminId, adminId);
if (admin.getRole() == SUPER_ADMIN) {
query.eq(MatrixAdmin::getChannel, channel);
} else {
query.eq(MatrixAdmin::getChannel, channel);
query.eq(MatrixAdmin::getParentAdminId, adminId);
}
List<MatrixAdmin> res = adminMapper.selectList(query);
List<MatrixAdminBo> data = res.stream().map(MatrixAdminBo::new).toList();

Loading…
Cancel
Save