Browse Source

算表格收益

master
nili 7 months ago
parent
commit
ea201879f5
  1. 12
      game-service/src/main/java/awesome/group/game/service/matrix/AdminService.java

12
game-service/src/main/java/awesome/group/game/service/matrix/AdminService.java

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

Loading…
Cancel
Save