|
@@ -663,10 +663,9 @@ public class AiHookServiceImpl implements AiHookService {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (result.isLongText()){
|
|
if (result.isLongText()){
|
|
|
- //新增用户信息
|
|
|
|
|
- addUserInfo(contentKh, qwExternalContacts.getId(),fastGptChatSession);
|
|
|
|
|
-
|
|
|
|
|
if(isNewVersion){
|
|
if(isNewVersion){
|
|
|
|
|
+ //新增用户信息
|
|
|
|
|
+ addUserInfoNew(contentKh,fastGptChatSession);
|
|
|
if ("北京卓美".equals(signProjectName) && type == 16) {
|
|
if ("北京卓美".equals(signProjectName) && type == 16) {
|
|
|
sendAiVoiceMsg(content, sender, uid, serverId, user);
|
|
sendAiVoiceMsg(content, sender, uid, serverId, user);
|
|
|
} else {
|
|
} else {
|
|
@@ -675,7 +674,8 @@ public class AiHookServiceImpl implements AiHookService {
|
|
|
sendAiMsg(content,sender,uid,serverId);
|
|
sendAiMsg(content,sender,uid,serverId);
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
-
|
|
|
|
|
|
|
+ //新增用户信息
|
|
|
|
|
+ addUserInfo(contentKh, qwExternalContacts.getId(),fastGptChatSession);
|
|
|
if (type == 16) {
|
|
if (type == 16) {
|
|
|
if (user.getIsCustomerVoice() != null && user.getIsCustomerVoice() == 1) {
|
|
if (user.getIsCustomerVoice() != null && user.getIsCustomerVoice() == 1) {
|
|
|
sendAiVoiceMsg(content, sender, uid, serverId, user);
|
|
sendAiVoiceMsg(content, sender, uid, serverId, user);
|
|
@@ -700,10 +700,10 @@ public class AiHookServiceImpl implements AiHookService {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
List<String> countList = countString(content);
|
|
List<String> countList = countString(content);
|
|
|
- //新增用户信息
|
|
|
|
|
- addUserInfo(contentKh, qwExternalContacts.getId(),fastGptChatSession);
|
|
|
|
|
for (String msg : countList) {
|
|
for (String msg : countList) {
|
|
|
if(isNewVersion){
|
|
if(isNewVersion){
|
|
|
|
|
+ //新增用户信息
|
|
|
|
|
+ addUserInfoNew(contentKh,fastGptChatSession);
|
|
|
if ("北京卓美".equals(signProjectName) && type == 16) {
|
|
if ("北京卓美".equals(signProjectName) && type == 16) {
|
|
|
sendAiVoiceMsg(msg,sender,uid,serverId,user);
|
|
sendAiVoiceMsg(msg,sender,uid,serverId,user);
|
|
|
} else {
|
|
} else {
|
|
@@ -712,7 +712,8 @@ public class AiHookServiceImpl implements AiHookService {
|
|
|
sendAiMsg(msg,sender,uid,serverId);
|
|
sendAiMsg(msg,sender,uid,serverId);
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
-
|
|
|
|
|
|
|
+ //新增用户信息
|
|
|
|
|
+ addUserInfo(contentKh, qwExternalContacts.getId(),fastGptChatSession);
|
|
|
if (type == 16) {
|
|
if (type == 16) {
|
|
|
if (user.getIsCustomerVoice() != null && user.getIsCustomerVoice() == 1) {
|
|
if (user.getIsCustomerVoice() != null && user.getIsCustomerVoice() == 1) {
|
|
|
sendAiVoiceMsg(msg, sender, uid, serverId, user);
|
|
sendAiVoiceMsg(msg, sender, uid, serverId, user);
|
|
@@ -750,6 +751,15 @@ public class AiHookServiceImpl implements AiHookService {
|
|
|
return R.ok();
|
|
return R.ok();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ private void addUserInfoNew(String word,FastGptChatSession fastGptChatSession) {
|
|
|
|
|
+ com.alibaba.fastjson.JSONObject jsonObject = com.alibaba.fastjson.JSONObject.parseObject(word);
|
|
|
|
|
+ String userInfo = jsonObject.getString("userInfo");
|
|
|
|
|
+ FastGptChatSession chatSession = new FastGptChatSession();
|
|
|
|
|
+ chatSession.setSessionId(fastGptChatSession.getSessionId());
|
|
|
|
|
+ chatSession.setUserInfo(userInfo);
|
|
|
|
|
+ fastGptChatSessionMapper.updateFastGptChatSession(chatSession);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
private void sendImgMsg(String contentKh, Long sender, String uuid, Long serverId) {
|
|
private void sendImgMsg(String contentKh, Long sender, String uuid, Long serverId) {
|
|
|
com.alibaba.fastjson.JSONObject jsonObject = com.alibaba.fastjson.JSONObject.parseObject(contentKh);
|
|
com.alibaba.fastjson.JSONObject jsonObject = com.alibaba.fastjson.JSONObject.parseObject(contentKh);
|
|
|
JSONArray imgUrls = jsonObject.getJSONArray("imgUrl");
|
|
JSONArray imgUrls = jsonObject.getJSONArray("imgUrl");
|