Browse Source

客户档案新增参评获奖

anderx 1 year ago
parent
commit
4e9d35edf6

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

@@ -10,7 +10,7 @@ import java.util.List;
  * 客户档案表(UserArchives)表数据库访问层
  *
  * @author makejava
- * @since 2024-09-26 09:25:42
+ * @since 2024-09-26 15:29:28
  */
 public interface UserArchivesMapper {
 

+ 33 - 8
src/main/java/com/goafanti/common/mapper/UserArchivesMapper.xml

@@ -18,10 +18,12 @@
         <result property="channelIndicators" column="channel_indicators" jdbcType="VARCHAR"/>
         <result property="interviewDistribution" column="interview_distribution" jdbcType="VARCHAR"/>
         <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
+        <result property="awardsTime" column="awards_time" jdbcType="TIMESTAMP"/>
+        <result property="awardsStatus" column="awards_status" jdbcType="INTEGER"/>
     </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, enterprise_count, channel_indicators, interview_distribution, update_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, update_time, awards_time, awards_status
     </sql>
 
     <!--查询单个-->
@@ -87,6 +89,12 @@
             <if test="updateTime != null">
                 and update_time = #{updateTime}
             </if>
+            <if test="awardsTime != null">
+                and awards_time = #{awardsTime}
+            </if>
+            <if test="awardsStatus != null">
+                and awards_status = #{awardsStatus}
+            </if>
         </where>
         <if test="page_sql != null">
             ${page_sql}
@@ -146,6 +154,12 @@
             <if test="updateTime != null">
                 and update_time = #{updateTime}
             </if>
+            <if test="awardsTime != null">
+                and awards_time = #{awardsTime}
+            </if>
+            <if test="awardsStatus != null">
+                and awards_status = #{awardsStatus}
+            </if>
         </where>
     </select>
 
@@ -154,37 +168,40 @@
         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, update_time)
+                                  channel_indicators, interview_distribution, update_time, awards_time, awards_status)
         values (#{uid}, #{patentCount}, #{inventionPatentCount}, #{utilityModelCount}, #{appearancePatentCount},
                 #{softwareWorksCount}, #{otherCount}, #{financialData}, #{earlyCommunication}, #{interviewIdeas},
-                #{createTime}, #{enterpriseCount}, #{channelIndicators}, #{interviewDistribution}, #{updateTime})
+                #{createTime}, #{enterpriseCount}, #{channelIndicators}, #{interviewDistribution}, #{updateTime},
+                #{awardsTime}, #{awardsStatus})
     </insert>
 
     <insert id="insertBatch">
         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, update_time)
+        interview_ideas, create_time, enterprise_count, channel_indicators, interview_distribution, update_time,
+        awards_time, awards_status)
         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.enterpriseCount}, #{entity.channelIndicators}, #{entity.interviewDistribution},
-            #{entity.updateTime})
+            #{entity.updateTime}, #{entity.awardsTime}, #{entity.awardsStatus})
         </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, enterprise_count, channel_indicators, interview_distribution, update_time)
+        interview_ideas, create_time, enterprise_count, channel_indicators, interview_distribution, update_time,
+        awards_time, awards_status)
         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.enterpriseCount}, #{entity.channelIndicators}, #{entity.interviewDistribution},
-            #{entity.updateTime})
+            #{entity.updateTime}, #{entity.awardsTime}, #{entity.awardsStatus})
         </foreach>
         on duplicate key update
         uid = values(uid),
@@ -201,7 +218,9 @@
         enterprise_count = values(enterprise_count),
         channel_indicators = values(channel_indicators),
         interview_distribution = values(interview_distribution),
-        update_time = values(update_time)
+        update_time = values(update_time),
+        awards_time = values(awards_time),
+        awards_status = values(awards_status)
     </insert>
 
     <!--通过主键修改数据-->
@@ -253,6 +272,12 @@
             <if test="updateTime != null">
                 update_time = #{updateTime},
             </if>
+            <if test="awardsTime != null">
+                awards_time = #{awardsTime},
+            </if>
+            <if test="awardsStatus != null">
+                awards_status = #{awardsStatus},
+            </if>
         </set>
         where id = #{id}
     </update>

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

@@ -10,10 +10,10 @@ import java.util.Date;
  * 客户档案表(UserArchives)实体类
  *
  * @author makejava
- * @since 2024-09-26 09:25:42
+ * @since 2024-09-26 15:29:28
  */
 public class UserArchives implements Serializable {
-    private static final long serialVersionUID = 270185495568394336L;
+    private static final long serialVersionUID = -88017082768227336L;
 
     private Integer id;
 
@@ -74,6 +74,14 @@ public class UserArchives implements Serializable {
      * 修改时间
      */
     private Date updateTime;
+    /**
+     * 获奖时间
+     */
+    private Date awardsTime;
+    /**
+     * 获奖状态 0=未参评,1=已参评,2=已获奖
+     */
+    private Integer awardsStatus;
 
 
     public Integer getId() {
@@ -205,5 +213,21 @@ public class UserArchives implements Serializable {
         this.updateTime = updateTime;
     }
 
+    public Date getAwardsTime() {
+        return awardsTime;
+    }
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    public void setAwardsTime(Date awardsTime) {
+        this.awardsTime = awardsTime;
+    }
+
+    public Integer getAwardsStatus() {
+        return awardsStatus;
+    }
+
+    public void setAwardsStatus(Integer awardsStatus) {
+        this.awardsStatus = awardsStatus;
+    }
+
 }