<?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.ruoyi.system.mapper.DriverMapper">
|
|
|
<select id="getDriverList" resultType="com.ruoyi.system.query.DriverListResp">
|
select a.id,
|
a.name as driverName,
|
b.name as enterpriseName,
|
a.driving_license_number as drivingLicenseNumber,
|
a.mailing_address as mailingAddress,
|
a.emergency_contact as emergencyContact,
|
a.emergency_phone as emergencyPhone,
|
a.phone,
|
a.contracting_company as contractingCompany
|
from t_driver a
|
left join t_enterprise b on (a.enterprise_id = b.id)
|
<where>
|
<if test="null != item.driverName and '' != item.driverName">
|
and a.name like CONCAT('%', #{item.driverName}, '%')
|
</if>
|
<if test="null != item.enterpriseName and '' != item.enterpriseName">
|
and b.name like CONCAT('%', #{item.enterpriseName}, '%')
|
</if>
|
<if test="null != item.phone and '' != item.phone">
|
and a.phone like CONCAT('%', #{item.phone}, '%')
|
</if>
|
<if test="null != item.emergencyContact and '' != item.emergencyContact">
|
and a.emergency_contact like CONCAT('%', #{item.emergencyContact}, '%')
|
</if>
|
</where>
|
order by a.update_time desc
|
</select>
|
|
</mapper>
|