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