Browse Source

新增字段

anderx 2 years ago
parent
commit
fac2391c3f

+ 47 - 42
src/main/java/com/goafanti/common/mapper/TOrderNewMapper.xml

@@ -50,6 +50,7 @@
     <result column="user_type" jdbcType="INTEGER" property="userType" />
     <result column="examine_name" jdbcType="VARCHAR" property="examineName" />
     <result column="tag" jdbcType="INTEGER" property="tag" />
+    <result column="patent_status" jdbcType="INTEGER" property="patentStatus" />
   </resultMap>
   <sql id="Base_Column_List">
     order_no, order_type, creater, create_time, update_time, buyer_id, first_amount,
@@ -59,7 +60,7 @@
     contract_type, contacts, contact_mobile, legal_person, legal_person_tel, proof_count,
     proof_aid, proof_time, proof_status, order_dep, outsource, additional_order, primary_order,
     old_salesman_id, back_status, agreement_url, new_user, service_content, sales_type,
-    channel_id, other, user_type, examine_name, tag
+    channel_id, other, user_type, examine_name, tag, patent_status
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
     select
@@ -71,48 +72,45 @@
     delete from t_order_new
     where order_no = #{orderNo,jdbcType=VARCHAR}
   </delete>
-  <insert id="insert" parameterType="com.goafanti.common.model.TOrderNew">
-    insert into t_order_new (order_no, order_type, creater,
-      create_time, update_time, buyer_id,
-      first_amount, total_amount, settlement_amount,
-      refund_amount, order_status, liquidation_status,
-      process_status, project_status, approval,
-      order_remarks, delete_sign, salesman_id,
-      finance_id, technician_id, sign_time,
-      settlement_time, contract_picture_url, contract_no,
-      contract_type, contacts, contact_mobile,
-      legal_person, legal_person_tel, proof_count,
-      proof_aid, proof_time, proof_status,
-      order_dep, outsource, additional_order,
-      primary_order, old_salesman_id, back_status,
-      agreement_url, new_user, service_content,
-      sales_type, channel_id, other,
-      user_type, examine_name, tag
+  <insert id="insert" keyColumn="order_no" keyProperty="orderNo" parameterType="com.goafanti.common.model.TOrderNew" useGeneratedKeys="true">
+    insert into t_order_new (order_type, creater, create_time,
+      update_time, buyer_id, first_amount,
+      total_amount, settlement_amount, refund_amount,
+      order_status, liquidation_status, process_status,
+      project_status, approval, order_remarks,
+      delete_sign, salesman_id, finance_id,
+      technician_id, sign_time, settlement_time,
+      contract_picture_url, contract_no, contract_type,
+      contacts, contact_mobile, legal_person,
+      legal_person_tel, proof_count, proof_aid,
+      proof_time, proof_status, order_dep,
+      outsource, additional_order, primary_order,
+      old_salesman_id, back_status, agreement_url,
+      new_user, service_content, sales_type,
+      channel_id, other, user_type,
+      examine_name, tag, patent_status
       )
-    values (#{orderNo,jdbcType=VARCHAR}, #{orderType,jdbcType=INTEGER}, #{creater,jdbcType=VARCHAR},
-      #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{buyerId,jdbcType=VARCHAR},
-      #{firstAmount,jdbcType=DECIMAL}, #{totalAmount,jdbcType=DECIMAL}, #{settlementAmount,jdbcType=DECIMAL},
-      #{refundAmount,jdbcType=DECIMAL}, #{orderStatus,jdbcType=INTEGER}, #{liquidationStatus,jdbcType=INTEGER},
-      #{processStatus,jdbcType=INTEGER}, #{projectStatus,jdbcType=INTEGER}, #{approval,jdbcType=INTEGER},
-      #{orderRemarks,jdbcType=VARCHAR}, #{deleteSign,jdbcType=INTEGER}, #{salesmanId,jdbcType=VARCHAR},
-      #{financeId,jdbcType=VARCHAR}, #{technicianId,jdbcType=VARCHAR}, #{signTime,jdbcType=DATE},
-      #{settlementTime,jdbcType=DATE}, #{contractPictureUrl,jdbcType=VARCHAR}, #{contractNo,jdbcType=VARCHAR},
-      #{contractType,jdbcType=VARCHAR}, #{contacts,jdbcType=VARCHAR}, #{contactMobile,jdbcType=VARCHAR},
-      #{legalPerson,jdbcType=VARCHAR}, #{legalPersonTel,jdbcType=VARCHAR}, #{proofCount,jdbcType=FLOAT},
-      #{proofAid,jdbcType=VARCHAR}, #{proofTime,jdbcType=TIMESTAMP}, #{proofStatus,jdbcType=INTEGER},
-      #{orderDep,jdbcType=VARCHAR}, #{outsource,jdbcType=INTEGER}, #{additionalOrder,jdbcType=VARCHAR},
-      #{primaryOrder,jdbcType=VARCHAR}, #{oldSalesmanId,jdbcType=VARCHAR}, #{backStatus,jdbcType=INTEGER},
-      #{agreementUrl,jdbcType=VARCHAR}, #{newUser,jdbcType=INTEGER}, #{serviceContent,jdbcType=VARCHAR},
-      #{salesType,jdbcType=INTEGER}, #{channelId,jdbcType=VARCHAR}, #{other,jdbcType=VARCHAR},
-      #{userType,jdbcType=INTEGER}, #{examineName,jdbcType=VARCHAR}, #{tag,jdbcType=INTEGER}
+    values (#{orderType,jdbcType=INTEGER}, #{creater,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
+      #{updateTime,jdbcType=TIMESTAMP}, #{buyerId,jdbcType=VARCHAR}, #{firstAmount,jdbcType=DECIMAL},
+      #{totalAmount,jdbcType=DECIMAL}, #{settlementAmount,jdbcType=DECIMAL}, #{refundAmount,jdbcType=DECIMAL},
+      #{orderStatus,jdbcType=INTEGER}, #{liquidationStatus,jdbcType=INTEGER}, #{processStatus,jdbcType=INTEGER},
+      #{projectStatus,jdbcType=INTEGER}, #{approval,jdbcType=INTEGER}, #{orderRemarks,jdbcType=VARCHAR},
+      #{deleteSign,jdbcType=INTEGER}, #{salesmanId,jdbcType=VARCHAR}, #{financeId,jdbcType=VARCHAR},
+      #{technicianId,jdbcType=VARCHAR}, #{signTime,jdbcType=DATE}, #{settlementTime,jdbcType=DATE},
+      #{contractPictureUrl,jdbcType=VARCHAR}, #{contractNo,jdbcType=VARCHAR}, #{contractType,jdbcType=VARCHAR},
+      #{contacts,jdbcType=VARCHAR}, #{contactMobile,jdbcType=VARCHAR}, #{legalPerson,jdbcType=VARCHAR},
+      #{legalPersonTel,jdbcType=VARCHAR}, #{proofCount,jdbcType=FLOAT}, #{proofAid,jdbcType=VARCHAR},
+      #{proofTime,jdbcType=TIMESTAMP}, #{proofStatus,jdbcType=INTEGER}, #{orderDep,jdbcType=VARCHAR},
+      #{outsource,jdbcType=INTEGER}, #{additionalOrder,jdbcType=VARCHAR}, #{primaryOrder,jdbcType=VARCHAR},
+      #{oldSalesmanId,jdbcType=VARCHAR}, #{backStatus,jdbcType=INTEGER}, #{agreementUrl,jdbcType=VARCHAR},
+      #{newUser,jdbcType=INTEGER}, #{serviceContent,jdbcType=VARCHAR}, #{salesType,jdbcType=INTEGER},
+      #{channelId,jdbcType=VARCHAR}, #{other,jdbcType=VARCHAR}, #{userType,jdbcType=INTEGER},
+      #{examineName,jdbcType=VARCHAR}, #{tag,jdbcType=INTEGER}, #{patentStatus,jdbcType=INTEGER}
       )
   </insert>
-  <insert id="insertSelective" parameterType="com.goafanti.common.model.TOrderNew">
+  <insert id="insertSelective" keyColumn="order_no" keyProperty="orderNo" parameterType="com.goafanti.common.model.TOrderNew" useGeneratedKeys="true">
     insert into t_order_new
     <trim prefix="(" suffix=")" suffixOverrides=",">
-      <if test="orderNo != null">
-        order_no,
-      </if>
       <if test="orderType != null">
         order_type,
       </if>
@@ -254,11 +252,11 @@
       <if test="tag != null">
         tag,
       </if>
+      <if test="patentStatus != null">
+        patent_status,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
-      <if test="orderNo != null">
-        #{orderNo,jdbcType=VARCHAR},
-      </if>
       <if test="orderType != null">
         #{orderType,jdbcType=INTEGER},
       </if>
@@ -400,6 +398,9 @@
       <if test="tag != null">
         #{tag,jdbcType=INTEGER},
       </if>
+      <if test="patentStatus != null">
+        #{patentStatus,jdbcType=INTEGER},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TOrderNew">
@@ -546,6 +547,9 @@
       <if test="tag != null">
         tag = #{tag,jdbcType=INTEGER},
       </if>
+      <if test="patentStatus != null">
+        patent_status = #{patentStatus,jdbcType=INTEGER},
+      </if>
     </set>
     where order_no = #{orderNo,jdbcType=VARCHAR}
   </update>
@@ -597,7 +601,8 @@
       other = #{other,jdbcType=VARCHAR},
       user_type = #{userType,jdbcType=INTEGER},
       examine_name = #{examineName,jdbcType=VARCHAR},
-      tag = #{tag,jdbcType=INTEGER}
+      tag = #{tag,jdbcType=INTEGER},
+      patent_status = #{patentStatus,jdbcType=INTEGER}
     where order_no = #{orderNo,jdbcType=VARCHAR}
   </update>
 

+ 13 - 0
src/main/java/com/goafanti/common/model/TOrderNew.java

@@ -249,6 +249,11 @@ public class TOrderNew implements Serializable {
      */
     private Integer tag;
 
+    /**
+     * 0=客户自己完成,1=非客户自己完成
+     */
+    private Integer patentStatus;
+
     private static final long serialVersionUID = 1L;
 
     public String getOrderNo() {
@@ -634,4 +639,12 @@ public class TOrderNew implements Serializable {
     public void setTag(Integer tag) {
         this.tag = tag;
     }
+
+    public Integer getPatentStatus() {
+        return patentStatus;
+    }
+
+    public void setPatentStatus(Integer patentStatus) {
+        this.patentStatus = patentStatus;
+    }
 }