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