Jelajahi Sumber

fix 停运时间

chenbiao 2 tahun lalu
induk
melakukan
13f0a0edfc

+ 1 - 1
netflix-service/src/main/java/com/cyksj/service/chatgpt/ChatGptAccountService.java

@@ -59,7 +59,7 @@ public interface ChatGptAccountService {
     /**
      * oai 触发车队限制
      */
-    void carLimited(String carId, String userToken, Integer expTime);
+    void carLimited(String carId, String userToken, Long expTime);
 
     /**
      * 获取GPT session

+ 2 - 2
netflix-service/src/main/java/com/cyksj/service/chatgpt/impl/ChatGptAccountServiceImpl.java

@@ -737,7 +737,7 @@ public class ChatGptAccountServiceImpl implements ChatGptAccountService {
     }
 
     @Override
-    public void carLimited(String carId, String userToken, Integer expTime) {
+    public void carLimited(String carId, String userToken, Long expTime) {
         if(carId == null){
             if (StringUtils.isNotBlank(userToken)) {
                 ChatgptUser chatgptUser = chatgptUserMapper.selectOne(Wrappers.lambdaQuery(ChatgptUser.class).eq(ChatgptUser::getUserToken, userToken));
@@ -749,7 +749,7 @@ public class ChatGptAccountServiceImpl implements ChatGptAccountService {
                 }
             }
         }
-        redisService.set("chatgpt:clears_in:" + carId, expTime);
+        redisService.set("chatgpt:clears_in:" + carId, expTime, expTime);
     }
 
     @PostConstruct

+ 1 - 1
netflix-web/src/main/java/com/cyksj/web/controller/mirror/MirrorController.java

@@ -219,7 +219,7 @@ public class MirrorController {
      * oai触发车队限制
      */
     @GetMapping("/gpt/car/limited")
-    public Result<String> carLimited(String carId, Integer expTime) {
+    public Result<String> carLimited(String carId, Long expTime) {
         String authorization = request.getHeader("Authorization");
         String userToken = "";
         if(StringUtils.isNotBlank(authorization)){