1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- <?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.live.mapper.LiveOrderStatusMapper">
- <resultMap type="LiveOrderStatus" id="LiveOrderStatusResult">
- <result property="id" column="id" />
- <result property="orderId" column="order_id" />
- <result property="changeType" column="change_type" />
- <result property="changeMessage" column="change_message" />
- <result property="changeTime" column="change_time" />
- </resultMap>
- <sql id="selectLiveOrderStatusVo">
- select id, order_id, change_type, change_message, change_time from live_order_status
- </sql>
- <select id="selectLiveOrderStatusList" parameterType="LiveOrderStatus" resultMap="LiveOrderStatusResult">
- <include refid="selectLiveOrderStatusVo"/>
- <where>
- <if test="orderId != null and orderId != ''"> and order_id = #{orderId}</if>
- <if test="changeType != null and changeType != ''"> and change_type = #{changeType}</if>
- <if test="changeMessage != null and changeMessage != ''"> and change_message = #{changeMessage}</if>
- <if test="changeTime != null "> and change_time = #{changeTime}</if>
- </where>
- </select>
- <select id="selectLiveOrderStatusById" parameterType="String" resultMap="LiveOrderStatusResult">
- <include refid="selectLiveOrderStatusVo"/>
- where id = #{id}
- </select>
- <insert id="insertLiveOrderStatus" parameterType="LiveOrderStatus" useGeneratedKeys="true" keyProperty="id">
- insert into live_order_status
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="orderId != null and orderId != ''">order_id,</if>
- <if test="changeType != null and changeType != ''">change_type,</if>
- <if test="changeMessage != null and changeMessage != ''">change_message,</if>
- <if test="changeTime != null">change_time,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="orderId != null and orderId != ''">#{orderId},</if>
- <if test="changeType != null and changeType != ''">#{changeType},</if>
- <if test="changeMessage != null and changeMessage != ''">#{changeMessage},</if>
- <if test="changeTime != null">#{changeTime},</if>
- </trim>
- </insert>
- <update id="updateLiveOrderStatus" parameterType="LiveOrderStatus">
- update live_order_status
- <trim prefix="SET" suffixOverrides=",">
- <if test="orderId != null and orderId != ''">order_id = #{orderId},</if>
- <if test="changeType != null and changeType != ''">change_type = #{changeType},</if>
- <if test="changeMessage != null and changeMessage != ''">change_message = #{changeMessage},</if>
- <if test="changeTime != null">change_time = #{changeTime},</if>
- </trim>
- where id = #{id}
- </update>
- <delete id="deleteLiveOrderStatusById" parameterType="String">
- delete from live_order_status where id = #{id}
- </delete>
- <delete id="deleteLiveOrderStatusByIds" parameterType="String">
- delete from live_order_status where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </delete>
- </mapper>
|