|
|
@@ -257,18 +257,23 @@ public class ChatGptAccountServiceImpl implements ChatGptAccountService {
|
|
|
ChatgptUser chatgptUser = getChatgptCarUser(userId, relationId, groupsRelation, goodsDonSku);
|
|
|
|
|
|
String DOMAIN = "https://chat.galaxydvd.com";
|
|
|
- try {
|
|
|
- SysConfig sysConfig = sysConfigService.getOne(Wrappers.lambdaQuery(SysConfig.class).eq(SysConfig::getSysKey, "mirror_gpt_domain"));
|
|
|
- if (sysConfig != null) {
|
|
|
- String sysValue = sysConfig.getSysValue();
|
|
|
- if (JSONUtil.isJsonArray(sysValue)) {
|
|
|
- List<String> domainList = JSONUtil.parseArray(sysValue).toList(String.class);
|
|
|
- DOMAIN = domainList.get(RandomUtil.randomInt(domainList.size()));
|
|
|
+ if(goodsDonSku.getId() == 444){
|
|
|
+ DOMAIN = "https://car.galaxydvd.com";
|
|
|
+ }else {
|
|
|
+ try {
|
|
|
+ SysConfig sysConfig = sysConfigService.getOne(Wrappers.lambdaQuery(SysConfig.class).eq(SysConfig::getSysKey, "mirror_gpt_domain"));
|
|
|
+ if (sysConfig != null) {
|
|
|
+ String sysValue = sysConfig.getSysValue();
|
|
|
+ if (JSONUtil.isJsonArray(sysValue)) {
|
|
|
+ List<String> domainList = JSONUtil.parseArray(sysValue).toList(String.class);
|
|
|
+ DOMAIN = domainList.get(RandomUtil.randomInt(domainList.size()));
|
|
|
+ }
|
|
|
}
|
|
|
+ }catch (Exception e){
|
|
|
+ log.error("随机抽取域名错误. msg:{}", StringUtil.getErrorText(e));
|
|
|
}
|
|
|
- }catch (Exception e){
|
|
|
- log.error("随机抽取域名错误. msg:{}", StringUtil.getErrorText(e));
|
|
|
}
|
|
|
+
|
|
|
log.info("domain:{},用户:{},所在车次:{},座位id:{},在{}获取跳转GPT镜像的登录url", DOMAIN, userId, groupsTrips.getId(), relationId, DateTime.now());
|
|
|
return DOMAIN + "/auth/logintoken?carid=" + carId + "&usertoken=" + chatgptUser.getUserToken();
|
|
|
} else {
|
|
|
@@ -482,9 +487,8 @@ public class ChatGptAccountServiceImpl implements ChatGptAccountService {
|
|
|
chatgptUserConversationRecord.setUserToken(userToken);
|
|
|
chatgptUserConversationRecord.setCarId(chatgptSession.getCarId());
|
|
|
chatgptUserConversationRecord.setCarName(chatgptSession.getCarName());
|
|
|
- if (StringUtils.isBlank(conversationRequest.getConversation_id())) {
|
|
|
- chatgptUserConversationRecord.setMessageId(conversationRequest.getMessages().get(0).getId());
|
|
|
- } else {
|
|
|
+
|
|
|
+ if (StringUtils.isNotBlank(conversationRequest.getConversation_id())) {
|
|
|
chatgptUserConversationRecord.setConversationId(conversationRequest.getConversation_id());
|
|
|
}
|
|
|
|