Browse Source

订单开单、签单功能开发

anderx 7 years ago
parent
commit
e065478873

+ 1 - 1
GeneratorConfig.xml

@@ -9,6 +9,6 @@
     <javaModelGenerator targetPackage="com.goafanti.common.model" targetProject="aft" />
     <sqlMapGenerator targetPackage="com.goafanti.common.mapper" targetProject="aft" />
     <javaClientGenerator targetPackage="com.goafanti.common.dao" targetProject="aft" type="XMLMAPPER" />
-    <table schema="aft" tableName="t_order_task"/> 
+    <table schema="aft" tableName="t_order_dun"/> 
   </context>
 </generatorConfiguration>

+ 26 - 0
src/main/java/OrderNewServiceImpl/TOrderNewBo.java

@@ -0,0 +1,26 @@
+package OrderNewServiceImpl;
+
+import org.apache.commons.lang3.time.DateFormatUtils;
+
+import com.goafanti.common.constant.AFTConstants;
+import com.goafanti.common.model.TOrderNew;
+
+public class TOrderNewBo extends TOrderNew{
+	
+	public String getCreateDate() {
+		if (super.getCreateTime() == null) {
+			return null;
+		} else {
+			return DateFormatUtils.format(super.getCreateTime(), AFTConstants.YYYYMMDDHHMMSS);
+		}
+	}
+	
+	public String getUpdateDate() {
+		if (super.getUpdateTime() == null) {
+			return null;
+		} else {
+			return DateFormatUtils.format(super.getUpdateTime(), AFTConstants.YYYYMMDDHHMMSS);
+		}
+	}
+	
+}

+ 101 - 0
src/main/java/com/goafanti/common/dao/TOrderDunMapper.java

@@ -0,0 +1,101 @@
+package com.goafanti.common.dao;
+
+import com.goafanti.common.model.TOrderDun;
+import com.goafanti.common.model.TOrderDunExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface TOrderDunMapper {
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_order_dun
+     *
+     * @mbg.generated Mon Nov 19 16:53:48 CST 2018
+     */
+    long countByExample(TOrderDunExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_order_dun
+     *
+     * @mbg.generated Mon Nov 19 16:53:48 CST 2018
+     */
+    int deleteByExample(TOrderDunExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_order_dun
+     *
+     * @mbg.generated Mon Nov 19 16:53:48 CST 2018
+     */
+    int deleteByPrimaryKey(String id);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_order_dun
+     *
+     * @mbg.generated Mon Nov 19 16:53:48 CST 2018
+     */
+    int insert(TOrderDun record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_order_dun
+     *
+     * @mbg.generated Mon Nov 19 16:53:48 CST 2018
+     */
+    int insertSelective(TOrderDun record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_order_dun
+     *
+     * @mbg.generated Mon Nov 19 16:53:48 CST 2018
+     */
+    List<TOrderDun> selectByExample(TOrderDunExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_order_dun
+     *
+     * @mbg.generated Mon Nov 19 16:53:48 CST 2018
+     */
+    TOrderDun selectByPrimaryKey(String id);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_order_dun
+     *
+     * @mbg.generated Mon Nov 19 16:53:48 CST 2018
+     */
+    int updateByExampleSelective(@Param("record") TOrderDun record, @Param("example") TOrderDunExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_order_dun
+     *
+     * @mbg.generated Mon Nov 19 16:53:48 CST 2018
+     */
+    int updateByExample(@Param("record") TOrderDun record, @Param("example") TOrderDunExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_order_dun
+     *
+     * @mbg.generated Mon Nov 19 16:53:48 CST 2018
+     */
+    int updateByPrimaryKeySelective(TOrderDun record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_order_dun
+     *
+     * @mbg.generated Mon Nov 19 16:53:48 CST 2018
+     */
+    int updateByPrimaryKey(TOrderDun record);
+
+
+    
+
+	List<TOrderDun> selectByOrderNoDunSubject(String orderNo);
+}

+ 354 - 0
src/main/java/com/goafanti/common/mapper/TOrderDunMapper.xml

@@ -0,0 +1,354 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.goafanti.common.dao.TOrderDunMapper">
+  <resultMap id="BaseResultMap" type="com.goafanti.common.model.TOrderDun">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Nov 19 16:53:48 CST 2018.
+    -->
+    <id column="id" jdbcType="VARCHAR" property="id" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="start_time" jdbcType="DATE" property="startTime" />
+    <result column="end_time" jdbcType="DATE" property="endTime" />
+    <result column="order_no" jdbcType="VARCHAR" property="orderNo" />
+    <result column="dun_subject" jdbcType="INTEGER" property="dunSubject" />
+    <result column="dun_status" jdbcType="INTEGER" property="dunStatus" />
+    <result column="dun_by" jdbcType="VARCHAR" property="dunBy" />
+    <result column="dun_target" jdbcType="VARCHAR" property="dunTarget" />
+  </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 Mon Nov 19 16:53:48 CST 2018.
+    -->
+    <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 Mon Nov 19 16:53:48 CST 2018.
+    -->
+    <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 Mon Nov 19 16:53:48 CST 2018.
+    -->
+    id, create_time, start_time, end_time, order_no, dun_subject, dun_status, dun_by, 
+    dun_target
+  </sql>
+  <select id="selectByExample" parameterType="com.goafanti.common.model.TOrderDunExample" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Nov 19 16:53:48 CST 2018.
+    -->
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from t_order_dun
+    <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.String" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Nov 19 16:53:48 CST 2018.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    from t_order_dun
+    where id = #{id,jdbcType=VARCHAR}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Nov 19 16:53:48 CST 2018.
+    -->
+    delete from t_order_dun
+    where id = #{id,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.goafanti.common.model.TOrderDunExample">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Nov 19 16:53:48 CST 2018.
+    -->
+    delete from t_order_dun
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.goafanti.common.model.TOrderDun">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Nov 19 16:53:48 CST 2018.
+    -->
+    insert into t_order_dun (id, create_time, start_time, 
+      end_time, order_no, dun_subject, 
+      dun_status, dun_by, dun_target
+      )
+    values (#{id,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{startTime,jdbcType=DATE}, 
+      #{endTime,jdbcType=DATE}, #{orderNo,jdbcType=VARCHAR}, #{dunSubject,jdbcType=INTEGER}, 
+      #{dunStatus,jdbcType=INTEGER}, #{dunBy,jdbcType=VARCHAR}, #{dunTarget,jdbcType=VARCHAR}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.goafanti.common.model.TOrderDun">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Nov 19 16:53:48 CST 2018.
+    -->
+    insert into t_order_dun
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+      <if test="startTime != null">
+        start_time,
+      </if>
+      <if test="endTime != null">
+        end_time,
+      </if>
+      <if test="orderNo != null">
+        order_no,
+      </if>
+      <if test="dunSubject != null">
+        dun_subject,
+      </if>
+      <if test="dunStatus != null">
+        dun_status,
+      </if>
+      <if test="dunBy != null">
+        dun_by,
+      </if>
+      <if test="dunTarget != null">
+        dun_target,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="startTime != null">
+        #{startTime,jdbcType=DATE},
+      </if>
+      <if test="endTime != null">
+        #{endTime,jdbcType=DATE},
+      </if>
+      <if test="orderNo != null">
+        #{orderNo,jdbcType=VARCHAR},
+      </if>
+      <if test="dunSubject != null">
+        #{dunSubject,jdbcType=INTEGER},
+      </if>
+      <if test="dunStatus != null">
+        #{dunStatus,jdbcType=INTEGER},
+      </if>
+      <if test="dunBy != null">
+        #{dunBy,jdbcType=VARCHAR},
+      </if>
+      <if test="dunTarget != null">
+        #{dunTarget,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.goafanti.common.model.TOrderDunExample" resultType="java.lang.Long">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Nov 19 16:53:48 CST 2018.
+    -->
+    select count(*) from t_order_dun
+    <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 Mon Nov 19 16:53:48 CST 2018.
+    -->
+    update t_order_dun
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=VARCHAR},
+      </if>
+      <if test="record.createTime != null">
+        create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.startTime != null">
+        start_time = #{record.startTime,jdbcType=DATE},
+      </if>
+      <if test="record.endTime != null">
+        end_time = #{record.endTime,jdbcType=DATE},
+      </if>
+      <if test="record.orderNo != null">
+        order_no = #{record.orderNo,jdbcType=VARCHAR},
+      </if>
+      <if test="record.dunSubject != null">
+        dun_subject = #{record.dunSubject,jdbcType=INTEGER},
+      </if>
+      <if test="record.dunStatus != null">
+        dun_status = #{record.dunStatus,jdbcType=INTEGER},
+      </if>
+      <if test="record.dunBy != null">
+        dun_by = #{record.dunBy,jdbcType=VARCHAR},
+      </if>
+      <if test="record.dunTarget != null">
+        dun_target = #{record.dunTarget,jdbcType=VARCHAR},
+      </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 Mon Nov 19 16:53:48 CST 2018.
+    -->
+    update t_order_dun
+    set id = #{record.id,jdbcType=VARCHAR},
+      create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      start_time = #{record.startTime,jdbcType=DATE},
+      end_time = #{record.endTime,jdbcType=DATE},
+      order_no = #{record.orderNo,jdbcType=VARCHAR},
+      dun_subject = #{record.dunSubject,jdbcType=INTEGER},
+      dun_status = #{record.dunStatus,jdbcType=INTEGER},
+      dun_by = #{record.dunBy,jdbcType=VARCHAR},
+      dun_target = #{record.dunTarget,jdbcType=VARCHAR}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TOrderDun">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Nov 19 16:53:48 CST 2018.
+    -->
+    update t_order_dun
+    <set>
+      <if test="createTime != null">
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="startTime != null">
+        start_time = #{startTime,jdbcType=DATE},
+      </if>
+      <if test="endTime != null">
+        end_time = #{endTime,jdbcType=DATE},
+      </if>
+      <if test="orderNo != null">
+        order_no = #{orderNo,jdbcType=VARCHAR},
+      </if>
+      <if test="dunSubject != null">
+        dun_subject = #{dunSubject,jdbcType=INTEGER},
+      </if>
+      <if test="dunStatus != null">
+        dun_status = #{dunStatus,jdbcType=INTEGER},
+      </if>
+      <if test="dunBy != null">
+        dun_by = #{dunBy,jdbcType=VARCHAR},
+      </if>
+      <if test="dunTarget != null">
+        dun_target = #{dunTarget,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.TOrderDun">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Nov 19 16:53:48 CST 2018.
+    -->
+    update t_order_dun
+    set create_time = #{createTime,jdbcType=TIMESTAMP},
+      start_time = #{startTime,jdbcType=DATE},
+      end_time = #{endTime,jdbcType=DATE},
+      order_no = #{orderNo,jdbcType=VARCHAR},
+      dun_subject = #{dunSubject,jdbcType=INTEGER},
+      dun_status = #{dunStatus,jdbcType=INTEGER},
+      dun_by = #{dunBy,jdbcType=VARCHAR},
+      dun_target = #{dunTarget,jdbcType=VARCHAR}
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+  <select id="selectByOrderNoDunSubject" resultType="com.goafanti.common.model.TOrderDun">
+  	select id,dun_subject as dunSubject from t_order_dun where order_no= #{orderNo,jdbcType=VARCHAR}
+  </select>
+</mapper>

+ 302 - 0
src/main/java/com/goafanti/common/model/TOrderDun.java

@@ -0,0 +1,302 @@
+package com.goafanti.common.model;
+
+import java.util.Date;
+
+public class TOrderDun {
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column t_order_dun.id
+     *
+     * @mbg.generated Mon Nov 19 16:53:48 CST 2018
+     */
+    private String id;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column t_order_dun.create_time
+     *
+     * @mbg.generated Mon Nov 19 16:53:48 CST 2018
+     */
+    private Date createTime;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column t_order_dun.start_time
+     *
+     * @mbg.generated Mon Nov 19 16:53:48 CST 2018
+     */
+    private Date startTime;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column t_order_dun.end_time
+     *
+     * @mbg.generated Mon Nov 19 16:53:48 CST 2018
+     */
+    private Date endTime;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column t_order_dun.order_no
+     *
+     * @mbg.generated Mon Nov 19 16:53:48 CST 2018
+     */
+    private String orderNo;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column t_order_dun.dun_subject
+     *
+     * @mbg.generated Mon Nov 19 16:53:48 CST 2018
+     */
+    private Integer dunSubject;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column t_order_dun.dun_status
+     *
+     * @mbg.generated Mon Nov 19 16:53:48 CST 2018
+     */
+    private Integer dunStatus;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column t_order_dun.dun_by
+     *
+     * @mbg.generated Mon Nov 19 16:53:48 CST 2018
+     */
+    private String dunBy;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column t_order_dun.dun_target
+     *
+     * @mbg.generated Mon Nov 19 16:53:48 CST 2018
+     */
+    private String dunTarget;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column t_order_dun.id
+     *
+     * @return the value of t_order_dun.id
+     *
+     * @mbg.generated Mon Nov 19 16:53:48 CST 2018
+     */
+    public String getId() {
+        return id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column t_order_dun.id
+     *
+     * @param id the value for t_order_dun.id
+     *
+     * @mbg.generated Mon Nov 19 16:53:48 CST 2018
+     */
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column t_order_dun.create_time
+     *
+     * @return the value of t_order_dun.create_time
+     *
+     * @mbg.generated Mon Nov 19 16:53:48 CST 2018
+     */
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column t_order_dun.create_time
+     *
+     * @param createTime the value for t_order_dun.create_time
+     *
+     * @mbg.generated Mon Nov 19 16:53:48 CST 2018
+     */
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column t_order_dun.start_time
+     *
+     * @return the value of t_order_dun.start_time
+     *
+     * @mbg.generated Mon Nov 19 16:53:48 CST 2018
+     */
+    public Date getStartTime() {
+        return startTime;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column t_order_dun.start_time
+     *
+     * @param startTime the value for t_order_dun.start_time
+     *
+     * @mbg.generated Mon Nov 19 16:53:48 CST 2018
+     */
+    public void setStartTime(Date startTime) {
+        this.startTime = startTime;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column t_order_dun.end_time
+     *
+     * @return the value of t_order_dun.end_time
+     *
+     * @mbg.generated Mon Nov 19 16:53:48 CST 2018
+     */
+    public Date getEndTime() {
+        return endTime;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column t_order_dun.end_time
+     *
+     * @param endTime the value for t_order_dun.end_time
+     *
+     * @mbg.generated Mon Nov 19 16:53:48 CST 2018
+     */
+    public void setEndTime(Date endTime) {
+        this.endTime = endTime;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column t_order_dun.order_no
+     *
+     * @return the value of t_order_dun.order_no
+     *
+     * @mbg.generated Mon Nov 19 16:53:48 CST 2018
+     */
+    public String getOrderNo() {
+        return orderNo;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column t_order_dun.order_no
+     *
+     * @param orderNo the value for t_order_dun.order_no
+     *
+     * @mbg.generated Mon Nov 19 16:53:48 CST 2018
+     */
+    public void setOrderNo(String orderNo) {
+        this.orderNo = orderNo;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column t_order_dun.dun_subject
+     *
+     * @return the value of t_order_dun.dun_subject
+     *
+     * @mbg.generated Mon Nov 19 16:53:48 CST 2018
+     */
+    public Integer getDunSubject() {
+        return dunSubject;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column t_order_dun.dun_subject
+     *
+     * @param dunSubject the value for t_order_dun.dun_subject
+     *
+     * @mbg.generated Mon Nov 19 16:53:48 CST 2018
+     */
+    public void setDunSubject(Integer dunSubject) {
+        this.dunSubject = dunSubject;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column t_order_dun.dun_status
+     *
+     * @return the value of t_order_dun.dun_status
+     *
+     * @mbg.generated Mon Nov 19 16:53:48 CST 2018
+     */
+    public Integer getDunStatus() {
+        return dunStatus;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column t_order_dun.dun_status
+     *
+     * @param dunStatus the value for t_order_dun.dun_status
+     *
+     * @mbg.generated Mon Nov 19 16:53:48 CST 2018
+     */
+    public void setDunStatus(Integer dunStatus) {
+        this.dunStatus = dunStatus;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column t_order_dun.dun_by
+     *
+     * @return the value of t_order_dun.dun_by
+     *
+     * @mbg.generated Mon Nov 19 16:53:48 CST 2018
+     */
+    public String getDunBy() {
+        return dunBy;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column t_order_dun.dun_by
+     *
+     * @param dunBy the value for t_order_dun.dun_by
+     *
+     * @mbg.generated Mon Nov 19 16:53:48 CST 2018
+     */
+    public void setDunBy(String dunBy) {
+        this.dunBy = dunBy;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column t_order_dun.dun_target
+     *
+     * @return the value of t_order_dun.dun_target
+     *
+     * @mbg.generated Mon Nov 19 16:53:48 CST 2018
+     */
+    public String getDunTarget() {
+        return dunTarget;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column t_order_dun.dun_target
+     *
+     * @param dunTarget the value for t_order_dun.dun_target
+     *
+     * @mbg.generated Mon Nov 19 16:53:48 CST 2018
+     */
+    public void setDunTarget(String dunTarget) {
+        this.dunTarget = dunTarget;
+    }
+}

+ 910 - 0
src/main/java/com/goafanti/common/model/TOrderDunExample.java

@@ -0,0 +1,910 @@
+package com.goafanti.common.model;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.Iterator;
+import java.util.List;
+
+public class TOrderDunExample {
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table t_order_dun
+     *
+     * @mbg.generated Mon Nov 19 16:53:48 CST 2018
+     */
+    protected String orderByClause;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table t_order_dun
+     *
+     * @mbg.generated Mon Nov 19 16:53:48 CST 2018
+     */
+    protected boolean distinct;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table t_order_dun
+     *
+     * @mbg.generated Mon Nov 19 16:53:48 CST 2018
+     */
+    protected List<Criteria> oredCriteria;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_order_dun
+     *
+     * @mbg.generated Mon Nov 19 16:53:48 CST 2018
+     */
+    public TOrderDunExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_order_dun
+     *
+     * @mbg.generated Mon Nov 19 16:53:48 CST 2018
+     */
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_order_dun
+     *
+     * @mbg.generated Mon Nov 19 16:53:48 CST 2018
+     */
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_order_dun
+     *
+     * @mbg.generated Mon Nov 19 16:53:48 CST 2018
+     */
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_order_dun
+     *
+     * @mbg.generated Mon Nov 19 16:53:48 CST 2018
+     */
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_order_dun
+     *
+     * @mbg.generated Mon Nov 19 16:53:48 CST 2018
+     */
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_order_dun
+     *
+     * @mbg.generated Mon Nov 19 16:53:48 CST 2018
+     */
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_order_dun
+     *
+     * @mbg.generated Mon Nov 19 16:53:48 CST 2018
+     */
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_order_dun
+     *
+     * @mbg.generated Mon Nov 19 16:53:48 CST 2018
+     */
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_order_dun
+     *
+     * @mbg.generated Mon Nov 19 16:53:48 CST 2018
+     */
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria();
+        return criteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_order_dun
+     *
+     * @mbg.generated Mon Nov 19 16:53:48 CST 2018
+     */
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table t_order_dun
+     *
+     * @mbg.generated Mon Nov 19 16:53:48 CST 2018
+     */
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<Criterion>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        protected void addCriterionForJDBCDate(String condition, Date value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            addCriterion(condition, new java.sql.Date(value.getTime()), property);
+        }
+
+        protected void addCriterionForJDBCDate(String condition, List<Date> values, String property) {
+            if (values == null || values.size() == 0) {
+                throw new RuntimeException("Value list for " + property + " cannot be null or empty");
+            }
+            List<java.sql.Date> dateList = new ArrayList<java.sql.Date>();
+            Iterator<Date> iter = values.iterator();
+            while (iter.hasNext()) {
+                dateList.add(new java.sql.Date(iter.next().getTime()));
+            }
+            addCriterion(condition, dateList, property);
+        }
+
+        protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property);
+        }
+
+        public Criteria andIdIsNull() {
+            addCriterion("id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIsNotNull() {
+            addCriterion("id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdEqualTo(String value) {
+            addCriterion("id =", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualTo(String value) {
+            addCriterion("id <>", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThan(String value) {
+            addCriterion("id >", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualTo(String value) {
+            addCriterion("id >=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThan(String value) {
+            addCriterion("id <", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualTo(String value) {
+            addCriterion("id <=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLike(String value) {
+            addCriterion("id like", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotLike(String value) {
+            addCriterion("id not like", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIn(List<String> values) {
+            addCriterion("id in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotIn(List<String> values) {
+            addCriterion("id not in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdBetween(String value1, String value2) {
+            addCriterion("id between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotBetween(String value1, String value2) {
+            addCriterion("id not between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIsNull() {
+            addCriterion("create_time is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIsNotNull() {
+            addCriterion("create_time is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeEqualTo(Date value) {
+            addCriterion("create_time =", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotEqualTo(Date value) {
+            addCriterion("create_time <>", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeGreaterThan(Date value) {
+            addCriterion("create_time >", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
+            addCriterion("create_time >=", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeLessThan(Date value) {
+            addCriterion("create_time <", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
+            addCriterion("create_time <=", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIn(List<Date> values) {
+            addCriterion("create_time in", values, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotIn(List<Date> values) {
+            addCriterion("create_time not in", values, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeBetween(Date value1, Date value2) {
+            addCriterion("create_time between", value1, value2, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
+            addCriterion("create_time not between", value1, value2, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andStartTimeIsNull() {
+            addCriterion("start_time is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStartTimeIsNotNull() {
+            addCriterion("start_time is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStartTimeEqualTo(Date value) {
+            addCriterionForJDBCDate("start_time =", value, "startTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andStartTimeNotEqualTo(Date value) {
+            addCriterionForJDBCDate("start_time <>", value, "startTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andStartTimeGreaterThan(Date value) {
+            addCriterionForJDBCDate("start_time >", value, "startTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andStartTimeGreaterThanOrEqualTo(Date value) {
+            addCriterionForJDBCDate("start_time >=", value, "startTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andStartTimeLessThan(Date value) {
+            addCriterionForJDBCDate("start_time <", value, "startTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andStartTimeLessThanOrEqualTo(Date value) {
+            addCriterionForJDBCDate("start_time <=", value, "startTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andStartTimeIn(List<Date> values) {
+            addCriterionForJDBCDate("start_time in", values, "startTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andStartTimeNotIn(List<Date> values) {
+            addCriterionForJDBCDate("start_time not in", values, "startTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andStartTimeBetween(Date value1, Date value2) {
+            addCriterionForJDBCDate("start_time between", value1, value2, "startTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andStartTimeNotBetween(Date value1, Date value2) {
+            addCriterionForJDBCDate("start_time not between", value1, value2, "startTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andEndTimeIsNull() {
+            addCriterion("end_time is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andEndTimeIsNotNull() {
+            addCriterion("end_time is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andEndTimeEqualTo(Date value) {
+            addCriterionForJDBCDate("end_time =", value, "endTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andEndTimeNotEqualTo(Date value) {
+            addCriterionForJDBCDate("end_time <>", value, "endTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andEndTimeGreaterThan(Date value) {
+            addCriterionForJDBCDate("end_time >", value, "endTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andEndTimeGreaterThanOrEqualTo(Date value) {
+            addCriterionForJDBCDate("end_time >=", value, "endTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andEndTimeLessThan(Date value) {
+            addCriterionForJDBCDate("end_time <", value, "endTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andEndTimeLessThanOrEqualTo(Date value) {
+            addCriterionForJDBCDate("end_time <=", value, "endTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andEndTimeIn(List<Date> values) {
+            addCriterionForJDBCDate("end_time in", values, "endTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andEndTimeNotIn(List<Date> values) {
+            addCriterionForJDBCDate("end_time not in", values, "endTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andEndTimeBetween(Date value1, Date value2) {
+            addCriterionForJDBCDate("end_time between", value1, value2, "endTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andEndTimeNotBetween(Date value1, Date value2) {
+            addCriterionForJDBCDate("end_time not between", value1, value2, "endTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andOrderNoIsNull() {
+            addCriterion("order_no is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andOrderNoIsNotNull() {
+            addCriterion("order_no is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andOrderNoEqualTo(String value) {
+            addCriterion("order_no =", value, "orderNo");
+            return (Criteria) this;
+        }
+
+        public Criteria andOrderNoNotEqualTo(String value) {
+            addCriterion("order_no <>", value, "orderNo");
+            return (Criteria) this;
+        }
+
+        public Criteria andOrderNoGreaterThan(String value) {
+            addCriterion("order_no >", value, "orderNo");
+            return (Criteria) this;
+        }
+
+        public Criteria andOrderNoGreaterThanOrEqualTo(String value) {
+            addCriterion("order_no >=", value, "orderNo");
+            return (Criteria) this;
+        }
+
+        public Criteria andOrderNoLessThan(String value) {
+            addCriterion("order_no <", value, "orderNo");
+            return (Criteria) this;
+        }
+
+        public Criteria andOrderNoLessThanOrEqualTo(String value) {
+            addCriterion("order_no <=", value, "orderNo");
+            return (Criteria) this;
+        }
+
+        public Criteria andOrderNoLike(String value) {
+            addCriterion("order_no like", value, "orderNo");
+            return (Criteria) this;
+        }
+
+        public Criteria andOrderNoNotLike(String value) {
+            addCriterion("order_no not like", value, "orderNo");
+            return (Criteria) this;
+        }
+
+        public Criteria andOrderNoIn(List<String> values) {
+            addCriterion("order_no in", values, "orderNo");
+            return (Criteria) this;
+        }
+
+        public Criteria andOrderNoNotIn(List<String> values) {
+            addCriterion("order_no not in", values, "orderNo");
+            return (Criteria) this;
+        }
+
+        public Criteria andOrderNoBetween(String value1, String value2) {
+            addCriterion("order_no between", value1, value2, "orderNo");
+            return (Criteria) this;
+        }
+
+        public Criteria andOrderNoNotBetween(String value1, String value2) {
+            addCriterion("order_no not between", value1, value2, "orderNo");
+            return (Criteria) this;
+        }
+
+        public Criteria andDunSubjectIsNull() {
+            addCriterion("dun_subject is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDunSubjectIsNotNull() {
+            addCriterion("dun_subject is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDunSubjectEqualTo(Integer value) {
+            addCriterion("dun_subject =", value, "dunSubject");
+            return (Criteria) this;
+        }
+
+        public Criteria andDunSubjectNotEqualTo(Integer value) {
+            addCriterion("dun_subject <>", value, "dunSubject");
+            return (Criteria) this;
+        }
+
+        public Criteria andDunSubjectGreaterThan(Integer value) {
+            addCriterion("dun_subject >", value, "dunSubject");
+            return (Criteria) this;
+        }
+
+        public Criteria andDunSubjectGreaterThanOrEqualTo(Integer value) {
+            addCriterion("dun_subject >=", value, "dunSubject");
+            return (Criteria) this;
+        }
+
+        public Criteria andDunSubjectLessThan(Integer value) {
+            addCriterion("dun_subject <", value, "dunSubject");
+            return (Criteria) this;
+        }
+
+        public Criteria andDunSubjectLessThanOrEqualTo(Integer value) {
+            addCriterion("dun_subject <=", value, "dunSubject");
+            return (Criteria) this;
+        }
+
+        public Criteria andDunSubjectIn(List<Integer> values) {
+            addCriterion("dun_subject in", values, "dunSubject");
+            return (Criteria) this;
+        }
+
+        public Criteria andDunSubjectNotIn(List<Integer> values) {
+            addCriterion("dun_subject not in", values, "dunSubject");
+            return (Criteria) this;
+        }
+
+        public Criteria andDunSubjectBetween(Integer value1, Integer value2) {
+            addCriterion("dun_subject between", value1, value2, "dunSubject");
+            return (Criteria) this;
+        }
+
+        public Criteria andDunSubjectNotBetween(Integer value1, Integer value2) {
+            addCriterion("dun_subject not between", value1, value2, "dunSubject");
+            return (Criteria) this;
+        }
+
+        public Criteria andDunStatusIsNull() {
+            addCriterion("dun_status is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDunStatusIsNotNull() {
+            addCriterion("dun_status is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDunStatusEqualTo(Integer value) {
+            addCriterion("dun_status =", value, "dunStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andDunStatusNotEqualTo(Integer value) {
+            addCriterion("dun_status <>", value, "dunStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andDunStatusGreaterThan(Integer value) {
+            addCriterion("dun_status >", value, "dunStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andDunStatusGreaterThanOrEqualTo(Integer value) {
+            addCriterion("dun_status >=", value, "dunStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andDunStatusLessThan(Integer value) {
+            addCriterion("dun_status <", value, "dunStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andDunStatusLessThanOrEqualTo(Integer value) {
+            addCriterion("dun_status <=", value, "dunStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andDunStatusIn(List<Integer> values) {
+            addCriterion("dun_status in", values, "dunStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andDunStatusNotIn(List<Integer> values) {
+            addCriterion("dun_status not in", values, "dunStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andDunStatusBetween(Integer value1, Integer value2) {
+            addCriterion("dun_status between", value1, value2, "dunStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andDunStatusNotBetween(Integer value1, Integer value2) {
+            addCriterion("dun_status not between", value1, value2, "dunStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andDunByIsNull() {
+            addCriterion("dun_by is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDunByIsNotNull() {
+            addCriterion("dun_by is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDunByEqualTo(String value) {
+            addCriterion("dun_by =", value, "dunBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andDunByNotEqualTo(String value) {
+            addCriterion("dun_by <>", value, "dunBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andDunByGreaterThan(String value) {
+            addCriterion("dun_by >", value, "dunBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andDunByGreaterThanOrEqualTo(String value) {
+            addCriterion("dun_by >=", value, "dunBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andDunByLessThan(String value) {
+            addCriterion("dun_by <", value, "dunBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andDunByLessThanOrEqualTo(String value) {
+            addCriterion("dun_by <=", value, "dunBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andDunByLike(String value) {
+            addCriterion("dun_by like", value, "dunBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andDunByNotLike(String value) {
+            addCriterion("dun_by not like", value, "dunBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andDunByIn(List<String> values) {
+            addCriterion("dun_by in", values, "dunBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andDunByNotIn(List<String> values) {
+            addCriterion("dun_by not in", values, "dunBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andDunByBetween(String value1, String value2) {
+            addCriterion("dun_by between", value1, value2, "dunBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andDunByNotBetween(String value1, String value2) {
+            addCriterion("dun_by not between", value1, value2, "dunBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andDunTargetIsNull() {
+            addCriterion("dun_target is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDunTargetIsNotNull() {
+            addCriterion("dun_target is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDunTargetEqualTo(String value) {
+            addCriterion("dun_target =", value, "dunTarget");
+            return (Criteria) this;
+        }
+
+        public Criteria andDunTargetNotEqualTo(String value) {
+            addCriterion("dun_target <>", value, "dunTarget");
+            return (Criteria) this;
+        }
+
+        public Criteria andDunTargetGreaterThan(String value) {
+            addCriterion("dun_target >", value, "dunTarget");
+            return (Criteria) this;
+        }
+
+        public Criteria andDunTargetGreaterThanOrEqualTo(String value) {
+            addCriterion("dun_target >=", value, "dunTarget");
+            return (Criteria) this;
+        }
+
+        public Criteria andDunTargetLessThan(String value) {
+            addCriterion("dun_target <", value, "dunTarget");
+            return (Criteria) this;
+        }
+
+        public Criteria andDunTargetLessThanOrEqualTo(String value) {
+            addCriterion("dun_target <=", value, "dunTarget");
+            return (Criteria) this;
+        }
+
+        public Criteria andDunTargetLike(String value) {
+            addCriterion("dun_target like", value, "dunTarget");
+            return (Criteria) this;
+        }
+
+        public Criteria andDunTargetNotLike(String value) {
+            addCriterion("dun_target not like", value, "dunTarget");
+            return (Criteria) this;
+        }
+
+        public Criteria andDunTargetIn(List<String> values) {
+            addCriterion("dun_target in", values, "dunTarget");
+            return (Criteria) this;
+        }
+
+        public Criteria andDunTargetNotIn(List<String> values) {
+            addCriterion("dun_target not in", values, "dunTarget");
+            return (Criteria) this;
+        }
+
+        public Criteria andDunTargetBetween(String value1, String value2) {
+            addCriterion("dun_target between", value1, value2, "dunTarget");
+            return (Criteria) this;
+        }
+
+        public Criteria andDunTargetNotBetween(String value1, String value2) {
+            addCriterion("dun_target not between", value1, value2, "dunTarget");
+            return (Criteria) this;
+        }
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table t_order_dun
+     *
+     * @mbg.generated do_not_delete_during_merge Mon Nov 19 16:53:48 CST 2018
+     */
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table t_order_dun
+     *
+     * @mbg.generated Mon Nov 19 16:53:48 CST 2018
+     */
+    public static class Criterion {
+        private String condition;
+
+        private Object value;
+
+        private Object secondValue;
+
+        private boolean noValue;
+
+        private boolean singleValue;
+
+        private boolean betweenValue;
+
+        private boolean listValue;
+
+        private String typeHandler;
+
+        public String getCondition() {
+            return condition;
+        }
+
+        public Object getValue() {
+            return value;
+        }
+
+        public Object getSecondValue() {
+            return secondValue;
+        }
+
+        public boolean isNoValue() {
+            return noValue;
+        }
+
+        public boolean isSingleValue() {
+            return singleValue;
+        }
+
+        public boolean isBetweenValue() {
+            return betweenValue;
+        }
+
+        public boolean isListValue() {
+            return listValue;
+        }
+
+        public String getTypeHandler() {
+            return typeHandler;
+        }
+
+        protected Criterion(String condition) {
+            super();
+            this.condition = condition;
+            this.typeHandler = null;
+            this.noValue = true;
+        }
+
+        protected Criterion(String condition, Object value, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.typeHandler = typeHandler;
+            if (value instanceof List<?>) {
+                this.listValue = true;
+            } else {
+                this.singleValue = true;
+            }
+        }
+
+        protected Criterion(String condition, Object value) {
+            this(condition, value, null);
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.secondValue = secondValue;
+            this.typeHandler = typeHandler;
+            this.betweenValue = true;
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue) {
+            this(condition, value, secondValue, null);
+        }
+    }
+}

+ 32 - 3
src/main/java/com/goafanti/order/controller/AdminNewOrderApiController.java

@@ -1,15 +1,19 @@
 package com.goafanti.order.controller;
 
 
+import java.util.List;
+
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RestController;
 
+import com.alibaba.fastjson.JSON;
 import com.goafanti.common.bo.Result;
 import com.goafanti.common.constant.ErrorConstants;
 import com.goafanti.common.controller.CertifyApiController;
+import com.goafanti.common.model.TOrderDun;
 import com.goafanti.common.model.TOrderNew;
 import com.goafanti.common.model.TOrderTask;
 import com.goafanti.order.service.OrderNewService;
@@ -111,18 +115,43 @@ public class AdminNewOrderApiController extends CertifyApiController {
 	public Result updateServiceOrder(TOrderNew t,Integer isSubmit){
 		Result res = new Result();
 		if(StringUtils.isBlank(t.getOrderNo())){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "订单编号"));
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "订单编号"));
 			return res;
 		}
 		if(null==t.getTotalAmount() || null==t.getFirstAmount()){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "订单金额 和 首付金额"));
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "订单金额 和 首付金额"));
 			return res;
 		}
 		if(StringUtils.isBlank(t.getContractPictureUrl())){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "合同图片"));
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "合同图片"));
 			return res;
 		}
 		res.setData(orderNewService.updateServiceOrder(t,isSubmit));
 		return res;
 	}
+	
+	/** 
+	 * 订单详情
+	 * @param orderNo
+	 * @return
+	 */
+	@RequestMapping(value = "/getOrderNewDetail", method = RequestMethod.GET)
+	public Result getOrderNewDetail(String orderNo){
+		Result res = new Result();
+		if(StringUtils.isBlank(orderNo)){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "订单编号","订单编号"));
+			return res;
+		}
+		res.setData(orderNewService.getOrderNewDetail(orderNo));
+		return res;
+	}
+	/**
+	 * 收款截点编辑
+	 */
+	@RequestMapping(value = "/createOrderDun", method = RequestMethod.GET)
+	public Result createOrderDun(String orderDun,String orderNo){
+		Result res = new Result();
+		res.setData(orderNewService.createOrderDun(orderDun,orderNo));
+		return res;
+	}
 }

+ 14 - 0
src/main/java/com/goafanti/order/service/OrderNewService.java

@@ -5,6 +5,8 @@ import java.util.List;
 import com.goafanti.common.model.TOrderNew;
 import com.goafanti.common.model.TOrderTask;
 
+import OrderNewServiceImpl.TOrderNewBo;
+
 public interface OrderNewService {
 	
 	/**
@@ -44,6 +46,18 @@ public interface OrderNewService {
 	  * @return
 	  */
 	int updateServiceOrder(TOrderNew t, Integer isSubmit);
+	/**
+	 * 订单详情
+	 * @param orderNo
+	 * @return
+	 */
+	TOrderNewBo getOrderNewDetail(String orderNo);
+	/**
+	 * 收款截点编辑
+	 * @param orderDun
+	 * @return
+	 */
+	int createOrderDun(String orderDun,String orderNo);
 	
 
 	

+ 58 - 3
src/main/java/com/goafanti/order/service/impl/OrderNewServiceImpl.java

@@ -1,17 +1,26 @@
 package com.goafanti.order.service.impl;
 
 
+import java.lang.reflect.InvocationTargetException;
 import java.math.BigDecimal;
+import java.util.Arrays;
 import java.util.Date;
 import java.util.List;
 import java.util.UUID;
 
+import org.apache.commons.lang3.StringUtils;
+import org.apache.commons.lang3.time.DateFormatUtils;
+import org.apache.poi.ss.usermodel.DataFormat;
+import org.json.JSONArray;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 
+import com.alibaba.fastjson.JSON;
 import com.goafanti.common.bo.Error;
+import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.constant.ErrorConstants;
+import com.goafanti.common.dao.TOrderDunMapper;
 import com.goafanti.common.dao.TOrderMapper;
 import com.goafanti.common.dao.TOrderNewMapper;
 import com.goafanti.common.dao.TOrderTaskMapper;
@@ -20,9 +29,11 @@ import com.goafanti.common.enums.UserLockReleaseStatus;
 import com.goafanti.common.error.BusinessException;
 import com.goafanti.common.model.TOrder;
 import com.goafanti.common.model.TOrderDetail;
+import com.goafanti.common.model.TOrderDun;
 import com.goafanti.common.model.TOrderNew;
 import com.goafanti.common.model.TOrderTask;
 import com.goafanti.common.model.UserLockRelease;
+import com.goafanti.common.utils.BeanUtilsExt;
 import com.goafanti.core.mybatis.BaseMybatisDao;
 import com.goafanti.core.mybatis.JDBCIdGenerator;
 import com.goafanti.core.shiro.token.TokenManager;
@@ -36,6 +47,8 @@ import com.goafanti.order.enums.ProjectNewStage;
 import com.goafanti.order.enums.TaskState;
 import com.goafanti.order.service.OrderNewService;
 
+import OrderNewServiceImpl.TOrderNewBo;
+
 @Service
 public class OrderNewServiceImpl extends BaseMybatisDao<TOrderMapper> implements OrderNewService {
 	@Autowired
@@ -43,6 +56,9 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderMapper> implements
 	@Autowired
 	private TOrderTaskMapper tOrderTaskMapper;
 	@Autowired
+	private TOrderDunMapper tOrderDunMapper;
+
+	@Autowired
 	private JDBCIdGenerator	idGenerator;
 	@Autowired
 	private UserLockReleaseMapper	userLockReleaseMapper;
@@ -54,7 +70,6 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderMapper> implements
 
 	@Value(value = "${accessSecret}")
 	private String					accessSecret		= null;
-	private final String DEFAULT_ADMIN_ID = "1"; //默认管理员
 	
 	
 	
@@ -139,8 +154,48 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderMapper> implements
 
 	@Override
 	public int updateServiceOrder(TOrderNew t, Integer isSubmit) {
-		
+		t.setOrderStatus(isSubmit==1?1:0);
 		return tOrderNewMapper.updateByPrimaryKeySelective(t);
 	}
-
+
+
+
+	@Override
+	public TOrderNewBo getOrderNewDetail(String orderNo) {
+		TOrderNew tOrder= tOrderNewMapper.selectByPrimaryKey(orderNo);
+		TOrderNewBo bo =new TOrderNewBo();
+		try {
+			BeanUtilsExt.copyProperties( bo,tOrder);
+		} catch (IllegalAccessException | InvocationTargetException e) {
+			e.printStackTrace();
+		}
+		return bo;
+	}
+
+
+
+	@Override
+	public int createOrderDun(String orderDun,String orderNo) {
+		List<TOrderDun> l=  JSON.parseArray(orderDun, TOrderDun.class);
+		List<TOrderDun> l2=tOrderDunMapper.selectByOrderNoDunSubject(orderNo);
+		if (l!=null&&!l.isEmpty()) {
+			for (TOrderDun t : l) {
+				if (t.getId()==null||t.getId()=="") {//Id为空新增
+					t.setId(UUID.randomUUID().toString());
+					tOrderDunMapper.insertSelective(t);
+				}
+				for (TOrderDun t2 : l2) {
+					boolean flag=true;
+					if (t2.getId().equals(t.getId())) {//查询集合与返回集合比较查出删除项
+						flag=false;
+					}
+					if (flag) {
+						tOrderDunMapper.deleteByPrimaryKey(t2.getId());
+					}
+				}
+			}
+		}
+		return 1;
+	}
+	
 }