You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
108 lines
4.8 KiB
XML
108 lines
4.8 KiB
XML
<?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.op.quality.mapper.QcSampleRuleMapper">
|
|
|
|
<resultMap type="QcSampleRule" id="QcSampleRuleResult">
|
|
<result property="id" column="id" />
|
|
<result property="startValue" column="start_value" />
|
|
<result property="endValue" column="end_value" />
|
|
<result property="attr1" column="attr1" />
|
|
<result property="createBy" column="create_by" />
|
|
<result property="createTime" column="create_time" />
|
|
<result property="updateBy" column="update_by" />
|
|
<result property="updateTime" column="update_time" />
|
|
<result property="factoryCode" column="factory_code" />
|
|
<result property="delFlag" column="del_flag" />
|
|
<result property="sampleQuality" column="sample_quality" />
|
|
<result property="checkType" column="check_type" />
|
|
<result property="typeCode" column="type_code" />
|
|
</resultMap>
|
|
|
|
<sql id="selectQcSampleRuleVo">
|
|
select id, start_value, end_value, attr1, create_by, create_time, update_by, update_time, factory_code, del_flag, sample_quality, check_type, type_code from qc_sample_rule
|
|
</sql>
|
|
|
|
<select id="selectQcSampleRuleList" parameterType="QcSampleRule" resultMap="QcSampleRuleResult">
|
|
<include refid="selectQcSampleRuleVo"/>
|
|
<where>
|
|
<if test="startValue != null "> and start_value = #{startValue}</if>
|
|
<if test="endValue != null "> and end_value = #{endValue}</if>
|
|
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
|
|
<if test="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</if>
|
|
<if test="sampleQuality != null "> and sample_quality = #{sampleQuality}</if>
|
|
<if test="checkType != null and checkType != ''"> and check_type = #{checkType}</if>
|
|
<if test="typeCode != null and typeCode != ''"> and type_code = #{typeCode}</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="selectQcSampleRuleById" parameterType="String" resultMap="QcSampleRuleResult">
|
|
<include refid="selectQcSampleRuleVo"/>
|
|
where id = #{id}
|
|
</select>
|
|
|
|
<insert id="insertQcSampleRule" parameterType="QcSampleRule">
|
|
insert into qc_sample_rule
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">id,</if>
|
|
<if test="startValue != null">start_value,</if>
|
|
<if test="endValue != null">end_value,</if>
|
|
<if test="attr1 != null">attr1,</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>
|
|
<if test="factoryCode != null and factoryCode != ''">factory_code,</if>
|
|
<if test="delFlag != null">del_flag,</if>
|
|
<if test="sampleQuality != null">sample_quality,</if>
|
|
<if test="checkType != null">check_type,</if>
|
|
<if test="typeCode != null">type_code,</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">#{id},</if>
|
|
<if test="startValue != null">#{startValue},</if>
|
|
<if test="endValue != null">#{endValue},</if>
|
|
<if test="attr1 != null">#{attr1},</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>
|
|
<if test="factoryCode != null and factoryCode != ''">#{factoryCode},</if>
|
|
<if test="delFlag != null">#{delFlag},</if>
|
|
<if test="sampleQuality != null">#{sampleQuality},</if>
|
|
<if test="checkType != null">#{checkType},</if>
|
|
<if test="typeCode != null">#{typeCode},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateQcSampleRule" parameterType="QcSampleRule">
|
|
update qc_sample_rule
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="startValue != null">start_value = #{startValue},</if>
|
|
<if test="endValue != null">end_value = #{endValue},</if>
|
|
<if test="attr1 != null">attr1 = #{attr1},</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>
|
|
<if test="factoryCode != null and factoryCode != ''">factory_code = #{factoryCode},</if>
|
|
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
|
<if test="sampleQuality != null">sample_quality = #{sampleQuality},</if>
|
|
<if test="checkType != null">check_type = #{checkType},</if>
|
|
<if test="typeCode != null">type_code = #{typeCode},</if>
|
|
</trim>
|
|
where id = #{id}
|
|
</update>
|
|
|
|
<delete id="deleteQcSampleRuleById" parameterType="String">
|
|
delete from qc_sample_rule where id = #{id}
|
|
</delete>
|
|
|
|
<delete id="deleteQcSampleRuleByIds" parameterType="String">
|
|
delete from qc_sample_rule where id in
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</delete>
|
|
</mapper> |