Преглед изворни кода

Merge remote-tracking branch 'origin/master'

三七 пре 2 дана
родитељ
комит
3ff75998ac

+ 252 - 0
fs-service/src/main/java/com/fs/crm/domain/CrmCustomerInfo.java

@@ -0,0 +1,252 @@
+package com.fs.crm.domain;
+
+import com.baomidou.mybatisplus.annotation.*;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.util.Date;
+
+/**
+ * 客户信息表实体类
+ * @author lk
+ * @since 2026-3-19
+ */
+@Data
+@TableName("crm_customer_info")
+@Accessors(chain = true)
+public class CrmCustomerInfo {
+
+    /**
+     * id
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * crm_customer_id
+     */
+    @TableField("customer_id")
+    private Long customerId;
+
+    /**
+     * 姓名
+     */
+    @TableField("name")
+    private String name;
+
+    /**
+     * 性别
+     */
+    @TableField("sex")
+    private String sex;
+
+    /**
+     * 年龄
+     */
+    @TableField("age")
+    private String age;
+
+    /**
+     * 地区
+     */
+    @TableField("address")
+    private String address;
+
+    /**
+     * 行为习惯
+     */
+    @TableField("habits")
+    private String habits;
+
+    /**
+     * 患病时间
+     */
+    @TableField("illness_time")
+    private String illnessTime;
+
+    /**
+     * 身体状态
+     */
+    @TableField("body")
+    private String body;
+
+    /**
+     * 学习到的章节
+     */
+    @TableField("study")
+    private String study;
+
+    /**
+     * 今日课程完成情况
+     */
+    @TableField("course_status")
+    private String courseStatus;
+
+    /**
+     * 学习课程
+     */
+    @TableField("course")
+    private String course;
+
+    /**
+     * 提及的家人
+     */
+    @TableField("family")
+    private String family;
+
+    /**
+     * 家人的疾病
+     */
+    @TableField("family_disease")
+    private String familyDisease;
+
+    /**
+     * 疾病
+     */
+    @TableField("disease")
+    private String disease;
+
+    /**
+     * 是否线下就诊
+     */
+    @TableField("is_line")
+    private String isLine;
+
+    /**
+     * 交流状态
+     */
+    @TableField("talk")
+    private String talk;
+
+    /**
+     * 用户分类
+     */
+    @TableField("user_type")
+    private String userType;
+
+    /**
+     * 是否本人会诊
+     */
+    @TableField("is_self")
+    private String isSelf;
+
+    /**
+     * 什么情况加重或缓解
+     */
+    @TableField("intensify")
+    private String intensify;
+
+    /**
+     * 是否怕热或者怕冷
+     */
+    @TableField("is_cold")
+    private String isCold;
+
+    /**
+     * 怕冷或怕热的部位
+     */
+    @TableField("cold_body")
+    private String coldBody;
+
+    /**
+     * 出汗情况
+     */
+    @TableField("sweat")
+    private String sweat;
+
+    /**
+     * 其他情况
+     */
+    @TableField("other")
+    private String other;
+
+    /**
+     * 大小便情况
+     */
+    @TableField("toilet")
+    private String toilet;
+
+    /**
+     * 饮食情况
+     */
+    @TableField("eat")
+    private String eat;
+
+    /**
+     * 经期如何 女 55岁以下
+     */
+    @TableField("menses")
+    private String menses;
+
+    /**
+     * 用药
+     */
+    @TableField("medicine")
+    private String medicine;
+
+    /**
+     * 体质
+     */
+    @TableField("constitution")
+    private String constitution;
+
+    /**
+     * 推荐用药
+     */
+    @TableField("recommend_medicine")
+    private String recommendMedicine;
+
+    /**
+     * 咨询产品
+     */
+    @TableField("consult_product")
+    private String consultProduct;
+
+    /**
+     * 是否已经购买产品
+     */
+    @TableField("is_buy")
+    private String isBuy;
+
+    /**
+     * 已经购买的产品
+     */
+    @TableField("buy_product")
+    private String buyProduct;
+
+    /**
+     * 创建时间
+     */
+    @TableField(value = "create_time", fill = FieldFill.INSERT)
+    private Date createTime;
+
+    /**
+     * 更新时间
+     */
+    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
+    private Date updateTime;
+
+    /**
+     * 最后回复时间
+     */
+    @TableField("reply_time")
+    private Date replyTime;
+
+    /**
+     * 产品交流
+     */
+    @TableField("product_talk")
+    private String productTalk;
+
+    /**
+     * 疾病交流
+     */
+    @TableField("disease_talk")
+    private String diseaseTalk;
+
+    /**
+     * 渠道类型
+     */
+    @TableField("channel_type")
+    private String channelType;
+}

+ 12 - 0
fs-service/src/main/java/com/fs/crm/dto/CrmCustomerAiAutoTagVo.java

@@ -0,0 +1,12 @@
+package com.fs.crm.dto;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+
+@Data
+@AllArgsConstructor
+public class CrmCustomerAiAutoTagVo {
+    private String id;
+    private String name;
+    private String aiHint;
+}

+ 4 - 0
fs-service/src/main/java/com/fs/crm/mapper/CrmCustomerMapper.java

@@ -4,6 +4,7 @@ package com.fs.crm.mapper;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.fs.crm.domain.CrmCustomer;
+import com.fs.crm.domain.CrmCustomerInfo;
 import com.fs.crm.param.*;
 import com.fs.crm.vo.*;
 import com.fs.qwApi.param.QwCustomerDetailParam;
@@ -966,4 +967,7 @@ public interface CrmCustomerMapper extends BaseMapper<CrmCustomer> {
      */
     List<Long> selectCustomerIdByCompanyUserId(@Param("companyUserId") Long companyUserId);
 
+    CrmCustomerInfo selectCrmCustomerInfoById(@Param("customerId") String customerId);
+
+    void insertCrmCustomerInfo(CrmCustomerInfo crmCustomerInfo);
 }

Разлика између датотеке није приказан због своје велике величине
+ 52 - 0
fs-service/src/main/java/com/fs/crm/utils/CrmCustomerAiTagUtil.java


+ 90 - 0
fs-service/src/main/resources/mapper/crm/CrmCustomerMapper.xml

@@ -229,6 +229,89 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="traceId != null">#{traceId},</if>
          </trim>
     </insert>
+    <insert id="insertCrmCustomerInfo">
+        INSERT INTO crm_customer_info
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="customerId != null">customer_id,</if>
+            <if test="name != null">name,</if>
+            <if test="sex != null">sex,</if>
+            <if test="age != null">age,</if>
+            <if test="address != null">address,</if>
+            <if test="habits != null">habits,</if>
+            <if test="illnessTime != null">illness_time,</if>
+            <if test="body != null">body,</if>
+            <if test="study != null">study,</if>
+            <if test="courseStatus != null">course_status,</if>
+            <if test="course != null">course,</if>
+            <if test="family != null">family,</if>
+            <if test="familyDisease != null">family_disease,</if>
+            <if test="disease != null">disease,</if>
+            <if test="isLine != null">is_line,</if>
+            <if test="talk != null">talk,</if>
+            <if test="userType != null">user_type,</if>
+            <if test="isSelf != null">is_self,</if>
+            <if test="intensify != null">intensify,</if>
+            <if test="isCold != null">is_cold,</if>
+            <if test="coldBody != null">cold_body,</if>
+            <if test="sweat != null">sweat,</if>
+            <if test="other != null">other,</if>
+            <if test="toilet != null">toilet,</if>
+            <if test="eat != null">eat,</if>
+            <if test="menses != null">menses,</if>
+            <if test="medicine != null">medicine,</if>
+            <if test="constitution != null">constitution,</if>
+            <if test="recommendMedicine != null">recommend_medicine,</if>
+            <if test="consultProduct != null">consult_product,</if>
+            <if test="isBuy != null">is_buy,</if>
+            <if test="buyProduct != null">buy_product,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="replyTime != null">reply_time,</if>
+            <if test="productTalk != null">product_talk,</if>
+            <if test="diseaseTalk != null">disease_talk,</if>
+            <if test="channelType != null">channel_type,</if>
+        </trim>
+        <trim prefix="VALUES (" suffix=")" suffixOverrides=",">
+            <if test="customerId != null">#{customerId},</if>
+            <if test="name != null">#{name},</if>
+            <if test="sex != null">#{sex},</if>
+            <if test="age != null">#{age},</if>
+            <if test="address != null">#{address},</if>
+            <if test="habits != null">#{habits},</if>
+            <if test="illnessTime != null">#{illnessTime},</if>
+            <if test="body != null">#{body},</if>
+            <if test="study != null">#{study},</if>
+            <if test="courseStatus != null">#{courseStatus},</if>
+            <if test="course != null">#{course},</if>
+            <if test="family != null">#{family},</if>
+            <if test="familyDisease != null">#{familyDisease},</if>
+            <if test="disease != null">#{disease},</if>
+            <if test="isLine != null">#{isLine},</if>
+            <if test="talk != null">#{talk},</if>
+            <if test="userType != null">#{userType},</if>
+            <if test="isSelf != null">#{isSelf},</if>
+            <if test="intensify != null">#{intensify},</if>
+            <if test="isCold != null">#{isCold},</if>
+            <if test="coldBody != null">#{coldBody},</if>
+            <if test="sweat != null">#{sweat},</if>
+            <if test="other != null">#{other},</if>
+            <if test="toilet != null">#{toilet},</if>
+            <if test="eat != null">#{eat},</if>
+            <if test="menses != null">#{menses},</if>
+            <if test="medicine != null">#{medicine},</if>
+            <if test="constitution != null">#{constitution},</if>
+            <if test="recommendMedicine != null">#{recommendMedicine},</if>
+            <if test="consultProduct != null">#{consultProduct},</if>
+            <if test="isBuy != null">#{isBuy},</if>
+            <if test="buyProduct != null">#{buyProduct},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="replyTime != null">#{replyTime},</if>
+            <if test="productTalk != null">#{productTalk},</if>
+            <if test="diseaseTalk != null">#{diseaseTalk},</if>
+            <if test="channelType != null">#{channelType},</if>
+        </trim>
+    </insert>
 
     <update id="updateCrmCustomer" parameterType="CrmCustomer">
         update crm_customer
@@ -459,4 +542,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </if>
         order by cu.customer_user_id desc
     </select>
+    <select id="selectCrmCustomerInfoById" resultType="com.fs.crm.domain.CrmCustomerInfo">
+        SELECT
+            id,customer_id,name,sex,age,address,habits,illness_time,body,study,course_status,course,family,family_disease,disease,is_line,
+            talk,user_type,is_self,intensify,is_cold,cold_body,sweat,other,toilet,eat,menses,medicine,constitution,recommend_medicine,
+            consult_product,is_buy,buy_product,create_time,update_time,reply_time,product_talk,disease_talk,channel_type
+        FROM crm_customer_info;
+    </select>
 </mapper>

Неке датотеке нису приказане због велике количине промена