46 lines
1.7 KiB
XML
46 lines
1.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.njzscloud.supervisory.biz.mapper.BizDriverMapper">
|
|
|
|
<!-- 分页查询司机信息,包含清运公司名称 -->
|
|
<select id="selectPageWithCompanyName" resultType="com.njzscloud.supervisory.biz.pojo.entity.BizDriverEntity">
|
|
SELECT
|
|
d.id,
|
|
d.user_id,
|
|
d.company_id,
|
|
d.driver_name,
|
|
d.phone,
|
|
d.driving_licence,
|
|
d.licence_start_time,
|
|
d.licence_end_time,
|
|
d.audit_status,
|
|
d.audit_memo,
|
|
d.creator_id,
|
|
d.modifier_id,
|
|
d.create_time,
|
|
d.modify_time,
|
|
d.deleted,
|
|
d.busy,
|
|
d.driving_licence_no,
|
|
c.company_name
|
|
FROM biz_driver d
|
|
LEFT JOIN biz_company c ON d.company_id = c.id
|
|
<if test="ew.customSqlSegment != null and ew.customSqlSegment != ''">
|
|
${ew.customSqlSegment}
|
|
</if>
|
|
ORDER BY d.modify_time DESC
|
|
</select>
|
|
<resultMap id="driverCantDelMap" type="com.njzscloud.supervisory.biz.pojo.result.DriverCantDelResult">
|
|
<result column="order_status" property="orderStatus" typeHandler="com.njzscloud.common.mp.support.handler.e.EnumTypeHandlerDealer"/>
|
|
</resultMap>
|
|
<select id="driverCantDel" resultMap="driverCantDelMap">
|
|
SELECT b.driver_name, a.sn, a.order_status
|
|
FROM order_info a
|
|
INNER JOIN biz_driver b ON b.id = a.driver_id AND b.deleted = 0
|
|
<if test="ew.customSqlSegment != null and ew.customSqlSegment != ''">
|
|
${ew.customSqlSegment}
|
|
</if>
|
|
</select>
|
|
|
|
</mapper>
|