longz
2026-04-22 2ba432c43dad7439b19fbfca12757d5530897db3
UserYKDTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/crossCity/dao/mapping/LineMapper.xml
@@ -22,6 +22,7 @@
        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}
        order by a.id asc
    </select>
@@ -33,4 +34,42 @@
        left join t_line b on (a.lineId = b.id)
        where b.state = 1 and a.driverId = #{driverId}
    </select>
</mapper>
    <select id="queryFutureLinesByDriver" resultType="map">
        select
        l.id as id,
        l.`name` as `name`,
        min(str_to_date(concat(date_format(lsd.`day`, '%Y-%m-%d'), ' ', ls.startTime), '%Y-%m-%d %H:%i')) as departTime
        from t_line_shift_driver lsd
        left join t_line_shift ls on ls.id = lsd.lineShiftId
        left join t_line l on l.id = ls.lineId
        where lsd.driverId = #{driverId}
          and lsd.`day` is not null
          and ls.state = 1
          and l.state = 1
          and str_to_date(concat(date_format(lsd.`day`, '%Y-%m-%d'), ' ', ls.startTime), '%Y-%m-%d %H:%i') >= now()
        group by l.id, l.`name`
        order by departTime asc, l.id asc
    </select>
    <select id="queryLineDestinations" resultType="map">
        select
        id,
        lineId,
        `name`,
        fenceType,
        coordinate,
        defaultPointLon,
        defaultPointLat,
        price5,
        price7,
        `state`,
        isMain,
        addTime,
        insertTime
        from t_line_destination
        where lineId = #{lineId}
          and state != 3
        order by isMain desc, id asc
    </select>
</mapper>