58 lines
2.8 KiB
XML
58 lines
2.8 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.njzscloud.dispose.cst.truck.mapper.TruckMapper">
|
|
|
|
<resultMap id="TruckResultMap" type="com.njzscloud.dispose.cst.truck.pojo.entity.TruckEntity">
|
|
<id column="id" property="id"/>
|
|
<result column="customer_id" property="customerId"/>
|
|
<result column="org_id" property="orgId"/>
|
|
<result column="license_plate" property="licensePlate"/>
|
|
<result column="truck_license" property="truckLicense"/>
|
|
<result column="vn_code" property="vnCode"/>
|
|
<result column="qualification" property="qualification"/>
|
|
<result column="carrying_capacity" property="carryingCapacity"/>
|
|
<result column="tare_weight" property="tareWeight"/>
|
|
<result column="license_start_date" property="licenseStartDate"/>
|
|
<result column="license_end_date" property="licenseEndDate"/>
|
|
<result column="qualification_start_date" property="qualificationStartDate"/>
|
|
<result column="qualification_end_date" property="qualificationEndDate"/>
|
|
<result column="truck_category" property="truckCategory"/>
|
|
<result column="picture" property="picture"/>
|
|
<result column="busy" property="busy"/>
|
|
<result column="creator_id" property="creatorId"/>
|
|
<result column="modifier_id" property="modifierId"/>
|
|
<result column="create_time" property="createTime"/>
|
|
<result column="modify_time" property="modifyTime"/>
|
|
<result column="deleted" property="deleted"/>
|
|
</resultMap>
|
|
|
|
<sql id="Base_Column_List">
|
|
id, customer_id, org_id, license_plate, truck_license, vn_code, qualification,
|
|
carrying_capacity, tare_weight, license_start_date, license_end_date,
|
|
qualification_start_date, qualification_end_date, truck_category, picture, busy,
|
|
creator_id, modifier_id, create_time, modify_time, deleted
|
|
</sql>
|
|
|
|
<select id="selectById" resultMap="TruckResultMap">
|
|
SELECT
|
|
<include refid="Base_Column_List"/>
|
|
FROM cst_truck
|
|
WHERE id = #{id}
|
|
</select>
|
|
|
|
<select id="selectList" resultMap="TruckResultMap">
|
|
SELECT
|
|
<include refid="Base_Column_List"/>
|
|
FROM cst_truck
|
|
<where>
|
|
<if test="customerId != null">AND customer_id = #{customerId}</if>
|
|
<if test="orgId != null">AND org_id = #{orgId}</if>
|
|
<if test="licensePlate != null and licensePlate != ''">AND license_plate = #{licensePlate}</if>
|
|
<if test="truckCategory != null and truckCategory != ''">AND truck_category = #{truckCategory}</if>
|
|
<if test="busy != null">AND busy = #{busy}</if>
|
|
<if test="deleted != null">AND deleted = #{deleted}</if>
|
|
</where>
|
|
ORDER BY create_time DESC
|
|
</select>
|
|
</mapper>
|