zoujiajian 1 жил өмнө
parent
commit
5dcb204c39

+ 16 - 0
netflix-service/src/main/java/com/cyksj/service/relation/impl/GroupRelationFrontServiceImpl.java

@@ -1087,6 +1087,22 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
 				}
 				accountNetflixState.setState(status);
 				accountNetflixStateMapper.updateById(accountNetflixState);
+
+				if (accountNetflixState.getState() == 3) {
+					Account account = accountMapper.selectOne(Wrappers.lambdaQuery(Account.class)
+							.eq(Account::getAccount, accountNetflixState.getAccount())
+							.eq(Account::getGoodsId, 1)
+							.last("limit 1"));
+					if (account != null) {
+						GroupsTrips groupsTrips = groupsMapper.selectOne(Wrappers.lambdaQuery(GroupsTrips.class)
+								.eq(GroupsTrips::getAccountId, account.getId())
+								.last("limit 1"));
+						if (groupsTrips != null && groupsTrips.getStatus() == GroupsTrips.Status.validity) {
+							groupsTrips.setStatus(GroupsTrips.Status.down);
+							groupsMapper.updateById(groupsTrips);
+						}
+					}
+				}
 			} catch (Exception e) {
 				log.error("创建检测奈飞账号状态任务状态失败:{}", StringUtil.getErrorText(e));
 			}