<?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.stylefeng.guns.modular.crossCity.dao.LineMapper">
|
|
<!-- 通用查询映射结果 -->
|
<resultMap id="BaseResultMap" type="com.stylefeng.guns.modular.crossCity.model.Line">
|
<id column="id" property="id"/>
|
<result column="name" property="name"/>
|
<result column="shiftInterval" property="shiftInterval"/>
|
<result column="rakeRate" property="rakeRate"/>
|
<result column="state" property="state"/>
|
<result column="insertTime" property="insertTime"/>
|
</resultMap>
|
|
|
<select id="queryLines" resultType="map">
|
select
|
a.id as id,
|
a.name as name,
|
c.name as siteName
|
from t_line a
|
left join t_line_site b on (a.id = b.lineId)
|
left join t_site c on (b.siteId = c.id)
|
where a.state = 1 and b.siteId = #{siteId} and b.type = #{type}
|
</select>
|
|
|
<select id="scanCodeQueryLines" resultType="map">
|
select
|
b.id as id,
|
b.`name` as `name`
|
from t_driver_line a
|
left join t_line b on (a.lineId = b.id)
|
where b.state = 1 and a.driverId = #{driverId}
|
</select>
|
</mapper>
|