소스 검색

fix 过期账号列表

zoujiajian 3 년 전
부모
커밋
04f75ab0f2

+ 11 - 0
netflix-dao/src/main/java/com/cyksj/model/views/BackgroundDataView.java

@@ -1,5 +1,6 @@
 package com.cyksj.model.views;
 
+import com.cyksj.model.entity.Account;
 import com.cyksj.model.entity.AppleOneData;
 import com.cyksj.model.entity.RealGoodsData;
 import com.cyksj.model.entity.StreamingAccountData;
@@ -49,6 +50,16 @@ public class BackgroundDataView {
 	 */
 	private Integer totalNumOfExpiredSubAccount;
 
+	/**
+	 * 近5天将要到期的主账号列表
+	 */
+	private List<Account> willExpireAccountList;
+
+	/**
+	 * 已到期主账号列表
+	 */
+	private List<Account> expiredAccountList;
+
 	/**
 	 * apple one数据
 	 */

+ 4 - 0
netflix-service/src/main/java/com/cyksj/service/mange/statistics/impl/StatisticsDataServiceImpl.java

@@ -159,16 +159,20 @@ public class StatisticsDataServiceImpl implements StatisticsDataService {
 		if (accountHead != null) {
 			BackgroundDataView dataView = (BackgroundDataView) accountHead;
 			backgroundDataView.setTotalNumOfWillExpireAccount(dataView.getTotalNumOfWillExpireAccount());
+			backgroundDataView.setWillExpireAccountList(dataView.getWillExpireAccountList());
 			backgroundDataView.setTotalExpiredAccountNum(dataView.getTotalExpiredAccountNum());
+			backgroundDataView.setExpiredAccountList(dataView.getExpiredAccountList());
 			backgroundDataView.setTotalNumOfExpiredSubAccount(dataView.getTotalNumOfExpiredSubAccount());
 		} else {
 			DateTime fiveDays = DateUtil.offsetDay(zero, 5);
 			//5天后将到期的主账号
 			List<Account> willExpireAccounts = Optional.ofNullable(accountService.list(Wrappers.lambdaQuery(Account.class).gt(Account::getExpiryTime, zero).le(Account::getExpiryTime, fiveDays))).orElse(new ArrayList<>());
 			backgroundDataView.setTotalNumOfWillExpireAccount(willExpireAccounts.size());
+			backgroundDataView.setWillExpireAccountList(willExpireAccounts);
 			//已到期主账号
 			List<Account> expiredAccounts = Optional.ofNullable(accountService.list(Wrappers.lambdaQuery(Account.class).le(Account::getExpiryTime, now))).orElse(new ArrayList<>());
 			backgroundDataView.setTotalExpiredAccountNum(expiredAccounts.size());
+			backgroundDataView.setExpiredAccountList(expiredAccounts);
 			//已到期子账号
 			List<GroupsRelation> expiredSubAccounts = Optional.ofNullable(groupsRelationMapper.selectList(Wrappers.lambdaQuery(GroupsRelation.class).le(GroupsRelation::getExpiryTime, now))).orElse(new ArrayList<>());
 			backgroundDataView.setTotalNumOfExpiredSubAccount(expiredSubAccounts.size());