|
@@ -0,0 +1,121 @@
|
|
|
|
+<?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.RouteAccountDAO">
|
|
|
|
+ <resultMap id="RouteAccountMap" type="com.jpsoft.bus.modules.bus.entity.RouteAccount">
|
|
|
|
+ <id property="id" column="id_" />
|
|
|
|
+ <result property="name" column="name_" />
|
|
|
|
+ <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" />
|
|
|
|
+ <result property="mapPath" column="map_path" />
|
|
|
|
+ <result property="companyId" column="company_id" />
|
|
|
|
+ <result property="goodsId" column="goods_id" />
|
|
|
|
+ <result property="startTime" column="start_time" />
|
|
|
|
+ <result property="endTime" column="end_time" />
|
|
|
|
+ <result property="regionId" column="region_id" />
|
|
|
|
+ <result property="interval" column="interval_" />
|
|
|
|
+ </resultMap>
|
|
|
|
+ <insert id="insert" parameterType="com.jpsoft.bus.modules.bus.entity.RouteAccount">
|
|
|
|
+ <!--
|
|
|
|
+ <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
|
|
|
|
+ select sys_guid() from dual
|
|
|
|
+ </selectKey>
|
|
|
|
+ -->
|
|
|
|
+ <![CDATA[
|
|
|
|
+ insert into bus_route_account
|
|
|
|
+ (id_,name_,create_by,create_time,update_by,update_time,del_flag,map_path,company_id,goods_id,start_time,end_time,region_id,interval_)
|
|
|
|
+ values
|
|
|
|
+ (
|
|
|
|
+#{id,jdbcType=VARCHAR}
|
|
|
|
+,#{name,jdbcType=VARCHAR}
|
|
|
|
+,#{createBy,jdbcType=VARCHAR}
|
|
|
|
+,#{createTime,jdbcType= TIMESTAMP }
|
|
|
|
+,#{updateBy,jdbcType=VARCHAR}
|
|
|
|
+,#{updateTime,jdbcType= TIMESTAMP }
|
|
|
|
+,#{delFlag,jdbcType= NUMERIC }
|
|
|
|
+,#{mapPath,jdbcType=VARCHAR}
|
|
|
|
+,#{companyId,jdbcType=VARCHAR}
|
|
|
|
+,#{goodsId,jdbcType=VARCHAR}
|
|
|
|
+,#{startTime,jdbcType=VARCHAR}
|
|
|
|
+,#{endTime,jdbcType=VARCHAR}
|
|
|
|
+,#{regionId,jdbcType=VARCHAR}
|
|
|
|
+,#{interval,jdbcType= NUMERIC }
|
|
|
|
+ )
|
|
|
|
+ ]]>
|
|
|
|
+ </insert>
|
|
|
|
+ <delete id="delete" parameterType="string">
|
|
|
|
+ delete from bus_route_account where id_=#{id,jdbcType=VARCHAR}
|
|
|
|
+ </delete>
|
|
|
|
+ <update id="update" parameterType="com.jpsoft.bus.modules.bus.entity.RouteAccount">
|
|
|
|
+ update bus_route_account
|
|
|
|
+ <set>
|
|
|
|
+ <if test="name!=null">
|
|
|
|
+ name_=#{name,jdbcType=VARCHAR},
|
|
|
|
+ </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>
|
|
|
|
+ <if test="mapPath!=null">
|
|
|
|
+ map_path=#{mapPath,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="companyId!=null">
|
|
|
|
+ company_id=#{companyId,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="goodsId!=null">
|
|
|
|
+ goods_id=#{goodsId,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="startTime!=null">
|
|
|
|
+ start_time=#{startTime,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="endTime!=null">
|
|
|
|
+ end_time=#{endTime,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="regionId!=null">
|
|
|
|
+ region_id=#{regionId,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="interval!=null">
|
|
|
|
+ interval_=#{interval,jdbcType= NUMERIC },
|
|
|
|
+ </if>
|
|
|
|
+ </set>
|
|
|
|
+ where id_=#{id}
|
|
|
|
+ </update>
|
|
|
|
+ <select id="get" parameterType="string" resultMap="RouteAccountMap">
|
|
|
|
+ select
|
|
|
|
+id_,name_,create_by,create_time,update_by,update_time,del_flag,map_path,company_id,goods_id,start_time,end_time,region_id,interval_ from bus_route_account where id_=#{0}
|
|
|
|
+ </select>
|
|
|
|
+ <select id="exist" parameterType="string" resultType="int">
|
|
|
|
+ select count(*) from bus_route_account where id_=#{0}
|
|
|
|
+ </select>
|
|
|
|
+ <select id="list" resultMap="RouteAccountMap">
|
|
|
|
+ select * from bus_route_account
|
|
|
|
+ </select>
|
|
|
|
+ <select id="search" parameterType="hashmap" resultMap="RouteAccountMap">
|
|
|
|
+ <![CDATA[
|
|
|
|
+ select * from bus_route_account
|
|
|
|
+ ]]>
|
|
|
|
+ <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>
|