|
|
@@ -10,9 +10,11 @@
|
|
|
<result column="attachment_url" jdbcType="VARCHAR" property="attachmentUrl" />
|
|
|
<result column="operation_time" jdbcType="DATE" property="operationTime" />
|
|
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
|
+ <result column="aid" jdbcType="VARCHAR" property="aid" />
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List">
|
|
|
- id, order_no, `type`, `status`, remarks, attachment_url, operation_time, create_time
|
|
|
+ id, order_no, `type`, `status`, remarks, attachment_url, operation_time, create_time,
|
|
|
+ aid
|
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
|
select
|
|
|
@@ -20,6 +22,7 @@
|
|
|
from t_order_legal_affairs
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</select>
|
|
|
+
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
|
|
delete from t_order_legal_affairs
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
@@ -27,10 +30,10 @@
|
|
|
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TOrderLegalAffairs" useGeneratedKeys="true">
|
|
|
insert into t_order_legal_affairs (order_no, `type`, `status`,
|
|
|
remarks, attachment_url, operation_time,
|
|
|
- create_time)
|
|
|
+ create_time, aid)
|
|
|
values (#{orderNo,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, #{status,jdbcType=INTEGER},
|
|
|
#{remarks,jdbcType=VARCHAR}, #{attachmentUrl,jdbcType=VARCHAR}, #{operationTime,jdbcType=DATE},
|
|
|
- #{createTime,jdbcType=TIMESTAMP})
|
|
|
+ #{createTime,jdbcType=TIMESTAMP}, #{aid,jdbcType=VARCHAR})
|
|
|
</insert>
|
|
|
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TOrderLegalAffairs" useGeneratedKeys="true">
|
|
|
insert into t_order_legal_affairs
|
|
|
@@ -56,6 +59,9 @@
|
|
|
<if test="createTime != null">
|
|
|
create_time,
|
|
|
</if>
|
|
|
+ <if test="aid != null">
|
|
|
+ aid,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="orderNo != null">
|
|
|
@@ -79,6 +85,9 @@
|
|
|
<if test="createTime != null">
|
|
|
#{createTime,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
+ <if test="aid != null">
|
|
|
+ #{aid,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TOrderLegalAffairs">
|
|
|
@@ -105,6 +114,9 @@
|
|
|
<if test="createTime != null">
|
|
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
+ <if test="aid != null">
|
|
|
+ aid = #{aid,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
@@ -116,7 +128,15 @@
|
|
|
remarks = #{remarks,jdbcType=VARCHAR},
|
|
|
attachment_url = #{attachmentUrl,jdbcType=VARCHAR},
|
|
|
operation_time = #{operationTime,jdbcType=DATE},
|
|
|
- create_time = #{createTime,jdbcType=TIMESTAMP}
|
|
|
+ create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ aid = #{aid,jdbcType=VARCHAR}
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
+ <select id="lagalAffairsLogList" resultType="com.goafanti.order.bo.OutLegalAffairsLogBo">
|
|
|
+ select a.id,a.order_no orderNo,a.`type` ,a.status,a.remarks ,a.attachment_url attachmentUrl,
|
|
|
+ date_format(a.operation_time ,'%Y-%m-%d')operationDate,date_format(a.create_time ,'%Y-%m-%d %H:%i:%S')createDate,
|
|
|
+ b.name adminName,c.buyer_name userName
|
|
|
+ from t_order_legal_affairs a left join admin b on a.aid=b.id left join t_order_mid c on a.order_no =c.order_no
|
|
|
+ where a.order_no = #{orderNo}
|
|
|
+ </select>
|
|
|
</mapper>
|