|
|
@ -120,7 +120,7 @@ public class AdminService { |
|
|
|
int page = param.current; |
|
|
|
int pageSize = param.pageSize; |
|
|
|
PageResult<MatrixAdvRecordBo> res = new PageResult<>(); |
|
|
|
if (page == 1 && StringUtils.hasText(param.deviceId)) { |
|
|
|
if (page == 1) { |
|
|
|
QueryWrapper<MatrixAdvRecord> sumQuery = wrapper.clone(); |
|
|
|
sumQuery.select("sum(ecpm) as ecpm"); |
|
|
|
MatrixAdvRecord sum = advRecordMapper.selectOne(sumQuery); |
|
|
@ -265,7 +265,9 @@ public class AdminService { |
|
|
|
} |
|
|
|
|
|
|
|
public List<MatrixMockSchedule> mockScheduleList() { |
|
|
|
return mockScheduleMapper.selectList(null); |
|
|
|
List<MatrixMockSchedule> data = mockScheduleMapper.selectList(new QueryWrapper<MatrixMockSchedule>().last("limit 200")); |
|
|
|
Collections.reverse(data); |
|
|
|
return data; |
|
|
|
} |
|
|
|
|
|
|
|
public void addMockSchedule(AddMockScheduleReq bo) { |
|
|
@ -273,12 +275,15 @@ public class AdminService { |
|
|
|
if (app == null || !StringUtils.hasText(app.getChannel())) { |
|
|
|
throw new PaganiException(PaganiExceptionCode.ILLEGAL_REQUEST, "应用不存在或渠道为空"); |
|
|
|
} |
|
|
|
MatrixMockSchedule schedule = new MatrixMockSchedule(); |
|
|
|
schedule.setAppId(bo.appId); |
|
|
|
schedule.setScheduleTime(new Timestamp(bo.scheduleTime)); |
|
|
|
schedule.setChannel(app.getChannel()); |
|
|
|
schedule.setIncomeYuan(bo.incomeYuan); |
|
|
|
mockScheduleMapper.insert(schedule); |
|
|
|
bo.scheduleTime.forEach(x -> { |
|
|
|
MatrixMockSchedule schedule = new MatrixMockSchedule(); |
|
|
|
schedule.setAppId(bo.appId); |
|
|
|
schedule.setScheduleTime(new Timestamp(x)); |
|
|
|
schedule.setChannel(app.getChannel()); |
|
|
|
schedule.setIncomeYuan(bo.incomeYuan); |
|
|
|
mockScheduleMapper.insert(schedule); |
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
public OverviewBo incomeOverview(int adminId, String code) { |
|
|
|