anderx лет назад: 4
Родитель
Сommit
ab0d64e8ba

+ 28 - 83
src/main/java/com/goafanti/common/dao/NewOrderChangeMapper.java

@@ -11,88 +11,33 @@ import java.util.Map;
 import org.apache.ibatis.annotations.Param;
 
 public interface NewOrderChangeMapper {
+    int deleteByPrimaryKey(Integer id);
 
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_change
-	 * @mbg.generated  Wed Apr 01 08:39:10 CST 2020
-	 */
-	long countByExample(NewOrderChangeExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_change
-	 * @mbg.generated  Wed Apr 01 08:39:10 CST 2020
-	 */
-	int deleteByExample(NewOrderChangeExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_change
-	 * @mbg.generated  Wed Apr 01 08:39:10 CST 2020
-	 */
-	int deleteByPrimaryKey(Integer id);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_change
-	 * @mbg.generated  Wed Apr 01 08:39:10 CST 2020
-	 */
-	int insert(NewOrderChange record);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_change
-	 * @mbg.generated  Wed Apr 01 08:39:10 CST 2020
-	 */
-	int insertSelective(NewOrderChange record);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_change
-	 * @mbg.generated  Wed Apr 01 08:39:10 CST 2020
-	 */
-	List<NewOrderChange> selectByExample(NewOrderChangeExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_change
-	 * @mbg.generated  Wed Apr 01 08:39:10 CST 2020
-	 */
-	NewOrderChange selectByPrimaryKey(Integer id);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_change
-	 * @mbg.generated  Wed Apr 01 08:39:10 CST 2020
-	 */
-	int updateByExampleSelective(@Param("record") NewOrderChange record,
-			@Param("example") NewOrderChangeExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_change
-	 * @mbg.generated  Wed Apr 01 08:39:10 CST 2020
-	 */
-	int updateByExample(@Param("record") NewOrderChange record, @Param("example") NewOrderChangeExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_change
-	 * @mbg.generated  Wed Apr 01 08:39:10 CST 2020
-	 */
-	int updateByPrimaryKeySelective(NewOrderChange record);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_change
-	 * @mbg.generated  Wed Apr 01 08:39:10 CST 2020
-	 */
-	int updateByPrimaryKey(NewOrderChange record);
-
-	List<NewOrderChangeBo> selectByorderNo(String orderNo);
-
-	int checkOderNo(String orderNo);
-
-	NewOrderChangeBo selectById(Integer id);
-
-	void addRefundInvoice(@Param("orderNo")String orderNo, @Param("amount")BigDecimal amount);
-
-	void subtractRefundInvoice(@Param("orderNo")String orderNo,@Param("amount")BigDecimal amount);
-
-
-	List<Map<String, String>> getOrderChange(String orderNo);
-
-	NewOrderChangeBo selectByChangeId(String changeId);
-
-	NewOrderChangeBo selectByorderNoAndStatus(String orderNo);
+    int insert(NewOrderChange record);
+
+    int insertSelective(NewOrderChange record);
+
+    NewOrderChange selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(NewOrderChange record);
+
+    int updateByPrimaryKey(NewOrderChange record);
+
+
+    List<NewOrderChangeBo> selectByorderNo(String orderNo);
+
+    int checkOderNo(String orderNo);
+
+    NewOrderChangeBo selectById(Integer id);
+
+    void addRefundInvoice(@Param("orderNo")String orderNo, @Param("amount")BigDecimal amount);
+
+    void subtractRefundInvoice(@Param("orderNo")String orderNo,@Param("amount")BigDecimal amount);
+
+
+    List<Map<String, String>> getOrderChange(String orderNo);
+
+    NewOrderChangeBo selectByChangeId(String changeId);
+
+    NewOrderChangeBo selectByorderNoAndStatus(String orderNo);
 }

+ 77 - 369
src/main/java/com/goafanti/common/mapper/NewOrderChangeMapper.xml

@@ -2,11 +2,6 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.goafanti.common.dao.NewOrderChangeMapper">
   <resultMap id="BaseResultMap" type="com.goafanti.common.model.NewOrderChange">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Apr 01 08:39:10 CST 2020.
-    -->
     <id column="id" jdbcType="INTEGER" property="id" />
     <result column="order_no" jdbcType="VARCHAR" property="orderNo" />
     <result column="process_state" jdbcType="INTEGER" property="processState" />
@@ -38,177 +33,52 @@
     <result column="refund_status" jdbcType="INTEGER" property="refundStatus" />
     <result column="refund_url" jdbcType="VARCHAR" property="refundUrl" />
     <result column="back_status" jdbcType="INTEGER" property="backStatus" />
+    <result column="attachment_url" jdbcType="VARCHAR" property="attachmentUrl" />
   </resultMap>
-  <sql id="Example_Where_Clause">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Apr 01 08:39:10 CST 2020.
-    -->
-    <where>
-      <foreach collection="oredCriteria" item="criteria" separator="or">
-        <if test="criteria.valid">
-          <trim prefix="(" prefixOverrides="and" suffix=")">
-            <foreach collection="criteria.criteria" item="criterion">
-              <choose>
-                <when test="criterion.noValue">
-                  and ${criterion.condition}
-                </when>
-                <when test="criterion.singleValue">
-                  and ${criterion.condition} #{criterion.value}
-                </when>
-                <when test="criterion.betweenValue">
-                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
-                </when>
-                <when test="criterion.listValue">
-                  and ${criterion.condition}
-                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
-                    #{listItem}
-                  </foreach>
-                </when>
-              </choose>
-            </foreach>
-          </trim>
-        </if>
-      </foreach>
-    </where>
-  </sql>
-  <sql id="Update_By_Example_Where_Clause">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Apr 01 08:39:10 CST 2020.
-    -->
-    <where>
-      <foreach collection="example.oredCriteria" item="criteria" separator="or">
-        <if test="criteria.valid">
-          <trim prefix="(" prefixOverrides="and" suffix=")">
-            <foreach collection="criteria.criteria" item="criterion">
-              <choose>
-                <when test="criterion.noValue">
-                  and ${criterion.condition}
-                </when>
-                <when test="criterion.singleValue">
-                  and ${criterion.condition} #{criterion.value}
-                </when>
-                <when test="criterion.betweenValue">
-                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
-                </when>
-                <when test="criterion.listValue">
-                  and ${criterion.condition}
-                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
-                    #{listItem}
-                  </foreach>
-                </when>
-              </choose>
-            </foreach>
-          </trim>
-        </if>
-      </foreach>
-    </where>
-  </sql>
   <sql id="Base_Column_List">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Apr 01 08:39:10 CST 2020.
-    -->
-    id, order_no, process_state, status, type, create_time, remarks, voucher_url, total_amount, 
-    settlement_amount, change_amount, applicant, dep_name, project_state, zxs_cost, zxs_remarks, 
-    payment_time, payment_amount, invoice_time, invoice_amount, invoice_type, cw_cost, 
-    refundable_amount, cw_remarks, estimate_cost, estimate_refundable, refund_Invoice, 
-    used_order, refund_status, refund_url, back_status
+    id, order_no, process_state, `status`, `type`, create_time, remarks, voucher_url, 
+    total_amount, settlement_amount, change_amount, applicant, dep_name, project_state, 
+    zxs_cost, zxs_remarks, payment_time, payment_amount, invoice_time, invoice_amount, 
+    invoice_type, cw_cost, refundable_amount, cw_remarks, estimate_cost, estimate_refundable, 
+    refund_Invoice, used_order, refund_status, refund_url, back_status, attachment_url
   </sql>
-  <select id="selectByExample" parameterType="com.goafanti.common.model.NewOrderChangeExample" resultMap="BaseResultMap">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Apr 01 08:39:10 CST 2020.
-    -->
-    select
-    <if test="distinct">
-      distinct
-    </if>
-    <include refid="Base_Column_List" />
-    from new_order_change
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-    <if test="orderByClause != null">
-      order by ${orderByClause}
-    </if>
-  </select>
   <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Apr 01 08:39:10 CST 2020.
-    -->
     select 
     <include refid="Base_Column_List" />
     from new_order_change
     where id = #{id,jdbcType=INTEGER}
   </select>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Apr 01 08:39:10 CST 2020.
-    -->
     delete from new_order_change
     where id = #{id,jdbcType=INTEGER}
   </delete>
-  <delete id="deleteByExample" parameterType="com.goafanti.common.model.NewOrderChangeExample">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Apr 01 08:39:10 CST 2020.
-    -->
-    delete from new_order_change
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-  </delete>
-  <insert id="insert" parameterType="com.goafanti.common.model.NewOrderChange">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Apr 01 08:39:10 CST 2020.
-    -->
-    insert into new_order_change (id, order_no, process_state, 
-      status, type, create_time, 
-      remarks, voucher_url, total_amount, 
-      settlement_amount, change_amount, applicant, 
-      dep_name, project_state, zxs_cost, 
-      zxs_remarks, payment_time, payment_amount, 
-      invoice_time, invoice_amount, invoice_type, 
-      cw_cost, refundable_amount, cw_remarks, 
-      estimate_cost, estimate_refundable, refund_Invoice, 
-      used_order, refund_status, refund_url, 
-      back_status)
-    values (#{id,jdbcType=INTEGER}, #{orderNo,jdbcType=VARCHAR}, #{processState,jdbcType=INTEGER}, 
-      #{status,jdbcType=INTEGER}, #{type,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, 
-      #{remarks,jdbcType=VARCHAR}, #{voucherUrl,jdbcType=VARCHAR}, #{totalAmount,jdbcType=DECIMAL}, 
-      #{settlementAmount,jdbcType=DECIMAL}, #{changeAmount,jdbcType=DECIMAL}, #{applicant,jdbcType=VARCHAR}, 
-      #{depName,jdbcType=VARCHAR}, #{projectState,jdbcType=VARCHAR}, #{zxsCost,jdbcType=DECIMAL}, 
-      #{zxsRemarks,jdbcType=VARCHAR}, #{paymentTime,jdbcType=TIMESTAMP}, #{paymentAmount,jdbcType=DECIMAL}, 
-      #{invoiceTime,jdbcType=TIMESTAMP}, #{invoiceAmount,jdbcType=DECIMAL}, #{invoiceType,jdbcType=VARCHAR}, 
-      #{cwCost,jdbcType=DECIMAL}, #{refundableAmount,jdbcType=DECIMAL}, #{cwRemarks,jdbcType=VARCHAR}, 
-      #{estimateCost,jdbcType=DECIMAL}, #{estimateRefundable,jdbcType=DECIMAL}, #{refundInvoice,jdbcType=DECIMAL}, 
-      #{usedOrder,jdbcType=VARCHAR}, #{refundStatus,jdbcType=INTEGER}, #{refundUrl,jdbcType=VARCHAR}, 
-      #{backStatus,jdbcType=INTEGER})
+  <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.NewOrderChange" useGeneratedKeys="true">
+    insert into new_order_change (order_no, process_state, `status`, 
+      `type`, create_time, remarks, 
+      voucher_url, total_amount, settlement_amount, 
+      change_amount, applicant, dep_name, 
+      project_state, zxs_cost, zxs_remarks, 
+      payment_time, payment_amount, invoice_time, 
+      invoice_amount, invoice_type, cw_cost, 
+      refundable_amount, cw_remarks, estimate_cost, 
+      estimate_refundable, refund_Invoice, used_order, 
+      refund_status, refund_url, back_status, 
+      attachment_url)
+    values (#{orderNo,jdbcType=VARCHAR}, #{processState,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, 
+      #{type,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{remarks,jdbcType=VARCHAR}, 
+      #{voucherUrl,jdbcType=VARCHAR}, #{totalAmount,jdbcType=DECIMAL}, #{settlementAmount,jdbcType=DECIMAL}, 
+      #{changeAmount,jdbcType=DECIMAL}, #{applicant,jdbcType=VARCHAR}, #{depName,jdbcType=VARCHAR}, 
+      #{projectState,jdbcType=VARCHAR}, #{zxsCost,jdbcType=DECIMAL}, #{zxsRemarks,jdbcType=VARCHAR}, 
+      #{paymentTime,jdbcType=TIMESTAMP}, #{paymentAmount,jdbcType=DECIMAL}, #{invoiceTime,jdbcType=TIMESTAMP}, 
+      #{invoiceAmount,jdbcType=DECIMAL}, #{invoiceType,jdbcType=VARCHAR}, #{cwCost,jdbcType=DECIMAL}, 
+      #{refundableAmount,jdbcType=DECIMAL}, #{cwRemarks,jdbcType=VARCHAR}, #{estimateCost,jdbcType=DECIMAL}, 
+      #{estimateRefundable,jdbcType=DECIMAL}, #{refundInvoice,jdbcType=DECIMAL}, #{usedOrder,jdbcType=VARCHAR}, 
+      #{refundStatus,jdbcType=INTEGER}, #{refundUrl,jdbcType=VARCHAR}, #{backStatus,jdbcType=INTEGER}, 
+      #{attachmentUrl,jdbcType=VARCHAR})
   </insert>
-  <insert id="insertSelective" parameterType="com.goafanti.common.model.NewOrderChange">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Apr 01 08:39:10 CST 2020.
-    -->
+  <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.NewOrderChange" useGeneratedKeys="true">
     insert into new_order_change
     <trim prefix="(" suffix=")" suffixOverrides=",">
-      <if test="id != null">
-        id,
-      </if>
       <if test="orderNo != null">
         order_no,
       </if>
@@ -216,10 +86,10 @@
         process_state,
       </if>
       <if test="status != null">
-        status,
+        `status`,
       </if>
       <if test="type != null">
-        type,
+        `type`,
       </if>
       <if test="createTime != null">
         create_time,
@@ -299,11 +169,11 @@
       <if test="backStatus != null">
         back_status,
       </if>
+      <if test="attachmentUrl != null">
+        attachment_url,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
-      <if test="id != null">
-        #{id,jdbcType=INTEGER},
-      </if>
       <if test="orderNo != null">
         #{orderNo,jdbcType=VARCHAR},
       </if>
@@ -394,173 +264,12 @@
       <if test="backStatus != null">
         #{backStatus,jdbcType=INTEGER},
       </if>
+      <if test="attachmentUrl != null">
+        #{attachmentUrl,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
-  <select id="countByExample" parameterType="com.goafanti.common.model.NewOrderChangeExample" resultType="java.lang.Long">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Apr 01 08:39:10 CST 2020.
-    -->
-    select count(*) from new_order_change
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-  </select>
-  <update id="updateByExampleSelective" parameterType="map">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Apr 01 08:39:10 CST 2020.
-    -->
-    update new_order_change
-    <set>
-      <if test="record.id != null">
-        id = #{record.id,jdbcType=INTEGER},
-      </if>
-      <if test="record.orderNo != null">
-        order_no = #{record.orderNo,jdbcType=VARCHAR},
-      </if>
-      <if test="record.processState != null">
-        process_state = #{record.processState,jdbcType=INTEGER},
-      </if>
-      <if test="record.status != null">
-        status = #{record.status,jdbcType=INTEGER},
-      </if>
-      <if test="record.type != null">
-        type = #{record.type,jdbcType=INTEGER},
-      </if>
-      <if test="record.createTime != null">
-        create_time = #{record.createTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="record.remarks != null">
-        remarks = #{record.remarks,jdbcType=VARCHAR},
-      </if>
-      <if test="record.voucherUrl != null">
-        voucher_url = #{record.voucherUrl,jdbcType=VARCHAR},
-      </if>
-      <if test="record.totalAmount != null">
-        total_amount = #{record.totalAmount,jdbcType=DECIMAL},
-      </if>
-      <if test="record.settlementAmount != null">
-        settlement_amount = #{record.settlementAmount,jdbcType=DECIMAL},
-      </if>
-      <if test="record.changeAmount != null">
-        change_amount = #{record.changeAmount,jdbcType=DECIMAL},
-      </if>
-      <if test="record.applicant != null">
-        applicant = #{record.applicant,jdbcType=VARCHAR},
-      </if>
-      <if test="record.depName != null">
-        dep_name = #{record.depName,jdbcType=VARCHAR},
-      </if>
-      <if test="record.projectState != null">
-        project_state = #{record.projectState,jdbcType=VARCHAR},
-      </if>
-      <if test="record.zxsCost != null">
-        zxs_cost = #{record.zxsCost,jdbcType=DECIMAL},
-      </if>
-      <if test="record.zxsRemarks != null">
-        zxs_remarks = #{record.zxsRemarks,jdbcType=VARCHAR},
-      </if>
-      <if test="record.paymentTime != null">
-        payment_time = #{record.paymentTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="record.paymentAmount != null">
-        payment_amount = #{record.paymentAmount,jdbcType=DECIMAL},
-      </if>
-      <if test="record.invoiceTime != null">
-        invoice_time = #{record.invoiceTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="record.invoiceAmount != null">
-        invoice_amount = #{record.invoiceAmount,jdbcType=DECIMAL},
-      </if>
-      <if test="record.invoiceType != null">
-        invoice_type = #{record.invoiceType,jdbcType=VARCHAR},
-      </if>
-      <if test="record.cwCost != null">
-        cw_cost = #{record.cwCost,jdbcType=DECIMAL},
-      </if>
-      <if test="record.refundableAmount != null">
-        refundable_amount = #{record.refundableAmount,jdbcType=DECIMAL},
-      </if>
-      <if test="record.cwRemarks != null">
-        cw_remarks = #{record.cwRemarks,jdbcType=VARCHAR},
-      </if>
-      <if test="record.estimateCost != null">
-        estimate_cost = #{record.estimateCost,jdbcType=DECIMAL},
-      </if>
-      <if test="record.estimateRefundable != null">
-        estimate_refundable = #{record.estimateRefundable,jdbcType=DECIMAL},
-      </if>
-      <if test="record.refundInvoice != null">
-        refund_Invoice = #{record.refundInvoice,jdbcType=DECIMAL},
-      </if>
-      <if test="record.usedOrder != null">
-        used_order = #{record.usedOrder,jdbcType=VARCHAR},
-      </if>
-      <if test="record.refundStatus != null">
-        refund_status = #{record.refundStatus,jdbcType=INTEGER},
-      </if>
-      <if test="record.refundUrl != null">
-        refund_url = #{record.refundUrl,jdbcType=VARCHAR},
-      </if>
-      <if test="record.backStatus != null">
-        back_status = #{record.backStatus,jdbcType=INTEGER},
-      </if>
-    </set>
-    <if test="_parameter != null">
-      <include refid="Update_By_Example_Where_Clause" />
-    </if>
-  </update>
-  <update id="updateByExample" parameterType="map">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Apr 01 08:39:10 CST 2020.
-    -->
-    update new_order_change
-    set id = #{record.id,jdbcType=INTEGER},
-      order_no = #{record.orderNo,jdbcType=VARCHAR},
-      process_state = #{record.processState,jdbcType=INTEGER},
-      status = #{record.status,jdbcType=INTEGER},
-      type = #{record.type,jdbcType=INTEGER},
-      create_time = #{record.createTime,jdbcType=TIMESTAMP},
-      remarks = #{record.remarks,jdbcType=VARCHAR},
-      voucher_url = #{record.voucherUrl,jdbcType=VARCHAR},
-      total_amount = #{record.totalAmount,jdbcType=DECIMAL},
-      settlement_amount = #{record.settlementAmount,jdbcType=DECIMAL},
-      change_amount = #{record.changeAmount,jdbcType=DECIMAL},
-      applicant = #{record.applicant,jdbcType=VARCHAR},
-      dep_name = #{record.depName,jdbcType=VARCHAR},
-      project_state = #{record.projectState,jdbcType=VARCHAR},
-      zxs_cost = #{record.zxsCost,jdbcType=DECIMAL},
-      zxs_remarks = #{record.zxsRemarks,jdbcType=VARCHAR},
-      payment_time = #{record.paymentTime,jdbcType=TIMESTAMP},
-      payment_amount = #{record.paymentAmount,jdbcType=DECIMAL},
-      invoice_time = #{record.invoiceTime,jdbcType=TIMESTAMP},
-      invoice_amount = #{record.invoiceAmount,jdbcType=DECIMAL},
-      invoice_type = #{record.invoiceType,jdbcType=VARCHAR},
-      cw_cost = #{record.cwCost,jdbcType=DECIMAL},
-      refundable_amount = #{record.refundableAmount,jdbcType=DECIMAL},
-      cw_remarks = #{record.cwRemarks,jdbcType=VARCHAR},
-      estimate_cost = #{record.estimateCost,jdbcType=DECIMAL},
-      estimate_refundable = #{record.estimateRefundable,jdbcType=DECIMAL},
-      refund_Invoice = #{record.refundInvoice,jdbcType=DECIMAL},
-      used_order = #{record.usedOrder,jdbcType=VARCHAR},
-      refund_status = #{record.refundStatus,jdbcType=INTEGER},
-      refund_url = #{record.refundUrl,jdbcType=VARCHAR},
-      back_status = #{record.backStatus,jdbcType=INTEGER}
-    <if test="_parameter != null">
-      <include refid="Update_By_Example_Where_Clause" />
-    </if>
-  </update>
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.NewOrderChange">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Apr 01 08:39:10 CST 2020.
-    -->
     update new_order_change
     <set>
       <if test="orderNo != null">
@@ -570,10 +279,10 @@
         process_state = #{processState,jdbcType=INTEGER},
       </if>
       <if test="status != null">
-        status = #{status,jdbcType=INTEGER},
+        `status` = #{status,jdbcType=INTEGER},
       </if>
       <if test="type != null">
-        type = #{type,jdbcType=INTEGER},
+        `type` = #{type,jdbcType=INTEGER},
       </if>
       <if test="createTime != null">
         create_time = #{createTime,jdbcType=TIMESTAMP},
@@ -653,20 +362,18 @@
       <if test="backStatus != null">
         back_status = #{backStatus,jdbcType=INTEGER},
       </if>
+      <if test="attachmentUrl != null">
+        attachment_url = #{attachmentUrl,jdbcType=VARCHAR},
+      </if>
     </set>
     where id = #{id,jdbcType=INTEGER}
   </update>
   <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.NewOrderChange">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Apr 01 08:39:10 CST 2020.
-    -->
     update new_order_change
     set order_no = #{orderNo,jdbcType=VARCHAR},
       process_state = #{processState,jdbcType=INTEGER},
-      status = #{status,jdbcType=INTEGER},
-      type = #{type,jdbcType=INTEGER},
+      `status` = #{status,jdbcType=INTEGER},
+      `type` = #{type,jdbcType=INTEGER},
       create_time = #{createTime,jdbcType=TIMESTAMP},
       remarks = #{remarks,jdbcType=VARCHAR},
       voucher_url = #{voucherUrl,jdbcType=VARCHAR},
@@ -692,7 +399,8 @@
       used_order = #{usedOrder,jdbcType=VARCHAR},
       refund_status = #{refundStatus,jdbcType=INTEGER},
       refund_url = #{refundUrl,jdbcType=VARCHAR},
-      back_status = #{backStatus,jdbcType=INTEGER}
+      back_status = #{backStatus,jdbcType=INTEGER},
+      attachment_url = #{attachmentUrl,jdbcType=VARCHAR}
     where id = #{id,jdbcType=INTEGER}
   </update>
   <select id="selectByorderNo" resultType="com.goafanti.order.bo.NewOrderChangeBo">
@@ -703,7 +411,7 @@ select
 	a.change_amount changeAmount, a.applicant, a.dep_name depName, a.project_state projectState, a.zxs_cost zxsCost,
 	a.zxs_remarks zxsRemarks, date_format(a.payment_time, '%Y-%m-%d')paymentTimes, a.payment_amount paymentAmount,
 	date_format(a. invoice_time, '%Y-%m-%d') invoiceTimes, a.invoice_amount invoiceAmount,a.invoice_type invoiceType,
-	a.cw_remarks cwRemarks from new_order_change a where 1 = 1 
+	a.cw_remarks cwRemarks from new_order_change a where 1 = 1
 	and a.order_no= #{orderNo}
 	order by a.create_time desc limit 1
   </select>
@@ -716,10 +424,10 @@ select
 	a.zxs_remarks zxsRemarks, date_format(a.payment_time, '%Y-%m-%d')paymentTimes, a.payment_amount paymentAmount,
 	date_format(a. invoice_time, '%Y-%m-%d') invoiceTimes, a.invoice_amount invoiceAmount,a.invoice_type invoiceType,
 	a.cw_remarks cwRemarks,a.back_status backStatus from new_order_change a where 1 = 1 and status!=4
-	and a.id= #{ChangeId} 
+	and a.id= #{ChangeId}
 	order by a.create_time desc
   </select>
-  
+
   <select id="selectByorderNoAndStatus" resultType="com.goafanti.order.bo.NewOrderChangeBo">
 select
 	a.id, a.order_no orderNo, a.process_state processState, a.status, a.`type`,a.refundable_amount refundableAmount,
@@ -729,10 +437,10 @@ select
 	a.zxs_remarks zxsRemarks, date_format(a.payment_time, '%Y-%m-%d')paymentTimes, a.payment_amount paymentAmount,
 	date_format(a. invoice_time, '%Y-%m-%d') invoiceTimes, a.invoice_amount invoiceAmount,a.invoice_type invoiceType,
 	a.cw_remarks cwRemarks,a.back_status backStatus from new_order_change a where 1 = 1 and status in (0,1,2,3)
-	and a.order_no= #{orderNo} 
+	and a.order_no= #{orderNo}
 	order by a.create_time desc
   </select>
-  
+
   <select id="selectById" resultType="com.goafanti.order.bo.NewOrderChangeBo">
   select
 	a.id, a.order_no orderNo, a.process_state processState, a.status, a.`type`,a.refundable_amount refundableAmount,a.refund_url refundUrl,
@@ -749,21 +457,21 @@ select
 	where status in (0,1,2,3) and order_no= #{orderNo}
   </select>
   <select id="selectOrderChangeList" resultType="com.goafanti.order.bo.NewOderCahngeListBo">
-	select a.id,a.order_no orderNo,b.contract_no contractNo, date_format(a.create_time,'%Y-%m-%d %H:%i:%S')createTimes,c.nickname,b.order_type orderType, 
+	select a.id,a.order_no orderNo,b.contract_no contractNo, date_format(a.create_time,'%Y-%m-%d %H:%i:%S')createTimes,c.nickname,b.order_type orderType,
   date_format(b.create_time,'%Y-%m-%d %H:%i:%S')establishTimes, b.order_status orderStatus,b.total_amount totalAmount,a.status ,
   b.settlement_amount settlementAmount,(b.total_amount-b.settlement_amount) arrears,d.name salesmanName,e.name depName,a.`type`,
   a.process_state processState,a.back_status backStatus from new_order_change  noc left join  new_order_change a on noc.id=a.id
-  left join t_order_new b on a.order_no=b.order_no left join user c on b.buyer_id=c.id left join admin d on b.salesman_id=d.id 
-  left join department e on b.order_dep=e.id 
- 	<if test="processState==2"> 
+  left join t_order_new b on a.order_no=b.order_no left join user c on b.buyer_id=c.id left join admin d on b.salesman_id=d.id
+  left join department e on b.order_dep=e.id
+ 	<if test="processState==2">
  	left join (select order_no, aid from order_examine where`type`=0 group by order_no,aid)x on a.order_no = x.order_no
 	</if>
-	<if test="processState==3"> 
+	<if test="processState==3">
 	left join (select order_no, aid from order_examine where`type`=1 group by order_no,aid)x on a.order_no = x.order_no
-	</if> 
+	</if>
 	where 1=1
 	<if test="processState==0">
-	and b.salesman_id= #{aid} 
+	and b.salesman_id= #{aid}
 	</if>
 	<if test="processState==1">
 	and b.order_dep in
@@ -787,7 +495,7 @@ select
 	and e.finance_id =#{aid}
 	</if>
 	<if test="processState==5 and aids !=null">
-	and e.finance_id in 
+	and e.finance_id in
 		<foreach close=")" collection="aids" item="id" open="(" separator=",">
 		#{id}
 		</foreach>
@@ -817,28 +525,28 @@ select
 	and d.name like concat('%',#{salesmanName},'%')
 	</if>
 	<if test="complete ==0 and processState != 8">
-	 and (a.process_state &gt;= #{processState} or a.back_status &gt;= #{processState}) 
+	 and (a.process_state &gt;= #{processState} or a.back_status &gt;= #{processState})
 	</if>
 	<if test="complete ==0 and processState == 8">
 	 and (a.process_state &gt;= #{processState} and  a.process_state &lt; 9)or a.back_status &gt;= #{processState}
 	</if>
 	<if test="complete ==1 and processState != 5 and processState != 7 and processState != 8">
-	 and a.process_state = #{processState}  
+	 and a.process_state = #{processState}
 	</if>
 	<if test="complete ==1 and processState == 5">
 	 and (a.process_state in(5,9)  and a.status !=4)
 	</if>
 	<if test="complete ==1 and processState == 7">
-	 and (a.process_state = 7  and  a.status != 4 and a.status !=2) 
+	 and (a.process_state = 7  and  a.status != 4 and a.status !=2)
 	</if>
 	<if test="complete ==1 and processState == 8">
 	 and a.process_state = #{processState}  and a.status != 4 and a.status !=2
 	</if>
 	<if test="complete ==2 and processState != 5 and processState != 7 and processState != 8">
-	 and a.process_state &gt; #{processState}  
+	 and a.process_state &gt; #{processState}
 	</if>
 	<if test="complete ==2 and processState == 5">
-	 and (a.process_state &gt; 5 and a.process_state &lt; 9) or (a.process_state =9 and a.status=4) 
+	 and (a.process_state &gt; 5 and a.process_state &lt; 9) or (a.process_state =9 and a.status=4)
 	</if>
 	<if test="complete ==2 and processState == 7">
 	 and ((a.process_state = 7  and  (a.status = 4 or a.status = 2))or a.process_state &gt; 7)
@@ -863,20 +571,20 @@ select
 			${page_sql}
 	</if>
   </select>
-  
+
   <select id="selectOrderChangeCount" resultType="java.lang.Integer">
   select count(*) from new_order_change noc left join  new_order_change a on noc.id=a.id
-  left join t_order_new b on a.order_no=b.order_no left join user c on b.buyer_id=c.id 
+  left join t_order_new b on a.order_no=b.order_no left join user c on b.buyer_id=c.id
   left join admin d on b.salesman_id=d.id left join department e on b.order_dep=e.id
-		<if test="processState==2"> 
+		<if test="processState==2">
  	left join (select order_no, aid from order_examine where`type`=0 group by order_no,aid)x on a.order_no = x.order_no
 	</if>
-	<if test="processState==3"> 
+	<if test="processState==3">
 	left join (select order_no, aid from order_examine where`type`=1 group by order_no,aid)x on a.order_no = x.order_no
-	</if> 
+	</if>
 	where 1=1
 	<if test="processState==0">
-	and b.salesman_id= #{aid} 
+	and b.salesman_id= #{aid}
 	</if>
 	<if test="processState==1">
 	and b.order_dep in
@@ -900,7 +608,7 @@ select
 	and e.finance_id =#{aid}
 	</if>
 	<if test="processState==5 and aids !=null">
-	and e.finance_id in 
+	and e.finance_id in
 		<foreach close=")" collection="aids" item="id" open="(" separator=",">
 		#{id}
 		</foreach>
@@ -930,28 +638,28 @@ select
 	and d.name like concat('%',#{salesmanName},'%')
 	</if>
 	<if test="complete ==0 and processState != 8">
-	 and (a.process_state &gt;= #{processState} or a.back_status &gt;= #{processState}) 
+	 and (a.process_state &gt;= #{processState} or a.back_status &gt;= #{processState})
 	</if>
 	<if test="complete ==0 and processState == 8">
 	 and (a.process_state &gt;= #{processState} and  a.process_state &lt; 9)or a.back_status &gt;= #{processState}
 	</if>
 	<if test="complete ==1 and processState != 5 and processState != 7 and processState != 8">
-	 and a.process_state = #{processState} 
+	 and a.process_state = #{processState}
 	</if>
 	<if test="complete ==1 and processState == 5">
 	 and (a.process_state in(5,9)  and a.status !=4)
 	</if>
 	<if test="complete ==1 and processState == 7">
-	 and (a.process_state = 7  and  a.status != 4 and a.status !=2) 
+	 and (a.process_state = 7  and  a.status != 4 and a.status !=2)
 	</if>
 	<if test="complete ==1 and processState == 8">
 	 and a.process_state = #{processState}  and a.status != 4 and a.status !=2
 	</if>
 	<if test="complete ==2 and processState != 5 and processState != 7 and processState != 8">
-	 and a.process_state &gt; #{processState}  
+	 and a.process_state &gt; #{processState}
 	</if>
 	<if test="complete ==2 and processState == 5">
-	 and (a.process_state &gt; 5 and a.process_state &lt; 9) or (a.process_state =9 and a.status=4) 
+	 and (a.process_state &gt; 5 and a.process_state &lt; 9) or (a.process_state =9 and a.status=4)
 	</if>
 	<if test="complete ==2 and processState == 7">
 	 and ((a.process_state = 7  and  (a.status = 4 or a.status = 2))or a.process_state &gt; 7)

Разница между файлами не показана из-за своего большого размера
+ 423 - 715
src/main/java/com/goafanti/common/model/NewOrderChange.java


+ 5 - 5
src/main/resources/props/config_local.properties

@@ -1,11 +1,11 @@
 dev.name=local
 jdbc.driverClassName=com.mysql.jdbc.Driver
-jdbc.url=jdbc\:mysql://localhost:3306/aft?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
-jdbc.username=root
-jdbc.password=123456
-#jdbc.url=jdbc:mysql://101.37.32.31:3306/aft?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
+#jdbc.url=jdbc\:mysql://localhost:3306/aft?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
 #jdbc.username=root
-#jdbc.password=aftdev
+#jdbc.password=123456
+jdbc.url=jdbc:mysql://101.37.32.31:3306/aft?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
+jdbc.username=root
+jdbc.password=aftdev
 jdbc.validationQuery=SELECT 'x'
 jdbc.initialSize=3
 jdbc.maxActive=20