Browse Source

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

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

6
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) { public List<MatrixAdminBo> adminList(int adminId, String channel) {
MatrixAdmin admin = adminMapper.selectById(adminId);
LambdaQueryWrapper<MatrixAdmin> query = Wrappers.lambdaQuery(); LambdaQueryWrapper<MatrixAdmin> query = Wrappers.lambdaQuery();
if (admin.getRole() == SUPER_ADMIN) {
query.eq(MatrixAdmin::getChannel, channel);
} else {
query.eq(MatrixAdmin::getChannel, channel); query.eq(MatrixAdmin::getChannel, channel);
query.eq(MatrixAdmin::getParentAdminId, adminId); query.eq(MatrixAdmin::getParentAdminId, adminId);
}
List<MatrixAdmin> res = adminMapper.selectList(query); List<MatrixAdmin> res = adminMapper.selectList(query);
List<MatrixAdminBo> data = res.stream().map(MatrixAdminBo::new).toList(); List<MatrixAdminBo> data = res.stream().map(MatrixAdminBo::new).toList();

Loading…
Cancel
Save