Procházet zdrojové kódy

Merge remote-tracking branch 'origin/test'

Conflicts:
	GeneratorConfig.xml
	src/main/java/com/goafanti/common/mapper/TOrderNewMapper.xml
limin před 7 roky
rodič
revize
ec362bae37

+ 3 - 3
GeneratorConfig.xml

@@ -6,10 +6,10 @@
   <context id="context1">	
  	<property name="javaFileEncoding" value="UTF-8"/>
     <jdbcConnection connectionURL="jdbc:mysql://192.168.0.17:3306/aft" 
-    	driverClass="com.mysql.jdbc.Driver" password="123456" userId="dev" />
+    	driverClass="com.mysql.jdbc.Driver" password="123456" userId="dev" />
    <javaModelGenerator targetPackage="com.goafanti.common.model" targetProject="kede-server" />
    <sqlMapGenerator targetPackage="com.goafanti.common.mapper" targetProject="kede-server" />
    <javaClientGenerator targetPackage="com.goafanti.common.dao" targetProject="kede-server" type="XMLMAPPER" />
-   <table schema="aft" tableName="t_order_bill_new"/>
+   <table schema="aft" tableName="t_order_bill_new"/>
   </context>
-</generatorConfiguration>
+</generatorConfiguration>

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

@@ -1,26 +0,0 @@
-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);
-		}
-	}
-	
-}

+ 100 - 0
src/main/java/com/goafanti/common/dao/TDunLogMapper.java

@@ -0,0 +1,100 @@
+package com.goafanti.common.dao;
+
+import com.goafanti.common.model.TDunLog;
+import com.goafanti.common.model.TDunLogExample;
+import com.goafanti.order.bo.TDunLogListBo;
+
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface TDunLogMapper {
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_dun_log
+     *
+     * @mbg.generated Tue Nov 20 11:50:41 CST 2018
+     */
+    long countByExample(TDunLogExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_dun_log
+     *
+     * @mbg.generated Tue Nov 20 11:50:41 CST 2018
+     */
+    int deleteByExample(TDunLogExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_dun_log
+     *
+     * @mbg.generated Tue Nov 20 11:50:41 CST 2018
+     */
+    int deleteByPrimaryKey(String id);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_dun_log
+     *
+     * @mbg.generated Tue Nov 20 11:50:41 CST 2018
+     */
+    int insert(TDunLog record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_dun_log
+     *
+     * @mbg.generated Tue Nov 20 11:50:41 CST 2018
+     */
+    int insertSelective(TDunLog record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_dun_log
+     *
+     * @mbg.generated Tue Nov 20 11:50:41 CST 2018
+     */
+    List<TDunLog> selectByExample(TDunLogExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_dun_log
+     *
+     * @mbg.generated Tue Nov 20 11:50:41 CST 2018
+     */
+    TDunLog selectByPrimaryKey(String id);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_dun_log
+     *
+     * @mbg.generated Tue Nov 20 11:50:41 CST 2018
+     */
+    int updateByExampleSelective(@Param("record") TDunLog record, @Param("example") TDunLogExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_dun_log
+     *
+     * @mbg.generated Tue Nov 20 11:50:41 CST 2018
+     */
+    int updateByExample(@Param("record") TDunLog record, @Param("example") TDunLogExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_dun_log
+     *
+     * @mbg.generated Tue Nov 20 11:50:41 CST 2018
+     */
+    int updateByPrimaryKeySelective(TDunLog record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_dun_log
+     *
+     * @mbg.generated Tue Nov 20 11:50:41 CST 2018
+     */
+    int updateByPrimaryKey(TDunLog record);
+
+	List<TDunLogListBo> selectByDunId(String dunId);
+}

+ 96 - 0
src/main/java/com/goafanti/common/dao/TOrderRefundMapper.java

@@ -0,0 +1,96 @@
+package com.goafanti.common.dao;
+
+import com.goafanti.common.model.TOrderRefund;
+import com.goafanti.common.model.TOrderRefundExample;
+import com.goafanti.common.model.TOrderRefundWithBLOBs;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface TOrderRefundMapper {
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_refund
+	 * @mbg.generated  Tue Nov 20 15:20:39 CST 2018
+	 */
+	long countByExample(TOrderRefundExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_refund
+	 * @mbg.generated  Tue Nov 20 15:20:39 CST 2018
+	 */
+	int deleteByExample(TOrderRefundExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_refund
+	 * @mbg.generated  Tue Nov 20 15:20:39 CST 2018
+	 */
+	int deleteByPrimaryKey(Integer id);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_refund
+	 * @mbg.generated  Tue Nov 20 15:20:39 CST 2018
+	 */
+	int insert(TOrderRefundWithBLOBs record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_refund
+	 * @mbg.generated  Tue Nov 20 15:20:39 CST 2018
+	 */
+	int insertSelective(TOrderRefundWithBLOBs record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_refund
+	 * @mbg.generated  Tue Nov 20 15:20:39 CST 2018
+	 */
+	List<TOrderRefundWithBLOBs> selectByExampleWithBLOBs(TOrderRefundExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_refund
+	 * @mbg.generated  Tue Nov 20 15:20:39 CST 2018
+	 */
+	List<TOrderRefund> selectByExample(TOrderRefundExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_refund
+	 * @mbg.generated  Tue Nov 20 15:20:39 CST 2018
+	 */
+	TOrderRefundWithBLOBs selectByPrimaryKey(Integer id);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_refund
+	 * @mbg.generated  Tue Nov 20 15:20:39 CST 2018
+	 */
+	int updateByExampleSelective(@Param("record") TOrderRefundWithBLOBs record,
+			@Param("example") TOrderRefundExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_refund
+	 * @mbg.generated  Tue Nov 20 15:20:39 CST 2018
+	 */
+	int updateByExampleWithBLOBs(@Param("record") TOrderRefundWithBLOBs record,
+			@Param("example") TOrderRefundExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_refund
+	 * @mbg.generated  Tue Nov 20 15:20:39 CST 2018
+	 */
+	int updateByExample(@Param("record") TOrderRefund record, @Param("example") TOrderRefundExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_refund
+	 * @mbg.generated  Tue Nov 20 15:20:39 CST 2018
+	 */
+	int updateByPrimaryKeySelective(TOrderRefundWithBLOBs record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_refund
+	 * @mbg.generated  Tue Nov 20 15:20:39 CST 2018
+	 */
+	int updateByPrimaryKeyWithBLOBs(TOrderRefundWithBLOBs record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_refund
+	 * @mbg.generated  Tue Nov 20 15:20:39 CST 2018
+	 */
+	int updateByPrimaryKey(TOrderRefund record);
+}

+ 292 - 0
src/main/java/com/goafanti/common/mapper/TDunLogMapper.xml

@@ -0,0 +1,292 @@
+<?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.TDunLogMapper">
+  <resultMap id="BaseResultMap" type="com.goafanti.common.model.TDunLog">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Nov 20 11:50:41 CST 2018.
+    -->
+    <id column="id" jdbcType="VARCHAR" property="id" />
+    <result column="dun_id" jdbcType="VARCHAR" property="dunId" />
+    <result column="dum_by" jdbcType="VARCHAR" property="dumBy" />
+    <result column="dum_time" jdbcType="DATE" property="dumTime" />
+    <result column="remarks" jdbcType="VARCHAR" property="remarks" />
+  </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 Tue Nov 20 11:50:41 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 Tue Nov 20 11:50:41 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 Tue Nov 20 11:50:41 CST 2018.
+    -->
+    id, dun_id, dum_by, dum_time, remarks
+  </sql>
+  <select id="selectByExample" parameterType="com.goafanti.common.model.TDunLogExample" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Nov 20 11:50:41 CST 2018.
+    -->
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from t_dun_log
+    <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 Tue Nov 20 11:50:41 CST 2018.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    from t_dun_log
+    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 Tue Nov 20 11:50:41 CST 2018.
+    -->
+    delete from t_dun_log
+    where id = #{id,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.goafanti.common.model.TDunLogExample">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Nov 20 11:50:41 CST 2018.
+    -->
+    delete from t_dun_log
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.goafanti.common.model.TDunLog">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Nov 20 11:50:41 CST 2018.
+    -->
+    insert into t_dun_log (id, dun_id, dum_by, 
+      dum_time, remarks)
+    values (#{id,jdbcType=VARCHAR}, #{dunId,jdbcType=VARCHAR}, #{dumBy,jdbcType=VARCHAR}, 
+      #{dumTime,jdbcType=DATE}, #{remarks,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.goafanti.common.model.TDunLog">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Nov 20 11:50:41 CST 2018.
+    -->
+    insert into t_dun_log
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="dunId != null">
+        dun_id,
+      </if>
+      <if test="dumBy != null">
+        dum_by,
+      </if>
+      <if test="dumTime != null">
+        dum_time,
+      </if>
+      <if test="remarks != null">
+        remarks,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=VARCHAR},
+      </if>
+      <if test="dunId != null">
+        #{dunId,jdbcType=VARCHAR},
+      </if>
+      <if test="dumBy != null">
+        #{dumBy,jdbcType=VARCHAR},
+      </if>
+      <if test="dumTime != null">
+        #{dumTime,jdbcType=DATE},
+      </if>
+      <if test="remarks != null">
+        #{remarks,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.goafanti.common.model.TDunLogExample" resultType="java.lang.Long">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Nov 20 11:50:41 CST 2018.
+    -->
+    select count(*) from t_dun_log
+    <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 Tue Nov 20 11:50:41 CST 2018.
+    -->
+    update t_dun_log
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=VARCHAR},
+      </if>
+      <if test="record.dunId != null">
+        dun_id = #{record.dunId,jdbcType=VARCHAR},
+      </if>
+      <if test="record.dumBy != null">
+        dum_by = #{record.dumBy,jdbcType=VARCHAR},
+      </if>
+      <if test="record.dumTime != null">
+        dum_time = #{record.dumTime,jdbcType=DATE},
+      </if>
+      <if test="record.remarks != null">
+        remarks = #{record.remarks,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 Tue Nov 20 11:50:41 CST 2018.
+    -->
+    update t_dun_log
+    set id = #{record.id,jdbcType=VARCHAR},
+      dun_id = #{record.dunId,jdbcType=VARCHAR},
+      dum_by = #{record.dumBy,jdbcType=VARCHAR},
+      dum_time = #{record.dumTime,jdbcType=DATE},
+      remarks = #{record.remarks,jdbcType=VARCHAR}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TDunLog">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Nov 20 11:50:41 CST 2018.
+    -->
+    update t_dun_log
+    <set>
+      <if test="dunId != null">
+        dun_id = #{dunId,jdbcType=VARCHAR},
+      </if>
+      <if test="dumBy != null">
+        dum_by = #{dumBy,jdbcType=VARCHAR},
+      </if>
+      <if test="dumTime != null">
+        dum_time = #{dumTime,jdbcType=DATE},
+      </if>
+      <if test="remarks != null">
+        remarks = #{remarks,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.TDunLog">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Nov 20 11:50:41 CST 2018.
+    -->
+    update t_dun_log
+    set dun_id = #{dunId,jdbcType=VARCHAR},
+      dum_by = #{dumBy,jdbcType=VARCHAR},
+      dum_time = #{dumTime,jdbcType=DATE},
+      remarks = #{remarks,jdbcType=VARCHAR}
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+  <select id="selectByDunId" parameterType="java.lang.String" resultType="com.goafanti.order.bo.TDunLogListBo">
+   select 
+    id, dun_id as dunId, dum_by as dumBy, dum_time as dumTime, remarks
+    from t_dun_log
+    where dun_id = #{dunId,jdbcType=VARCHAR}
+  </select>
+</mapper>

+ 22 - 5
src/main/java/com/goafanti/common/mapper/TOrderDunMapper.xml

@@ -16,6 +16,8 @@
     <result column="dun_status" jdbcType="INTEGER" property="dunStatus" />
     <result column="dun_by" jdbcType="VARCHAR" property="dunBy" />
     <result column="dun_target" jdbcType="VARCHAR" property="dunTarget" />
+    <result column="money" jdbcType="DECIMAL" property="money" />
+    
   </resultMap>
   <sql id="Example_Where_Clause">
     <!--
@@ -92,7 +94,7 @@
       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
+    dun_target,money
   </sql>
   <select id="selectByExample" parameterType="com.goafanti.common.model.TOrderDunExample" resultMap="BaseResultMap">
     <!--
@@ -152,11 +154,12 @@
     -->
     insert into t_order_dun (id, create_time, start_time, 
       end_time, order_no, dun_subject, 
-      dun_status, dun_by, dun_target
+      dun_status, dun_by, dun_target,money
       )
     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}
+      #{dunStatus,jdbcType=INTEGER}, #{dunBy,jdbcType=VARCHAR}, #{dunTarget,jdbcType=VARCHAR},
+      #{money,jdbcType=DECIMAL}
       )
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.TOrderDun">
@@ -194,6 +197,9 @@
       <if test="dunTarget != null">
         dun_target,
       </if>
+      <if test="money != null">
+      money,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="id != null">
@@ -223,6 +229,9 @@
       <if test="dunTarget != null">
         #{dunTarget,jdbcType=VARCHAR},
       </if>
+        <if test="money != null">
+      #{money,jdbcType=DECIMAL},
+      </if>
     </trim>
   </insert>
   <select id="countByExample" parameterType="com.goafanti.common.model.TOrderDunExample" resultType="java.lang.Long">
@@ -271,6 +280,9 @@
       <if test="record.dunTarget != null">
         dun_target = #{record.dunTarget,jdbcType=VARCHAR},
       </if>
+      <if test="record.money != null">
+      	money = #{money,jdbcType=DECIMAL},
+      </if>
     </set>
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
@@ -291,7 +303,8 @@
       dun_subject = #{record.dunSubject,jdbcType=INTEGER},
       dun_status = #{record.dunStatus,jdbcType=INTEGER},
       dun_by = #{record.dunBy,jdbcType=VARCHAR},
-      dun_target = #{record.dunTarget,jdbcType=VARCHAR}
+      dun_target = #{record.dunTarget,jdbcType=VARCHAR},
+      money = #{money,jdbcType=DECIMAL}
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
@@ -328,6 +341,9 @@
       <if test="dunTarget != null">
         dun_target = #{dunTarget,jdbcType=VARCHAR},
       </if>
+       <if test="money != null">
+      	money = #{money,jdbcType=DECIMAL},
+      </if>
     </set>
     where id = #{id,jdbcType=VARCHAR}
   </update>
@@ -345,7 +361,8 @@
       dun_subject = #{dunSubject,jdbcType=INTEGER},
       dun_status = #{dunStatus,jdbcType=INTEGER},
       dun_by = #{dunBy,jdbcType=VARCHAR},
-      dun_target = #{dunTarget,jdbcType=VARCHAR}
+      dun_target = #{dunTarget,jdbcType=VARCHAR},
+      money = #{money,jdbcType=DECIMAL},
     where id = #{id,jdbcType=VARCHAR}
   </update>
   <select id="selectByOrderNoDunSubject" resultType="com.goafanti.common.model.TOrderDun">

+ 89 - 0
src/main/java/com/goafanti/common/mapper/TOrderNewMapper.xml

@@ -988,5 +988,94 @@
   <select id="getSaleIdByOno" parameterType="java.lang.String" resultType="java.lang.String">
   	select salesman_id from t_order_new where order_no = #{_parameter,jdbcType=VARCHAR}
   </select>
+  <select id="selectOrderNewListByPage" resultType="com.goafanti.order.bo.TOrderNewBo">
+  	select 
+  		a.order_no as orderNo,a.create_time as createTime, date_format(a.sign_time,'%Y-%m-%d' ) as signDate,
+  		b.nickname as userName ,a.process_status as processStatus,a.total_amount as totalAmount,
+  		a.liquidation_status as liquidationStatus,a.approval,c.name as salesmanName,d.name as financeName
+  	from t_order_new a  left join `user` b on a.buyer_id=b.id 
+  	left join admin c on a.salesman_id=c.id
+  	left join admin d on a.finance_id=c.id
+  	where a.delete_sign = 0
+  	<if test="orderStatus != null">
+  	and a.order_status = #{orderStatus,jdbcType=VARCHAR}
+  	</if>
+  	<if test="name != null">
+  	and b.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
+  	</if>
+  	<if test="orderNo != null">
+  	and a.order_no = #{orderNo,jdbcType=VARCHAR}
+  	</if>
+  	<if test="starTime !=null and endTime !=null">
+  	and a.sign_time &gt; #{starTime,jdbcType=VARCHAR} 
+  	and a.sign_time &lt; #{endTime,jdbcType=VARCHAR}
+  	</if>
+  	order by a.sign_time desc
+  	<if test="page_sql!=null">
+			${page_sql}
+	</if>
+  </select>
+  
+   <select id="selectOrderNewListCount" resultType="java.lang.Integer">
+  	select 
+  		count(*)
+  	from t_order_new a  left join `user` b on a.buyer_id=b.id 
+  	where a.delete_sign = 0
+  	<if test="orderStatus != null">
+  	and a.order_status = #{orderStatus,jdbcType=VARCHAR}
+  	</if>
+  	<if test="name != null">
+  	and b.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
+  	</if>
+  	<if test="orderNo != null">
+  	and a.order_no = #{orderNo,jdbcType=VARCHAR}
+  	</if>
+  	<if test="starTime !=null and endTime !=null">
+  	and #{starTime,jdbcType=VARCHAR} &lt; a.sign_time &lt; #{endTime,jdbcType=VARCHAR}
+  	</if>
+  </select>
+  
+  <select id="selectDunOrderNewListByPage" resultType="com.goafanti.order.bo.TOrderNewBo">
+  	select a.id,a.order_no as orderNo,date_format(b.sign_time,'%Y-%m-%d') as signDate,
+    c.nickname as userName,b.order_status as orderStatus,b.total_amount as totalAmount,
+    b.project_status as projectStatus,b.liquidation_status as liquidationStatus,
+    b.settlement_amount as settlementAmount,d.name as salesmanName,a.dun_subject as dunSubject,
+    date_format(a.start_time, '%Y-%m-%d') as startDate
+    from t_order_dun a 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=c.id
+    where a.start_time is not null and b.delete_sign = 0
+    <if test="name != null">
+  	and c.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
+  	</if>
+  	<if test="orderNo != null">
+  	and a.order_no = #{orderNo,jdbcType=VARCHAR}
+  	</if>
+  	<if test="starTime !=null and endTime !=null">
+  	and b.sign_time &gt; #{starTime,jdbcType=VARCHAR} 
+  	and b.sign_time &lt; #{endTime,jdbcType=VARCHAR}
+  	</if>
+  	order by b.sign_time desc
+  	<if test="page_sql!=null">
+			${page_sql}
+	</if>
+  </select>
   
+   <select id="selectDunOrderNewListCount" resultType="java.lang.Integer">
+  	select 
+		count(*)
+    from t_order_dun a left join t_order_new b on a.order_no=b.order_no
+    left join `user` c on b.buyer_id=c.id 
+    where b.delete_sign = 0
+    <if test="name != null">
+  	and c.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
+  	</if>
+  	<if test="orderNo != null">
+  	and a.order_no = #{orderNo,jdbcType=VARCHAR}
+  	</if>
+  	<if test="starTime !=null and endTime !=null">
+  	and b.sign_time &gt; #{starTime,jdbcType=VARCHAR} 
+  	and b.sign_time &lt; #{endTime,jdbcType=VARCHAR}
+  	</if>
+  </select>
 </mapper>

+ 453 - 0
src/main/java/com/goafanti/common/mapper/TOrderRefundMapper.xml

@@ -0,0 +1,453 @@
+<?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.TOrderRefundMapper">
+  <resultMap id="BaseResultMap" type="com.goafanti.common.model.TOrderRefund">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Nov 20 15:20:39 CST 2018.
+    -->
+    <id column="id" jdbcType="INTEGER" property="id" />
+    <result column="order_no" jdbcType="VARCHAR" property="orderNo" />
+    <result column="refund_status" jdbcType="INTEGER" property="refundStatus" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="initiate" jdbcType="VARCHAR" property="initiate" />
+    <result column="accept" jdbcType="VARCHAR" property="accept" />
+    <result column="reason" jdbcType="VARCHAR" property="reason" />
+    <result column="result" jdbcType="VARCHAR" property="result" />
+  </resultMap>
+  <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.goafanti.common.model.TOrderRefundWithBLOBs">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Nov 20 15:20:39 CST 2018.
+    -->
+    <result column="reason_attachment_url" jdbcType="LONGVARCHAR" property="reasonAttachmentUrl" />
+    <result column="contract_url" jdbcType="LONGVARCHAR" property="contractUrl" />
+    <result column="application_url" jdbcType="LONGVARCHAR" property="applicationUrl" />
+  </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 Tue Nov 20 15:20:39 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 Tue Nov 20 15:20:39 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 Tue Nov 20 15:20:39 CST 2018.
+    -->
+    id, order_no, refund_status, create_time, initiate, accept, reason, result
+  </sql>
+  <sql id="Blob_Column_List">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Nov 20 15:20:39 CST 2018.
+    -->
+    reason_attachment_url, contract_url, application_url
+  </sql>
+  <select id="selectByExampleWithBLOBs" parameterType="com.goafanti.common.model.TOrderRefundExample" resultMap="ResultMapWithBLOBs">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Nov 20 15:20:39 CST 2018.
+    -->
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    ,
+    <include refid="Blob_Column_List" />
+    from t_order_refund
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByExample" parameterType="com.goafanti.common.model.TOrderRefundExample" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Nov 20 15:20:39 CST 2018.
+    -->
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from t_order_refund
+    <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="ResultMapWithBLOBs">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Nov 20 15:20:39 CST 2018.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    ,
+    <include refid="Blob_Column_List" />
+    from t_order_refund
+    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 Tue Nov 20 15:20:39 CST 2018.
+    -->
+    delete from t_order_refund
+    where id = #{id,jdbcType=INTEGER}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.goafanti.common.model.TOrderRefundExample">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Nov 20 15:20:39 CST 2018.
+    -->
+    delete from t_order_refund
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.goafanti.common.model.TOrderRefundWithBLOBs">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Nov 20 15:20:39 CST 2018.
+    -->
+    insert into t_order_refund (id, order_no, refund_status, 
+      create_time, initiate, accept, 
+      reason, result, reason_attachment_url, 
+      contract_url, application_url)
+    values (#{id,jdbcType=INTEGER}, #{orderNo,jdbcType=VARCHAR}, #{refundStatus,jdbcType=INTEGER}, 
+      #{createTime,jdbcType=TIMESTAMP}, #{initiate,jdbcType=VARCHAR}, #{accept,jdbcType=VARCHAR}, 
+      #{reason,jdbcType=VARCHAR}, #{result,jdbcType=VARCHAR}, #{reasonAttachmentUrl,jdbcType=LONGVARCHAR}, 
+      #{contractUrl,jdbcType=LONGVARCHAR}, #{applicationUrl,jdbcType=LONGVARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.goafanti.common.model.TOrderRefundWithBLOBs">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Nov 20 15:20:39 CST 2018.
+    -->
+    insert into t_order_refund
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="orderNo != null">
+        order_no,
+      </if>
+      <if test="refundStatus != null">
+        refund_status,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+      <if test="initiate != null">
+        initiate,
+      </if>
+      <if test="accept != null">
+        accept,
+      </if>
+      <if test="reason != null">
+        reason,
+      </if>
+      <if test="result != null">
+        result,
+      </if>
+      <if test="reasonAttachmentUrl != null">
+        reason_attachment_url,
+      </if>
+      <if test="contractUrl != null">
+        contract_url,
+      </if>
+      <if test="applicationUrl != null">
+        application_url,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=INTEGER},
+      </if>
+      <if test="orderNo != null">
+        #{orderNo,jdbcType=VARCHAR},
+      </if>
+      <if test="refundStatus != null">
+        #{refundStatus,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="initiate != null">
+        #{initiate,jdbcType=VARCHAR},
+      </if>
+      <if test="accept != null">
+        #{accept,jdbcType=VARCHAR},
+      </if>
+      <if test="reason != null">
+        #{reason,jdbcType=VARCHAR},
+      </if>
+      <if test="result != null">
+        #{result,jdbcType=VARCHAR},
+      </if>
+      <if test="reasonAttachmentUrl != null">
+        #{reasonAttachmentUrl,jdbcType=LONGVARCHAR},
+      </if>
+      <if test="contractUrl != null">
+        #{contractUrl,jdbcType=LONGVARCHAR},
+      </if>
+      <if test="applicationUrl != null">
+        #{applicationUrl,jdbcType=LONGVARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.goafanti.common.model.TOrderRefundExample" resultType="java.lang.Long">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Nov 20 15:20:39 CST 2018.
+    -->
+    select count(*) from t_order_refund
+    <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 Tue Nov 20 15:20:39 CST 2018.
+    -->
+    update t_order_refund
+    <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.refundStatus != null">
+        refund_status = #{record.refundStatus,jdbcType=INTEGER},
+      </if>
+      <if test="record.createTime != null">
+        create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.initiate != null">
+        initiate = #{record.initiate,jdbcType=VARCHAR},
+      </if>
+      <if test="record.accept != null">
+        accept = #{record.accept,jdbcType=VARCHAR},
+      </if>
+      <if test="record.reason != null">
+        reason = #{record.reason,jdbcType=VARCHAR},
+      </if>
+      <if test="record.result != null">
+        result = #{record.result,jdbcType=VARCHAR},
+      </if>
+      <if test="record.reasonAttachmentUrl != null">
+        reason_attachment_url = #{record.reasonAttachmentUrl,jdbcType=LONGVARCHAR},
+      </if>
+      <if test="record.contractUrl != null">
+        contract_url = #{record.contractUrl,jdbcType=LONGVARCHAR},
+      </if>
+      <if test="record.applicationUrl != null">
+        application_url = #{record.applicationUrl,jdbcType=LONGVARCHAR},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExampleWithBLOBs" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Nov 20 15:20:39 CST 2018.
+    -->
+    update t_order_refund
+    set id = #{record.id,jdbcType=INTEGER},
+      order_no = #{record.orderNo,jdbcType=VARCHAR},
+      refund_status = #{record.refundStatus,jdbcType=INTEGER},
+      create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      initiate = #{record.initiate,jdbcType=VARCHAR},
+      accept = #{record.accept,jdbcType=VARCHAR},
+      reason = #{record.reason,jdbcType=VARCHAR},
+      result = #{record.result,jdbcType=VARCHAR},
+      reason_attachment_url = #{record.reasonAttachmentUrl,jdbcType=LONGVARCHAR},
+      contract_url = #{record.contractUrl,jdbcType=LONGVARCHAR},
+      application_url = #{record.applicationUrl,jdbcType=LONGVARCHAR}
+    <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 Tue Nov 20 15:20:39 CST 2018.
+    -->
+    update t_order_refund
+    set id = #{record.id,jdbcType=INTEGER},
+      order_no = #{record.orderNo,jdbcType=VARCHAR},
+      refund_status = #{record.refundStatus,jdbcType=INTEGER},
+      create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      initiate = #{record.initiate,jdbcType=VARCHAR},
+      accept = #{record.accept,jdbcType=VARCHAR},
+      reason = #{record.reason,jdbcType=VARCHAR},
+      result = #{record.result,jdbcType=VARCHAR}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TOrderRefundWithBLOBs">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Nov 20 15:20:39 CST 2018.
+    -->
+    update t_order_refund
+    <set>
+      <if test="orderNo != null">
+        order_no = #{orderNo,jdbcType=VARCHAR},
+      </if>
+      <if test="refundStatus != null">
+        refund_status = #{refundStatus,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null">
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="initiate != null">
+        initiate = #{initiate,jdbcType=VARCHAR},
+      </if>
+      <if test="accept != null">
+        accept = #{accept,jdbcType=VARCHAR},
+      </if>
+      <if test="reason != null">
+        reason = #{reason,jdbcType=VARCHAR},
+      </if>
+      <if test="result != null">
+        result = #{result,jdbcType=VARCHAR},
+      </if>
+      <if test="reasonAttachmentUrl != null">
+        reason_attachment_url = #{reasonAttachmentUrl,jdbcType=LONGVARCHAR},
+      </if>
+      <if test="contractUrl != null">
+        contract_url = #{contractUrl,jdbcType=LONGVARCHAR},
+      </if>
+      <if test="applicationUrl != null">
+        application_url = #{applicationUrl,jdbcType=LONGVARCHAR},
+      </if>
+    </set>
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.goafanti.common.model.TOrderRefundWithBLOBs">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Nov 20 15:20:39 CST 2018.
+    -->
+    update t_order_refund
+    set order_no = #{orderNo,jdbcType=VARCHAR},
+      refund_status = #{refundStatus,jdbcType=INTEGER},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      initiate = #{initiate,jdbcType=VARCHAR},
+      accept = #{accept,jdbcType=VARCHAR},
+      reason = #{reason,jdbcType=VARCHAR},
+      result = #{result,jdbcType=VARCHAR},
+      reason_attachment_url = #{reasonAttachmentUrl,jdbcType=LONGVARCHAR},
+      contract_url = #{contractUrl,jdbcType=LONGVARCHAR},
+      application_url = #{applicationUrl,jdbcType=LONGVARCHAR}
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.TOrderRefund">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Nov 20 15:20:39 CST 2018.
+    -->
+    update t_order_refund
+    set order_no = #{orderNo,jdbcType=VARCHAR},
+      refund_status = #{refundStatus,jdbcType=INTEGER},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      initiate = #{initiate,jdbcType=VARCHAR},
+      accept = #{accept,jdbcType=VARCHAR},
+      reason = #{reason,jdbcType=VARCHAR},
+      result = #{result,jdbcType=VARCHAR}
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+</mapper>

+ 170 - 0
src/main/java/com/goafanti/common/model/TDunLog.java

@@ -0,0 +1,170 @@
+package com.goafanti.common.model;
+
+import java.util.Date;
+
+public class TDunLog {
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column t_dun_log.id
+     *
+     * @mbg.generated Tue Nov 20 11:50:41 CST 2018
+     */
+    private String id;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column t_dun_log.dun_id
+     *
+     * @mbg.generated Tue Nov 20 11:50:41 CST 2018
+     */
+    private String dunId;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column t_dun_log.dum_by
+     *
+     * @mbg.generated Tue Nov 20 11:50:41 CST 2018
+     */
+    private String dumBy;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column t_dun_log.dum_time
+     *
+     * @mbg.generated Tue Nov 20 11:50:41 CST 2018
+     */
+    private Date dumTime;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column t_dun_log.remarks
+     *
+     * @mbg.generated Tue Nov 20 11:50:41 CST 2018
+     */
+    private String remarks;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column t_dun_log.id
+     *
+     * @return the value of t_dun_log.id
+     *
+     * @mbg.generated Tue Nov 20 11:50:41 CST 2018
+     */
+    public String getId() {
+        return id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column t_dun_log.id
+     *
+     * @param id the value for t_dun_log.id
+     *
+     * @mbg.generated Tue Nov 20 11:50:41 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_dun_log.dun_id
+     *
+     * @return the value of t_dun_log.dun_id
+     *
+     * @mbg.generated Tue Nov 20 11:50:41 CST 2018
+     */
+    public String getDunId() {
+        return dunId;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column t_dun_log.dun_id
+     *
+     * @param dunId the value for t_dun_log.dun_id
+     *
+     * @mbg.generated Tue Nov 20 11:50:41 CST 2018
+     */
+    public void setDunId(String dunId) {
+        this.dunId = dunId;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column t_dun_log.dum_by
+     *
+     * @return the value of t_dun_log.dum_by
+     *
+     * @mbg.generated Tue Nov 20 11:50:41 CST 2018
+     */
+    public String getDumBy() {
+        return dumBy;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column t_dun_log.dum_by
+     *
+     * @param dumBy the value for t_dun_log.dum_by
+     *
+     * @mbg.generated Tue Nov 20 11:50:41 CST 2018
+     */
+    public void setDumBy(String dumBy) {
+        this.dumBy = dumBy;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column t_dun_log.dum_time
+     *
+     * @return the value of t_dun_log.dum_time
+     *
+     * @mbg.generated Tue Nov 20 11:50:41 CST 2018
+     */
+    public Date getDumTime() {
+        return dumTime;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column t_dun_log.dum_time
+     *
+     * @param dumTime the value for t_dun_log.dum_time
+     *
+     * @mbg.generated Tue Nov 20 11:50:41 CST 2018
+     */
+    public void setDumTime(Date dumTime) {
+        this.dumTime = dumTime;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column t_dun_log.remarks
+     *
+     * @return the value of t_dun_log.remarks
+     *
+     * @mbg.generated Tue Nov 20 11:50:41 CST 2018
+     */
+    public String getRemarks() {
+        return remarks;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column t_dun_log.remarks
+     *
+     * @param remarks the value for t_dun_log.remarks
+     *
+     * @mbg.generated Tue Nov 20 11:50:41 CST 2018
+     */
+    public void setRemarks(String remarks) {
+        this.remarks = remarks;
+    }
+}

+ 670 - 0
src/main/java/com/goafanti/common/model/TDunLogExample.java

@@ -0,0 +1,670 @@
+package com.goafanti.common.model;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.Iterator;
+import java.util.List;
+
+public class TDunLogExample {
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table t_dun_log
+     *
+     * @mbg.generated Tue Nov 20 11:50:41 CST 2018
+     */
+    protected String orderByClause;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table t_dun_log
+     *
+     * @mbg.generated Tue Nov 20 11:50:41 CST 2018
+     */
+    protected boolean distinct;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table t_dun_log
+     *
+     * @mbg.generated Tue Nov 20 11:50:41 CST 2018
+     */
+    protected List<Criteria> oredCriteria;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_dun_log
+     *
+     * @mbg.generated Tue Nov 20 11:50:41 CST 2018
+     */
+    public TDunLogExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_dun_log
+     *
+     * @mbg.generated Tue Nov 20 11:50:41 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_dun_log
+     *
+     * @mbg.generated Tue Nov 20 11:50:41 CST 2018
+     */
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_dun_log
+     *
+     * @mbg.generated Tue Nov 20 11:50:41 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_dun_log
+     *
+     * @mbg.generated Tue Nov 20 11:50:41 CST 2018
+     */
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_dun_log
+     *
+     * @mbg.generated Tue Nov 20 11:50:41 CST 2018
+     */
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_dun_log
+     *
+     * @mbg.generated Tue Nov 20 11:50:41 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_dun_log
+     *
+     * @mbg.generated Tue Nov 20 11:50:41 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_dun_log
+     *
+     * @mbg.generated Tue Nov 20 11:50:41 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_dun_log
+     *
+     * @mbg.generated Tue Nov 20 11:50:41 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_dun_log
+     *
+     * @mbg.generated Tue Nov 20 11:50:41 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_dun_log
+     *
+     * @mbg.generated Tue Nov 20 11:50:41 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 andDunIdIsNull() {
+            addCriterion("dun_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDunIdIsNotNull() {
+            addCriterion("dun_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDunIdEqualTo(String value) {
+            addCriterion("dun_id =", value, "dunId");
+            return (Criteria) this;
+        }
+
+        public Criteria andDunIdNotEqualTo(String value) {
+            addCriterion("dun_id <>", value, "dunId");
+            return (Criteria) this;
+        }
+
+        public Criteria andDunIdGreaterThan(String value) {
+            addCriterion("dun_id >", value, "dunId");
+            return (Criteria) this;
+        }
+
+        public Criteria andDunIdGreaterThanOrEqualTo(String value) {
+            addCriterion("dun_id >=", value, "dunId");
+            return (Criteria) this;
+        }
+
+        public Criteria andDunIdLessThan(String value) {
+            addCriterion("dun_id <", value, "dunId");
+            return (Criteria) this;
+        }
+
+        public Criteria andDunIdLessThanOrEqualTo(String value) {
+            addCriterion("dun_id <=", value, "dunId");
+            return (Criteria) this;
+        }
+
+        public Criteria andDunIdLike(String value) {
+            addCriterion("dun_id like", value, "dunId");
+            return (Criteria) this;
+        }
+
+        public Criteria andDunIdNotLike(String value) {
+            addCriterion("dun_id not like", value, "dunId");
+            return (Criteria) this;
+        }
+
+        public Criteria andDunIdIn(List<String> values) {
+            addCriterion("dun_id in", values, "dunId");
+            return (Criteria) this;
+        }
+
+        public Criteria andDunIdNotIn(List<String> values) {
+            addCriterion("dun_id not in", values, "dunId");
+            return (Criteria) this;
+        }
+
+        public Criteria andDunIdBetween(String value1, String value2) {
+            addCriterion("dun_id between", value1, value2, "dunId");
+            return (Criteria) this;
+        }
+
+        public Criteria andDunIdNotBetween(String value1, String value2) {
+            addCriterion("dun_id not between", value1, value2, "dunId");
+            return (Criteria) this;
+        }
+
+        public Criteria andDumByIsNull() {
+            addCriterion("dum_by is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDumByIsNotNull() {
+            addCriterion("dum_by is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDumByEqualTo(String value) {
+            addCriterion("dum_by =", value, "dumBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andDumByNotEqualTo(String value) {
+            addCriterion("dum_by <>", value, "dumBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andDumByGreaterThan(String value) {
+            addCriterion("dum_by >", value, "dumBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andDumByGreaterThanOrEqualTo(String value) {
+            addCriterion("dum_by >=", value, "dumBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andDumByLessThan(String value) {
+            addCriterion("dum_by <", value, "dumBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andDumByLessThanOrEqualTo(String value) {
+            addCriterion("dum_by <=", value, "dumBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andDumByLike(String value) {
+            addCriterion("dum_by like", value, "dumBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andDumByNotLike(String value) {
+            addCriterion("dum_by not like", value, "dumBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andDumByIn(List<String> values) {
+            addCriterion("dum_by in", values, "dumBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andDumByNotIn(List<String> values) {
+            addCriterion("dum_by not in", values, "dumBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andDumByBetween(String value1, String value2) {
+            addCriterion("dum_by between", value1, value2, "dumBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andDumByNotBetween(String value1, String value2) {
+            addCriterion("dum_by not between", value1, value2, "dumBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andDumTimeIsNull() {
+            addCriterion("dum_time is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDumTimeIsNotNull() {
+            addCriterion("dum_time is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDumTimeEqualTo(Date value) {
+            addCriterionForJDBCDate("dum_time =", value, "dumTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andDumTimeNotEqualTo(Date value) {
+            addCriterionForJDBCDate("dum_time <>", value, "dumTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andDumTimeGreaterThan(Date value) {
+            addCriterionForJDBCDate("dum_time >", value, "dumTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andDumTimeGreaterThanOrEqualTo(Date value) {
+            addCriterionForJDBCDate("dum_time >=", value, "dumTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andDumTimeLessThan(Date value) {
+            addCriterionForJDBCDate("dum_time <", value, "dumTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andDumTimeLessThanOrEqualTo(Date value) {
+            addCriterionForJDBCDate("dum_time <=", value, "dumTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andDumTimeIn(List<Date> values) {
+            addCriterionForJDBCDate("dum_time in", values, "dumTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andDumTimeNotIn(List<Date> values) {
+            addCriterionForJDBCDate("dum_time not in", values, "dumTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andDumTimeBetween(Date value1, Date value2) {
+            addCriterionForJDBCDate("dum_time between", value1, value2, "dumTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andDumTimeNotBetween(Date value1, Date value2) {
+            addCriterionForJDBCDate("dum_time not between", value1, value2, "dumTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemarksIsNull() {
+            addCriterion("remarks is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemarksIsNotNull() {
+            addCriterion("remarks is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemarksEqualTo(String value) {
+            addCriterion("remarks =", value, "remarks");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemarksNotEqualTo(String value) {
+            addCriterion("remarks <>", value, "remarks");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemarksGreaterThan(String value) {
+            addCriterion("remarks >", value, "remarks");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemarksGreaterThanOrEqualTo(String value) {
+            addCriterion("remarks >=", value, "remarks");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemarksLessThan(String value) {
+            addCriterion("remarks <", value, "remarks");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemarksLessThanOrEqualTo(String value) {
+            addCriterion("remarks <=", value, "remarks");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemarksLike(String value) {
+            addCriterion("remarks like", value, "remarks");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemarksNotLike(String value) {
+            addCriterion("remarks not like", value, "remarks");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemarksIn(List<String> values) {
+            addCriterion("remarks in", values, "remarks");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemarksNotIn(List<String> values) {
+            addCriterion("remarks not in", values, "remarks");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemarksBetween(String value1, String value2) {
+            addCriterion("remarks between", value1, value2, "remarks");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemarksNotBetween(String value1, String value2) {
+            addCriterion("remarks not between", value1, value2, "remarks");
+            return (Criteria) this;
+        }
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table t_dun_log
+     *
+     * @mbg.generated do_not_delete_during_merge Tue Nov 20 11:50:41 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_dun_log
+     *
+     * @mbg.generated Tue Nov 20 11:50:41 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);
+        }
+    }
+}

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

@@ -1,5 +1,6 @@
 package com.goafanti.common.model;
 
+import java.math.BigDecimal;
 import java.util.Date;
 
 public class TOrderDun {
@@ -92,6 +93,9 @@ public class TOrderDun {
      *
      * @mbg.generated Mon Nov 19 16:53:48 CST 2018
      */
+    
+    private BigDecimal money;
+    
     public String getId() {
         return id;
     }
@@ -299,4 +303,12 @@ public class TOrderDun {
     public void setDunTarget(String dunTarget) {
         this.dunTarget = dunTarget;
     }
+
+	public BigDecimal getMoney() {
+		return money;
+	}
+
+	public void setMoney(BigDecimal money) {
+		this.money = money;
+	}
 }

+ 194 - 0
src/main/java/com/goafanti/common/model/TOrderRefund.java

@@ -0,0 +1,194 @@
+package com.goafanti.common.model;
+
+import java.util.Date;
+
+public class TOrderRefund {
+
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_refund.id
+	 * @mbg.generated  Tue Nov 20 15:20:39 CST 2018
+	 */
+	private Integer id;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_refund.order_no
+	 * @mbg.generated  Tue Nov 20 15:20:39 CST 2018
+	 */
+	private String orderNo;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_refund.refund_status
+	 * @mbg.generated  Tue Nov 20 15:20:39 CST 2018
+	 */
+	private Integer refundStatus;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_refund.create_time
+	 * @mbg.generated  Tue Nov 20 15:20:39 CST 2018
+	 */
+	private Date createTime;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_refund.initiate
+	 * @mbg.generated  Tue Nov 20 15:20:39 CST 2018
+	 */
+	private String initiate;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_refund.accept
+	 * @mbg.generated  Tue Nov 20 15:20:39 CST 2018
+	 */
+	private String accept;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_refund.reason
+	 * @mbg.generated  Tue Nov 20 15:20:39 CST 2018
+	 */
+	private String reason;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_refund.result
+	 * @mbg.generated  Tue Nov 20 15:20:39 CST 2018
+	 */
+	private String result;
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_refund.id
+	 * @return  the value of t_order_refund.id
+	 * @mbg.generated  Tue Nov 20 15:20:39 CST 2018
+	 */
+	
+	public Integer getId() {
+		return id;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_refund.id
+	 * @param id  the value for t_order_refund.id
+	 * @mbg.generated  Tue Nov 20 15:20:39 CST 2018
+	 */
+	public void setId(Integer id) {
+		this.id = id;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_refund.order_no
+	 * @return  the value of t_order_refund.order_no
+	 * @mbg.generated  Tue Nov 20 15:20:39 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_refund.order_no
+	 * @param orderNo  the value for t_order_refund.order_no
+	 * @mbg.generated  Tue Nov 20 15:20:39 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_refund.refund_status
+	 * @return  the value of t_order_refund.refund_status
+	 * @mbg.generated  Tue Nov 20 15:20:39 CST 2018
+	 */
+	public Integer getRefundStatus() {
+		return refundStatus;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_refund.refund_status
+	 * @param refundStatus  the value for t_order_refund.refund_status
+	 * @mbg.generated  Tue Nov 20 15:20:39 CST 2018
+	 */
+	public void setRefundStatus(Integer refundStatus) {
+		this.refundStatus = refundStatus;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_refund.create_time
+	 * @return  the value of t_order_refund.create_time
+	 * @mbg.generated  Tue Nov 20 15:20:39 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_refund.create_time
+	 * @param createTime  the value for t_order_refund.create_time
+	 * @mbg.generated  Tue Nov 20 15:20:39 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_refund.initiate
+	 * @return  the value of t_order_refund.initiate
+	 * @mbg.generated  Tue Nov 20 15:20:39 CST 2018
+	 */
+	public String getInitiate() {
+		return initiate;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_refund.initiate
+	 * @param initiate  the value for t_order_refund.initiate
+	 * @mbg.generated  Tue Nov 20 15:20:39 CST 2018
+	 */
+	public void setInitiate(String initiate) {
+		this.initiate = initiate;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_refund.accept
+	 * @return  the value of t_order_refund.accept
+	 * @mbg.generated  Tue Nov 20 15:20:39 CST 2018
+	 */
+	public String getAccept() {
+		return accept;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_refund.accept
+	 * @param accept  the value for t_order_refund.accept
+	 * @mbg.generated  Tue Nov 20 15:20:39 CST 2018
+	 */
+	public void setAccept(String accept) {
+		this.accept = accept;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_refund.reason
+	 * @return  the value of t_order_refund.reason
+	 * @mbg.generated  Tue Nov 20 15:20:39 CST 2018
+	 */
+	public String getReason() {
+		return reason;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_refund.reason
+	 * @param reason  the value for t_order_refund.reason
+	 * @mbg.generated  Tue Nov 20 15:20:39 CST 2018
+	 */
+	public void setReason(String reason) {
+		this.reason = reason;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_refund.result
+	 * @return  the value of t_order_refund.result
+	 * @mbg.generated  Tue Nov 20 15:20:39 CST 2018
+	 */
+	public String getResult() {
+		return result;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_refund.result
+	 * @param result  the value for t_order_refund.result
+	 * @mbg.generated  Tue Nov 20 15:20:39 CST 2018
+	 */
+	public void setResult(String result) {
+		this.result = result;
+	}
+
+	
+}

+ 792 - 0
src/main/java/com/goafanti/common/model/TOrderRefundExample.java

@@ -0,0 +1,792 @@
+package com.goafanti.common.model;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class TOrderRefundExample {
+    /**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database table t_order_refund
+	 * @mbg.generated  Tue Nov 20 15:20:39 CST 2018
+	 */
+	protected String orderByClause;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database table t_order_refund
+	 * @mbg.generated  Tue Nov 20 15:20:39 CST 2018
+	 */
+	protected boolean distinct;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database table t_order_refund
+	 * @mbg.generated  Tue Nov 20 15:20:39 CST 2018
+	 */
+	protected List<Criteria> oredCriteria;
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_refund
+	 * @mbg.generated  Tue Nov 20 15:20:39 CST 2018
+	 */
+	public TOrderRefundExample() {
+		oredCriteria = new ArrayList<Criteria>();
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_refund
+	 * @mbg.generated  Tue Nov 20 15:20:39 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_refund
+	 * @mbg.generated  Tue Nov 20 15:20:39 CST 2018
+	 */
+	public String getOrderByClause() {
+		return orderByClause;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_refund
+	 * @mbg.generated  Tue Nov 20 15:20:39 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_refund
+	 * @mbg.generated  Tue Nov 20 15:20:39 CST 2018
+	 */
+	public boolean isDistinct() {
+		return distinct;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_refund
+	 * @mbg.generated  Tue Nov 20 15:20:39 CST 2018
+	 */
+	public List<Criteria> getOredCriteria() {
+		return oredCriteria;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_refund
+	 * @mbg.generated  Tue Nov 20 15:20:39 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_refund
+	 * @mbg.generated  Tue Nov 20 15:20:39 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_refund
+	 * @mbg.generated  Tue Nov 20 15:20:39 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_refund
+	 * @mbg.generated  Tue Nov 20 15:20:39 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_refund
+	 * @mbg.generated  Tue Nov 20 15:20:39 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_refund
+	 * @mbg.generated  Tue Nov 20 15:20:39 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));
+		}
+
+		public Criteria andIdIsNull() {
+			addCriterion("id is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdIsNotNull() {
+			addCriterion("id is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdEqualTo(Integer value) {
+			addCriterion("id =", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdNotEqualTo(Integer value) {
+			addCriterion("id <>", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdGreaterThan(Integer value) {
+			addCriterion("id >", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdGreaterThanOrEqualTo(Integer value) {
+			addCriterion("id >=", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdLessThan(Integer value) {
+			addCriterion("id <", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdLessThanOrEqualTo(Integer value) {
+			addCriterion("id <=", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdIn(List<Integer> values) {
+			addCriterion("id in", values, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdNotIn(List<Integer> values) {
+			addCriterion("id not in", values, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdBetween(Integer value1, Integer value2) {
+			addCriterion("id between", value1, value2, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdNotBetween(Integer value1, Integer value2) {
+			addCriterion("id not between", value1, value2, "id");
+			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 andRefundStatusIsNull() {
+			addCriterion("refund_status is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andRefundStatusIsNotNull() {
+			addCriterion("refund_status is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andRefundStatusEqualTo(Integer value) {
+			addCriterion("refund_status =", value, "refundStatus");
+			return (Criteria) this;
+		}
+
+		public Criteria andRefundStatusNotEqualTo(Integer value) {
+			addCriterion("refund_status <>", value, "refundStatus");
+			return (Criteria) this;
+		}
+
+		public Criteria andRefundStatusGreaterThan(Integer value) {
+			addCriterion("refund_status >", value, "refundStatus");
+			return (Criteria) this;
+		}
+
+		public Criteria andRefundStatusGreaterThanOrEqualTo(Integer value) {
+			addCriterion("refund_status >=", value, "refundStatus");
+			return (Criteria) this;
+		}
+
+		public Criteria andRefundStatusLessThan(Integer value) {
+			addCriterion("refund_status <", value, "refundStatus");
+			return (Criteria) this;
+		}
+
+		public Criteria andRefundStatusLessThanOrEqualTo(Integer value) {
+			addCriterion("refund_status <=", value, "refundStatus");
+			return (Criteria) this;
+		}
+
+		public Criteria andRefundStatusIn(List<Integer> values) {
+			addCriterion("refund_status in", values, "refundStatus");
+			return (Criteria) this;
+		}
+
+		public Criteria andRefundStatusNotIn(List<Integer> values) {
+			addCriterion("refund_status not in", values, "refundStatus");
+			return (Criteria) this;
+		}
+
+		public Criteria andRefundStatusBetween(Integer value1, Integer value2) {
+			addCriterion("refund_status between", value1, value2, "refundStatus");
+			return (Criteria) this;
+		}
+
+		public Criteria andRefundStatusNotBetween(Integer value1, Integer value2) {
+			addCriterion("refund_status not between", value1, value2, "refundStatus");
+			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 andInitiateIsNull() {
+			addCriterion("initiate is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andInitiateIsNotNull() {
+			addCriterion("initiate is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andInitiateEqualTo(String value) {
+			addCriterion("initiate =", value, "initiate");
+			return (Criteria) this;
+		}
+
+		public Criteria andInitiateNotEqualTo(String value) {
+			addCriterion("initiate <>", value, "initiate");
+			return (Criteria) this;
+		}
+
+		public Criteria andInitiateGreaterThan(String value) {
+			addCriterion("initiate >", value, "initiate");
+			return (Criteria) this;
+		}
+
+		public Criteria andInitiateGreaterThanOrEqualTo(String value) {
+			addCriterion("initiate >=", value, "initiate");
+			return (Criteria) this;
+		}
+
+		public Criteria andInitiateLessThan(String value) {
+			addCriterion("initiate <", value, "initiate");
+			return (Criteria) this;
+		}
+
+		public Criteria andInitiateLessThanOrEqualTo(String value) {
+			addCriterion("initiate <=", value, "initiate");
+			return (Criteria) this;
+		}
+
+		public Criteria andInitiateLike(String value) {
+			addCriterion("initiate like", value, "initiate");
+			return (Criteria) this;
+		}
+
+		public Criteria andInitiateNotLike(String value) {
+			addCriterion("initiate not like", value, "initiate");
+			return (Criteria) this;
+		}
+
+		public Criteria andInitiateIn(List<String> values) {
+			addCriterion("initiate in", values, "initiate");
+			return (Criteria) this;
+		}
+
+		public Criteria andInitiateNotIn(List<String> values) {
+			addCriterion("initiate not in", values, "initiate");
+			return (Criteria) this;
+		}
+
+		public Criteria andInitiateBetween(String value1, String value2) {
+			addCriterion("initiate between", value1, value2, "initiate");
+			return (Criteria) this;
+		}
+
+		public Criteria andInitiateNotBetween(String value1, String value2) {
+			addCriterion("initiate not between", value1, value2, "initiate");
+			return (Criteria) this;
+		}
+
+		public Criteria andAcceptIsNull() {
+			addCriterion("accept is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andAcceptIsNotNull() {
+			addCriterion("accept is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andAcceptEqualTo(String value) {
+			addCriterion("accept =", value, "accept");
+			return (Criteria) this;
+		}
+
+		public Criteria andAcceptNotEqualTo(String value) {
+			addCriterion("accept <>", value, "accept");
+			return (Criteria) this;
+		}
+
+		public Criteria andAcceptGreaterThan(String value) {
+			addCriterion("accept >", value, "accept");
+			return (Criteria) this;
+		}
+
+		public Criteria andAcceptGreaterThanOrEqualTo(String value) {
+			addCriterion("accept >=", value, "accept");
+			return (Criteria) this;
+		}
+
+		public Criteria andAcceptLessThan(String value) {
+			addCriterion("accept <", value, "accept");
+			return (Criteria) this;
+		}
+
+		public Criteria andAcceptLessThanOrEqualTo(String value) {
+			addCriterion("accept <=", value, "accept");
+			return (Criteria) this;
+		}
+
+		public Criteria andAcceptLike(String value) {
+			addCriterion("accept like", value, "accept");
+			return (Criteria) this;
+		}
+
+		public Criteria andAcceptNotLike(String value) {
+			addCriterion("accept not like", value, "accept");
+			return (Criteria) this;
+		}
+
+		public Criteria andAcceptIn(List<String> values) {
+			addCriterion("accept in", values, "accept");
+			return (Criteria) this;
+		}
+
+		public Criteria andAcceptNotIn(List<String> values) {
+			addCriterion("accept not in", values, "accept");
+			return (Criteria) this;
+		}
+
+		public Criteria andAcceptBetween(String value1, String value2) {
+			addCriterion("accept between", value1, value2, "accept");
+			return (Criteria) this;
+		}
+
+		public Criteria andAcceptNotBetween(String value1, String value2) {
+			addCriterion("accept not between", value1, value2, "accept");
+			return (Criteria) this;
+		}
+
+		public Criteria andReasonIsNull() {
+			addCriterion("reason is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andReasonIsNotNull() {
+			addCriterion("reason is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andReasonEqualTo(String value) {
+			addCriterion("reason =", value, "reason");
+			return (Criteria) this;
+		}
+
+		public Criteria andReasonNotEqualTo(String value) {
+			addCriterion("reason <>", value, "reason");
+			return (Criteria) this;
+		}
+
+		public Criteria andReasonGreaterThan(String value) {
+			addCriterion("reason >", value, "reason");
+			return (Criteria) this;
+		}
+
+		public Criteria andReasonGreaterThanOrEqualTo(String value) {
+			addCriterion("reason >=", value, "reason");
+			return (Criteria) this;
+		}
+
+		public Criteria andReasonLessThan(String value) {
+			addCriterion("reason <", value, "reason");
+			return (Criteria) this;
+		}
+
+		public Criteria andReasonLessThanOrEqualTo(String value) {
+			addCriterion("reason <=", value, "reason");
+			return (Criteria) this;
+		}
+
+		public Criteria andReasonLike(String value) {
+			addCriterion("reason like", value, "reason");
+			return (Criteria) this;
+		}
+
+		public Criteria andReasonNotLike(String value) {
+			addCriterion("reason not like", value, "reason");
+			return (Criteria) this;
+		}
+
+		public Criteria andReasonIn(List<String> values) {
+			addCriterion("reason in", values, "reason");
+			return (Criteria) this;
+		}
+
+		public Criteria andReasonNotIn(List<String> values) {
+			addCriterion("reason not in", values, "reason");
+			return (Criteria) this;
+		}
+
+		public Criteria andReasonBetween(String value1, String value2) {
+			addCriterion("reason between", value1, value2, "reason");
+			return (Criteria) this;
+		}
+
+		public Criteria andReasonNotBetween(String value1, String value2) {
+			addCriterion("reason not between", value1, value2, "reason");
+			return (Criteria) this;
+		}
+
+		public Criteria andResultIsNull() {
+			addCriterion("result is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andResultIsNotNull() {
+			addCriterion("result is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andResultEqualTo(String value) {
+			addCriterion("result =", value, "result");
+			return (Criteria) this;
+		}
+
+		public Criteria andResultNotEqualTo(String value) {
+			addCriterion("result <>", value, "result");
+			return (Criteria) this;
+		}
+
+		public Criteria andResultGreaterThan(String value) {
+			addCriterion("result >", value, "result");
+			return (Criteria) this;
+		}
+
+		public Criteria andResultGreaterThanOrEqualTo(String value) {
+			addCriterion("result >=", value, "result");
+			return (Criteria) this;
+		}
+
+		public Criteria andResultLessThan(String value) {
+			addCriterion("result <", value, "result");
+			return (Criteria) this;
+		}
+
+		public Criteria andResultLessThanOrEqualTo(String value) {
+			addCriterion("result <=", value, "result");
+			return (Criteria) this;
+		}
+
+		public Criteria andResultLike(String value) {
+			addCriterion("result like", value, "result");
+			return (Criteria) this;
+		}
+
+		public Criteria andResultNotLike(String value) {
+			addCriterion("result not like", value, "result");
+			return (Criteria) this;
+		}
+
+		public Criteria andResultIn(List<String> values) {
+			addCriterion("result in", values, "result");
+			return (Criteria) this;
+		}
+
+		public Criteria andResultNotIn(List<String> values) {
+			addCriterion("result not in", values, "result");
+			return (Criteria) this;
+		}
+
+		public Criteria andResultBetween(String value1, String value2) {
+			addCriterion("result between", value1, value2, "result");
+			return (Criteria) this;
+		}
+
+		public Criteria andResultNotBetween(String value1, String value2) {
+			addCriterion("result not between", value1, value2, "result");
+			return (Criteria) this;
+		}
+	}
+
+	/**
+	 * This class was generated by MyBatis Generator. This class corresponds to the database table t_order_refund
+	 * @mbg.generated  Tue Nov 20 15:20:39 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);
+		}
+	}
+
+	/**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table t_order_refund
+     *
+     * @mbg.generated do_not_delete_during_merge Tue Nov 20 15:04:45 CST 2018
+     */
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+}

+ 74 - 0
src/main/java/com/goafanti/common/model/TOrderRefundWithBLOBs.java

@@ -0,0 +1,74 @@
+package com.goafanti.common.model;
+
+public class TOrderRefundWithBLOBs extends TOrderRefund {
+
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_refund.reason_attachment_url
+	 * @mbg.generated  Tue Nov 20 15:20:39 CST 2018
+	 */
+	private String reasonAttachmentUrl;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_refund.contract_url
+	 * @mbg.generated  Tue Nov 20 15:20:39 CST 2018
+	 */
+	private String contractUrl;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_refund.application_url
+	 * @mbg.generated  Tue Nov 20 15:20:39 CST 2018
+	 */
+	private String applicationUrl;
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_refund.reason_attachment_url
+	 * @return  the value of t_order_refund.reason_attachment_url
+	 * @mbg.generated  Tue Nov 20 15:20:39 CST 2018
+	 */
+	public String getReasonAttachmentUrl() {
+		return reasonAttachmentUrl;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_refund.reason_attachment_url
+	 * @param reasonAttachmentUrl  the value for t_order_refund.reason_attachment_url
+	 * @mbg.generated  Tue Nov 20 15:20:39 CST 2018
+	 */
+	public void setReasonAttachmentUrl(String reasonAttachmentUrl) {
+		this.reasonAttachmentUrl = reasonAttachmentUrl;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_refund.contract_url
+	 * @return  the value of t_order_refund.contract_url
+	 * @mbg.generated  Tue Nov 20 15:20:39 CST 2018
+	 */
+	public String getContractUrl() {
+		return contractUrl;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_refund.contract_url
+	 * @param contractUrl  the value for t_order_refund.contract_url
+	 * @mbg.generated  Tue Nov 20 15:20:39 CST 2018
+	 */
+	public void setContractUrl(String contractUrl) {
+		this.contractUrl = contractUrl;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_refund.application_url
+	 * @return  the value of t_order_refund.application_url
+	 * @mbg.generated  Tue Nov 20 15:20:39 CST 2018
+	 */
+	public String getApplicationUrl() {
+		return applicationUrl;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_refund.application_url
+	 * @param applicationUrl  the value for t_order_refund.application_url
+	 * @mbg.generated  Tue Nov 20 15:20:39 CST 2018
+	 */
+	public void setApplicationUrl(String applicationUrl) {
+		this.applicationUrl = applicationUrl;
+	}
+}

+ 16 - 0
src/main/java/com/goafanti/order/bo/TDunLogListBo.java

@@ -0,0 +1,16 @@
+package com.goafanti.order.bo;
+
+import org.apache.commons.lang3.time.DateFormatUtils;
+
+import com.goafanti.common.constant.AFTConstants;
+import com.goafanti.common.model.TDunLog;
+
+public class TDunLogListBo extends TDunLog {
+	public String getDumDate() {
+		if (super.getDumTime() == null) {
+			return null;
+		} else {
+			return DateFormatUtils.format(super.getDumTime(), AFTConstants.YYYYMMDDHHMMSS);
+		}
+	}
+}

+ 89 - 0
src/main/java/com/goafanti/order/bo/TOrderNewBo.java

@@ -0,0 +1,89 @@
+package com.goafanti.order.bo;
+
+import org.apache.commons.lang3.time.DateFormatUtils;
+
+import com.goafanti.common.constant.AFTConstants;
+import com.goafanti.common.model.TOrderNew;
+
+public class TOrderNewBo extends TOrderNew{
+	private String id;
+	private String signDate;
+	private String userName;
+	private String salesmanName;
+	private String financeName;
+	private String dunSubject;
+	private String startDate;
+	
+	public String getSignDate() {
+		return signDate;
+	}
+
+	public void setSignDate(String signDate) {
+		this.signDate = signDate;
+	}
+
+	public String getUserName() {
+		return userName;
+	}
+
+	public void setUserName(String userName) {
+		this.userName = userName;
+	}
+
+	public String getSalesmanName() {
+		return salesmanName;
+	}
+
+	public void setSalesmanName(String salesmanName) {
+		this.salesmanName = salesmanName;
+	}
+
+	public String getFinanceName() {
+		return financeName;
+	}
+
+	public void setFinanceName(String financeName) {
+		this.financeName = financeName;
+	}
+
+	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);
+		}
+	}
+
+	public String getStartDate() {
+		return startDate;
+	}
+
+	public void setStartDate(String startDate) {
+		this.startDate = startDate;
+	}
+
+	public String getDunSubject() {
+		return dunSubject;
+	}
+
+	public void setDunSubject(String dunSubject) {
+		this.dunSubject = dunSubject;
+	}
+
+	public String getId() {
+		return id;
+	}
+
+	public void setId(String id) {
+		this.id = id;
+	}
+	
+}

+ 90 - 5
src/main/java/com/goafanti/order/controller/AdminNewOrderApiController.java

@@ -1,20 +1,17 @@
 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.TOrderRefundWithBLOBs;
 import com.goafanti.common.model.TOrderTask;
 import com.goafanti.order.service.OrderNewService;
 
@@ -148,10 +145,98 @@ public class AdminNewOrderApiController extends CertifyApiController {
 	/**
 	 * 收款截点编辑
 	 */
-	@RequestMapping(value = "/createOrderDun", method = RequestMethod.GET)
+	@RequestMapping(value = "/createOrderDun", method = RequestMethod.POST)
 	public Result createOrderDun(String orderDun,String orderNo){
 		Result res = new Result();
+		if(StringUtils.isBlank(orderNo)){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "订单编号","订单编号"));
+			return res;
+		}
 		res.setData(orderNewService.createOrderDun(orderDun,orderNo));
 		return res;
 	}
+	/**
+	 * 订单列表
+	 */
+	@RequestMapping(value="/orderNewList", method = RequestMethod.GET)
+	public Result orderNewList(String name,String orderNo,String starTime,String endTime,Integer orderStatus,Integer pageNo,Integer pageSize){
+		Result res=new Result();
+		res.data(orderNewService.orderNewList(name, orderNo, starTime, endTime,orderStatus, pageNo, pageSize));
+		return res;
+	}
+	/**
+	 * 订单审核
+	 */
+	@RequestMapping(value="/auditOrderNew", method = RequestMethod.GET)
+	public Result auditOrderNewList(String orderNo,Integer orderStatus){
+		Result res=new Result();
+		if(StringUtils.isBlank(orderNo)){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "订单编号","订单编号"));
+			return res;
+		}
+		if(orderStatus==null||(orderStatus!=2&&orderStatus!=3)){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "审核状态","审核状态"));
+			return res;
+		}
+		orderNewService.updateOrderNew(orderNo,orderStatus);
+		return res;
+	}
+	/**
+	 * 催款统计列表
+	 */
+	@RequestMapping(value="/dunOrderNewList", method = RequestMethod.GET)
+	public Result dunOrderNewList(String name,String orderNo,String starTime,String endTime,Integer orderStatus,Integer pageNo,Integer pageSize){
+		Result res=new Result();
+		res.data(orderNewService.dunOrderNewList(name, orderNo, starTime, endTime,orderStatus, pageNo, pageSize));
+		return res;
+	}
+	/**
+	 * 新增催款记录
+	 */
+	@RequestMapping(value="/createDunLog", method = RequestMethod.POST)
+	public Result createDunLog(String dunId,String dumTime,String remarks){
+		Result res=new  Result();
+		if (StringUtils.isBlank(dunId)) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "催款ID","催款ID"));
+			return res;
+		}
+		if (StringUtils.isBlank(dumTime)||StringUtils.isBlank(remarks)) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "时间与描述","时间与描述"));
+			return res;
+		}
+		
+		res.data(orderNewService.createDunLog(dunId, dumTime, remarks));
+		return res;
+	}
+	/**
+	 * 催款记录查询
+	 */
+	@RequestMapping(value="/selectDunLogList", method = RequestMethod.GET)
+	public Result selectDunLogList(String dunId){
+			Result res=new Result();
+			if (StringUtils.isBlank(dunId)) {
+				res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "催款ID","催款ID"));
+				return res;
+			}
+			res.data(orderNewService.selectDunLogList(dunId));
+			return res;
+	}
+	/**
+	 * 订单退单
+	 */
+	@RequestMapping(value="/addOrderRefund", method = RequestMethod.POST)
+	public Result addOrderRefund(TOrderRefundWithBLOBs t){
+			Result res=new Result();
+			if (StringUtils.isBlank(t.getOrderNo())) {
+				res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "订单编号","订单编号"));
+				return res;
+			}
+			if(StringUtils.isBlank(t.getContractUrl())||StringUtils.isBlank(t.getApplicationUrl())){
+				res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "合同与申请表","合同与申请表"));
+				return res;
+			}
+			res.data(orderNewService.addOrderRefund(t));
+			return res;
+	}
+	
 }

+ 52 - 0
src/main/java/com/goafanti/order/enums/refundState.java

@@ -0,0 +1,52 @@
+package com.goafanti.order.enums;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public enum refundState {
+	/** 正常  **/
+	DSH(0,"待审核"),
+	/** 废除 **/
+	SHTG(1,"审核通过"),
+	/** 锁定 **/
+	SHJJ(2,"审核拒绝"),
+	/** 无效 **/
+	INVALID(10, "INVALID");
+	
+	
+	private refundState(Integer code, String desc) {
+		this.code = code;
+		this.desc = desc;
+	}
+
+	private static Map<Integer, refundState> status = new HashMap<Integer, refundState>();
+
+	static {
+		for (refundState value : refundState.values()) {
+			status.put(value.getCode(), value);
+		}
+	}
+	public static refundState getStatus(Integer code) {
+		if (containsType(code)) {
+			return status.get(code);
+		}
+		return INVALID;
+	}
+	public static boolean containsType(Integer code) {
+		return status.containsKey(code);
+	}
+	private Integer	code;
+	private String	desc;
+	public Integer getCode() {
+		return code;
+	}
+	public void setCode(Integer code) {
+		this.code = code;
+	}
+	public String getDesc() {
+		return desc;
+	}
+	public void setDesc(String desc) {
+		this.desc = desc;
+	}
+}

+ 57 - 2
src/main/java/com/goafanti/order/service/OrderNewService.java

@@ -2,10 +2,15 @@ package com.goafanti.order.service;
 
 import java.util.List;
 
+import com.goafanti.common.model.TDunLog;
 import com.goafanti.common.model.TOrderNew;
+import com.goafanti.common.model.TOrderRefund;
+import com.goafanti.common.model.TOrderRefundWithBLOBs;
 import com.goafanti.common.model.TOrderTask;
-
-import OrderNewServiceImpl.TOrderNewBo;
+import com.goafanti.core.mybatis.page.Pagination;
+import com.goafanti.order.bo.BillListBo;
+import com.goafanti.order.bo.TDunLogListBo;
+import com.goafanti.order.bo.TOrderNewBo;
 
 public interface OrderNewService {
 	
@@ -58,6 +63,56 @@ public interface OrderNewService {
 	 * @return
 	 */
 	int createOrderDun(String orderDun,String orderNo);
+	/**
+	 * 订单列表
+	 * @param name
+	 * @param orderNo
+	 * @param starTime
+	 * @param endTime
+	 * @param orderStatus
+	 * @param pageNo
+	 * @param pageSize
+	 * @return
+	 */
+	Pagination<TOrderNewBo> orderNewList(String name, String orderNo, String starTime, String endTime, Integer orderStatus,Integer pageNo, Integer pageSize);
+	/**
+	 * 订单审核
+	 * @param orderNo
+	 * @param orderStatus
+	 * @return
+	 */
+	int updateOrderNew(String orderNo, Integer orderStatus);
+	
+	/**
+	 * 催款订单列表
+	 * @param name
+	 * @param orderNo
+	 * @param starTime
+	 * @param endTime
+	 * @param orderStatus
+	 * @param pageNo
+	 * @param pageSize
+	 * @return
+	 */
+	Pagination<TOrderNewBo> dunOrderNewList(String name, String orderNo, String starTime, String endTime, Integer orderStatus,
+			Integer pageNo, Integer pageSize);
+	/**
+	 * 新增催款记录
+	 * @return
+	 */
+	int createDunLog(String dunId,String dumTime,String remarks);
+	/**
+	 * 查询催款记录
+	 * @param dunId
+	 * @return
+	 */
+	List<TDunLogListBo> selectDunLogList(String dunId);
+	/**
+	 * 新增退单
+	 * @param t
+	 * @return
+	 */
+	int addOrderRefund(TOrderRefundWithBLOBs t);
 	
 
 	

+ 109 - 9
src/main/java/com/goafanti/order/service/impl/OrderNewServiceImpl.java

@@ -3,9 +3,13 @@ package com.goafanti.order.service.impl;
 
 import java.lang.reflect.InvocationTargetException;
 import java.math.BigDecimal;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
 import java.util.Arrays;
 import java.util.Date;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 import java.util.UUID;
 
 import org.apache.commons.lang3.StringUtils;
@@ -20,24 +24,32 @@ 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.TDunLogMapper;
 import com.goafanti.common.dao.TOrderDunMapper;
 import com.goafanti.common.dao.TOrderMapper;
 import com.goafanti.common.dao.TOrderNewMapper;
+import com.goafanti.common.dao.TOrderRefundMapper;
 import com.goafanti.common.dao.TOrderTaskMapper;
 import com.goafanti.common.dao.UserLockReleaseMapper;
 import com.goafanti.common.enums.UserLockReleaseStatus;
 import com.goafanti.common.error.BusinessException;
+import com.goafanti.common.model.TDunLog;
 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.TOrderRefund;
+import com.goafanti.common.model.TOrderRefundWithBLOBs;
 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.mybatis.page.Pagination;
 import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.customer.bo.LockingReleaseBo;
+import com.goafanti.order.bo.TDunLogListBo;
+import com.goafanti.order.bo.TOrderNewBo;
 import com.goafanti.order.enums.ActiveState;
 import com.goafanti.order.enums.ApprovalNewState;
 import com.goafanti.order.enums.LiquidationNewState;
@@ -45,19 +57,21 @@ import com.goafanti.order.enums.OrderNewState;
 import com.goafanti.order.enums.ProcessStatus;
 import com.goafanti.order.enums.ProjectNewStage;
 import com.goafanti.order.enums.TaskState;
+import com.goafanti.order.enums.refundState;
 import com.goafanti.order.service.OrderNewService;
 
-import OrderNewServiceImpl.TOrderNewBo;
-
 @Service
-public class OrderNewServiceImpl extends BaseMybatisDao<TOrderMapper> implements OrderNewService {
+public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> implements OrderNewService {
 	@Autowired
 	private TOrderNewMapper	tOrderNewMapper;
 	@Autowired
 	private TOrderTaskMapper tOrderTaskMapper;
 	@Autowired
 	private TOrderDunMapper tOrderDunMapper;
-
+	@Autowired
+	private TDunLogMapper tDunLogMapper;
+	@Autowired
+	private TOrderRefundMapper	tOrderRefundMapper;	
 	@Autowired
 	private JDBCIdGenerator	idGenerator;
 	@Autowired
@@ -72,10 +86,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderMapper> implements
 	private String					accessSecret		= null;
 	
 	
-	
-	/*
-	 * -------------------------------------------------- APP管理端 --------------------------------------------------------
-	 */
+
 	
 	@Override
 	public int createServiceOrder(String uid, Integer orderType) {
@@ -180,9 +191,12 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderMapper> implements
 		List<TOrderDun> l2=tOrderDunMapper.selectByOrderNoDunSubject(orderNo);
 		if (l!=null&&!l.isEmpty()) {
 			for (TOrderDun t : l) {
-				if (t.getId()==null||t.getId()=="") {//Id为空新增
+				if (t.getId()==null||t.getId().equals("")) {//Id为空新增
 					t.setId(UUID.randomUUID().toString());
+					t.setDunBy(TokenManager.getAdminId()==null?"1":TokenManager.getAdminId());
 					tOrderDunMapper.insertSelective(t);
+				}else {
+					tOrderDunMapper.updateByPrimaryKey(t);
 				}
 				for (TOrderDun t2 : l2) {
 					boolean flag=true;
@@ -197,5 +211,91 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderMapper> implements
 		}
 		return 1;
 	}
+
+
+
+	@SuppressWarnings("unchecked")
+	@Override
+	public Pagination<TOrderNewBo> orderNewList(String name, String orderNo, String starTime, String endTime,Integer orderStatus, Integer pageNo,
+			Integer pageSize) {
+		Map<String, Object> params = new HashMap<String, Object>();
+		if(pageSize==null||pageSize<0)pageSize=10;
+		if(pageNo==null||pageNo<0)pageNo=1;
+		if (orderStatus==1) {
+			params.put("orderStatus", orderStatus);
+		}else {
+			if (StringUtils.isNotBlank(TokenManager.getAdminId())) params.put("aid", TokenManager.getAdminId()==null?"1":TokenManager.getAdminId());
+		}
+		if (StringUtils.isNotBlank(name)) params.put("name", name);
+		if (StringUtils.isNotBlank(orderNo)) params.put("orderNo", orderNo);
+		if (StringUtils.isNotBlank(starTime)) params.put("starTime", starTime);
+		if (StringUtils.isNotBlank(endTime)) params.put("endTime", endTime+" 23:59:59");
+		Pagination<TOrderNewBo> p = (Pagination<TOrderNewBo>)findPage("selectOrderNewListByPage", "selectOrderNewListCount", params, pageNo, pageSize);
+		return p;
+	}
+
+
+
+	@Override
+	public int updateOrderNew(String orderNo, Integer orderStatus) {
+		TOrderNew t= new TOrderNew();
+		t.setOrderNo(orderNo);
+		t.setOrderStatus(orderStatus);
+		return tOrderNewMapper.updateByPrimaryKeySelective(t);
+	}
+
+
+
+	@SuppressWarnings("unchecked")
+	@Override
+	public Pagination<TOrderNewBo> dunOrderNewList(String name, String orderNo, String starTime, String endTime,
+			Integer orderStatus, Integer pageNo, Integer pageSize) {
+		Map<String, Object> params = new HashMap<String, Object>();
+		if(pageSize==null||pageSize<0)pageSize=10;
+		if(pageNo==null||pageNo<0)pageNo=1;
+		if (StringUtils.isNotBlank(name)) params.put("name", name);
+		if (StringUtils.isNotBlank(orderNo)) params.put("orderNo", orderNo);
+		if (StringUtils.isNotBlank(starTime)) params.put("starTime", starTime);
+		if (StringUtils.isNotBlank(endTime)) params.put("endTime", endTime+" 23:59:59");
+		Pagination<TOrderNewBo> p = (Pagination<TOrderNewBo>)findPage("selectDunOrderNewListByPage", "selectDunOrderNewListCount", params, pageNo, pageSize);
+		return p;
+	}
+
+
+
+	@Override
+	public int createDunLog(String dunId,String dumTime,String remarks) {
+		TDunLog d=new TDunLog();
+		d.setId(UUID.randomUUID().toString());
+		d.setDunId(dunId);
+		d.setDumBy(TokenManager.getAdminId()==null?"1":TokenManager.getAdminId());
+		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+		try {
+			d.setDumTime(sdf.parse(dumTime));
+		} catch (ParseException e) {
+			e.printStackTrace();
+		}
+		d.setRemarks(remarks);
+		return tDunLogMapper.insertSelective(d);
+	}
+
+
+
+	@Override
+	public List<TDunLogListBo> selectDunLogList(String dunId) {
+		return tDunLogMapper.selectByDunId(dunId);
+	}
+
+
+
+	@Override
+	public int addOrderRefund(TOrderRefundWithBLOBs t) {
+		t.setRefundStatus(refundState.DSH.getCode());
+		t.setCreateTime(new Date());
+		t.setInitiate(TokenManager.getAdminId()==null?"1":TokenManager.getAdminId());
+		t.setAccept("受理人");
+		t.setResult("");
+		return tOrderRefundMapper.insertSelective(t);
+	}
 	
 }