|
|
@@ -0,0 +1,158 @@
|
|
|
+<?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.hisStore.mapper.FsStoreOrderPickMapper">
|
|
|
+
|
|
|
+ <resultMap type="FsStoreOrderPick" id="FsStoreOrderPickResult">
|
|
|
+ <result property="id" column="id" />
|
|
|
+ <result property="orderCode" column="order_code" />
|
|
|
+ <result property="userId" column="user_id" />
|
|
|
+ <result property="nickName" column="nick_name" />
|
|
|
+ <result property="phone" column="phone" />
|
|
|
+ <result property="pickupAddress" column="pickup_address" />
|
|
|
+ <result property="totalNum" column="total_num" />
|
|
|
+ <result property="totalPrice" column="total_price" />
|
|
|
+ <result property="redeemedCode" column="redeemed_code" />
|
|
|
+ <result property="redeemedStatus" column="redeemed_status" />
|
|
|
+ <result property="redeemedTime" column="redeemed_time" />
|
|
|
+ <result property="redeemedId" column="redeemed_id" />
|
|
|
+ <result property="createTime" column="create_time" />
|
|
|
+ <result property="updateTime" column="update_time" />
|
|
|
+ <result property="cancelExplain" column="cancel_explain" />
|
|
|
+ <result property="cancelTime" column="cancel_time" />
|
|
|
+ <result property="isDel" column="is_del" />
|
|
|
+ <result property="remark" column="remark" />
|
|
|
+ <result property="companyId" column="company_id" />
|
|
|
+ <result property="companyUserId" column="company_user_id" />
|
|
|
+ <result property="deptId" column="dept_id" />
|
|
|
+ <result property="itemJson" column="item_json" />
|
|
|
+ <result property="userRecordId" column="user_record_id" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectFsStoreOrderPickVo">
|
|
|
+ select id, order_code, user_id, nick_name, phone, pickup_address, total_num, total_price, redeemed_code, redeemed_status, redeemed_time, redeemed_id, create_time, update_time, cancel_explain, cancel_time, is_del, remark, company_id, company_user_id, dept_id, item_json, user_record_id from fs_store_order_pick
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectFsStoreOrderPickList" parameterType="FsStoreOrderPick" resultMap="FsStoreOrderPickResult">
|
|
|
+ <include refid="selectFsStoreOrderPickVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="orderCode != null and orderCode != ''"> and order_code = #{orderCode}</if>
|
|
|
+ <if test="userId != null "> and user_id = #{userId}</if>
|
|
|
+ <if test="nickName != null and nickName != ''"> and nick_name like concat('%', #{nickName}, '%')</if>
|
|
|
+ <if test="phone != null and phone != ''"> and phone = #{phone}</if>
|
|
|
+ <if test="pickupAddress != null and pickupAddress != ''"> and pickup_address = #{pickupAddress}</if>
|
|
|
+ <if test="totalNum != null "> and total_num = #{totalNum}</if>
|
|
|
+ <if test="totalPrice != null "> and total_price = #{totalPrice}</if>
|
|
|
+ <if test="redeemedCode != null and redeemedCode != ''"> and redeemed_code = #{redeemedCode}</if>
|
|
|
+ <if test="redeemedStatus != null "> and redeemed_status = #{redeemedStatus}</if>
|
|
|
+ <if test="redeemedTime != null "> and redeemed_time = #{redeemedTime}</if>
|
|
|
+ <if test="redeemedId != null "> and redeemed_id = #{redeemedId}</if>
|
|
|
+ <if test="cancelExplain != null and cancelExplain != ''"> and cancel_explain = #{cancelExplain}</if>
|
|
|
+ <if test="cancelTime != null "> and cancel_time = #{cancelTime}</if>
|
|
|
+ <if test="isDel != null "> and is_del = #{isDel}</if>
|
|
|
+ <if test="companyId != null "> and company_id = #{companyId}</if>
|
|
|
+ <if test="companyUserId != null "> and company_user_id = #{companyUserId}</if>
|
|
|
+ <if test="deptId != null "> and dept_id = #{deptId}</if>
|
|
|
+ <if test="itemJson != null and itemJson != ''"> and item_json = #{itemJson}</if>
|
|
|
+ <if test="userRecordId != null "> and user_record_id = #{userRecordId}</if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectFsStoreOrderPickById" parameterType="Long" resultMap="FsStoreOrderPickResult">
|
|
|
+ <include refid="selectFsStoreOrderPickVo"/>
|
|
|
+ where id = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertFsStoreOrderPick" parameterType="FsStoreOrderPick" useGeneratedKeys="true" keyProperty="id">
|
|
|
+ insert into fs_store_order_pick
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="orderCode != null and orderCode != ''">order_code,</if>
|
|
|
+ <if test="userId != null">user_id,</if>
|
|
|
+ <if test="nickName != null">nick_name,</if>
|
|
|
+ <if test="phone != null">phone,</if>
|
|
|
+ <if test="pickupAddress != null">pickup_address,</if>
|
|
|
+ <if test="totalNum != null">total_num,</if>
|
|
|
+ <if test="totalPrice != null">total_price,</if>
|
|
|
+ <if test="redeemedCode != null">redeemed_code,</if>
|
|
|
+ <if test="redeemedStatus != null">redeemed_status,</if>
|
|
|
+ <if test="redeemedTime != null">redeemed_time,</if>
|
|
|
+ <if test="redeemedId != null">redeemed_id,</if>
|
|
|
+ <if test="createTime != null">create_time,</if>
|
|
|
+ <if test="updateTime != null">update_time,</if>
|
|
|
+ <if test="cancelExplain != null">cancel_explain,</if>
|
|
|
+ <if test="cancelTime != null">cancel_time,</if>
|
|
|
+ <if test="isDel != null">is_del,</if>
|
|
|
+ <if test="remark != null">remark,</if>
|
|
|
+ <if test="companyId != null">company_id,</if>
|
|
|
+ <if test="companyUserId != null">company_user_id,</if>
|
|
|
+ <if test="deptId != null">dept_id,</if>
|
|
|
+ <if test="itemJson != null">item_json,</if>
|
|
|
+ <if test="userRecordId != null">user_record_id,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="orderCode != null and orderCode != ''">#{orderCode},</if>
|
|
|
+ <if test="userId != null">#{userId},</if>
|
|
|
+ <if test="nickName != null">#{nickName},</if>
|
|
|
+ <if test="phone != null">#{phone},</if>
|
|
|
+ <if test="pickupAddress != null">#{pickupAddress},</if>
|
|
|
+ <if test="totalNum != null">#{totalNum},</if>
|
|
|
+ <if test="totalPrice != null">#{totalPrice},</if>
|
|
|
+ <if test="redeemedCode != null">#{redeemedCode},</if>
|
|
|
+ <if test="redeemedStatus != null">#{redeemedStatus},</if>
|
|
|
+ <if test="redeemedTime != null">#{redeemedTime},</if>
|
|
|
+ <if test="redeemedId != null">#{redeemedId},</if>
|
|
|
+ <if test="createTime != null">#{createTime},</if>
|
|
|
+ <if test="updateTime != null">#{updateTime},</if>
|
|
|
+ <if test="cancelExplain != null">#{cancelExplain},</if>
|
|
|
+ <if test="cancelTime != null">#{cancelTime},</if>
|
|
|
+ <if test="isDel != null">#{isDel},</if>
|
|
|
+ <if test="remark != null">#{remark},</if>
|
|
|
+ <if test="companyId != null">#{companyId},</if>
|
|
|
+ <if test="companyUserId != null">#{companyUserId},</if>
|
|
|
+ <if test="deptId != null">#{deptId},</if>
|
|
|
+ <if test="itemJson != null">#{itemJson},</if>
|
|
|
+ <if test="userRecordId != null">#{userRecordId},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateFsStoreOrderPick" parameterType="FsStoreOrderPick">
|
|
|
+ update fs_store_order_pick
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="orderCode != null and orderCode != ''">order_code = #{orderCode},</if>
|
|
|
+ <if test="userId != null">user_id = #{userId},</if>
|
|
|
+ <if test="nickName != null">nick_name = #{nickName},</if>
|
|
|
+ <if test="phone != null">phone = #{phone},</if>
|
|
|
+ <if test="pickupAddress != null">pickup_address = #{pickupAddress},</if>
|
|
|
+ <if test="totalNum != null">total_num = #{totalNum},</if>
|
|
|
+ <if test="totalPrice != null">total_price = #{totalPrice},</if>
|
|
|
+ <if test="redeemedCode != null">redeemed_code = #{redeemedCode},</if>
|
|
|
+ <if test="redeemedStatus != null">redeemed_status = #{redeemedStatus},</if>
|
|
|
+ <if test="redeemedTime != null">redeemed_time = #{redeemedTime},</if>
|
|
|
+ <if test="redeemedId != null">redeemed_id = #{redeemedId},</if>
|
|
|
+ <if test="createTime != null">create_time = #{createTime},</if>
|
|
|
+ <if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
+ <if test="cancelExplain != null">cancel_explain = #{cancelExplain},</if>
|
|
|
+ <if test="cancelTime != null">cancel_time = #{cancelTime},</if>
|
|
|
+ <if test="isDel != null">is_del = #{isDel},</if>
|
|
|
+ <if test="remark != null">remark = #{remark},</if>
|
|
|
+ <if test="companyId != null">company_id = #{companyId},</if>
|
|
|
+ <if test="companyUserId != null">company_user_id = #{companyUserId},</if>
|
|
|
+ <if test="deptId != null">dept_id = #{deptId},</if>
|
|
|
+ <if test="itemJson != null">item_json = #{itemJson},</if>
|
|
|
+ <if test="userRecordId != null">user_record_id = #{userRecordId},</if>
|
|
|
+ </trim>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteFsStoreOrderPickById" parameterType="Long">
|
|
|
+ delete from fs_store_order_pick where id = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteFsStoreOrderPickByIds" parameterType="String">
|
|
|
+ delete from fs_store_order_pick where id in
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+</mapper>
|