longz
2026-06-30 80fd77e1bcb47726e440b8a728838189cd39a56a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<?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
        from t_line a
        left join t_line_site b on (a.id = b.lineId)
        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>
 
    <select id="queryLineDestinations" resultType="map">
        select
        id,
        lineId,
        `name`,
        fenceType,
        coordinate,
        defaultPointLon,
        defaultPointLat,
        price5,
        price6,
        price7,
        `state`,
        isMain,
        addTime,
        insertTime
        from t_line_destination
        where lineId = #{lineId}
          and state != 3
        order by isMain desc, id asc
    </select>
 
    <select id="queryLineDestinationById" resultType="map">
        select
        id,
        lineId,
        fenceType,
        coordinate,
        defaultPointLon,
        defaultPointLat,
        price5,
        price6,
        price7,
        state
        from t_line_destination
        where id = #{id}
          and state != 3
        <if test="lineId != null">
            and lineId = #{lineId}
        </if>
        limit 1
    </select>
 
    <select id="queryLineCharterPrices" resultType="map">
        select
        id,
        charterPrice5,
        charterPrice6,
        charterPrice7
        from t_line
        where id = #{lineId}
          and state = 1
        limit 1
    </select>
</mapper>