<?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.jcdm.main.bs.technologyRoute.mapper.BsTechnologyRouteInfoMapper">
|
|
<resultMap type="BsTechnologyRouteInfo" id="BsTechnologyRouteInfoResult">
|
<result property="id" column="id" />
|
<result property="routeCode" column="route_code" />
|
<result property="routeName" column="route_name" />
|
<result property="lineCode" column="line_code" />
|
<result property="lineName" column="line_name" />
|
<result property="productCode" column="product_code" />
|
<result property="productName" column="product_name" />
|
<result property="version" column="version" />
|
<result property="status" column="status" />
|
<result property="dataSource" column="data_source" />
|
<result property="remark" column="remark" />
|
<result property="createUser" column="create_user" />
|
<result property="createTime" column="create_time" />
|
<result property="updateUser" column="update_user" />
|
<result property="updateTime" column="update_time" />
|
<result property="spareField1" column="spare_field_1" />
|
<result property="spareField2" column="spare_field_2" />
|
<result property="spareField3" column="spare_field_3" />
|
<result property="spareField4" column="spare_field_4" />
|
</resultMap>
|
|
<sql id="selectBsTechnologyRouteInfoVo">
|
select id, route_code, route_name, line_code, line_name , product_code, product_name, version, status, data_source, remark, create_user, create_time, update_user, update_time, spare_field_1, spare_field_2, spare_field_3, spare_field_4 from bs_technology_route_info
|
</sql>
|
|
<select id="selectBsTechnologyRouteInfoList" parameterType="BsTechnologyRouteInfo" resultMap="BsTechnologyRouteInfoResult">
|
<include refid="selectBsTechnologyRouteInfoVo"/>
|
<where>
|
<if test="routeCode != null and routeCode != ''"> and route_code like concat('%', #{routeCode}, '%')</if>
|
<if test="routeName != null and routeName != ''"> and route_name like concat('%', #{routeName}, '%')</if>
|
<if test="productCode != null and productCode != ''"> and product_code like concat('%', #{productCode}, '%')</if>
|
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
|
<if test="status != null and status != ''"> and status = #{status}</if>
|
<if test="lineCode != null and lineCode != ''"> and line_code like concat('%', #{lineCode}, '%')</if>
|
<if test="lineName != null and lineName != ''"> and line_name like concat('%', #{lineName}, '%')</if>
|
<if test="dataSource != null and dataSource != ''"> and data_source like concat('%', #{dataSource}, '%')</if>
|
</where>
|
</select>
|
|
<select id="selectBsTechnologyRouteInfoById" parameterType="Long" resultMap="BsTechnologyRouteInfoResult">
|
<include refid="selectBsTechnologyRouteInfoVo"/>
|
where id = #{id}
|
</select>
|
|
<insert id="insertBsTechnologyRouteInfo" parameterType="BsTechnologyRouteInfo">
|
insert into bs_technology_route_info
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="id != null">id,</if>
|
<if test="routeCode != null and routeCode != ''">route_code,</if>
|
<if test="lineCode != null and lineCode != ''">line_code,</if>
|
<if test="lineName != null and lineName != ''">line_name,</if>
|
<if test="routeName != null">route_name,</if>
|
<if test="productCode != null and productCode != ''">product_code,</if>
|
<if test="productName != null">product_name,</if>
|
<if test="version != null">version,</if>
|
<if test="status != null">status,</if>
|
<if test="dataSource != null">data_source,</if>
|
<if test="remark != null">remark,</if>
|
<if test="createUser != null">create_user,</if>
|
<if test="createTime != null">create_time,</if>
|
<if test="updateUser != null">update_user,</if>
|
<if test="updateTime != null">update_time,</if>
|
<if test="spareField1 != null">spare_field_1,</if>
|
<if test="spareField2 != null">spare_field_2,</if>
|
<if test="spareField3 != null">spare_field_3,</if>
|
<if test="spareField4 != null">spare_field_4,</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="id != null">#{id},</if>
|
<if test="routeCode != null and routeCode != ''">#{routeCode},</if>
|
<if test="routeName != null">#{routeName},</if>
|
<if test="lineCode != null and lineCode != ''">#{lineCode},</if>
|
<if test="lineName != null and lineName != ''">#{lineName},</if>
|
<if test="productCode != null and productCode != ''">#{productCode},</if>
|
<if test="productName != null">#{productName},</if>
|
<if test="version != null">#{version},</if>
|
<if test="status != null">#{status},</if>
|
<if test="dataSource != null">#{dataSource},</if>
|
<if test="remark != null">#{remark},</if>
|
<if test="createUser != null">#{createUser},</if>
|
<if test="createTime != null">#{createTime},</if>
|
<if test="updateUser != null">#{updateUser},</if>
|
<if test="updateTime != null">#{updateTime},</if>
|
<if test="spareField1 != null">#{spareField1},</if>
|
<if test="spareField2 != null">#{spareField2},</if>
|
<if test="spareField3 != null">#{spareField3},</if>
|
<if test="spareField4 != null">#{spareField4},</if>
|
</trim>
|
</insert>
|
|
<update id="updateBsTechnologyRouteInfo" parameterType="BsTechnologyRouteInfo">
|
update bs_technology_route_info
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="routeCode != null and routeCode != ''">route_code = #{routeCode},</if>
|
<if test="lineCode != null and lineCode != ''">line_code = #{lineCode},</if>
|
<if test="lineName != null and lineName != ''">line_name = #{lineName},</if>
|
<if test="routeName != null">route_name = #{routeName},</if>
|
<if test="productCode != null and productCode != ''">product_code = #{productCode},</if>
|
<if test="productName != null">product_name = #{productName},</if>
|
<if test="version != null">version = #{version},</if>
|
<if test="status != null">status = #{status},</if>
|
<if test="dataSource != null">data_source = #{dataSource},</if>
|
<if test="remark != null">remark = #{remark},</if>
|
<if test="createUser != null">create_user = #{createUser},</if>
|
<if test="createTime != null">create_time = #{createTime},</if>
|
<if test="updateUser != null">update_user = #{updateUser},</if>
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
<if test="spareField1 != null">spare_field_1 = #{spareField1},</if>
|
<if test="spareField2 != null">spare_field_2 = #{spareField2},</if>
|
<if test="spareField3 != null">spare_field_3 = #{spareField3},</if>
|
<if test="spareField4 != null">spare_field_4 = #{spareField4},</if>
|
</trim>
|
where id = #{id}
|
</update>
|
|
<delete id="deleteBsTechnologyRouteInfoById" parameterType="Long">
|
delete from bs_technology_route_info where id = #{id}
|
</delete>
|
|
<delete id="deleteBsTechnologyRouteInfoByIds" parameterType="String">
|
delete from bs_technology_route_info where id in
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
#{id}
|
</foreach>
|
</delete>
|
</mapper>
|