Commit 03c4b026 authored by jiawei's avatar jiawei

要求修改=》播放数据统计,展板点播趋势图 还原分页查询接口

parent e5071f2f
......@@ -22,16 +22,16 @@ public interface TBoardStatisticMapper extends BaseMapper<TBoardStatistic> {
public List<TBoardPlayRank> getBoardRankPageList(Page<TBoardPlayRank> page, TBoardPlayRank rank);
// public List<TBoardPlayTrend> getBoardTrendPageList(Page<TBoardPlayTrend> page, TBoardPlayTrend trend);
public List<TBoardPlayTrend> getBoardTrendPageList(Page<TBoardPlayTrend> page, TBoardPlayTrend trend);
/**
* 获取展板播放趋势 去掉数据库分页查询
*
* @param
* @param trend
* @return
*/
public List<TBoardPlayTrend> getBoardTrendPageList(@Param("trend") TBoardPlayTrend trend);
// /**
// * 获取展板播放趋势 去掉数据库分页查询
// *
// * @param
// * @param trend
// * @return
// */
// public List<TBoardPlayTrend> getBoardTrendPageList(@Param("trend") TBoardPlayTrend trend);
public List<TDistrictBoardStatistic> getBoardDistrictPageList(Page<TDistrictBoardStatistic> page, TDistrictBoardStatistic district);
......
......@@ -39,7 +39,7 @@ public interface TBoardStatisticService extends IService<TBoardStatistic> {
// * @param rank
// * @return
// */
// Page<TBoardPlayTrend> getBoardTrendPageList(Page<TBoardPlayTrend> page, TBoardPlayTrend rank);
Page<TBoardPlayTrend> getBoardTrendPageList(Page<TBoardPlayTrend> page, TBoardPlayTrend rank);
/**
* 获取展板播放趋势
......@@ -47,7 +47,7 @@ public interface TBoardStatisticService extends IService<TBoardStatistic> {
* @param rank
* @return
*/
List<TBoardPlayTrend> getBoardTrendPageList(Page<TBoardPlayTrend> page, TBoardPlayTrend rank);
// List<TBoardPlayTrend> getBoardTrendPageList(Page<TBoardPlayTrend> page, TBoardPlayTrend rank);
/**
* 获取地区看板统计信息
......
......@@ -99,20 +99,20 @@ public class TBoardStatisticServiceImpl extends ServiceImpl<TBoardStatisticMappe
return page;
}
// @Override
// public Page<TBoardPlayTrend> getBoardTrendPageList(Page<TBoardPlayTrend> page, TBoardPlayTrend trend) {
//
// page.setRecords(boardStatisticMapper.getBoardTrendPageList(page, trend));
// return page;
// }
@Override
public List<TBoardPlayTrend> getBoardTrendPageList(Page<TBoardPlayTrend> page, TBoardPlayTrend trend) {
public Page<TBoardPlayTrend> getBoardTrendPageList(Page<TBoardPlayTrend> page, TBoardPlayTrend trend) {
List<TBoardPlayTrend> boardTrendPageList = boardStatisticMapper.getBoardTrendPageList(trend);
return boardTrendPageList;
page.setRecords(boardStatisticMapper.getBoardTrendPageList(page, trend));
return page;
}
// @Override
// public List<TBoardPlayTrend> getBoardTrendPageList(Page<TBoardPlayTrend> page, TBoardPlayTrend trend) {
//
// List<TBoardPlayTrend> boardTrendPageList = boardStatisticMapper.getBoardTrendPageList(trend);
// return boardTrendPageList;
// }
@Override
public Page<TDistrictBoardStatistic> getBoardDistrictPageList(Page<TDistrictBoardStatistic> page, TDistrictBoardStatistic district) {
List<TDistrictBoardStatistic> list = boardStatisticMapper.getBoardDistrictPageList(page, district);
......
......@@ -107,17 +107,17 @@ public class TBoardStatisticController extends BaseController {
trend.setPlayDate(DateUtil.getCurrentDate("yyyyMM"));
}
// Page<TBoardPlayTrend> page = this.tBoardStatisticService.getBoardTrendPageList(getPage(),trend);
Page<TBoardPlayTrend> page = this.tBoardStatisticService.getBoardTrendPageList(getPage(),trend);
List<TBoardPlayTrend> records = this.tBoardStatisticService.getBoardTrendPageList(getPage(), trend);
// List<TBoardPlayTrend> records = this.tBoardStatisticService.getBoardTrendPageList(getPage(), trend);
// 处理数据为展板趋势图
Map map = new HashMap();
List dateList = new ArrayList();
List cntList = new ArrayList();
//按照 播放数据统计大屏 中 展板点播趋势图要求返回本月每天的播放量需求 修改接口
getDateList(trend.getPlayDate(), dateList, cntList);
// for (TBoardPlayTrend t : page.getRecords()) {
for (TBoardPlayTrend t : records) {
for (TBoardPlayTrend t : page.getRecords()) {
// for (TBoardPlayTrend t : records) {
// dateList.add(t.getPlayDate());
// cntList.add(t.getPlayNumber());
int index = dateList.indexOf(t.getPlayDate());
......@@ -128,7 +128,7 @@ public class TBoardStatisticController extends BaseController {
// page.getRecords().sort(Comparator.comparing(TBoardPlayTrend::getPlayNumber).reversed());
map.put("dateList", dateList);
map.put("cntList", cntList);
// map.put("page",page);
map.put("page",page);
return getResult(map);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment