|
@@ -6,12 +6,14 @@
|
|
|
<resultMap id="StationRemindMap" type="com.jpsoft.bus.modules.bus.entity.StationRemind">
|
|
|
<id property="id" column="id_"/>
|
|
|
<result property="startStationId" column="start_station_id"/>
|
|
|
+ <result property="endStationId" column="end_station_id"/>
|
|
|
<result property="remindStationId" column="remind_station_id"/>
|
|
|
<result property="advanceStationId" column="advance_station_id"/>
|
|
|
<result property="stopInAdvance" column="stop_in_advance"/>
|
|
|
<result property="openId" column="open_id"/>
|
|
|
<result property="remindType" column="remind_type"/>
|
|
|
<result property="vehicleShiftId" column="vehicle_shift_id"/>
|
|
|
+ <result property="routeId" column="route_id"/>
|
|
|
<result property="createBy" column="create_by"/>
|
|
|
<result property="createTime" column="create_time"/>
|
|
|
<result property="updateBy" column="update_by"/>
|
|
@@ -26,18 +28,20 @@
|
|
|
-->
|
|
|
<![CDATA[
|
|
|
insert into bus_station_remind
|
|
|
- (id_,start_station_id,remind_station_id,advance_station_id,
|
|
|
- stop_in_advance,open_id,remind_type,vehicle_shift_id,create_by,create_time,update_by,update_time,del_flag)
|
|
|
+ (id_,start_station_id,end_station_id,remind_station_id,advance_station_id,
|
|
|
+ stop_in_advance,open_id,remind_type,vehicle_shift_id,route_id,create_by,create_time,update_by,update_time,del_flag)
|
|
|
values
|
|
|
(
|
|
|
#{id,jdbcType= VARCHAR }
|
|
|
,#{startStationId,jdbcType=VARCHAR}
|
|
|
+ ,#{endStationId,jdbcType=VARCHAR}
|
|
|
,#{remindStationId,jdbcType=VARCHAR}
|
|
|
,#{advanceStationId,jdbcType=VARCHAR}
|
|
|
,#{stopInAdvance,jdbcType= NUMERIC }
|
|
|
,#{openId,jdbcType=VARCHAR}
|
|
|
,#{remindType,jdbcType= NUMERIC }
|
|
|
,#{vehicleShiftId,jdbcType=VARCHAR}
|
|
|
+ ,#{routeId,jdbcType=VARCHAR}
|
|
|
,#{createBy,jdbcType=VARCHAR}
|
|
|
,#{createTime,jdbcType= TIMESTAMP }
|
|
|
,#{updateBy,jdbcType=VARCHAR}
|
|
@@ -55,6 +59,9 @@
|
|
|
<if test="startStationId!=null">
|
|
|
start_station_id=#{startStationId,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="endStationId!=null">
|
|
|
+ end_station_id=#{endStationId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
<if test="remindStationId!=null">
|
|
|
remind_station_id=#{remindStationId,jdbcType=VARCHAR},
|
|
|
</if>
|
|
@@ -73,6 +80,9 @@
|
|
|
<if test="vehicleShiftId!=null">
|
|
|
vehicle_shift_id=#{vehicleShiftId,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="routeId!=null">
|
|
|
+ route_id=#{routeId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
<if test="createBy!=null">
|
|
|
create_by=#{createBy,jdbcType=VARCHAR},
|
|
|
</if>
|
|
@@ -92,10 +102,7 @@
|
|
|
where id_=#{id}
|
|
|
</update>
|
|
|
<select id="get" parameterType="string" resultMap="StationRemindMap">
|
|
|
- select
|
|
|
- id_,start_station_id,remind_station_id,stop_in_advance,advance_station_id,
|
|
|
- open_id,remind_type,vehicle_shift_id,create_by,create_time,update_by,update_time,del_flag
|
|
|
- from bus_station_remind
|
|
|
+ select * from bus_station_remind
|
|
|
where id_=#{0}
|
|
|
</select>
|
|
|
<select id="exist" parameterType="string" resultType="int">
|
|
@@ -136,10 +143,10 @@
|
|
|
|
|
|
<select id="findByOpenId" resultMap="StationRemindMap">
|
|
|
<![CDATA[
|
|
|
- select * from bus_station_remind
|
|
|
- where del_flag = 0
|
|
|
- and open_id = #{openId}
|
|
|
- order by create_time desc
|
|
|
+ select a.* from bus_station_remind a
|
|
|
+ where a.del_flag = 0
|
|
|
+ and a.open_id = #{openId}
|
|
|
+ order by a.create_time desc
|
|
|
]]>
|
|
|
</select>
|
|
|
</mapper>
|