|
@@ -0,0 +1,96 @@
|
|
|
|
+<?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.PassengerMessageDAO">
|
|
|
|
+ <resultMap id="PassengerMessageMap" type="com.jpsoft.bus.modules.bus.entity.PassengerMessage">
|
|
|
|
+ <id property="id" column="id_" />
|
|
|
|
+ <result property="openId" column="open_id" />
|
|
|
|
+ <result property="passengerId" column="passenger_id" />
|
|
|
|
+ <result property="readStatus" column="read_status" />
|
|
|
|
+ <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.PassengerMessage">
|
|
|
|
+ <!--
|
|
|
|
+ <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
|
|
|
|
+ select sys_guid() from dual
|
|
|
|
+ </selectKey>
|
|
|
|
+ -->
|
|
|
|
+ <![CDATA[
|
|
|
|
+ insert into bus_passenger_message
|
|
|
|
+ (id_,open_id,passenger_id,read_status,create_by,create_time,update_by,update_time,del_flag)
|
|
|
|
+ values
|
|
|
|
+ (
|
|
|
|
+#{id,jdbcType=VARCHAR}
|
|
|
|
+,#{openId,jdbcType=VARCHAR}
|
|
|
|
+,#{passengerId,jdbcType=VARCHAR}
|
|
|
|
+,#{readStatus,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_passenger_message where id_=#{id,jdbcType=VARCHAR}
|
|
|
|
+ </delete>
|
|
|
|
+ <update id="update" parameterType="com.jpsoft.bus.modules.bus.entity.PassengerMessage">
|
|
|
|
+ update bus_passenger_message
|
|
|
|
+ <set>
|
|
|
|
+ <if test="openId!=null">
|
|
|
|
+ open_id=#{openId,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="passengerId!=null">
|
|
|
|
+ passenger_id=#{passengerId,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="readStatus!=null">
|
|
|
|
+ read_status=#{readStatus,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="PassengerMessageMap">
|
|
|
|
+ select
|
|
|
|
+id_,open_id,passenger_id,read_status,create_by,create_time,update_by,update_time,del_flag from bus_passenger_message where id_=#{0}
|
|
|
|
+ </select>
|
|
|
|
+ <select id="exist" parameterType="string" resultType="int">
|
|
|
|
+ select count(*) from bus_passenger_message where id_=#{0}
|
|
|
|
+ </select>
|
|
|
|
+ <select id="list" resultMap="PassengerMessageMap">
|
|
|
|
+ select * from bus_passenger_message
|
|
|
|
+ </select>
|
|
|
|
+ <select id="search" parameterType="hashmap" resultMap="PassengerMessageMap">
|
|
|
|
+ <![CDATA[
|
|
|
|
+ select * from bus_passenger_message
|
|
|
|
+ ]]>
|
|
|
|
+ <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>
|