|
@@ -0,0 +1,106 @@
|
|
|
+<?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">
|
|
|
+<!-- namespace必须指向DAO接口 -->
|
|
|
+<mapper namespace="com.jpsoft.bus.modules.bus.dao.StationSubInfoDAO">
|
|
|
+ <resultMap id="StationSubInfoMap" type="com.jpsoft.bus.modules.bus.entity.StationSubInfo">
|
|
|
+ <id property="id" column="id_" />
|
|
|
+ <result property="stationId" column="station_id" />
|
|
|
+ <result property="startStationId" column="start_station_id" />
|
|
|
+ <result property="endStationId" column="end_station_id" />
|
|
|
+ <result property="longitude" column="longitude_" />
|
|
|
+ <result property="latitude" column="latitude_" />
|
|
|
+ <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="delFlag" column="del_flag" />
|
|
|
+ </resultMap>
|
|
|
+ <insert id="insert" parameterType="com.jpsoft.bus.modules.bus.entity.StationSubInfo">
|
|
|
+ <!--
|
|
|
+ <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
|
|
|
+ select sys_guid() from dual
|
|
|
+ </selectKey>
|
|
|
+ -->
|
|
|
+ <![CDATA[
|
|
|
+ insert into bus_station_sub_info
|
|
|
+ (id_,station_id,start_station_id,end_station_id,longitude_,latitude_,create_by,create_time,update_by,update_time,del_flag)
|
|
|
+ values
|
|
|
+ (
|
|
|
+#{id,jdbcType=VARCHAR}
|
|
|
+,#{stationId,jdbcType=VARCHAR}
|
|
|
+,#{startStationId,jdbcType=VARCHAR}
|
|
|
+,#{endStationId,jdbcType=VARCHAR}
|
|
|
+,#{longitude,jdbcType= NUMERIC }
|
|
|
+,#{latitude,jdbcType= NUMERIC }
|
|
|
+,#{createBy,jdbcType=VARCHAR}
|
|
|
+,#{createTime,jdbcType= TIMESTAMP }
|
|
|
+,#{updateBy,jdbcType=VARCHAR}
|
|
|
+,#{updateTime,jdbcType= TIMESTAMP }
|
|
|
+,#{delFlag,jdbcType= NUMERIC }
|
|
|
+ )
|
|
|
+ ]]>
|
|
|
+ </insert>
|
|
|
+ <delete id="delete" parameterType="string">
|
|
|
+ delete from bus_station_sub_info where id_=#{id,jdbcType=VARCHAR}
|
|
|
+ </delete>
|
|
|
+ <update id="update" parameterType="com.jpsoft.bus.modules.bus.entity.StationSubInfo">
|
|
|
+ update bus_station_sub_info
|
|
|
+ <set>
|
|
|
+ <if test="stationId!=null">
|
|
|
+ station_id=#{stationId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="startStationId!=null">
|
|
|
+ start_station_id=#{startStationId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="endStationId!=null">
|
|
|
+ end_station_id=#{endStationId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="longitude!=null">
|
|
|
+ longitude_=#{longitude,jdbcType= NUMERIC },
|
|
|
+ </if>
|
|
|
+ <if test="latitude!=null">
|
|
|
+ latitude_=#{latitude,jdbcType= NUMERIC },
|
|
|
+ </if>
|
|
|
+ <if test="createBy!=null">
|
|
|
+ create_by=#{createBy,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="createTime!=null">
|
|
|
+ create_time=#{createTime,jdbcType= TIMESTAMP },
|
|
|
+ </if>
|
|
|
+ <if test="updateBy!=null">
|
|
|
+ update_by=#{updateBy,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="updateTime!=null">
|
|
|
+ update_time=#{updateTime,jdbcType= TIMESTAMP },
|
|
|
+ </if>
|
|
|
+ <if test="delFlag!=null">
|
|
|
+ del_flag=#{delFlag,jdbcType= NUMERIC },
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where id_=#{id}
|
|
|
+ </update>
|
|
|
+ <select id="get" parameterType="string" resultMap="StationSubInfoMap">
|
|
|
+ select
|
|
|
+id_,station_id,start_station_id,end_station_id,longitude_,latitude_,create_by,create_time,update_by,update_time,del_flag from bus_station_sub_info where id_=#{0}
|
|
|
+ </select>
|
|
|
+ <select id="exist" parameterType="string" resultType="int">
|
|
|
+ select count(*) from bus_station_sub_info where id_=#{0}
|
|
|
+ </select>
|
|
|
+ <select id="list" resultMap="StationSubInfoMap">
|
|
|
+ select * from bus_station_sub_info
|
|
|
+ </select>
|
|
|
+ <select id="search" parameterType="hashmap" resultMap="StationSubInfoMap">
|
|
|
+ <![CDATA[
|
|
|
+ select * from bus_station_sub_info
|
|
|
+ ]]>
|
|
|
+ <where>
|
|
|
+ <if test="searchParams.id != null">
|
|
|
+ and ID_ like #{searchParams.id}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ <foreach item="sort" collection="sortList" open="order by" separator=",">
|
|
|
+ ${sort.name} ${sort.order}
|
|
|
+ </foreach>
|
|
|
+ </select>
|
|
|
+</mapper>
|