Просмотр исходного кода

客户档案新增字段,
客户档案详情新增渠道相关

anderx 1 год назад
Родитель
Сommit
721ef996f3

+ 1 - 1
src/main/java/com/goafanti/common/dao/UserArchivesMapper.java

@@ -10,7 +10,7 @@ import java.util.List;
  * 客户档案表(UserArchives)表数据库访问层
  *
  * @author makejava
- * @since 2024-07-12 11:52:01
+ * @since 2024-08-12 10:38:57
  */
 public interface UserArchivesMapper {
 

+ 44 - 9
src/main/java/com/goafanti/common/mapper/UserArchivesMapper.xml

@@ -15,10 +15,13 @@
         <result property="earlyCommunication" column="early_communication" jdbcType="VARCHAR"/>
         <result property="interviewIdeas" column="interview_ideas" jdbcType="VARCHAR"/>
         <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
+        <result property="enterpriseCount" column="enterprise_count" jdbcType="INTEGER"/>
+        <result property="channelIndicators" column="channel_indicators" jdbcType="VARCHAR"/>
+        <result property="interviewDistribution" column="interview_distribution" jdbcType="VARCHAR"/>
     </resultMap>
     
     <sql id="UserArchivesAllSql">
-id, uid, patent_count, invention_patent_count, utility_model_count, appearance_patent_count, software_works_count, other_count, financial_data, early_communication, interview_ideas, create_time        
+id, uid, patent_count, invention_patent_count, utility_model_count, appearance_patent_count, software_works_count, other_count, financial_data, early_communication, interview_ideas, create_time, enterprise_count, channel_indicators, interview_distribution        
     </sql>
 
     <!--查询单个-->
@@ -72,8 +75,19 @@ id, uid, patent_count, invention_patent_count, utility_model_count, appearance_p
             <if test="createTime != null">
                 and create_time = #{createTime}
             </if>
+            <if test="enterpriseCount != null">
+                and enterprise_count = #{enterpriseCount}
+            </if>
+            <if test="channelIndicators != null and channelIndicators != ''">
+                and channel_indicators = #{channelIndicators}
+            </if>
+            <if test="interviewDistribution != null and interviewDistribution != ''">
+                and interview_distribution = #{interviewDistribution}
+            </if>
         </where>
-        limit #{pageable.offset}, #{pageable.pageSize}
+        <if test="page_sql != null">
+    		${page_sql}
+        </if>
     </select>
 
     <!--统计总行数-->
@@ -117,28 +131,37 @@ id, uid, patent_count, invention_patent_count, utility_model_count, appearance_p
             <if test="createTime != null">
                 and create_time = #{createTime}
             </if>
+            <if test="enterpriseCount != null">
+                and enterprise_count = #{enterpriseCount}
+            </if>
+            <if test="channelIndicators != null and channelIndicators != ''">
+                and channel_indicators = #{channelIndicators}
+            </if>
+            <if test="interviewDistribution != null and interviewDistribution != ''">
+                and interview_distribution = #{interviewDistribution}
+            </if>
         </where>
     </select>
 
     <!--新增所有列-->
     <insert id="insert" keyProperty="id" useGeneratedKeys="true">
-        insert into user_archives(uid, patent_count, invention_patent_count, utility_model_count, appearance_patent_count, software_works_count, other_count, financial_data, early_communication, interview_ideas)
-        values (#{uid}, #{patentCount}, #{inventionPatentCount}, #{utilityModelCount}, #{appearancePatentCount}, #{softwareWorksCount}, #{otherCount}, #{financialData}, #{earlyCommunication}, #{interviewIdeas})
+        insert into user_archives(uid, patent_count, invention_patent_count, utility_model_count, appearance_patent_count, software_works_count, other_count, financial_data, early_communication, interview_ideas, create_time, enterprise_count, channel_indicators, interview_distribution)
+        values (#{uid}, #{patentCount}, #{inventionPatentCount}, #{utilityModelCount}, #{appearancePatentCount}, #{softwareWorksCount}, #{otherCount}, #{financialData}, #{earlyCommunication}, #{interviewIdeas}, #{createTime}, #{enterpriseCount}, #{channelIndicators}, #{interviewDistribution})
     </insert>
 
     <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
-        insert into user_archives(uid, patent_count, invention_patent_count, utility_model_count, appearance_patent_count, software_works_count, other_count, financial_data, early_communication, interview_ideas, create_time)
+        insert into user_archives(uid, patent_count, invention_patent_count, utility_model_count, appearance_patent_count, software_works_count, other_count, financial_data, early_communication, interview_ideas, create_time, enterprise_count, channel_indicators, interview_distribution)
         values
         <foreach collection="entities" item="entity" separator=",">
-        (#{entity.uid}, #{entity.patentCount}, #{entity.inventionPatentCount}, #{entity.utilityModelCount}, #{entity.appearancePatentCount}, #{entity.softwareWorksCount}, #{entity.otherCount}, #{entity.financialData}, #{entity.earlyCommunication}, #{entity.interviewIdeas}, #{entity.createTime})
+        (#{entity.uid}, #{entity.patentCount}, #{entity.inventionPatentCount}, #{entity.utilityModelCount}, #{entity.appearancePatentCount}, #{entity.softwareWorksCount}, #{entity.otherCount}, #{entity.financialData}, #{entity.earlyCommunication}, #{entity.interviewIdeas}, #{entity.createTime}, #{entity.enterpriseCount}, #{entity.channelIndicators}, #{entity.interviewDistribution})
         </foreach>
     </insert>
 
     <insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
-        insert into user_archives(uid, patent_count, invention_patent_count, utility_model_count, appearance_patent_count, software_works_count, other_count, financial_data, early_communication, interview_ideas, create_time)
+        insert into user_archives(uid, patent_count, invention_patent_count, utility_model_count, appearance_patent_count, software_works_count, other_count, financial_data, early_communication, interview_ideas, create_time, enterprise_count, channel_indicators, interview_distribution)
         values
         <foreach collection="entities" item="entity" separator=",">
-            (#{entity.uid}, #{entity.patentCount}, #{entity.inventionPatentCount}, #{entity.utilityModelCount}, #{entity.appearancePatentCount}, #{entity.softwareWorksCount}, #{entity.otherCount}, #{entity.financialData}, #{entity.earlyCommunication}, #{entity.interviewIdeas}, #{entity.createTime})
+            (#{entity.uid}, #{entity.patentCount}, #{entity.inventionPatentCount}, #{entity.utilityModelCount}, #{entity.appearancePatentCount}, #{entity.softwareWorksCount}, #{entity.otherCount}, #{entity.financialData}, #{entity.earlyCommunication}, #{entity.interviewIdeas}, #{entity.createTime}, #{entity.enterpriseCount}, #{entity.channelIndicators}, #{entity.interviewDistribution})
         </foreach>
         on duplicate key update
 uid = values(uid),
@@ -151,7 +174,10 @@ other_count = values(other_count),
 financial_data = values(financial_data),
 early_communication = values(early_communication),
 interview_ideas = values(interview_ideas),
-create_time = values(create_time)
+create_time = values(create_time),
+enterprise_count = values(enterprise_count),
+channel_indicators = values(channel_indicators),
+interview_distribution = values(interview_distribution)
     </insert>
 
     <!--通过主键修改数据-->
@@ -191,6 +217,15 @@ create_time = values(create_time)
             <if test="createTime != null">
                 create_time = #{createTime},
             </if>
+            <if test="enterpriseCount != null">
+                enterprise_count = #{enterpriseCount},
+            </if>
+            <if test="channelIndicators != null and channelIndicators != ''">
+                channel_indicators = #{channelIndicators},
+            </if>
+            <if test="interviewDistribution != null and interviewDistribution != ''">
+                interview_distribution = #{interviewDistribution},
+            </if>
         </set>
         where id = #{id}
     </update>

+ 4 - 1
src/main/java/com/goafanti/common/mapper/UserMapperExt.xml

@@ -2395,10 +2395,13 @@ inner join(
 			   b.org_code         orgCode,
 			   b.business_scope   businessScope,
 			   b.intended_project intendedProject,
-			   a.nickname
+			   a.nickname,
+			   a.share_type      shareType,
+			   d.channel_type    channelType
 		from `user` a
 				 left join organization_identity b on a.id = b.uid
 				 left join industry_category c  on b.industry =c.id
+				left join user_mid d on a.id=d.uid
 		where a.type = 1
 		  and a.id = #{id}
 	</select>

+ 39 - 2
src/main/java/com/goafanti/common/model/UserArchives.java

@@ -10,10 +10,10 @@ import java.util.Date;
  * 客户档案表(UserArchives)实体类
  *
  * @author makejava
- * @since 2024-07-12 15:26:57
+ * @since 2024-08-12 10:38:57
  */
 public class UserArchives implements Serializable {
-    private static final long serialVersionUID = 209412221290580251L;
+    private static final long serialVersionUID = -61985340141600786L;
 
     private Integer id;
 
@@ -58,6 +58,19 @@ public class UserArchives implements Serializable {
      * 创建时间
      */
     private Date createTime;
+/**
+     * 企业数
+     */
+    private Integer enterpriseCount;
+/**
+     * 渠道考核指标
+     */
+    private String channelIndicators;
+/**
+     * 我方主要面谈及分工
+     */
+    private String interviewDistribution;
+
 
     public Integer getId() {
         return id;
@@ -156,5 +169,29 @@ public class UserArchives implements Serializable {
         this.createTime = createTime;
     }
 
+    public Integer getEnterpriseCount() {
+        return enterpriseCount;
+    }
+
+    public void setEnterpriseCount(Integer enterpriseCount) {
+        this.enterpriseCount = enterpriseCount;
+    }
+
+    public String getChannelIndicators() {
+        return channelIndicators;
+    }
+
+    public void setChannelIndicators(String channelIndicators) {
+        this.channelIndicators = channelIndicators;
+    }
+
+    public String getInterviewDistribution() {
+        return interviewDistribution;
+    }
+
+    public void setInterviewDistribution(String interviewDistribution) {
+        this.interviewDistribution = interviewDistribution;
+    }
+
 }
 

+ 18 - 0
src/main/java/com/goafanti/customer/bo/UserArchivesDetails.java

@@ -13,6 +13,24 @@ public class UserArchivesDetails extends UserArchives {
     private String intendedProject;
     private String nickname;
     private Integer myUser;
+    private Integer shareType;
+    private Integer channelType;
+
+    public Integer getShareType() {
+        return shareType;
+    }
+
+    public void setShareType(Integer shareType) {
+        this.shareType = shareType;
+    }
+
+    public Integer getChannelType() {
+        return channelType;
+    }
+
+    public void setChannelType(Integer channelType) {
+        this.channelType = channelType;
+    }
 
     public Integer getMyUser() {
         return myUser;