|
@ -130,10 +130,15 @@ public class AdminService { |
|
|
wrapper.orderByDesc("id"); |
|
|
wrapper.orderByDesc("id"); |
|
|
IPage<MatrixAdvRecord> iPage = advRecordMapper.selectPage(new Page<>(page, pageSize), wrapper); |
|
|
IPage<MatrixAdvRecord> iPage = advRecordMapper.selectPage(new Page<>(page, pageSize), wrapper); |
|
|
Map<Integer, MatrixApp> appMap = appList.stream().collect(Collectors.toMap(MatrixApp::getId, x -> x)); |
|
|
Map<Integer, MatrixApp> appMap = appList.stream().collect(Collectors.toMap(MatrixApp::getId, x -> x)); |
|
|
|
|
|
List<MatrixAdmin> adminList = adminMapper.selectList(null); |
|
|
|
|
|
Map<Integer, String> adminMap = adminList.stream().collect(Collectors.toMap(MatrixAdmin::getId, MatrixAdmin::getName)); |
|
|
res.total = iPage.getTotal(); |
|
|
res.total = iPage.getTotal(); |
|
|
res.data = iPage.getRecords().stream().map(x -> { |
|
|
res.data = iPage.getRecords().stream().map(x -> { |
|
|
MatrixAdvRecordBo bo = new MatrixAdvRecordBo(x, appMap.get(x.getAppId())); |
|
|
MatrixAdvRecordBo bo = new MatrixAdvRecordBo(x, appMap.get(x.getAppId())); |
|
|
BeanUtils.copyProperties(x, bo); |
|
|
BeanUtils.copyProperties(x, bo); |
|
|
|
|
|
if (x.getAdminId() != null) { |
|
|
|
|
|
bo.adminName = adminMap.get(x.getAdminId()); |
|
|
|
|
|
} |
|
|
return bo; |
|
|
return bo; |
|
|
}).toList(); |
|
|
}).toList(); |
|
|
return res; |
|
|
return res; |
|
|