|
|
@@ -3,7 +3,6 @@ package com.cyksj.service.chatgpt.impl;
|
|
|
import cn.hutool.core.date.DateTime;
|
|
|
import cn.hutool.core.date.DateUtil;
|
|
|
import cn.hutool.core.lang.UUID;
|
|
|
-import cn.hutool.core.util.StrUtil;
|
|
|
import cn.hutool.http.HttpRequest;
|
|
|
import cn.hutool.http.HttpResponse;
|
|
|
import cn.hutool.http.HttpUtil;
|
|
|
@@ -821,13 +820,13 @@ public class ChatGptAccountServiceImpl implements ChatGptAccountService {
|
|
|
String highCarChatKey = RedisService.key.CHATGPT_CAR_HIGH_CHAT.getName() + carId;
|
|
|
String lowCarChatKey = RedisService.key.CHATGPT_CAR_LOW_CHAT.getName() + carId;
|
|
|
|
|
|
- String highCarChatNum = redisService.getStr(highCarChatKey);
|
|
|
- if (StrUtil.isNotBlank(highCarChatNum)) {
|
|
|
- chatgptUserCarUsedRecord.setGptFour(Integer.parseInt(highCarChatNum));
|
|
|
+ Long highCarChatNum = redisService.zCard(highCarChatKey);
|
|
|
+ if (highCarChatNum != null) {
|
|
|
+ chatgptUserCarUsedRecord.setGptFour(Integer.parseInt(highCarChatNum.toString()));
|
|
|
}
|
|
|
- String lowCarChatNum = redisService.getStr(lowCarChatKey);
|
|
|
- if (StrUtil.isNotBlank(lowCarChatNum)) {
|
|
|
- chatgptUserCarUsedRecord.setGpt(Integer.parseInt(lowCarChatNum));
|
|
|
+ Object lowCarChatNum = redisService.zCard(lowCarChatKey);
|
|
|
+ if (lowCarChatNum != null) {
|
|
|
+ chatgptUserCarUsedRecord.setGpt(Integer.parseInt(lowCarChatNum.toString()));
|
|
|
}
|
|
|
chatgptUserCarUsedRecordMapper.insert(chatgptUserCarUsedRecord);
|
|
|
log.info("记录userToken:{}访问对应镜像车队carId:{}操作成功", userToken, carId);
|