100 lines
2.7 KiB
XML
100 lines
2.7 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.haitongauto.mapper.client.TruckExtendMapper">
|
||
<!--根据用户Id查车牌号-->
|
||
<select id="getTruckNumberForUid" resultType="com.haitongauto.models.pojo.Truck">
|
||
select
|
||
truck_number
|
||
from applet_truck
|
||
where is_del=0
|
||
and users_id=#{users_id}
|
||
limit 1
|
||
</select>
|
||
|
||
<!--获取指定用的板车信息-->
|
||
<select id="getPalletTruckForUsers" resultType="com.haitongauto.models.pojo.Truck">
|
||
select
|
||
id,
|
||
users_id,
|
||
truck_number,
|
||
driving_license_id,
|
||
tel_number,
|
||
head_frame_number,
|
||
vehicle_weight,
|
||
vehicle_frame_weight,
|
||
driving_license,
|
||
truck_state,
|
||
create_time,
|
||
update_time,
|
||
is_del
|
||
from applet_truck
|
||
where is_del=0
|
||
and users_id=#{users_id}
|
||
order by create_time desc
|
||
</select>
|
||
|
||
<!--根据车牌号查车辆信息-->
|
||
<select id="getPalletTruckForNumber" resultType="com.haitongauto.models.pojo.Truck">
|
||
select
|
||
id,
|
||
users_id,
|
||
truck_number,
|
||
driving_license_id,
|
||
tel_number,
|
||
head_frame_number,
|
||
vehicle_weight,
|
||
vehicle_frame_weight,
|
||
driving_license,
|
||
truck_state,
|
||
create_time,
|
||
update_time,
|
||
is_del
|
||
from applet_truck
|
||
where is_del=0
|
||
and truck_number=#{truck_number}
|
||
limit 1
|
||
</select>
|
||
|
||
<!--将指定用户的板车状态全部置为0,除非被列入黑名单的车辆-->
|
||
<update id="setTruckSateToGeneral" parameterType="String">
|
||
update applet_truck
|
||
set
|
||
truck_state=0
|
||
where users_id=#{users_id} and truck_state<>4
|
||
</update>
|
||
|
||
<!--我的车辆黑名单信息-->
|
||
<select id="getMyTruckManagement" resultType="com.haitongauto.models.pojo.TruckManagement">
|
||
select
|
||
id,
|
||
users_id,
|
||
truck_number,
|
||
cause,
|
||
drivers_name,
|
||
drivers_phone,
|
||
administrators_name,
|
||
administrators_phone,
|
||
enter_time,
|
||
create_time,
|
||
update_time,
|
||
is_del
|
||
from applet_truck_management
|
||
where is_del=0
|
||
and users_id=#{users_id}
|
||
order by create_time desc
|
||
</select>
|
||
|
||
<!--根据车牌号查用户Id-->
|
||
<select id="getUidByTruckNo" resultType="com.haitongauto.models.pojo.Users">
|
||
select
|
||
users_id
|
||
from applet_truck
|
||
where is_del=0
|
||
and truck_number=#{truck_number}
|
||
order by create_time desc
|
||
limit 1
|
||
</select>
|
||
|
||
</mapper> |