221 lines
8.2 KiB
XML
221 lines
8.2 KiB
XML
<?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.zhwl.wcsc.mapper.ZdyWcscOrderActionMapper">
|
|
|
|
<resultMap type="ZdyWcscOrderAction" id="ZdyWcscOrderActionResult">
|
|
<result property="id" column="id"/>
|
|
<result property="orderId" column="order_id"/>
|
|
<result property="orderItemId" column="order_item_id"/>
|
|
<result property="operType" column="oper_type"/>
|
|
<result property="operId" column="oper_id"/>
|
|
<result property="orderStatus" column="order_status"/>
|
|
<result property="dispatchStatus" column="dispatch_status"/>
|
|
<result property="commentStatus" column="comment_status"/>
|
|
<result property="aftersaleStatus" column="aftersale_status"/>
|
|
<result property="refundStatus" column="refund_status"/>
|
|
<result property="remark" column="remark"/>
|
|
<result property="createTime" column="create_time"/>
|
|
<result property="updateTime" column="update_time"/>
|
|
<result property="createBy" column="create_by"/>
|
|
<result property="updateBy" column="update_by"/>
|
|
<result property="userName" column="userName"/>
|
|
<result property="nickName" column="nickName"/>
|
|
</resultMap>
|
|
|
|
<sql id="selectZdyWcscOrderActionVo">
|
|
select woa.id,
|
|
woa.order_id,
|
|
woa.order_item_id,
|
|
woa.oper_type,
|
|
woa.oper_id,
|
|
woa.order_status,
|
|
woa.dispatch_status,
|
|
woa.comment_status,
|
|
woa.aftersale_status,
|
|
woa.refund_status,
|
|
woa.remark,
|
|
woa.create_time,
|
|
woa.update_time,
|
|
woa.create_by,
|
|
woa.update_by,zu.NAME AS userName,
|
|
su.nick_name as nickName
|
|
from zdy_wcsc_order_action woa
|
|
LEFT JOIN zdy_user zu ON woa.oper_id = zu.id
|
|
LEFT JOIN sys_user su ON woa.oper_id = su.user_id
|
|
</sql>
|
|
|
|
<select id="selectZdyWcscOrderActionList" parameterType="ZdyWcscOrderAction" resultMap="ZdyWcscOrderActionResult">
|
|
<include refid="selectZdyWcscOrderActionVo"/>
|
|
<where>
|
|
<if test="orderId != null ">
|
|
and woa.order_id = #{orderId}
|
|
</if>
|
|
<if test="orderItemId != null ">
|
|
and woa.order_item_id = #{orderItemId}
|
|
</if>
|
|
<if test="operType != null and operType != ''">
|
|
and woa.oper_type = #{operType}
|
|
</if>
|
|
<if test="operId != null ">
|
|
and woa.oper_id = #{operId}
|
|
</if>
|
|
<if test="orderStatus != null ">
|
|
and woa.order_status = #{orderStatus}
|
|
</if>
|
|
<if test="dispatchStatus != null ">
|
|
and woa.dispatch_status = #{dispatchStatus}
|
|
</if>
|
|
<if test="commentStatus != null ">
|
|
and woa.comment_status = #{commentStatus}
|
|
</if>
|
|
<if test="aftersaleStatus != null ">
|
|
and woa.aftersale_status = #{aftersaleStatus}
|
|
</if>
|
|
<if test="refundStatus != null ">
|
|
and woa.refund_status = #{refundStatus}
|
|
</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="selectZdyWcscOrderActionById" parameterType="Long"
|
|
resultMap="ZdyWcscOrderActionResult">
|
|
<include refid="selectZdyWcscOrderActionVo"/>
|
|
where woa.id = #{id}
|
|
</select>
|
|
|
|
<insert id="insertZdyWcscOrderAction" parameterType="ZdyWcscOrderAction" useGeneratedKeys="true"
|
|
keyProperty="id">
|
|
insert into zdy_wcsc_order_action
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="orderId != null">order_id,
|
|
</if>
|
|
<if test="orderItemId != null">order_item_id,
|
|
</if>
|
|
<if test="operType != null and operType != ''">oper_type,
|
|
</if>
|
|
<if test="operId != null">oper_id,
|
|
</if>
|
|
<if test="orderStatus != null">order_status,
|
|
</if>
|
|
<if test="dispatchStatus != null">dispatch_status,
|
|
</if>
|
|
<if test="commentStatus != null">comment_status,
|
|
</if>
|
|
<if test="aftersaleStatus != null">aftersale_status,
|
|
</if>
|
|
<if test="refundStatus != null">refund_status,
|
|
</if>
|
|
<if test="remark != null">remark,
|
|
</if>
|
|
<if test="createTime != null">create_time,
|
|
</if>
|
|
<if test="updateTime != null">update_time,
|
|
</if>
|
|
<if test="createBy != null">create_by,
|
|
</if>
|
|
<if test="updateBy != null">update_by,
|
|
</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="orderId != null">#{orderId},
|
|
</if>
|
|
<if test="orderItemId != null">#{orderItemId},
|
|
</if>
|
|
<if test="operType != null and operType != ''">#{operType},
|
|
</if>
|
|
<if test="operId != null">#{operId},
|
|
</if>
|
|
<if test="orderStatus != null">#{orderStatus},
|
|
</if>
|
|
<if test="dispatchStatus != null">#{dispatchStatus},
|
|
</if>
|
|
<if test="commentStatus != null">#{commentStatus},
|
|
</if>
|
|
<if test="aftersaleStatus != null">#{aftersaleStatus},
|
|
</if>
|
|
<if test="refundStatus != null">#{refundStatus},
|
|
</if>
|
|
<if test="remark != null">#{remark},
|
|
</if>
|
|
<if test="createTime != null">#{createTime},
|
|
</if>
|
|
<if test="updateTime != null">#{updateTime},
|
|
</if>
|
|
<if test="createBy != null">#{createBy},
|
|
</if>
|
|
<if test="updateBy != null">#{updateBy},
|
|
</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateZdyWcscOrderAction" parameterType="ZdyWcscOrderAction">
|
|
update zdy_wcsc_order_action
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="orderId != null">order_id =
|
|
#{orderId},
|
|
</if>
|
|
<if test="orderItemId != null">order_item_id =
|
|
#{orderItemId},
|
|
</if>
|
|
<if test="operType != null and operType != ''">oper_type =
|
|
#{operType},
|
|
</if>
|
|
<if test="operId != null">oper_id =
|
|
#{operId},
|
|
</if>
|
|
<if test="orderStatus != null">order_status =
|
|
#{orderStatus},
|
|
</if>
|
|
<if test="dispatchStatus != null">dispatch_status =
|
|
#{dispatchStatus},
|
|
</if>
|
|
<if test="commentStatus != null">comment_status =
|
|
#{commentStatus},
|
|
</if>
|
|
<if test="aftersaleStatus != null">aftersale_status =
|
|
#{aftersaleStatus},
|
|
</if>
|
|
<if test="refundStatus != null">refund_status =
|
|
#{refundStatus},
|
|
</if>
|
|
<if test="remark != null">remark =
|
|
#{remark},
|
|
</if>
|
|
<if test="createTime != null">create_time =
|
|
#{createTime},
|
|
</if>
|
|
<if test="updateTime != null">update_time =
|
|
#{updateTime},
|
|
</if>
|
|
<if test="createBy != null">create_by =
|
|
#{createBy},
|
|
</if>
|
|
<if test="updateBy != null">update_by =
|
|
#{updateBy},
|
|
</if>
|
|
</trim>
|
|
where id = #{id}
|
|
</update>
|
|
|
|
<delete id="deleteZdyWcscOrderActionById" parameterType="Long">
|
|
delete
|
|
from zdy_wcsc_order_action
|
|
where id = #{id}
|
|
</delete>
|
|
|
|
<delete id="deleteZdyWcscOrderActionByIds" parameterType="String">
|
|
delete from zdy_wcsc_order_action where id in
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</delete>
|
|
|
|
<select id="selectZdyWcscOrderActionByOrderId" parameterType="Long"
|
|
resultMap="ZdyWcscOrderActionResult">
|
|
<include refid="selectZdyWcscOrderActionVo"/>
|
|
where woa.order_id = #{orderId}
|
|
</select>
|
|
</mapper>
|