|
|
@@ -10,9 +10,10 @@
|
|
|
<result column="attachment_url" jdbcType="VARCHAR" property="attachmentUrl" />
|
|
|
<result column="type" jdbcType="INTEGER" property="type" />
|
|
|
<result column="order_no" jdbcType="VARCHAR" property="orderNo" />
|
|
|
+ <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List">
|
|
|
- id, dun_id, dum_by, dum_time, remarks, attachment_url, `type`, order_no
|
|
|
+ id, dun_id, dum_by, dum_time, remarks, attachment_url, `type`, order_no, create_time
|
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
select
|
|
|
@@ -27,10 +28,12 @@
|
|
|
<insert id="insert" parameterType="com.goafanti.common.model.TDunLog">
|
|
|
insert into t_dun_log (id, dun_id, dum_by,
|
|
|
dum_time, remarks, attachment_url,
|
|
|
- `type`, order_no)
|
|
|
+ `type`, order_no, create_time
|
|
|
+ )
|
|
|
values (#{id,jdbcType=VARCHAR}, #{dunId,jdbcType=VARCHAR}, #{dumBy,jdbcType=VARCHAR},
|
|
|
#{dumTime,jdbcType=DATE}, #{remarks,jdbcType=VARCHAR}, #{attachmentUrl,jdbcType=VARCHAR},
|
|
|
- #{type,jdbcType=INTEGER}, #{orderNo,jdbcType=VARCHAR})
|
|
|
+ #{type,jdbcType=INTEGER}, #{orderNo,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}
|
|
|
+ )
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.goafanti.common.model.TDunLog">
|
|
|
insert into t_dun_log
|
|
|
@@ -59,6 +62,9 @@
|
|
|
<if test="orderNo != null">
|
|
|
order_no,
|
|
|
</if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ create_time,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="id != null">
|
|
|
@@ -85,6 +91,9 @@
|
|
|
<if test="orderNo != null">
|
|
|
#{orderNo,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TDunLog">
|
|
|
@@ -111,6 +120,9 @@
|
|
|
<if test="orderNo != null">
|
|
|
order_no = #{orderNo,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
@@ -122,7 +134,8 @@
|
|
|
remarks = #{remarks,jdbcType=VARCHAR},
|
|
|
attachment_url = #{attachmentUrl,jdbcType=VARCHAR},
|
|
|
`type` = #{type,jdbcType=INTEGER},
|
|
|
- order_no = #{orderNo,jdbcType=VARCHAR}
|
|
|
+ order_no = #{orderNo,jdbcType=VARCHAR},
|
|
|
+ create_time = #{createTime,jdbcType=TIMESTAMP}
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
<select id="selectByDunId" parameterType="java.lang.String" resultType="com.goafanti.order.bo.TDunLogListBo">
|
|
|
@@ -133,8 +146,8 @@
|
|
|
</select>
|
|
|
<select id="selectByOrderNo" resultType="com.goafanti.order.bo.TDunLogListBo">
|
|
|
select a.id, a.dun_id as dunId, b.name as dumBy, a.dum_time as dumTime, a.remarks,a.type,
|
|
|
- a.attachment_url attachmentUrl, c.order_no orderNo,c.buyer_name userName
|
|
|
+ a.attachment_url attachmentUrl, c.order_no orderNo,c.buyer_name userName,a.create_time
|
|
|
from t_dun_log a left join admin b on a.dum_by=b.id left join t_order_mid c on a.order_no =c.order_no
|
|
|
- where c.order_no = #{orderNo}
|
|
|
+ where c.order_no = #{orderNo} order by a.create_time
|
|
|
</select>
|
|
|
</mapper>
|