|
|
@@ -0,0 +1,356 @@
|
|
|
+<?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 sys_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 sys_line
|
|
|
+ set del_flag='1'
|
|
|
+ WHERE line_id = #{lineId}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <update id="update" parameterType="com.railway.business.catenary.domain.BusLine">
|
|
|
+ UPDATE sys_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 sys_line
|
|
|
+ WHERE del_flag='0' and line_id = #{lineId}
|
|
|
+
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="getList" resultMap="BaseResultMap">
|
|
|
+ SELECT
|
|
|
+ <include refid="Base_Column_List"/>
|
|
|
+ FROM sys_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>
|