|
@@ -0,0 +1,142 @@
|
|
|
|
+<?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.pj.tb_order.TbOrderMapper">
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ <!-- ================================== 查询相关 ================================== -->
|
|
|
|
+ <!-- select id, trade_area_id, trade_area_name, address_ids, sale_main_id, trade_no, buy_user_id, buy_user_name, buy_user_type, enterprise_id, enterprise_name, total_weight, total_price, trade_time, trade_status, pay_type, settle_time, real_price, should_price, settle_user_id, record_user_id, record_time, record, refund_reason, refund_time, receive_name, receive_phone, receive_address, out_time, goods_names, apply, apply_time, apply_result, apply_fail_reason, distribution, confirm, pick, pick_time, shop_id, shop_name, send, send_time, level_two_order_id, create_time, create_by, create_name, update_time, update_by, update_name, delete_status from tb_order -->
|
|
|
|
+
|
|
|
|
+ <!-- 通用映射:自动模式 -->
|
|
|
|
+ <resultMap id="model" autoMapping="true" type="com.pj.tb_order.TbOrder"></resultMap>
|
|
|
|
+
|
|
|
|
+ <!-- 公共查询sql片段 -->
|
|
|
|
+ <sql id="select_sql">
|
|
|
|
+ select trade_no,trade_area_name,buy_user_name,buy_user_type,enterprise_name,total_weight,total_price,
|
|
|
|
+ trade_time, trade_status, real_price,pay_type,should_price,goods_names,apply,confirm,pick,pick_time,
|
|
|
|
+ send,send_time,level_two_order_id
|
|
|
|
+ from tb_order
|
|
|
|
+ </sql>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ <!-- 查集合 - 根据条件(参数为空时代表忽略指定条件) [G] -->
|
|
|
|
+ <select id="getList" resultMap="model">
|
|
|
|
+ <include refid="select_sql"></include>
|
|
|
|
+<!-- <where>-->
|
|
|
|
+<!-- <if test=' this.has("id") '> and id = #{id} </if>-->
|
|
|
|
+<!-- <if test=' this.has("tradeAreaId") '> and trade_area_id = #{tradeAreaId} </if>-->
|
|
|
|
+<!-- <if test=' this.has("tradeAreaName") '> and trade_area_name = #{tradeAreaName} </if>-->
|
|
|
|
+<!-- <if test=' this.has("addressIds") '> and address_ids = #{addressIds} </if>-->
|
|
|
|
+<!-- <if test=' this.has("saleMainId") '> and sale_main_id = #{saleMainId} </if>-->
|
|
|
|
+<!-- <if test=' this.has("tradeNo") '> and trade_no = #{tradeNo} </if>-->
|
|
|
|
+<!-- <if test=' this.has("buyUserId") '> and buy_user_id = #{buyUserId} </if>-->
|
|
|
|
+<!-- <if test=' this.has("buyUserName") '> and buy_user_name = #{buyUserName} </if>-->
|
|
|
|
+<!-- <if test=' this.has("buyUserType") '> and buy_user_type = #{buyUserType} </if>-->
|
|
|
|
+<!-- <if test=' this.has("enterpriseId") '> and enterprise_id = #{enterpriseId} </if>-->
|
|
|
|
+<!-- <if test=' this.has("enterpriseName") '> and enterprise_name = #{enterpriseName} </if>-->
|
|
|
|
+<!-- <if test=' this.has("totalWeight") '> and total_weight = #{totalWeight} </if>-->
|
|
|
|
+<!-- <if test=' this.has("totalPrice") '> and total_price = #{totalPrice} </if>-->
|
|
|
|
+<!-- <if test=' this.has("tradeStatus") '> and trade_status = #{tradeStatus} </if>-->
|
|
|
|
+<!-- <if test=' this.has("payType") '> and pay_type = #{payType} </if>-->
|
|
|
|
+<!-- <if test=' this.has("settleTime") '> and settle_time = #{settleTime} </if>-->
|
|
|
|
+<!-- <if test=' this.has("realPrice") '> and real_price = #{realPrice} </if>-->
|
|
|
|
+<!-- <if test=' this.has("shouldPrice") '> and should_price = #{shouldPrice} </if>-->
|
|
|
|
+<!-- <if test=' this.has("settleUserId") '> and settle_user_id = #{settleUserId} </if>-->
|
|
|
|
+<!-- <if test=' this.has("recordUserId") '> and record_user_id = #{recordUserId} </if>-->
|
|
|
|
+<!-- <if test=' this.has("recordTime") '> and record_time = #{recordTime} </if>-->
|
|
|
|
+<!-- <if test=' this.has("record") '> and record = #{record} </if>-->
|
|
|
|
+<!-- <if test=' this.has("refundReason") '> and refund_reason = #{refundReason} </if>-->
|
|
|
|
+<!-- <if test=' this.has("refundTime") '> and refund_time = #{refundTime} </if>-->
|
|
|
|
+<!-- <if test=' this.has("receiveName") '> and receive_name = #{receiveName} </if>-->
|
|
|
|
+<!-- <if test=' this.has("receivePhone") '> and receive_phone = #{receivePhone} </if>-->
|
|
|
|
+<!-- <if test=' this.has("receiveAddress") '> and receive_address = #{receiveAddress} </if>-->
|
|
|
|
+<!-- <if test=' this.has("outTime") '> and out_time = #{outTime} </if>-->
|
|
|
|
+<!-- <if test=' this.has("goodsNames") '> and goods_names = #{goodsNames} </if>-->
|
|
|
|
+<!-- <if test=' this.has("apply") '> and apply = #{apply} </if>-->
|
|
|
|
+<!-- <if test=' this.has("applyTime") '> and apply_time = #{applyTime} </if>-->
|
|
|
|
+<!-- <if test=' this.has("applyResult") '> and apply_result = #{applyResult} </if>-->
|
|
|
|
+<!-- <if test=' this.has("applyFailReason") '> and apply_fail_reason = #{applyFailReason} </if>-->
|
|
|
|
+<!-- <if test=' this.has("distribution") '> and distribution = #{distribution} </if>-->
|
|
|
|
+<!-- <if test=' this.has("confirm") '> and confirm = #{confirm} </if>-->
|
|
|
|
+<!-- <if test=' this.has("pick") '> and pick = #{pick} </if>-->
|
|
|
|
+<!-- <if test=' this.has("pickTime") '> and pick_time = #{pickTime} </if>-->
|
|
|
|
+<!-- <if test=' this.has("shopId") '> and shop_id = #{shopId} </if>-->
|
|
|
|
+<!-- <if test=' this.has("shopName") '> and shop_name = #{shopName} </if>-->
|
|
|
|
+<!-- <if test=' this.has("send") '> and send = #{send} </if>-->
|
|
|
|
+<!-- <if test=' this.has("sendTime") '> and send_time = #{sendTime} </if>-->
|
|
|
|
+<!-- <if test=' this.has("levelTwoOrderId") '> and level_two_order_id = #{levelTwoOrderId} </if>-->
|
|
|
|
+<!-- <if test=' this.has("createTime") '> and create_time = #{createTime} </if>-->
|
|
|
|
+<!-- <if test=' this.has("createBy") '> and create_by = #{createBy} </if>-->
|
|
|
|
+<!-- <if test=' this.has("createName") '> and create_name = #{createName} </if>-->
|
|
|
|
+<!-- <if test=' this.has("updateTime") '> and update_time = #{updateTime} </if>-->
|
|
|
|
+<!-- <if test=' this.has("updateBy") '> and update_by = #{updateBy} </if>-->
|
|
|
|
+<!-- <if test=' this.has("updateName") '> and update_name = #{updateName} </if>-->
|
|
|
|
+<!-- <if test=' this.has("deleteStatus") '> and delete_status = #{deleteStatus} </if>-->
|
|
|
|
+<!-- </where>-->
|
|
|
|
+<!-- order by-->
|
|
|
|
+<!-- <choose>-->
|
|
|
|
+<!-- <when test='sortType == 1'> id desc </when>-->
|
|
|
|
+<!-- <when test='sortType == 2'> trade_area_id desc </when>-->
|
|
|
|
+<!-- <when test='sortType == 3'> trade_area_name desc </when>-->
|
|
|
|
+<!-- <when test='sortType == 4'> address_ids desc </when>-->
|
|
|
|
+<!-- <when test='sortType == 5'> sale_main_id desc </when>-->
|
|
|
|
+<!-- <when test='sortType == 6'> trade_no desc </when>-->
|
|
|
|
+<!-- <when test='sortType == 7'> buy_user_id desc </when>-->
|
|
|
|
+<!-- <when test='sortType == 8'> buy_user_name desc </when>-->
|
|
|
|
+<!-- <when test='sortType == 9'> buy_user_type desc </when>-->
|
|
|
|
+<!-- <when test='sortType == 10'> enterprise_id desc </when>-->
|
|
|
|
+<!-- <when test='sortType == 11'> enterprise_name desc </when>-->
|
|
|
|
+<!-- <when test='sortType == 12'> total_weight desc </when>-->
|
|
|
|
+<!-- <when test='sortType == 13'> total_price desc </when>-->
|
|
|
|
+<!-- <when test='sortType == 14'> trade_time desc </when>-->
|
|
|
|
+<!-- <when test='sortType == 15'> trade_status desc </when>-->
|
|
|
|
+<!-- <when test='sortType == 16'> pay_type desc </when>-->
|
|
|
|
+<!-- <when test='sortType == 17'> settle_time desc </when>-->
|
|
|
|
+<!-- <when test='sortType == 18'> real_price desc </when>-->
|
|
|
|
+<!-- <when test='sortType == 19'> should_price desc </when>-->
|
|
|
|
+<!-- <when test='sortType == 20'> settle_user_id desc </when>-->
|
|
|
|
+<!-- <when test='sortType == 21'> record_user_id desc </when>-->
|
|
|
|
+<!-- <when test='sortType == 22'> record_time desc </when>-->
|
|
|
|
+<!-- <when test='sortType == 23'> record desc </when>-->
|
|
|
|
+<!-- <when test='sortType == 24'> refund_reason desc </when>-->
|
|
|
|
+<!-- <when test='sortType == 25'> refund_time desc </when>-->
|
|
|
|
+<!-- <when test='sortType == 26'> receive_name desc </when>-->
|
|
|
|
+<!-- <when test='sortType == 27'> receive_phone desc </when>-->
|
|
|
|
+<!-- <when test='sortType == 28'> receive_address desc </when>-->
|
|
|
|
+<!-- <when test='sortType == 29'> out_time desc </when>-->
|
|
|
|
+<!-- <when test='sortType == 30'> goods_names desc </when>-->
|
|
|
|
+<!-- <when test='sortType == 31'> apply desc </when>-->
|
|
|
|
+<!-- <when test='sortType == 32'> apply_time desc </when>-->
|
|
|
|
+<!-- <when test='sortType == 33'> apply_result desc </when>-->
|
|
|
|
+<!-- <when test='sortType == 34'> apply_fail_reason desc </when>-->
|
|
|
|
+<!-- <when test='sortType == 35'> distribution desc </when>-->
|
|
|
|
+<!-- <when test='sortType == 36'> confirm desc </when>-->
|
|
|
|
+<!-- <when test='sortType == 37'> pick desc </when>-->
|
|
|
|
+<!-- <when test='sortType == 38'> pick_time desc </when>-->
|
|
|
|
+<!-- <when test='sortType == 39'> shop_id desc </when>-->
|
|
|
|
+<!-- <when test='sortType == 40'> shop_name desc </when>-->
|
|
|
|
+<!-- <when test='sortType == 41'> send desc </when>-->
|
|
|
|
+<!-- <when test='sortType == 42'> send_time desc </when>-->
|
|
|
|
+<!-- <when test='sortType == 43'> level_two_order_id desc </when>-->
|
|
|
|
+<!-- <when test='sortType == 44'> create_time desc </when>-->
|
|
|
|
+<!-- <when test='sortType == 45'> create_by desc </when>-->
|
|
|
|
+<!-- <when test='sortType == 46'> create_name desc </when>-->
|
|
|
|
+<!-- <when test='sortType == 47'> update_time desc </when>-->
|
|
|
|
+<!-- <when test='sortType == 48'> update_by desc </when>-->
|
|
|
|
+<!-- <when test='sortType == 49'> update_name desc </when>-->
|
|
|
|
+<!-- <when test='sortType == 50'> delete_status desc </when>-->
|
|
|
|
+<!-- <otherwise> id desc </otherwise>-->
|
|
|
|
+<!-- </choose>-->
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+</mapper>
|