|
@ -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, "应用不存在或渠道为空"); |
|
|
} |
|
|
} |
|
|
MatrixMockSchedule schedule = new MatrixMockSchedule(); |
|
|
bo.scheduleTime.forEach(x -> { |
|
|
schedule.setAppId(bo.appId); |
|
|
MatrixMockSchedule schedule = new MatrixMockSchedule(); |
|
|
schedule.setScheduleTime(new Timestamp(bo.scheduleTime)); |
|
|
schedule.setAppId(bo.appId); |
|
|
schedule.setChannel(app.getChannel()); |
|
|
schedule.setScheduleTime(new Timestamp(x)); |
|
|
schedule.setIncomeYuan(bo.incomeYuan); |
|
|
schedule.setChannel(app.getChannel()); |
|
|
mockScheduleMapper.insert(schedule); |
|
|
schedule.setIncomeYuan(bo.incomeYuan); |
|
|
|
|
|
mockScheduleMapper.insert(schedule); |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public OverviewBo incomeOverview(int adminId, String code) { |
|
|
public OverviewBo incomeOverview(int adminId, String code) { |
|
|