鲜奶检验记录
This commit is contained in:
@@ -0,0 +1,134 @@
|
||||
<?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.zhyc.module.dairyProducts.freshMilkTest.mapper.NpFreshMilkInspMapper">
|
||||
|
||||
<resultMap type="NpFreshMilkInsp" id="NpFreshMilkInspResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="source" column="source" />
|
||||
<result property="datetime" column="datetime" />
|
||||
<result property="fat" column="fat" />
|
||||
<result property="protein" column="protein" />
|
||||
<result property="nonFat" column="non_fat" />
|
||||
<result property="acidity" column="acidity" />
|
||||
<result property="bacterialColony1" column="bacterial_colony_1" />
|
||||
<result property="bacterialColony2" column="bacterial_colony_2" />
|
||||
<result property="bacterialColony3" column="bacterial_colony_3" />
|
||||
<result property="bacterialColony4" column="bacterial_colony_4" />
|
||||
<result property="bacterialColony5" column="bacterial_colony_5" />
|
||||
<result property="coli" column="coli" />
|
||||
<result property="lactoferrin" column="lactoferrin" />
|
||||
<result property="ig" column="ig" />
|
||||
<result property="commnet" column="commnet" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectNpFreshMilkInspVo">
|
||||
select id, source, datetime, fat, protein, non_fat, acidity, bacterial_colony_1, bacterial_colony_2, bacterial_colony_3, bacterial_colony_4, bacterial_colony_5, coli, lactoferrin, ig, commnet, create_by, create_time from np_fresh_milk_insp
|
||||
</sql>
|
||||
|
||||
<select id="selectNpFreshMilkInspList" parameterType="NpFreshMilkInsp" resultMap="NpFreshMilkInspResult">
|
||||
<include refid="selectNpFreshMilkInspVo"/>
|
||||
<where>
|
||||
<if test="source != null and source != ''"> and source = #{source}</if>
|
||||
<if test="datetime != null "> and datetime = #{datetime}</if>
|
||||
<if test="fat != null "> and fat = #{fat}</if>
|
||||
<if test="protein != null "> and protein = #{protein}</if>
|
||||
<if test="nonFat != null "> and non_fat = #{nonFat}</if>
|
||||
<if test="acidity != null "> and acidity = #{acidity}</if>
|
||||
<if test="bacterialColony1 != null "> and bacterial_colony_1 = #{bacterialColony1}</if>
|
||||
<if test="bacterialColony2 != null "> and bacterial_colony_2 = #{bacterialColony2}</if>
|
||||
<if test="bacterialColony3 != null "> and bacterial_colony_3 = #{bacterialColony3}</if>
|
||||
<if test="bacterialColony4 != null "> and bacterial_colony_4 = #{bacterialColony4}</if>
|
||||
<if test="bacterialColony5 != null "> and bacterial_colony_5 = #{bacterialColony5}</if>
|
||||
<if test="coli != null "> and coli = #{coli}</if>
|
||||
<if test="lactoferrin != null "> and lactoferrin = #{lactoferrin}</if>
|
||||
<if test="ig != null "> and ig = #{ig}</if>
|
||||
<if test="commnet != null and commnet != ''"> and commnet = #{commnet}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectNpFreshMilkInspById" parameterType="Long" resultMap="NpFreshMilkInspResult">
|
||||
<include refid="selectNpFreshMilkInspVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertNpFreshMilkInsp" parameterType="NpFreshMilkInsp" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into np_fresh_milk_insp
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="source != null">source,</if>
|
||||
<if test="datetime != null">datetime,</if>
|
||||
<if test="fat != null">fat,</if>
|
||||
<if test="protein != null">protein,</if>
|
||||
<if test="nonFat != null">non_fat,</if>
|
||||
<if test="acidity != null">acidity,</if>
|
||||
<if test="bacterialColony1 != null">bacterial_colony_1,</if>
|
||||
<if test="bacterialColony2 != null">bacterial_colony_2,</if>
|
||||
<if test="bacterialColony3 != null">bacterial_colony_3,</if>
|
||||
<if test="bacterialColony4 != null">bacterial_colony_4,</if>
|
||||
<if test="bacterialColony5 != null">bacterial_colony_5,</if>
|
||||
<if test="coli != null">coli,</if>
|
||||
<if test="lactoferrin != null">lactoferrin,</if>
|
||||
<if test="ig != null">ig,</if>
|
||||
<if test="commnet != null">commnet,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="source != null">#{source},</if>
|
||||
<if test="datetime != null">#{datetime},</if>
|
||||
<if test="fat != null">#{fat},</if>
|
||||
<if test="protein != null">#{protein},</if>
|
||||
<if test="nonFat != null">#{nonFat},</if>
|
||||
<if test="acidity != null">#{acidity},</if>
|
||||
<if test="bacterialColony1 != null">#{bacterialColony1},</if>
|
||||
<if test="bacterialColony2 != null">#{bacterialColony2},</if>
|
||||
<if test="bacterialColony3 != null">#{bacterialColony3},</if>
|
||||
<if test="bacterialColony4 != null">#{bacterialColony4},</if>
|
||||
<if test="bacterialColony5 != null">#{bacterialColony5},</if>
|
||||
<if test="coli != null">#{coli},</if>
|
||||
<if test="lactoferrin != null">#{lactoferrin},</if>
|
||||
<if test="ig != null">#{ig},</if>
|
||||
<if test="commnet != null">#{commnet},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateNpFreshMilkInsp" parameterType="NpFreshMilkInsp">
|
||||
update np_fresh_milk_insp
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="source != null">source = #{source},</if>
|
||||
<if test="datetime != null">datetime = #{datetime},</if>
|
||||
<if test="fat != null">fat = #{fat},</if>
|
||||
<if test="protein != null">protein = #{protein},</if>
|
||||
<if test="nonFat != null">non_fat = #{nonFat},</if>
|
||||
<if test="acidity != null">acidity = #{acidity},</if>
|
||||
<if test="bacterialColony1 != null">bacterial_colony_1 = #{bacterialColony1},</if>
|
||||
<if test="bacterialColony2 != null">bacterial_colony_2 = #{bacterialColony2},</if>
|
||||
<if test="bacterialColony3 != null">bacterial_colony_3 = #{bacterialColony3},</if>
|
||||
<if test="bacterialColony4 != null">bacterial_colony_4 = #{bacterialColony4},</if>
|
||||
<if test="bacterialColony5 != null">bacterial_colony_5 = #{bacterialColony5},</if>
|
||||
<if test="coli != null">coli = #{coli},</if>
|
||||
<if test="lactoferrin != null">lactoferrin = #{lactoferrin},</if>
|
||||
<if test="ig != null">ig = #{ig},</if>
|
||||
<if test="commnet != null">commnet = #{commnet},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteNpFreshMilkInspById" parameterType="Long">
|
||||
delete from np_fresh_milk_insp where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteNpFreshMilkInspByIds" parameterType="String">
|
||||
delete from np_fresh_milk_insp where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user