|
@@ -0,0 +1,85 @@
|
|
|
|
|
+<?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.fs.sop.mapper.SopOrderLogMapper">
|
|
|
|
|
+
|
|
|
|
|
+ <resultMap type="SopOrderLog" id="SopOrderLogResult">
|
|
|
|
|
+ <result property="id" column="id" />
|
|
|
|
|
+ <result property="sopId" column="sop_id" />
|
|
|
|
|
+ <result property="fsUserId" column="fs_user_id" />
|
|
|
|
|
+ <result property="isBuy" column="is_buy" />
|
|
|
|
|
+ <result property="orderSendType" column="order_send_type" />
|
|
|
|
|
+ <result property="crateTime" column="crate_time" />
|
|
|
|
|
+ <result property="updateTime" column="update_time" />
|
|
|
|
|
+ <result property="sendTime" column="send_time" />
|
|
|
|
|
+ </resultMap>
|
|
|
|
|
+
|
|
|
|
|
+ <sql id="selectSopOrderLogVo">
|
|
|
|
|
+ select id, sop_id, fs_user_id, is_buy, order_send_type, crate_time, update_time, send_time from sop_order_log
|
|
|
|
|
+ </sql>
|
|
|
|
|
+
|
|
|
|
|
+ <select id="selectSopOrderLogList" parameterType="SopOrderLog" resultMap="SopOrderLogResult">
|
|
|
|
|
+ <include refid="selectSopOrderLogVo"/>
|
|
|
|
|
+ <where>
|
|
|
|
|
+ <if test="sopId != null and sopId != ''"> and sop_id = #{sopId}</if>
|
|
|
|
|
+ <if test="fsUserId != null "> and fs_user_id = #{fsUserId}</if>
|
|
|
|
|
+ <if test="isBuy != null "> and is_buy = #{isBuy}</if>
|
|
|
|
|
+ <if test="orderSendType != null "> and order_send_type = #{orderSendType}</if>
|
|
|
|
|
+ <if test="crateTime != null "> and crate_time = #{crateTime}</if>
|
|
|
|
|
+ <if test="sendTime != null "> and send_time = #{sendTime}</if>
|
|
|
|
|
+ </where>
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
|
|
+ <select id="selectSopOrderLogById" parameterType="Long" resultMap="SopOrderLogResult">
|
|
|
|
|
+ <include refid="selectSopOrderLogVo"/>
|
|
|
|
|
+ where id = #{id}
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
|
|
+ <insert id="insertSopOrderLog" parameterType="SopOrderLog" useGeneratedKeys="true" keyProperty="id">
|
|
|
|
|
+ insert into sop_order_log
|
|
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
+ <if test="sopId != null">sop_id,</if>
|
|
|
|
|
+ <if test="fsUserId != null">fs_user_id,</if>
|
|
|
|
|
+ <if test="isBuy != null">is_buy,</if>
|
|
|
|
|
+ <if test="orderSendType != null">order_send_type,</if>
|
|
|
|
|
+ <if test="crateTime != null">crate_time,</if>
|
|
|
|
|
+ <if test="updateTime != null">update_time,</if>
|
|
|
|
|
+ <if test="sendTime != null">send_time,</if>
|
|
|
|
|
+ </trim>
|
|
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
+ <if test="sopId != null">#{sopId},</if>
|
|
|
|
|
+ <if test="fsUserId != null">#{fsUserId},</if>
|
|
|
|
|
+ <if test="isBuy != null">#{isBuy},</if>
|
|
|
|
|
+ <if test="orderSendType != null">#{orderSendType},</if>
|
|
|
|
|
+ <if test="crateTime != null">#{crateTime},</if>
|
|
|
|
|
+ <if test="updateTime != null">#{updateTime},</if>
|
|
|
|
|
+ <if test="sendTime != null">#{sendTime},</if>
|
|
|
|
|
+ </trim>
|
|
|
|
|
+ </insert>
|
|
|
|
|
+
|
|
|
|
|
+ <update id="updateSopOrderLog" parameterType="SopOrderLog">
|
|
|
|
|
+ update sop_order_log
|
|
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
|
|
+ <if test="sopId != null">sop_id = #{sopId},</if>
|
|
|
|
|
+ <if test="fsUserId != null">fs_user_id = #{fsUserId},</if>
|
|
|
|
|
+ <if test="isBuy != null">is_buy = #{isBuy},</if>
|
|
|
|
|
+ <if test="orderSendType != null">order_send_type = #{orderSendType},</if>
|
|
|
|
|
+ <if test="crateTime != null">crate_time = #{crateTime},</if>
|
|
|
|
|
+ <if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
|
|
+ <if test="sendTime != null">send_time = #{sendTime},</if>
|
|
|
|
|
+ </trim>
|
|
|
|
|
+ where id = #{id}
|
|
|
|
|
+ </update>
|
|
|
|
|
+
|
|
|
|
|
+ <delete id="deleteSopOrderLogById" parameterType="Long">
|
|
|
|
|
+ delete from sop_order_log where id = #{id}
|
|
|
|
|
+ </delete>
|
|
|
|
|
+
|
|
|
|
|
+ <delete id="deleteSopOrderLogByIds" parameterType="String">
|
|
|
|
|
+ delete from sop_order_log where id in
|
|
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
|
|
+ #{id}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </delete>
|
|
|
|
|
+</mapper>
|