Compare commits
No commits in common. "d853dbe5a3cc90c9fdec0e472a2de9aeb727e693" and "6d6ea869429c112fd899369563260f07630abb90" have entirely different histories.
d853dbe5a3
...
6d6ea86942
@ -1,61 +1,62 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<!DOCTYPE mapper
|
<!DOCTYPE mapper
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.zhyc.module.dairyProducts.mapper.NpFreshMilkInspMapper">
|
<mapper namespace="com.zhyc.module.dairyProducts.mapper.NpFreshMilkInspMapper">
|
||||||
|
|
||||||
<resultMap type="NpFreshMilkInsp" id="NpFreshMilkInspResult">
|
<resultMap type="NpFreshMilkInsp" id="NpFreshMilkInspResult">
|
||||||
<result property="id" column="id" />
|
<result property="id" column="id" />
|
||||||
<result property="source" column="source" />
|
<result property="source" column="source" />
|
||||||
<result property="datetime" column="datetime" />
|
<result property="datetime" column="datetime" />
|
||||||
<result property="fat" column="fat" />
|
<result property="fat" column="fat" />
|
||||||
<result property="protein" column="protein" />
|
<result property="protein" column="protein" />
|
||||||
<result property="nonFat" column="non_fat" />
|
<result property="nonFat" column="non_fat" />
|
||||||
<result property="acidity" column="acidity" />
|
<result property="acidity" column="acidity" />
|
||||||
<result property="bacterialColony1" column="bacterial_colony_1" />
|
<result property="bacterialColony1" column="bacterial_colony_1" />
|
||||||
<result property="bacterialColony2" column="bacterial_colony_2" />
|
<result property="bacterialColony2" column="bacterial_colony_2" />
|
||||||
<result property="bacterialColony3" column="bacterial_colony_3" />
|
<result property="bacterialColony3" column="bacterial_colony_3" />
|
||||||
<result property="bacterialColony4" column="bacterial_colony_4" />
|
<result property="bacterialColony4" column="bacterial_colony_4" />
|
||||||
<result property="bacterialColony5" column="bacterial_colony_5" />
|
<result property="bacterialColony5" column="bacterial_colony_5" />
|
||||||
<result property="coli" column="coli" />
|
<result property="coli" column="coli" />
|
||||||
<result property="lactoferrin" column="lactoferrin" />
|
<result property="lactoferrin" column="lactoferrin" />
|
||||||
<result property="ig" column="ig" />
|
<result property="ig" column="ig" />
|
||||||
<result property="commnet" column="commnet" />
|
<result property="commnet" column="commnet" />
|
||||||
<result property="createBy" column="create_by" />
|
<result property="createBy" column="create_by" />
|
||||||
<result property="createTime" column="create_time" />
|
<result property="createTime" column="create_time" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectNpFreshMilkInspVo">
|
<sql id="selectNpFreshMilkInspVo">
|
||||||
SELECT
|
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
|
||||||
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>
|
</sql>
|
||||||
|
|
||||||
<!-- 查询列表(已修改为只按来源和日期查询) -->
|
|
||||||
<select id="selectNpFreshMilkInspList" parameterType="NpFreshMilkInsp" resultMap="NpFreshMilkInspResult">
|
<select id="selectNpFreshMilkInspList" parameterType="NpFreshMilkInsp" resultMap="NpFreshMilkInspResult">
|
||||||
<include refid="selectNpFreshMilkInspVo"/>
|
<include refid="selectNpFreshMilkInspVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="source != null and source != ''">
|
<if test="source != null and source != ''"> and source = #{source}</if>
|
||||||
AND source LIKE CONCAT('%', #{source}, '%')
|
<if test="datetime != null "> and datetime = #{datetime}</if>
|
||||||
</if>
|
<if test="fat != null "> and fat = #{fat}</if>
|
||||||
<if test="datetime != null">
|
<if test="protein != null "> and protein = #{protein}</if>
|
||||||
AND datetime = #{datetime}
|
<if test="nonFat != null "> and non_fat = #{nonFat}</if>
|
||||||
</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>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 根据ID查询 -->
|
|
||||||
<select id="selectNpFreshMilkInspById" parameterType="Long" resultMap="NpFreshMilkInspResult">
|
<select id="selectNpFreshMilkInspById" parameterType="Long" resultMap="NpFreshMilkInspResult">
|
||||||
<include refid="selectNpFreshMilkInspVo"/>
|
<include refid="selectNpFreshMilkInspVo"/>
|
||||||
WHERE id = #{id}
|
where id = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 新增 -->
|
|
||||||
<insert id="insertNpFreshMilkInsp" parameterType="NpFreshMilkInsp" useGeneratedKeys="true" keyProperty="id">
|
<insert id="insertNpFreshMilkInsp" parameterType="NpFreshMilkInsp" useGeneratedKeys="true" keyProperty="id">
|
||||||
INSERT INTO np_fresh_milk_insp
|
insert into np_fresh_milk_insp
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
<if test="source != null">source,</if>
|
<if test="source != null">source,</if>
|
||||||
<if test="datetime != null">datetime,</if>
|
<if test="datetime != null">datetime,</if>
|
||||||
@ -74,7 +75,7 @@
|
|||||||
<if test="commnet != null">commnet,</if>
|
<if test="commnet != null">commnet,</if>
|
||||||
<if test="createBy != null">create_by,</if>
|
<if test="createBy != null">create_by,</if>
|
||||||
<if test="createTime != null">create_time,</if>
|
<if test="createTime != null">create_time,</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="source != null">#{source},</if>
|
<if test="source != null">#{source},</if>
|
||||||
<if test="datetime != null">#{datetime},</if>
|
<if test="datetime != null">#{datetime},</if>
|
||||||
@ -93,12 +94,11 @@
|
|||||||
<if test="commnet != null">#{commnet},</if>
|
<if test="commnet != null">#{commnet},</if>
|
||||||
<if test="createBy != null">#{createBy},</if>
|
<if test="createBy != null">#{createBy},</if>
|
||||||
<if test="createTime != null">#{createTime},</if>
|
<if test="createTime != null">#{createTime},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<!-- 修改 -->
|
|
||||||
<update id="updateNpFreshMilkInsp" parameterType="NpFreshMilkInsp">
|
<update id="updateNpFreshMilkInsp" parameterType="NpFreshMilkInsp">
|
||||||
UPDATE np_fresh_milk_insp
|
update np_fresh_milk_insp
|
||||||
<trim prefix="SET" suffixOverrides=",">
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
<if test="source != null">source = #{source},</if>
|
<if test="source != null">source = #{source},</if>
|
||||||
<if test="datetime != null">datetime = #{datetime},</if>
|
<if test="datetime != null">datetime = #{datetime},</if>
|
||||||
@ -115,18 +115,18 @@
|
|||||||
<if test="lactoferrin != null">lactoferrin = #{lactoferrin},</if>
|
<if test="lactoferrin != null">lactoferrin = #{lactoferrin},</if>
|
||||||
<if test="ig != null">ig = #{ig},</if>
|
<if test="ig != null">ig = #{ig},</if>
|
||||||
<if test="commnet != null">commnet = #{commnet},</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>
|
</trim>
|
||||||
WHERE id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<!-- 单个删除 -->
|
|
||||||
<delete id="deleteNpFreshMilkInspById" parameterType="Long">
|
<delete id="deleteNpFreshMilkInspById" parameterType="Long">
|
||||||
DELETE FROM np_fresh_milk_insp WHERE id = #{id}
|
delete from np_fresh_milk_insp where id = #{id}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<!-- 批量删除 -->
|
|
||||||
<delete id="deleteNpFreshMilkInspByIds" parameterType="String">
|
<delete id="deleteNpFreshMilkInspByIds" parameterType="String">
|
||||||
DELETE FROM np_fresh_milk_insp WHERE id IN
|
delete from np_fresh_milk_insp where id in
|
||||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
#{id}
|
#{id}
|
||||||
</foreach>
|
</foreach>
|
||||||
|
@ -26,11 +26,7 @@
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectNpYogurtInspVo">
|
<sql id="selectNpYogurtInspVo">
|
||||||
select id, source, datetime, fat, protein, non_fat,
|
select id, source, datetime, fat, protein, non_fat, acidity, bacterial_colony_1, bacterial_clony_2, bacterial_clony_3, bacterial_clony_4, bacterial_clony_5, yeast, mould, lacto, comment, create_by, create_time from np_yogurt_insp
|
||||||
acidity, bacterial_colony_1, bacterial_clony_2,
|
|
||||||
bacterial_clony_3, bacterial_clony_4, bacterial_clony_5,
|
|
||||||
yeast, mould, lacto, comment, create_by, create_time
|
|
||||||
from np_yogurt_insp
|
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectNpYogurtInspList" parameterType="NpYogurtInsp" resultMap="NpYogurtInspResult">
|
<select id="selectNpYogurtInspList" parameterType="NpYogurtInsp" resultMap="NpYogurtInspResult">
|
||||||
@ -44,7 +40,7 @@
|
|||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectNpYogurtInspById" parameterType="Long" resultMap="NpYogurtInspResult">
|
<select id="selectNpYogurtInspById" parameterType="Long" resultMap="NpYogurtInspResult">
|
||||||
<include refid="selectNpYogurtInspVo"/>
|
<include refid="selectNpYogurtInspVo"/>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
@ -121,7 +117,7 @@
|
|||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<delete id="deleteNpYogurtInspByIds" parameterType="String">
|
<delete id="deleteNpYogurtInspByIds" parameterType="String">
|
||||||
delete from np_yogurt_insp where id in
|
delete from np_yogurt_insp where id in
|
||||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
#{id}
|
#{id}
|
||||||
</foreach>
|
</foreach>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user