|
|
@@ -18,9 +18,11 @@ import com.fs.common.utils.date.DateUtil;
|
|
|
import com.fs.common.utils.spring.SpringUtils;
|
|
|
import com.fs.config.ai.AiHostProper;
|
|
|
import com.fs.crm.domain.CrmCustomer;
|
|
|
+import com.fs.crm.domain.CrmCustomerAnalyze;
|
|
|
import com.fs.crm.domain.CrmCustomerInfo;
|
|
|
import com.fs.crm.domain.CrmCustomerPropertyTemplate;
|
|
|
import com.fs.crm.dto.CrmCustomerAiAutoTagVo;
|
|
|
+import com.fs.crm.mapper.CrmCustomerAnalyzeMapper;
|
|
|
import com.fs.crm.mapper.CrmCustomerMapper;
|
|
|
import com.fs.crm.param.CrmCustomerAiTagParam;
|
|
|
import com.fs.crm.service.ICrmCustomerPropertyTemplateService;
|
|
|
@@ -368,7 +370,6 @@ public class CrmCustomerAiTagUtil {
|
|
|
ArrayList<Map> maps = new ArrayList<>();
|
|
|
//存入crm_customer_info
|
|
|
HashMap<String, Object> time = new HashMap<>();
|
|
|
- time.put("time", DateUtil.format("yyyy-MM-dd HH:mm:ss"));
|
|
|
maps.add(time);
|
|
|
communication.forEach(o->{
|
|
|
String role = (String) o.get("role");
|
|
|
@@ -381,9 +382,10 @@ public class CrmCustomerAiTagUtil {
|
|
|
}
|
|
|
});
|
|
|
if (!maps.isEmpty()){
|
|
|
- CrmCustomerInfo crmCustomerInfo = new CrmCustomerInfo();
|
|
|
- crmCustomerInfo.setCustomerId(Long.valueOf(customerId)).setAiChatRecord(JSONUtil.toJsonStr(maps));
|
|
|
- SpringUtils.getBean(CrmCustomerMapper.class).updateCrmCustomerInfo(crmCustomerInfo);
|
|
|
+ CrmCustomerAnalyze crmCustomerInfo = new CrmCustomerAnalyze();
|
|
|
+ crmCustomerInfo.setCustomerId(Long.valueOf(customerId));
|
|
|
+ crmCustomerInfo.setAiChatRecord(JSONUtil.toJsonStr(maps));
|
|
|
+ SpringUtils.getBean(CrmCustomerAnalyzeMapper.class).insertCrmCustomerAnalyze(crmCustomerInfo);
|
|
|
}
|
|
|
|
|
|
return result;
|