|
@@ -1,151 +0,0 @@
|
|
|
-<?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.LiveGoodsOrderMapper">
|
|
|
-
|
|
|
- <resultMap type="LiveGoodsOrder" id="LiveGoodsOrderResult">
|
|
|
- <result property="orderId" column="order_id" />
|
|
|
- <result property="companyId" column="company_id" />
|
|
|
- <result property="companyUserId" column="company_user_id" />
|
|
|
- <result property="orderSn" column="order_sn" />
|
|
|
- <result property="userId" column="user_id" />
|
|
|
- <result property="userName" column="user_name" />
|
|
|
- <result property="mobile" column="mobile" />
|
|
|
- <result property="address" column="address" />
|
|
|
- <result property="payMoney" column="pay_money" />
|
|
|
- <result property="orderMoney" column="order_money" />
|
|
|
- <result property="deliveryCode" column="delivery_code" />
|
|
|
- <result property="deliveryName" column="delivery_name" />
|
|
|
- <result property="deliverySn" column="delivery_sn" />
|
|
|
- <result property="payTime" column="pay_time" />
|
|
|
- <result property="finishTime" column="finish_time" />
|
|
|
- <result property="status" column="status" />
|
|
|
- <result property="createTime" column="create_time" />
|
|
|
- <result property="createBy" column="create_by" />
|
|
|
- <result property="updateBy" column="update_by" />
|
|
|
- <result property="updateTime" column="update_time" />
|
|
|
- <result property="remark" column="remark" />
|
|
|
- </resultMap>
|
|
|
-
|
|
|
- <sql id="selectLiveGoodsOrderVo">
|
|
|
- select order_id, company_id, company_user_id, order_sn, user_id, user_name, mobile, address, pay_money, order_money, delivery_code, delivery_name, delivery_sn, pay_time, finish_time, status, create_time, create_by, update_by, update_time, remark from live_goods_order
|
|
|
- </sql>
|
|
|
-
|
|
|
- <select id="selectLiveGoodsOrderList" parameterType="LiveGoodsOrder" resultMap="LiveGoodsOrderResult">
|
|
|
- <include refid="selectLiveGoodsOrderVo"/>
|
|
|
- <where>
|
|
|
- <if test="companyId != null "> and company_id = #{companyId}</if>
|
|
|
- <if test="companyUserId != null "> and company_user_id = #{companyUserId}</if>
|
|
|
- <if test="orderSn != null and orderSn != ''"> and order_sn = #{orderSn}</if>
|
|
|
- <if test="userId != null "> and user_id = #{userId}</if>
|
|
|
- <if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
|
|
|
- <if test="mobile != null and mobile != ''"> and mobile = #{mobile}</if>
|
|
|
- <if test="address != null and address != ''"> and address = #{address}</if>
|
|
|
- <if test="payMoney != null "> and pay_money = #{payMoney}</if>
|
|
|
- <if test="orderMoney != null "> and order_money = #{orderMoney}</if>
|
|
|
- <if test="deliveryCode != null and deliveryCode != ''"> and delivery_code = #{deliveryCode}</if>
|
|
|
- <if test="deliveryName != null and deliveryName != ''"> and delivery_name like concat('%', #{deliveryName}, '%')</if>
|
|
|
- <if test="deliverySn != null and deliverySn != ''"> and delivery_sn = #{deliverySn}</if>
|
|
|
- <if test="payTime != null "> and pay_time = #{payTime}</if>
|
|
|
- <if test="finishTime != null "> and finish_time = #{finishTime}</if>
|
|
|
- <if test="status != null "> and status = #{status}</if>
|
|
|
- </where>
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="selectLiveGoodsOrderByOrderId" parameterType="Long" resultMap="LiveGoodsOrderResult">
|
|
|
- <include refid="selectLiveGoodsOrderVo"/>
|
|
|
- where order_id = #{orderId}
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="selectLiveGoodsOrderByOrderIdAndCompanyIdAndCompanyUserId" resultMap="LiveGoodsOrderResult">
|
|
|
- <include refid="selectLiveGoodsOrderVo"/>
|
|
|
- where order_id = #{orderId} and company_id = #{companyId} and company_user_id = #{companyUserId}
|
|
|
- </select>
|
|
|
-
|
|
|
- <insert id="insertLiveGoodsOrder" parameterType="LiveGoodsOrder">
|
|
|
- insert into live_goods_order
|
|
|
- <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
- <if test="orderId != null">order_id,</if>
|
|
|
- <if test="companyId != null">company_id,</if>
|
|
|
- <if test="companyUserId != null">company_user_id,</if>
|
|
|
- <if test="orderSn != null">order_sn,</if>
|
|
|
- <if test="userId != null">user_id,</if>
|
|
|
- <if test="userName != null">user_name,</if>
|
|
|
- <if test="mobile != null">mobile,</if>
|
|
|
- <if test="address != null">address,</if>
|
|
|
- <if test="payMoney != null">pay_money,</if>
|
|
|
- <if test="orderMoney != null">order_money,</if>
|
|
|
- <if test="deliveryCode != null">delivery_code,</if>
|
|
|
- <if test="deliveryName != null">delivery_name,</if>
|
|
|
- <if test="deliverySn != null">delivery_sn,</if>
|
|
|
- <if test="payTime != null">pay_time,</if>
|
|
|
- <if test="finishTime != null">finish_time,</if>
|
|
|
- <if test="status != null">status,</if>
|
|
|
- <if test="createTime != null">create_time,</if>
|
|
|
- <if test="createBy != null">create_by,</if>
|
|
|
- <if test="updateBy != null">update_by,</if>
|
|
|
- <if test="updateTime != null">update_time,</if>
|
|
|
- <if test="remark != null">remark,</if>
|
|
|
- </trim>
|
|
|
- <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
- <if test="orderId != null">#{orderId},</if>
|
|
|
- <if test="companyId != null">#{companyId},</if>
|
|
|
- <if test="companyUserId != null">#{companyUserId},</if>
|
|
|
- <if test="orderSn != null">#{orderSn},</if>
|
|
|
- <if test="userId != null">#{userId},</if>
|
|
|
- <if test="userName != null">#{userName},</if>
|
|
|
- <if test="mobile != null">#{mobile},</if>
|
|
|
- <if test="address != null">#{address},</if>
|
|
|
- <if test="payMoney != null">#{payMoney},</if>
|
|
|
- <if test="orderMoney != null">#{orderMoney},</if>
|
|
|
- <if test="deliveryCode != null">#{deliveryCode},</if>
|
|
|
- <if test="deliveryName != null">#{deliveryName},</if>
|
|
|
- <if test="deliverySn != null">#{deliverySn},</if>
|
|
|
- <if test="payTime != null">#{payTime},</if>
|
|
|
- <if test="finishTime != null">#{finishTime},</if>
|
|
|
- <if test="status != null">#{status},</if>
|
|
|
- <if test="createTime != null">#{createTime},</if>
|
|
|
- <if test="createBy != null">#{createBy},</if>
|
|
|
- <if test="updateBy != null">#{updateBy},</if>
|
|
|
- <if test="updateTime != null">#{updateTime},</if>
|
|
|
- <if test="remark != null">#{remark},</if>
|
|
|
- </trim>
|
|
|
- </insert>
|
|
|
-
|
|
|
- <update id="updateLiveGoodsOrder" parameterType="LiveGoodsOrder">
|
|
|
- update live_goods_order
|
|
|
- <trim prefix="SET" suffixOverrides=",">
|
|
|
- <if test="orderSn != null">order_sn = #{orderSn},</if>
|
|
|
- <if test="userId != null">user_id = #{userId},</if>
|
|
|
- <if test="userName != null">user_name = #{userName},</if>
|
|
|
- <if test="mobile != null">mobile = #{mobile},</if>
|
|
|
- <if test="address != null">address = #{address},</if>
|
|
|
- <if test="payMoney != null">pay_money = #{payMoney},</if>
|
|
|
- <if test="orderMoney != null">order_money = #{orderMoney},</if>
|
|
|
- <if test="deliveryCode != null">delivery_code = #{deliveryCode},</if>
|
|
|
- <if test="deliveryName != null">delivery_name = #{deliveryName},</if>
|
|
|
- <if test="deliverySn != null">delivery_sn = #{deliverySn},</if>
|
|
|
- <if test="payTime != null">pay_time = #{payTime},</if>
|
|
|
- <if test="finishTime != null">finish_time = #{finishTime},</if>
|
|
|
- <if test="status != null">status = #{status},</if>
|
|
|
- <if test="createTime != null">create_time = #{createTime},</if>
|
|
|
- <if test="createBy != null">create_by = #{createBy},</if>
|
|
|
- <if test="updateBy != null">update_by = #{updateBy},</if>
|
|
|
- <if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
- <if test="remark != null">remark = #{remark},</if>
|
|
|
- </trim>
|
|
|
- where order_id = #{orderId}
|
|
|
- </update>
|
|
|
-
|
|
|
- <delete id="deleteLiveGoodsOrderByOrderId" parameterType="Long">
|
|
|
- delete from live_goods_order where order_id = #{orderId}
|
|
|
- </delete>
|
|
|
-
|
|
|
- <delete id="deleteLiveGoodsOrderByOrderIds" parameterType="String">
|
|
|
- delete from live_goods_order where order_id in
|
|
|
- <foreach item="orderId" collection="array" open="(" separator="," close=")">
|
|
|
- #{orderId}
|
|
|
- </foreach>
|
|
|
- </delete>
|
|
|
-</mapper>
|