Sfoglia il codice sorgente

fix 奈飞账号车队类型

zoujiajian 1 mese fa
parent
commit
fb588b9874

+ 10 - 0
netflix-web/src/main/java/com/cyksj/web/controller/manage/account/CmsAccountController.java

@@ -164,6 +164,16 @@ public class CmsAccountController {
             if (sysEmail != null) gptEmailPwd = sysEmail.getPassword();
         }
         credential.put("password", gptEmailPwd);
+        String type = "ohter";
+        GroupsTrips groupsTrips = groupsMapper.selectOne(Wrappers.lambdaQuery(GroupsTrips.class).eq(GroupsTrips::getAccountId, netflixAccount.getId()).last("limit 1"));
+        if (groupsTrips != null) {
+            Long skuId = groupsTrips.getSkuId();
+            GoodsDonSku goodsDonSku = goodsDonSkuMapper.selectById(skuId);
+            if (goodsDonSku != null && goodsDonSku.getMonths() == 1) {
+                type = "month";
+            }
+        }
+        credential.put("type", type);
         return GatewayResponse.SUCCESS.newBuilder().toResult(credential);
     }