| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356 |
- <?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">
- <mapper namespace="com.railway.business.catenary.mapper.BusLineMapper">
- <resultMap id="BaseResultMap" type="com.railway.business.catenary.domain.BusLine">
- <result column="line_id" property="lineId"/>
- <result column="dept_id" property="deptId"/>
- <result column="dept_name" property="deptName"/>
- <result column="line_name" property="lineName"/>
- <result column="line_sddj" property="lineSddj"/>
- <result column="line_type" property="lineType"/>
- <result column="line_dj" property="lineDj"/>
- <result column="line_ktrq" property="lineKtrq"/>
- <result column="line_yylc" property="lineYylc"/>
- <result column="line_start_marker" property="lineStartMarker"/>
- <result column="line_end_marker" property="lineEndMarker"/>
- <result column="up_start_marker" property="upStartMarker"/>
- <result column="up_end_marker" property="upEndMarker"/>
- <result column="down_start_marker" property="downStartMarker"/>
- <result column="down_end_marker" property="downEndMarker"/>
- <result column="line_gdfs" property="lineGdfs"/>
- <result column="line_xglx" property="lineXglx"/>
- <result column="line_qt" property="lineQt"/>
- <result column="line_sjbh" property="lineSjbh"/>
- <result column="order_num" property="orderNum"/>
- <result column="status" property="status"/>
- <result column="del_flag" property="delFlag"/>
- <result column="create_by" property="createBy"/>
- <result column="create_time" property="createTime"/>
- <result column="update_by" property="updateBy"/>
- <result column="update_time" property="updateTime"/>
- </resultMap>
- <sql id="Base_Column_List">
- line_id,
- dept_id,
- dept_name,
- line_name,
- line_sddj,
- line_type,
- line_dj,
- line_ktrq,
- line_yylc,
- line_start_marker,
- line_end_marker,
- up_start_marker,
- up_end_marker,
- down_start_marker,
- down_end_marker,
- line_gdfs,
- line_xglx,
- line_qt,
- line_sjbh,
- order_num,
- status,
- del_flag,
- create_by,
- create_time,
- update_by,
- update_time
- </sql>
- <insert id="insert" parameterType="com.railway.business.catenary.domain.BusLine">
- <selectKey keyProperty="lineId" order="BEFORE" resultType="String">
- select replace(uuid(), '-', '') from dual
- </selectKey>
- INSERT INTO bus_line
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test='null != deptId'>
- dept_id,
- </if>
- <if test='null != deptName'>
- dept_name,
- </if>
- <if test='null != lineName'>
- line_name,
- </if>
- <if test='null != lineSddj'>
- line_sddj,
- </if>
- <if test='null != lineType'>
- line_type,
- </if>
- <if test='null != lineDj'>
- line_dj,
- </if>
- <if test='null != lineKtrq'>
- line_ktrq,
- </if>
- <if test='null != lineYylc'>
- line_yylc,
- </if>
- <if test='null != lineStartMarker'>
- line_start_marker,
- </if>
- <if test='null != lineEndMarker'>
- line_end_marker,
- </if>
- <if test='null != upStartMarker'>
- up_start_marker,
- </if>
- <if test='null != upEndMarker'>
- up_end_marker,
- </if>
- <if test='null != downStartMarker'>
- down_start_marker,
- </if>
- <if test='null != downEndMarker'>
- down_end_marker,
- </if>
- <if test='null != lineGdfs'>
- line_gdfs,
- </if>
- <if test='null != lineXglx'>
- line_xglx,
- </if>
- <if test='null != lineQt'>
- line_qt,
- </if>
- <if test='null != lineSjbh'>
- line_sjbh,
- </if>
- <if test='null != orderNum'>
- order_num,
- </if>
- <if test='null != status'>
- status,
- </if>
- <if test='null != delFlag'>
- del_flag,
- </if>
- <if test='null != createBy'>
- create_by,
- </if>
- <if test='null != createTime'>
- create_time,
- </if>
- <if test='null != updateBy'>
- update_by,
- </if>
- <if test='null != updateTime'>
- update_time
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test='null != deptId'>
- #{deptId},
- </if>
- <if test='null != deptName'>
- #{deptName},
- </if>
- <if test='null != lineName'>
- #{lineName},
- </if>
- <if test='null != lineSddj'>
- #{lineSddj},
- </if>
- <if test='null != lineType'>
- #{lineType},
- </if>
- <if test='null != lineDj'>
- #{lineDj},
- </if>
- <if test='null != lineKtrq'>
- #{lineKtrq},
- </if>
- <if test='null != lineYylc'>
- #{lineYylc},
- </if>
- <if test='null != lineStartMarker'>
- #{lineStartMarker},
- </if>
- <if test='null != lineEndMarker'>
- #{lineEndMarker},
- </if>
- <if test='null != upStartMarker'>
- #{upStartMarker},
- </if>
- <if test='null != upEndMarker'>
- #{upEndMarker},
- </if>
- <if test='null != downStartMarker'>
- #{downStartMarker},
- </if>
- <if test='null != downEndMarker'>
- #{downEndMarker},
- </if>
- <if test='null != lineGdfs'>
- #{lineGdfs},
- </if>
- <if test='null != lineXglx'>
- #{lineXglx},
- </if>
- <if test='null != lineQt'>
- #{lineQt},
- </if>
- <if test='null != lineSjbh'>
- #{lineSjbh},
- </if>
- <if test='null != orderNum'>
- #{orderNum},
- </if>
- <if test='null != status'>
- #{status},
- </if>
- <if test='null != delFlag'>
- #{delFlag},
- </if>
- <if test='null != createBy'>
- #{createBy},
- </if>
- <if test='null != createTime'>
- #{createTime},
- </if>
- <if test='null != updateBy'>
- #{updateBy},
- </if>
- <if test='null != updateTime'>
- #{updateTime}
- </if>
- </trim>
- </insert>
- <delete id="delete">
- UPDATE bus_line
- set del_flag='1'
- WHERE line_id = #{lineId}
- </delete>
- <update id="update" parameterType="com.railway.business.catenary.domain.BusLine">
- UPDATE bus_line
- <set>
- <if test='null != deptId'>dept_id = #{deptId},</if>
- <if test='null != deptName'>dept_name = #{deptName},</if>
- <if test='null != lineName'>line_name = #{lineName},</if>
- <if test='null != lineSddj'>line_sddj = #{lineSddj},</if>
- <if test='null != lineType'>line_type = #{lineType},</if>
- <if test='null != lineDj'>line_dj = #{lineDj},</if>
- <if test='null != lineKtrq'>line_ktrq = #{lineKtrq},</if>
- <if test='null != lineYylc'>line_yylc = #{lineYylc},</if>
- <if test='null != lineStartMarker'>line_start_marker = #{lineStartMarker},</if>
- <if test='null != lineEndMarker'>line_end_marker = #{lineEndMarker},</if>
- <if test='null != upStartMarker'>up_start_marker = #{upStartMarker},</if>
- <if test='null != upEndMarker'>up_end_marker = #{upEndMarker},</if>
- <if test='null != downStartMarker'>down_start_marker = #{downStartMarker},</if>
- <if test='null != downEndMarker'>down_end_marker = #{downEndMarker},</if>
- <if test='null != lineGdfs'>line_gdfs = #{lineGdfs},</if>
- <if test='null != lineXglx'>line_xglx = #{lineXglx},</if>
- <if test='null != lineQt'>line_qt = #{lineQt},</if>
- <if test='null != lineSjbh'>line_sjbh = #{lineSjbh},</if>
- <if test='null != orderNum'>order_num = #{orderNum},</if>
- <if test='null != status'>status = #{status},</if>
- <if test='null != delFlag'>del_flag = #{delFlag},</if>
- <if test='null != createBy'>create_by = #{createBy},</if>
- <if test='null != createTime'>create_time = #{createTime},</if>
- <if test='null != updateBy'>update_by = #{updateBy},</if>
- <if test='null != updateTime'>update_time = #{updateTime}</if>
- </set>
- WHERE line_id = #{lineId}
- </update>
- <select id="getInfo" resultMap="BaseResultMap">
- SELECT
- <include refid="Base_Column_List"/>
- FROM bus_line
- WHERE del_flag='0' and line_id = #{lineId}
- </select>
- <select id="getList" resultMap="BaseResultMap">
- SELECT
- <include refid="Base_Column_List"/>
- FROM bus_line
- <where>
- del_flag='0'
- <if test="deptId!=null and deptId!=''">
- and dept_id=#{deptId}
- </if>
- <if test="deptName!=null and deptName!=''">
- and dept_name=#{deptName}
- </if>
- <if test="lineName!=null and lineName!=''">
- and line_name=#{lineName}
- </if>
- <if test="lineSddj!=null and lineSddj!=''">
- and line_sddj=#{lineSddj}
- </if>
- <if test="lineType!=null and lineType!=''">
- and line_type=#{lineType}
- </if>
- <if test="lineDj!=null and lineDj!=''">
- and line_dj=#{lineDj}
- </if>
- <if test="lineKtrq!=null and lineKtrq!=''">
- and line_ktrq=#{lineKtrq}
- </if>
- <if test="lineYylc!=null and lineYylc!=''">
- and line_yylc=#{lineYylc}
- </if>
- <if test="lineStartMarker!=null and lineStartMarker!=''">
- and line_start_marker=#{lineStartMarker}
- </if>
- <if test="lineEndMarker!=null and lineEndMarker!=''">
- and line_end_marker=#{lineEndMarker}
- </if>
- <if test="upStartMarker!=null and upStartMarker!=''">
- and up_start_marker=#{upStartMarker}
- </if>
- <if test="upEndMarker!=null and upEndMarker!=''">
- and up_end_marker=#{upEndMarker}
- </if>
- <if test="downStartMarker!=null and downStartMarker!=''">
- and down_start_marker=#{downStartMarker}
- </if>
- <if test="downEndMarker!=null and downEndMarker!=''">
- and down_end_marker=#{downEndMarker}
- </if>
- <if test="lineGdfs!=null and lineGdfs!=''">
- and line_gdfs=#{lineGdfs}
- </if>
- <if test="lineXglx!=null and lineXglx!=''">
- and line_xglx=#{lineXglx}
- </if>
- <if test="lineQt!=null and lineQt!=''">
- and line_qt=#{lineQt}
- </if>
- <if test="lineSjbh!=null and lineSjbh!=''">
- and line_sjbh=#{lineSjbh}
- </if>
- <if test="orderNum!=null and orderNum!=''">
- and order_num=#{orderNum}
- </if>
- <if test="status!=null and status!=''">
- and status=#{status}
- </if>
- <if test="delFlag!=null and delFlag!=''">
- and del_flag=#{delFlag}
- </if>
- <if test="createBy!=null and createBy!=''">
- and create_by=#{createBy}
- </if>
- <if test="createTime!=null and createTime!=''">
- and create_time=#{createTime}
- </if>
- <if test="updateBy!=null and updateBy!=''">
- and update_by=#{updateBy}
- </if>
- <if test="updateTime!=null and updateTime!=''">
- and update_time=#{updateTime}
- </if>
- </where>
- </select>
- </mapper>
|