123333
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
package com.ruoyi.cai.manager;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.ruoyi.cai.cache.AnchorCountTotalCache;
|
||||
import com.ruoyi.cai.cache.RechargeTotalCache;
|
||||
import com.ruoyi.cai.cache.WithdrawTotalCache;
|
||||
import com.ruoyi.cai.cache.bean.RechargeTotalCacheBean;
|
||||
@@ -53,6 +53,8 @@ public class AdminHomeManager {
|
||||
private RankManager rankManager;
|
||||
@Autowired
|
||||
private UserService userService;
|
||||
@Autowired
|
||||
private AnchorCountTotalCache anchorCountTotalCache;
|
||||
|
||||
/**
|
||||
* @param rankType 1-魅力榜 2-邀请榜 3-充值榜 4-提现榜
|
||||
@@ -140,7 +142,10 @@ public class AdminHomeManager {
|
||||
HomeStaticIndexVo vo = new HomeStaticIndexVo();
|
||||
vo.setTodayLoginNum(onlineTodayNum);
|
||||
vo.setTodayLoginDiffLast(CaiNumUtil.diffRate(onlineTodayNum,onlineLastNum));
|
||||
vo.setAnchorNum(anchorService.count(Wrappers.emptyWrapper()));
|
||||
long anchorNum = anchorService.count(Wrappers.emptyWrapper());
|
||||
Long lastAnchorNum = anchorCountTotalCache.get(LocalDate.now().plusDays(-1));
|
||||
vo.setAnchorNum(anchorNum);
|
||||
vo.setAnchorNumDiffLast(CaiNumUtil.diffRate(anchorNum,lastAnchorNum));
|
||||
RechargeTotalCacheBean todayRecharge = rechargeTotalCache.getToday();
|
||||
RechargeTotalCacheBean lastTodayRecharge = rechargeTotalCache.getLastToday();
|
||||
vo.setTodayRechargeAmountNum(todayRecharge.getAmount());
|
||||
|
||||
Reference in New Issue
Block a user