|
|
@@ -220,12 +220,16 @@ public class StatisticsDataDayServiceImpl implements StatisticsDataDayService {
|
|
|
* 统计流媒体账号数据
|
|
|
*/
|
|
|
public List<StreamingAccountData> statisticsStreamingAccountData(Date yesZeroDate, Date thisZeroDate, Boolean today) {
|
|
|
- List<Account> accounts = accountService.getNoAppleOneAccount(2l);
|
|
|
- Map<Long, List<Account>> accountMaps = accounts.stream().collect(Collectors.groupingBy(Account::getGoodsId));
|
|
|
- List<StreamingAccountData> streamingAccountDataSave = new ArrayList<>(accounts.size());
|
|
|
- accountMaps.forEach((goodsId, accountList) -> {
|
|
|
+ Long appleOndGoodsId = 2l;
|
|
|
+ List<GoodsDon> goodsDons = goodsDonMapper.selectList(Wrappers.lambdaQuery(GoodsDon.class)
|
|
|
+ .ne(GoodsDon::getId, appleOndGoodsId)
|
|
|
+ .eq(GoodsDon::getType, 1)
|
|
|
+ .eq(GoodsDon::getDeleted, 1));
|
|
|
+ List<StreamingAccountData> streamingAccountDataSave = new ArrayList<>(goodsDons.size());
|
|
|
+ goodsDons.forEach(goods->{
|
|
|
StreamingAccountData streamingAccount = new StreamingAccountData();
|
|
|
- streamingAccount.setAccountName(accountList.get(0).getTitle());
|
|
|
+ Long goodsId = goods.getId();
|
|
|
+ streamingAccount.setAccountName(goods.getTitle());
|
|
|
streamingAccount.setGoodsId(goodsId);
|
|
|
streamingAccountDataStatistics(goodsId, streamingAccount, streamingAccountDataSave, yesZeroDate, thisZeroDate);
|
|
|
});
|