|
@ -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(); |
|
|