|
@@ -7,7 +7,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<resultMap type="StationInfo" id="StationInfoResult">
|
|
<resultMap type="StationInfo" id="StationInfoResult">
|
|
|
<result property="stationId" column="station_id" />
|
|
<result property="stationId" column="station_id" />
|
|
|
<result property="stationName" column="station_name" />
|
|
<result property="stationName" column="station_name" />
|
|
|
- <result property="stationNo" column="station_no" />
|
|
|
|
|
<result property="stationAddress" column="station_address" />
|
|
<result property="stationAddress" column="station_address" />
|
|
|
<result property="oilGunNum" column="oil_gun_num" />
|
|
<result property="oilGunNum" column="oil_gun_num" />
|
|
|
<result property="contacts" column="contacts" />
|
|
<result property="contacts" column="contacts" />
|
|
@@ -17,17 +16,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="stationPic" column="station_pic" />
|
|
<result property="stationPic" column="station_pic" />
|
|
|
<result property="stationLongitude" column="station_longitude" />
|
|
<result property="stationLongitude" column="station_longitude" />
|
|
|
<result property="stationLatitude" column="station_latitude" />
|
|
<result property="stationLatitude" column="station_latitude" />
|
|
|
|
|
+ <result property="mno" column="mno" />
|
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
|
|
<sql id="selectStationInfoVo">
|
|
<sql id="selectStationInfoVo">
|
|
|
- select station_id, station_name, station_no, station_address, oil_gun_num, contacts, phone, station_group_id, station_group_name, station_pic, station_longitude, station_latitude from station_info
|
|
|
|
|
|
|
+ select station_id, station_name, station_address, oil_gun_num, contacts, phone, station_group_id, station_group_name, station_pic, station_longitude, station_latitude, mno from station_info
|
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
|
|
<select id="selectStationInfoList" parameterType="StationInfo" resultMap="StationInfoResult">
|
|
<select id="selectStationInfoList" parameterType="StationInfo" resultMap="StationInfoResult">
|
|
|
<include refid="selectStationInfoVo"/>
|
|
<include refid="selectStationInfoVo"/>
|
|
|
<where>
|
|
<where>
|
|
|
<if test="stationName != null and stationName != ''"> and station_name like concat('%', #{stationName}, '%')</if>
|
|
<if test="stationName != null and stationName != ''"> and station_name like concat('%', #{stationName}, '%')</if>
|
|
|
- <if test="stationNo != null and stationNo != ''"> and station_no = #{stationNo}</if>
|
|
|
|
|
<if test="stationAddress != null and stationAddress != ''"> and station_address = #{stationAddress}</if>
|
|
<if test="stationAddress != null and stationAddress != ''"> and station_address = #{stationAddress}</if>
|
|
|
<if test="oilGunNum != null "> and oil_gun_num = #{oilGunNum}</if>
|
|
<if test="oilGunNum != null "> and oil_gun_num = #{oilGunNum}</if>
|
|
|
<if test="contacts != null and contacts != ''"> and contacts = #{contacts}</if>
|
|
<if test="contacts != null and contacts != ''"> and contacts = #{contacts}</if>
|
|
@@ -37,6 +36,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="stationPic != null and stationPic != ''"> and station_pic = #{stationPic}</if>
|
|
<if test="stationPic != null and stationPic != ''"> and station_pic = #{stationPic}</if>
|
|
|
<if test="stationLongitude != null and stationLongitude != ''"> and station_longitude = #{stationLongitude}</if>
|
|
<if test="stationLongitude != null and stationLongitude != ''"> and station_longitude = #{stationLongitude}</if>
|
|
|
<if test="stationLatitude != null and stationLatitude != ''"> and station_latitude = #{stationLatitude}</if>
|
|
<if test="stationLatitude != null and stationLatitude != ''"> and station_latitude = #{stationLatitude}</if>
|
|
|
|
|
+ <if test="mno != null "> and mno = #{mno}</if>
|
|
|
</where>
|
|
</where>
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
@@ -50,7 +50,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
<if test="stationId != null">station_id,</if>
|
|
<if test="stationId != null">station_id,</if>
|
|
|
<if test="stationName != null">station_name,</if>
|
|
<if test="stationName != null">station_name,</if>
|
|
|
- <if test="stationNo != null">station_no,</if>
|
|
|
|
|
<if test="stationAddress != null">station_address,</if>
|
|
<if test="stationAddress != null">station_address,</if>
|
|
|
<if test="oilGunNum != null">oil_gun_num,</if>
|
|
<if test="oilGunNum != null">oil_gun_num,</if>
|
|
|
<if test="contacts != null">contacts,</if>
|
|
<if test="contacts != null">contacts,</if>
|
|
@@ -60,11 +59,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="stationPic != null">station_pic,</if>
|
|
<if test="stationPic != null">station_pic,</if>
|
|
|
<if test="stationLongitude != null">station_longitude,</if>
|
|
<if test="stationLongitude != null">station_longitude,</if>
|
|
|
<if test="stationLatitude != null">station_latitude,</if>
|
|
<if test="stationLatitude != null">station_latitude,</if>
|
|
|
|
|
+ <if test="mno != null">mno,</if>
|
|
|
</trim>
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="stationId != null">#{stationId},</if>
|
|
<if test="stationId != null">#{stationId},</if>
|
|
|
<if test="stationName != null">#{stationName},</if>
|
|
<if test="stationName != null">#{stationName},</if>
|
|
|
- <if test="stationNo != null">#{stationNo},</if>
|
|
|
|
|
<if test="stationAddress != null">#{stationAddress},</if>
|
|
<if test="stationAddress != null">#{stationAddress},</if>
|
|
|
<if test="oilGunNum != null">#{oilGunNum},</if>
|
|
<if test="oilGunNum != null">#{oilGunNum},</if>
|
|
|
<if test="contacts != null">#{contacts},</if>
|
|
<if test="contacts != null">#{contacts},</if>
|
|
@@ -74,6 +73,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="stationPic != null">#{stationPic},</if>
|
|
<if test="stationPic != null">#{stationPic},</if>
|
|
|
<if test="stationLongitude != null">#{stationLongitude},</if>
|
|
<if test="stationLongitude != null">#{stationLongitude},</if>
|
|
|
<if test="stationLatitude != null">#{stationLatitude},</if>
|
|
<if test="stationLatitude != null">#{stationLatitude},</if>
|
|
|
|
|
+ <if test="mno != null">#{mno},</if>
|
|
|
</trim>
|
|
</trim>
|
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
|
@@ -81,7 +81,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
update station_info
|
|
update station_info
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
<if test="stationName != null">station_name = #{stationName},</if>
|
|
<if test="stationName != null">station_name = #{stationName},</if>
|
|
|
- <if test="stationNo != null">station_no = #{stationNo},</if>
|
|
|
|
|
<if test="stationAddress != null">station_address = #{stationAddress},</if>
|
|
<if test="stationAddress != null">station_address = #{stationAddress},</if>
|
|
|
<if test="oilGunNum != null">oil_gun_num = #{oilGunNum},</if>
|
|
<if test="oilGunNum != null">oil_gun_num = #{oilGunNum},</if>
|
|
|
<if test="contacts != null">contacts = #{contacts},</if>
|
|
<if test="contacts != null">contacts = #{contacts},</if>
|
|
@@ -91,6 +90,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="stationPic != null">station_pic = #{stationPic},</if>
|
|
<if test="stationPic != null">station_pic = #{stationPic},</if>
|
|
|
<if test="stationLongitude != null">station_longitude = #{stationLongitude},</if>
|
|
<if test="stationLongitude != null">station_longitude = #{stationLongitude},</if>
|
|
|
<if test="stationLatitude != null">station_latitude = #{stationLatitude},</if>
|
|
<if test="stationLatitude != null">station_latitude = #{stationLatitude},</if>
|
|
|
|
|
+ <if test="mno != null">mno = #{mno},</if>
|
|
|
</trim>
|
|
</trim>
|
|
|
where station_id = #{stationId}
|
|
where station_id = #{stationId}
|
|
|
</update>
|
|
</update>
|