|
@@ -0,0 +1,320 @@
|
|
|
|
|
+<?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.baseinfo.mapper.BasePreventThawMapper">
|
|
|
|
|
+
|
|
|
|
|
+ <resultMap id="BaseResultMap" type="com.railway.business.baseinfo.domain.BasePreventThaw">
|
|
|
|
|
+ <result column="id" property="id"/>
|
|
|
|
|
+ <result column="piecewise" property="piecewise"/>
|
|
|
|
|
+ <result column="dept_id" property="deptId"/>
|
|
|
|
|
+ <result column="dept_name" property="deptName"/>
|
|
|
|
|
+ <result column="line_id" property="lineId"/>
|
|
|
|
|
+ <result column="line_name" property="lineName"/>
|
|
|
|
|
+ <result column="xingbie" property="xingbie"/>
|
|
|
|
|
+ <result column="station_id" property="stationId"/>
|
|
|
|
|
+ <result column="station_name" property="stationName"/>
|
|
|
|
|
+ <result column="pillar_area" property="pillarArea"/>
|
|
|
|
|
+ <result column="pillar_count" property="pillarCount"/>
|
|
|
|
|
+ <result column="line_type" property="lineType"/>
|
|
|
|
|
+ <result column="pillar_type" property="pillarType"/>
|
|
|
|
|
+ <result column="marker" property="marker"/>
|
|
|
|
|
+ <result column="terrain" property="terrain"/>
|
|
|
|
|
+ <result column="iftransform" property="iftransform"/>
|
|
|
|
|
+ <result column="measures" property="measures"/>
|
|
|
|
|
+ <result column="remark" property="remark"/>
|
|
|
|
|
+ <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">
|
|
|
|
|
+ id,
|
|
|
|
|
+ piecewise,
|
|
|
|
|
+ dept_id,
|
|
|
|
|
+ dept_name,
|
|
|
|
|
+ line_id,
|
|
|
|
|
+ line_name,
|
|
|
|
|
+ xingbie,
|
|
|
|
|
+ station_id,
|
|
|
|
|
+ station_name,
|
|
|
|
|
+ pillar_area,
|
|
|
|
|
+ pillar_count,
|
|
|
|
|
+ line_type,
|
|
|
|
|
+ pillar_type,
|
|
|
|
|
+ marker,
|
|
|
|
|
+ terrain,
|
|
|
|
|
+ iftransform,
|
|
|
|
|
+ measures,
|
|
|
|
|
+ remark,
|
|
|
|
|
+ del_flag,
|
|
|
|
|
+ create_by,
|
|
|
|
|
+ create_time,
|
|
|
|
|
+ update_by,
|
|
|
|
|
+ update_time
|
|
|
|
|
+ </sql>
|
|
|
|
|
+
|
|
|
|
|
+ <insert id="insert" parameterType="com.railway.business.baseinfo.domain.BasePreventThaw">
|
|
|
|
|
+ <selectKey keyProperty="id" order="BEFORE" resultType="String">
|
|
|
|
|
+ select replace(uuid(), '-', '') from dual
|
|
|
|
|
+ </selectKey>
|
|
|
|
|
+ INSERT INTO base_prevent_thaw
|
|
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
+ <if test ='null != piecewise'>
|
|
|
|
|
+ piecewise,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='null != deptId'>
|
|
|
|
|
+ dept_id,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='null != deptName'>
|
|
|
|
|
+ dept_name,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='null != lineId'>
|
|
|
|
|
+ line_id,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='null != lineName'>
|
|
|
|
|
+ line_name,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='null != xingbie'>
|
|
|
|
|
+ xingbie,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='null != stationId'>
|
|
|
|
|
+ station_id,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='null != stationName'>
|
|
|
|
|
+ station_name,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='null != pillarArea'>
|
|
|
|
|
+ pillar_area,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='null != pillarCount'>
|
|
|
|
|
+ pillar_count,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='null != lineType'>
|
|
|
|
|
+ line_type,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='null != pillarType'>
|
|
|
|
|
+ pillar_type,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='null != marker'>
|
|
|
|
|
+ marker,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='null != terrain'>
|
|
|
|
|
+ terrain,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='null != iftransform'>
|
|
|
|
|
+ iftransform,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='null != measures'>
|
|
|
|
|
+ measures,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='null != remark'>
|
|
|
|
|
+ remark,
|
|
|
|
|
+ </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 != piecewise'>
|
|
|
|
|
+ #{piecewise},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='null != deptId'>
|
|
|
|
|
+ #{deptId},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='null != deptName'>
|
|
|
|
|
+ #{deptName},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='null != lineId'>
|
|
|
|
|
+ #{lineId},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='null != lineName'>
|
|
|
|
|
+ #{lineName},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='null != xingbie'>
|
|
|
|
|
+ #{xingbie},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='null != stationId'>
|
|
|
|
|
+ #{stationId},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='null != stationName'>
|
|
|
|
|
+ #{stationName},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='null != pillarArea'>
|
|
|
|
|
+ #{pillarArea},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='null != pillarCount'>
|
|
|
|
|
+ #{pillarCount},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='null != lineType'>
|
|
|
|
|
+ #{lineType},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='null != pillarType'>
|
|
|
|
|
+ #{pillarType},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='null != marker'>
|
|
|
|
|
+ #{marker},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='null != terrain'>
|
|
|
|
|
+ #{terrain},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='null != iftransform'>
|
|
|
|
|
+ #{iftransform},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='null != measures'>
|
|
|
|
|
+ #{measures},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='null != remark'>
|
|
|
|
|
+ #{remark},
|
|
|
|
|
+ </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 base_prevent_thaw
|
|
|
|
|
+ set del_flag='1'
|
|
|
|
|
+ WHERE id = #{id}
|
|
|
|
|
+ </delete>
|
|
|
|
|
+
|
|
|
|
|
+ <update id="update" parameterType="com.railway.business.baseinfo.domain.BasePreventThaw">
|
|
|
|
|
+ UPDATE base_prevent_thaw
|
|
|
|
|
+ <set>
|
|
|
|
|
+ <if test ='null != piecewise'>piecewise = #{piecewise},</if>
|
|
|
|
|
+ <if test ='null != deptId'>dept_id = #{deptId},</if>
|
|
|
|
|
+ <if test ='null != deptName'>dept_name = #{deptName},</if>
|
|
|
|
|
+ <if test ='null != lineId'>line_id = #{lineId},</if>
|
|
|
|
|
+ <if test ='null != lineName'>line_name = #{lineName},</if>
|
|
|
|
|
+ <if test ='null != xingbie'>xingbie = #{xingbie},</if>
|
|
|
|
|
+ <if test ='null != stationId'>station_id = #{stationId},</if>
|
|
|
|
|
+ <if test ='null != stationName'>station_name = #{stationName},</if>
|
|
|
|
|
+ <if test ='null != pillarArea'>pillar_area = #{pillarArea},</if>
|
|
|
|
|
+ <if test ='null != pillarCount'>pillar_count = #{pillarCount},</if>
|
|
|
|
|
+ <if test ='null != lineType'>line_type = #{lineType},</if>
|
|
|
|
|
+ <if test ='null != pillarType'>pillar_type = #{pillarType},</if>
|
|
|
|
|
+ <if test ='null != marker'>marker = #{marker},</if>
|
|
|
|
|
+ <if test ='null != terrain'>terrain = #{terrain},</if>
|
|
|
|
|
+ <if test ='null != iftransform'>iftransform = #{iftransform},</if>
|
|
|
|
|
+ <if test ='null != measures'>measures = #{measures},</if>
|
|
|
|
|
+ <if test ='null != remark'>remark = #{remark},</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 id = #{id}
|
|
|
|
|
+ </update>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <select id="getInfo" resultMap="BaseResultMap">
|
|
|
|
|
+ SELECT
|
|
|
|
|
+ <include refid="Base_Column_List"/>
|
|
|
|
|
+ FROM base_prevent_thaw
|
|
|
|
|
+ WHERE del_flag='0' and id = #{id}
|
|
|
|
|
+
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
|
|
+ <select id="getList" resultMap="BaseResultMap">
|
|
|
|
|
+ SELECT
|
|
|
|
|
+ <include refid="Base_Column_List"/>
|
|
|
|
|
+ FROM base_prevent_thaw
|
|
|
|
|
+ <where>
|
|
|
|
|
+ del_flag='0'
|
|
|
|
|
+ <if test="piecewise!=null and piecewise!=''">
|
|
|
|
|
+ and piecewise=#{piecewise}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="deptId!=null and deptId!=''">
|
|
|
|
|
+ and dept_id=#{deptId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="deptName!=null and deptName!=''">
|
|
|
|
|
+ and dept_name=#{deptName}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="lineId!=null and lineId!=''">
|
|
|
|
|
+ and line_id=#{lineId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="lineName!=null and lineName!=''">
|
|
|
|
|
+ and line_name=#{lineName}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="xingbie!=null and xingbie!=''">
|
|
|
|
|
+ and xingbie=#{xingbie}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="stationId!=null and stationId!=''">
|
|
|
|
|
+ and station_id=#{stationId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="stationName!=null and stationName!=''">
|
|
|
|
|
+ and station_name=#{stationName}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="pillarArea!=null and pillarArea!=''">
|
|
|
|
|
+ and pillar_area=#{pillarArea}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="pillarCount!=null and pillarCount!=''">
|
|
|
|
|
+ and pillar_count=#{pillarCount}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="lineType!=null and lineType!=''">
|
|
|
|
|
+ and line_type=#{lineType}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="pillarType!=null and pillarType!=''">
|
|
|
|
|
+ and pillar_type=#{pillarType}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="marker!=null and marker!=''">
|
|
|
|
|
+ and marker=#{marker}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="terrain!=null and terrain!=''">
|
|
|
|
|
+ and terrain=#{terrain}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="iftransform!=null and iftransform!=''">
|
|
|
|
|
+ and iftransform=#{iftransform}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="measures!=null and measures!=''">
|
|
|
|
|
+ and measures=#{measures}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="remark!=null and remark!=''">
|
|
|
|
|
+ and remark=#{remark}
|
|
|
|
|
+ </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>
|