<?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.billion.main.sc.mapper.ScCollectionParamConfMapper">
|
|
<resultMap type="ScCollectionParamConf" id="ScCollectionParamConfResult">
|
<result property="id" column="id" />
|
<result property="productCode" column="product_code" />
|
<result property="productType" column="product_type" />
|
<result property="locationCode" column="location_code" />
|
<result property="paramCode" column="param_code" />
|
<result property="paramName" column="param_name" />
|
<result property="paramSetCode" column="param_set_code" />
|
<result property="paramSetName" column="param_set_name" />
|
<result property="node" column="node" />
|
<result property="type" column="type" />
|
<result property="unit" column="unit" />
|
<result property="paramUpper" column="param_upper" />
|
<result property="paramLower" column="param_lower" />
|
<result property="paramCentral" column="param_central" />
|
<result property="orderNum" column="order_num" />
|
<result property="subscribe" column="subscribe" />
|
<result property="delFlag" column="del_flag" />
|
<result property="createBy" column="create_by" />
|
<result property="createTime" column="create_time" />
|
<result property="updateBy" column="update_by" />
|
<result property="updateTime" column="update_time" />
|
</resultMap>
|
|
<sql id="selectScCollectionParamConfVo">
|
select id, product_code, product_type, location_code, param_code, param_name, param_set_code, param_set_name, node, type, unit, param_upper, param_lower, param_central, order_num, subscribe, del_flag, create_by, create_time, update_by, update_time from sc_collection_param_conf
|
</sql>
|
|
<select id="selectScCollectionParamConfList" parameterType="ScCollectionParamConf" resultMap="ScCollectionParamConfResult">
|
<include refid="selectScCollectionParamConfVo"/>
|
<where>
|
<if test="productCode != null and productCode != ''"> and product_code = #{productCode}</if>
|
<if test="productType != null and productType != ''"> and product_type = #{productType}</if>
|
<if test="locationCode != null and locationCode != ''"> and location_code = #{locationCode}</if>
|
<if test="paramCode != null and paramCode != ''"> and param_code = #{paramCode}</if>
|
<if test="paramName != null and paramName != ''"> and param_name like concat('%', #{paramName}, '%')</if>
|
<if test="paramSetCode != null and paramSetCode != ''"> and param_set_code = #{paramSetCode}</if>
|
<if test="paramSetName != null and paramSetName != ''"> and param_set_name like concat('%', #{paramSetName}, '%')</if>
|
<if test="node != null and node != ''"> and node = #{node}</if>
|
<if test="type != null and type != ''"> and type = #{type}</if>
|
<if test="unit != null and unit != ''"> and unit = #{unit}</if>
|
<if test="paramUpper != null and paramUpper != ''"> and param_upper = #{paramUpper}</if>
|
<if test="paramLower != null and paramLower != ''"> and param_lower = #{paramLower}</if>
|
<if test="paramCentral != null and paramCentral != ''"> and param_central = #{paramCentral}</if>
|
<if test="orderNum != null "> and order_num = #{orderNum}</if>
|
<if test="subscribe != null and subscribe != ''"> and subscribe = #{subscribe}</if>
|
</where>
|
</select>
|
|
<select id="selectScCollectionParamConfById" parameterType="Long" resultMap="ScCollectionParamConfResult">
|
<include refid="selectScCollectionParamConfVo"/>
|
where id = #{id}
|
</select>
|
|
<insert id="insertScCollectionParamConf" parameterType="ScCollectionParamConf" useGeneratedKeys="true" keyProperty="id">
|
insert into sc_collection_param_conf
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="productCode != null">product_code,</if>
|
<if test="productType != null">product_type,</if>
|
<if test="locationCode != null">location_code,</if>
|
<if test="paramCode != null">param_code,</if>
|
<if test="paramName != null">param_name,</if>
|
<if test="paramSetCode != null">param_set_code,</if>
|
<if test="paramSetName != null">param_set_name,</if>
|
<if test="node != null">node,</if>
|
<if test="type != null">type,</if>
|
<if test="unit != null">unit,</if>
|
<if test="paramUpper != null">param_upper,</if>
|
<if test="paramLower != null">param_lower,</if>
|
<if test="paramCentral != null">param_central,</if>
|
<if test="orderNum != null">order_num,</if>
|
<if test="subscribe != null">subscribe,</if>
|
<if test="delFlag != null">del_flag,</if>
|
<if test="createBy != null">create_by,</if>
|
<if test="createTime != null">create_time,</if>
|
<if test="updateBy != null">update_by,</if>
|
<if test="updateTime != null">update_time,</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="productCode != null">#{productCode},</if>
|
<if test="productType != null">#{productType},</if>
|
<if test="locationCode != null">#{locationCode},</if>
|
<if test="paramCode != null">#{paramCode},</if>
|
<if test="paramName != null">#{paramName},</if>
|
<if test="paramSetCode != null">#{paramSetCode},</if>
|
<if test="paramSetName != null">#{paramSetName},</if>
|
<if test="node != null">#{node},</if>
|
<if test="type != null">#{type},</if>
|
<if test="unit != null">#{unit},</if>
|
<if test="paramUpper != null">#{paramUpper},</if>
|
<if test="paramLower != null">#{paramLower},</if>
|
<if test="paramCentral != null">#{paramCentral},</if>
|
<if test="orderNum != null">#{orderNum},</if>
|
<if test="subscribe != null">#{subscribe},</if>
|
<if test="delFlag != null">#{delFlag},</if>
|
<if test="createBy != null">#{createBy},</if>
|
<if test="createTime != null">#{createTime},</if>
|
<if test="updateBy != null">#{updateBy},</if>
|
<if test="updateTime != null">#{updateTime},</if>
|
</trim>
|
</insert>
|
|
<update id="updateScCollectionParamConf" parameterType="ScCollectionParamConf">
|
update sc_collection_param_conf
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="productCode != null">product_code = #{productCode},</if>
|
<if test="productType != null">product_type = #{productType},</if>
|
<if test="locationCode != null">location_code = #{locationCode},</if>
|
<if test="paramCode != null">param_code = #{paramCode},</if>
|
<if test="paramName != null">param_name = #{paramName},</if>
|
<if test="paramSetCode != null">param_set_code = #{paramSetCode},</if>
|
<if test="paramSetName != null">param_set_name = #{paramSetName},</if>
|
<if test="node != null">node = #{node},</if>
|
<if test="type != null">type = #{type},</if>
|
<if test="unit != null">unit = #{unit},</if>
|
<if test="paramUpper != null">param_upper = #{paramUpper},</if>
|
<if test="paramLower != null">param_lower = #{paramLower},</if>
|
<if test="paramCentral != null">param_central = #{paramCentral},</if>
|
<if test="orderNum != null">order_num = #{orderNum},</if>
|
<if test="subscribe != null">subscribe = #{subscribe},</if>
|
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
<if test="createBy != null">create_by = #{createBy},</if>
|
<if test="createTime != null">create_time = #{createTime},</if>
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
</trim>
|
where id = #{id}
|
</update>
|
|
<delete id="deleteScCollectionParamConfById" parameterType="Long">
|
delete from sc_collection_param_conf where id = #{id}
|
</delete>
|
|
<delete id="deleteScCollectionParamConfByIds" parameterType="String">
|
delete from sc_collection_param_conf where id in
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
#{id}
|
</foreach>
|
</delete>
|
</mapper>
|