2025-09-22 17:06:47 +08:00
|
|
|
<?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.cms.mapper.SubwayLineMapper">
|
|
|
|
|
|
|
|
|
|
<resultMap type="SubwayLine" id="SubwayLineResult">
|
|
|
|
|
<result property="lineId" column="line_id" />
|
|
|
|
|
<result property="lineName" column="line_name" />
|
|
|
|
|
<result property="delFlag" column="del_flag" />
|
|
|
|
|
<result property="createBy" column="create_by" />
|
|
|
|
|
<result property="createTime" column="create_time" />
|
|
|
|
|
<result property="updateBy" column="update_by" />
|
|
|
|
|
<result property="updateTime" column="update_time" />
|
|
|
|
|
<result property="remark" column="remark" />
|
|
|
|
|
</resultMap>
|
|
|
|
|
<resultMap type="SubwayLine" id="SubwayLineStationResult">
|
|
|
|
|
<id property="lineId" column="line_id" />
|
|
|
|
|
<result property="lineName" column="line_name" />
|
|
|
|
|
<collection property="subwayStationList" javaType="java.util.List" resultMap="stationList" />
|
|
|
|
|
</resultMap>
|
|
|
|
|
<resultMap type="SubwayStation" id="stationList">
|
|
|
|
|
<id property="stationId" column="station_id" />
|
|
|
|
|
<result property="lineId" column="line_id" />
|
|
|
|
|
<result property="stationName" column="station_name" />
|
|
|
|
|
<result property="lineName" column="line_name" />
|
|
|
|
|
<result property="latitude" column="latitude" />
|
|
|
|
|
<result property="longitude" column="longitude" />
|
|
|
|
|
</resultMap>
|
|
|
|
|
<sql id="selectSubwayLineVo">
|
|
|
|
|
select line_id, line_name, del_flag, create_by, create_time, update_by, update_time, remark from subway_line
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<select id="selectSubwayLineList" parameterType="SubwayLine" resultMap="SubwayLineResult">
|
|
|
|
|
<include refid="selectSubwayLineVo"/>
|
2025-09-24 10:49:59 +08:00
|
|
|
<where> del_flag = '0'
|
2025-11-21 12:32:36 +08:00
|
|
|
<if test="lineName != null and lineName != ''"> and line_name like concat('%', cast(#{lineName, jdbcType=VARCHAR} as varchar), '%')</if>
|
2025-09-22 17:06:47 +08:00
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
<select id="appSubway" resultMap="SubwayLineStationResult">
|
|
|
|
|
select l.line_id, l.line_name,s.station_id, s.station_name, s.line_name,s.latitude, s.longitude,s.station_order
|
|
|
|
|
from subway_line as l
|
|
|
|
|
inner join subway_station as s on s.line_id = l.line_id
|
2025-09-24 10:49:59 +08:00
|
|
|
where l.del_flag = '0' and s.del_flag = '0'
|
2025-09-22 17:06:47 +08:00
|
|
|
</select>
|
|
|
|
|
</mapper>
|