zoujiajian 1 سال پیش
والد
کامیت
b155f90d47

+ 12 - 7
netflix-service/src/main/java/com/cyksj/service/relation/impl/GroupRelationFrontServiceImpl.java

@@ -1043,6 +1043,7 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
 		RenewalView renewalView = beanSearcher.searchFirst(RenewalView.class, MapUtils.builder()
 				.field(RenewalView::getRelationId, relationId)
 				.field(RenewalView::getUserId, userIdList).op(Operator.InList)
+				.field(RenewalView::getGroupsStatus, GroupsTrips.Status.down.name())
 				.field(RenewalView::getExpiryTime, DateTime.now()).op(Operator.GreaterThan)
 				.build());
 		if (renewalView == null) {
@@ -1056,16 +1057,20 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
 		Account account;
 		if (netflixTempAccountUser == null) {
 			account = accountMapper.selectNetflixTempAccount();
-			netflixTempAccountUser = new NetflixTempAccountUser();
-			netflixTempAccountUser.setAccountId(account.getId());
-			netflixTempAccountUser.setRelationId(relationId);
-			netflixTempAccountUser.setUserId(renewalView.getUserId());
-			netflixTempAccountUserMapper.insert(netflixTempAccountUser);
+			if (account != null) {
+				netflixTempAccountUser = new NetflixTempAccountUser();
+				netflixTempAccountUser.setAccountId(account.getId());
+				netflixTempAccountUser.setRelationId(relationId);
+				netflixTempAccountUser.setUserId(renewalView.getUserId());
+				netflixTempAccountUserMapper.insert(netflixTempAccountUser);
+			}
 		} else {
 			account = accountMapper.selectById(netflixTempAccountUser.getAccountId());
 		}
-		accountView.setAccount(account.getAccount());
-		accountView.setPassword(account.getPassword());
+		if (account != null) {
+			accountView.setAccount(account.getAccount());
+			accountView.setPassword(account.getPassword());
+		}
 		return accountView;
 	}