|
@@ -0,0 +1,111 @@
|
|
|
+<?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.project.tb_collage_orders.TbCollageOrdersMapper">
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <!-- ================================== 查询相关 ================================== -->
|
|
|
+ <!-- select id, trade_area_id, trade_area_name, order_no, cooperative_id, cooperative_name, total_price, entry_people_status, entry_leader_status, entry_customs_status, entry_no, entry_time, entry_result, entry_fail_reason, import_people_status, import_leader_status, import_no, import_time, is_delivery, order_finish, driver_id, driver_name, driver_phone, car_id, car_type, vehicle_plate, loading_address, unloading_address, create_by, create_name, create_time, update_by, update_name, update_time, delete_status from tb_collage_orders -->
|
|
|
+
|
|
|
+ <!-- 通用映射:自动模式 -->
|
|
|
+ <resultMap id="model" autoMapping="true" type="com.pj.project.tb_collage_orders.TbCollageOrders"></resultMap>
|
|
|
+
|
|
|
+ <!-- 公共查询sql片段 -->
|
|
|
+ <sql id="select_sql">
|
|
|
+ select *
|
|
|
+ from tb_collage_orders
|
|
|
+ </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("orderNo") '> and order_no = #{orderNo} </if>
|
|
|
+ <if test=' this.has("cooperativeId") '> and cooperative_id = #{cooperativeId} </if>
|
|
|
+ <if test=' this.has("cooperativeName") '> and cooperative_name = #{cooperativeName} </if>
|
|
|
+ <if test=' this.has("totalPrice") '> and total_price = #{totalPrice} </if>
|
|
|
+ <if test=' this.has("entryPeopleStatus") '> and entry_people_status = #{entryPeopleStatus} </if>
|
|
|
+ <if test=' this.has("entryLeaderStatus") '> and entry_leader_status = #{entryLeaderStatus} </if>
|
|
|
+ <if test=' this.has("entryCustomsStatus") '> and entry_customs_status = #{entryCustomsStatus} </if>
|
|
|
+ <if test=' this.has("entryNo") '> and entry_no = #{entryNo} </if>
|
|
|
+ <if test=' this.has("entryTime") '> and entry_time = #{entryTime} </if>
|
|
|
+ <if test=' this.has("entryResult") '> and entry_result = #{entryResult} </if>
|
|
|
+ <if test=' this.has("entryFailReason") '> and entry_fail_reason = #{entryFailReason} </if>
|
|
|
+ <if test=' this.has("importPeopleStatus") '> and import_people_status = #{importPeopleStatus} </if>
|
|
|
+ <if test=' this.has("importLeaderStatus") '> and import_leader_status = #{importLeaderStatus} </if>
|
|
|
+ <if test=' this.has("importNo") '> and import_no = #{importNo} </if>
|
|
|
+ <if test=' this.has("importTime") '> and import_time = #{importTime} </if>
|
|
|
+ <if test=' this.has("isDelivery") '> and is_delivery = #{isDelivery} </if>
|
|
|
+ <if test=' this.has("orderFinish") '> and order_finish = #{orderFinish} </if>
|
|
|
+ <if test=' this.has("driverId") '> and driver_id = #{driverId} </if>
|
|
|
+ <if test=' this.has("driverName") '> and driver_name = #{driverName} </if>
|
|
|
+ <if test=' this.has("driverPhone") '> and driver_phone = #{driverPhone} </if>
|
|
|
+ <if test=' this.has("carId") '> and car_id = #{carId} </if>
|
|
|
+ <if test=' this.has("carType") '> and car_type = #{carType} </if>
|
|
|
+ <if test=' this.has("vehiclePlate") '> and vehicle_plate = #{vehiclePlate} </if>
|
|
|
+ <if test=' this.has("loadingAddress") '> and loading_address = #{loadingAddress} </if>
|
|
|
+ <if test=' this.has("unloadingAddress") '> and unloading_address = #{unloadingAddress} </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("createTime") '> and create_time = #{createTime} </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("updateTime") '> and update_time = #{updateTime} </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'> order_no desc </when>
|
|
|
+ <when test='sortType == 5'> cooperative_id desc </when>
|
|
|
+ <when test='sortType == 6'> cooperative_name desc </when>
|
|
|
+ <when test='sortType == 7'> total_price desc </when>
|
|
|
+ <when test='sortType == 8'> entry_people_status desc </when>
|
|
|
+ <when test='sortType == 9'> entry_leader_status desc </when>
|
|
|
+ <when test='sortType == 10'> entry_customs_status desc </when>
|
|
|
+ <when test='sortType == 11'> entry_no desc </when>
|
|
|
+ <when test='sortType == 12'> entry_time desc </when>
|
|
|
+ <when test='sortType == 13'> entry_result desc </when>
|
|
|
+ <when test='sortType == 14'> entry_fail_reason desc </when>
|
|
|
+ <when test='sortType == 15'> import_people_status desc </when>
|
|
|
+ <when test='sortType == 16'> import_leader_status desc </when>
|
|
|
+ <when test='sortType == 17'> import_no desc </when>
|
|
|
+ <when test='sortType == 18'> import_time desc </when>
|
|
|
+ <when test='sortType == 19'> is_delivery desc </when>
|
|
|
+ <when test='sortType == 20'> order_finish desc </when>
|
|
|
+ <when test='sortType == 21'> driver_id desc </when>
|
|
|
+ <when test='sortType == 22'> driver_name desc </when>
|
|
|
+ <when test='sortType == 23'> driver_phone desc </when>
|
|
|
+ <when test='sortType == 24'> car_id desc </when>
|
|
|
+ <when test='sortType == 25'> car_type desc </when>
|
|
|
+ <when test='sortType == 26'> vehicle_plate desc </when>
|
|
|
+ <when test='sortType == 27'> loading_address desc </when>
|
|
|
+ <when test='sortType == 28'> unloading_address desc </when>
|
|
|
+ <when test='sortType == 29'> create_by desc </when>
|
|
|
+ <when test='sortType == 30'> create_name desc </when>
|
|
|
+ <when test='sortType == 31'> create_time desc </when>
|
|
|
+ <when test='sortType == 32'> update_by desc </when>
|
|
|
+ <when test='sortType == 33'> update_name desc </when>
|
|
|
+ <when test='sortType == 34'> update_time desc </when>
|
|
|
+ <when test='sortType == 35'> delete_status desc </when>
|
|
|
+ <otherwise> id desc </otherwise>
|
|
|
+ </choose>
|
|
|
+ </select>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+</mapper>
|