|
|
@@ -2,160 +2,37 @@
|
|
|
<!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" />
|
|
|
+ <result column="attachment_url" jdbcType="VARCHAR" property="attachmentUrl" />
|
|
|
+ <result column="type" jdbcType="INTEGER" property="type" />
|
|
|
+ <result column="order_no" jdbcType="VARCHAR" property="orderNo" />
|
|
|
</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
|
|
|
+ id, dun_id, dum_by, dum_time, remarks, attachment_url, `type`, order_no
|
|
|
</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)
|
|
|
+ dum_time, remarks, attachment_url,
|
|
|
+ `type`, order_no)
|
|
|
values (#{id,jdbcType=VARCHAR}, #{dunId,jdbcType=VARCHAR}, #{dumBy,jdbcType=VARCHAR},
|
|
|
- #{dumTime,jdbcType=DATE}, #{remarks,jdbcType=VARCHAR})
|
|
|
+ #{dumTime,jdbcType=DATE}, #{remarks,jdbcType=VARCHAR}, #{attachmentUrl,jdbcType=VARCHAR},
|
|
|
+ #{type,jdbcType=INTEGER}, #{orderNo,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">
|
|
|
@@ -173,6 +50,15 @@
|
|
|
<if test="remarks != null">
|
|
|
remarks,
|
|
|
</if>
|
|
|
+ <if test="attachmentUrl != null">
|
|
|
+ attachment_url,
|
|
|
+ </if>
|
|
|
+ <if test="type != null">
|
|
|
+ `type`,
|
|
|
+ </if>
|
|
|
+ <if test="orderNo != null">
|
|
|
+ order_no,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="id != null">
|
|
|
@@ -190,69 +76,18 @@
|
|
|
<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 test="attachmentUrl != null">
|
|
|
+ #{attachmentUrl,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="record.dumBy != null">
|
|
|
- dum_by = #{record.dumBy,jdbcType=VARCHAR},
|
|
|
+ <if test="type != null">
|
|
|
+ #{type,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
- <if test="record.dumTime != null">
|
|
|
- dum_time = #{record.dumTime,jdbcType=DATE},
|
|
|
+ <if test="orderNo != null">
|
|
|
+ #{orderNo,jdbcType=VARCHAR},
|
|
|
</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>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
<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">
|
|
|
@@ -267,26 +102,39 @@
|
|
|
<if test="remarks != null">
|
|
|
remarks = #{remarks,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="attachmentUrl != null">
|
|
|
+ attachment_url = #{attachmentUrl,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="type != null">
|
|
|
+ `type` = #{type,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="orderNo != null">
|
|
|
+ order_no = #{orderNo,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}
|
|
|
+ remarks = #{remarks,jdbcType=VARCHAR},
|
|
|
+ attachment_url = #{attachmentUrl,jdbcType=VARCHAR},
|
|
|
+ `type` = #{type,jdbcType=INTEGER},
|
|
|
+ order_no = #{orderNo,jdbcType=VARCHAR}
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
<select id="selectByDunId" parameterType="java.lang.String" resultType="com.goafanti.order.bo.TDunLogListBo">
|
|
|
- select
|
|
|
+ select
|
|
|
a.id, a.dun_id as dunId, b.name as dumBy, a.dum_time as dumTime, a.remarks
|
|
|
from t_dun_log a left join admin b on a.dum_by=b.id
|
|
|
where dun_id = #{dunId,jdbcType=VARCHAR}
|
|
|
</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.attachment_url attachmentUrl, c.order_no orderNo,c.buyer_name userName
|
|
|
+ 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}
|
|
|
+ </select>
|
|
|
</mapper>
|