今日访问量更改

This commit is contained in:
liuyingfang 2024-03-15 16:19:46 +08:00
parent b9f9a435b9
commit 325afd0aa0
2 changed files with 10 additions and 2 deletions

View File

@ -53,6 +53,8 @@ public class SummaryServiceImpl implements SummaryService {
}
//用户数
Tuple count = tbShopUserRepository.searchByCount(shopId.toString());
summaryVO.setTotalUser(count.get(0, Long.class));
//支付笔数柱形图
List<Object[]> objects = shopUserDutyRepository.sumByDateOrderNum(shopId, DateUtil.getDate30DaysAgo(), DateUtil.getDayEnd());
@ -90,6 +92,7 @@ public class SummaryServiceImpl implements SummaryService {
// 将SumDateVO对象添加到列表中
countDateLists.add(countDateVO);
}
countDateLists.sort((a,b)->a.getTradeDay().compareTo(b.getTradeDay()));
summaryVO.setCountDateList(countDateLists);
//访问量
Tuple tuple = tbTokenRepository.countByAccountId(shopId);
@ -126,6 +129,7 @@ public class SummaryServiceImpl implements SummaryService {
// 将SumDateVO对象添加到列表中
countVisitsLists.add(countDateVO);
}
countVisitsLists.sort((a,b)->a.getTradeDay().compareTo(b.getTradeDay()));
summaryVO.setVisitsCountList(countVisitsLists);
return summaryVO;
}
@ -275,7 +279,7 @@ public class SummaryServiceImpl implements SummaryService {
Tuple tuple1 = tbShopUserRepository.searchByCountToday(shopId.toString(), DateUtil.getTodayStartTimestamp(), DateUtil.getTodayEndTimestamp());
map.put("userToday", tuple1.get(0, Long.class));
Tuple tupleToday = tbTokenRepository.countByAccountId(shopId, DateUtil.getDayBegin(), DateUtil.getDayEnd());
map.put("totalVisitsToday",tupleToday);
map.put("totalVisitsToday",tupleToday == null?0:tupleToday.get(0,Long.class));
return map;
}
@Override

View File

@ -31,7 +31,7 @@ public class SummaryVO {
*/
private Long totalUser =0L;
/**
* 销售额柱形图
* 支付笔数柱形图
*/
private List<CountDateVO> countDateList;
/**
@ -43,5 +43,9 @@ public class SummaryVO {
*/
public List<CountVisitsVO> visitsCountList;
/**
* 用户数柱状图
*/
public List<CountVisitsVO> countShopUserList;
}