|
|
@ -132,12 +132,12 @@ public class AdminService { |
|
|
|
int page = param.current; |
|
|
|
int pageSize = param.pageSize; |
|
|
|
PageResult<MatrixAdvRecordBo> res = new PageResult<>(); |
|
|
|
// if (page == 1) {
|
|
|
|
// QueryWrapper<MatrixAdvRecord> sumQuery = wrapper.clone();
|
|
|
|
// sumQuery.select("sum(ecpm) as ecpm");
|
|
|
|
// MatrixAdvRecord sum = advRecordMapper.selectOne(sumQuery);
|
|
|
|
// res.sum = sum != null ? sum.getEcpm() : 0L;
|
|
|
|
// }
|
|
|
|
if (page == 1) { |
|
|
|
QueryWrapper<MatrixAdvRecord> sumQuery = wrapper.clone(); |
|
|
|
sumQuery.select("sum(ecpm) as ecpm"); |
|
|
|
MatrixAdvRecord sum = advRecordMapper.selectOne(sumQuery); |
|
|
|
res.sum = sum != null ? sum.getEcpm() : 0L; |
|
|
|
} |
|
|
|
|
|
|
|
wrapper.orderByDesc("id"); |
|
|
|
IPage<MatrixAdvRecord> iPage = advRecordMapper.selectPage(new Page<>(page, pageSize), wrapper); |
|
|
|