Merge remote-tracking branch 'origin/main'

This commit is contained in:
zyh
2025-07-22 14:59:47 +08:00
25 changed files with 364 additions and 505 deletions

View File

@@ -52,19 +52,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="groupId != null"> AND m.group_id = #{groupId}</if>
<if test="bsManageTags != null and bsManageTags.size > 0">
AND s.bs_manage_tags IN
<foreach collection="bsManageTags" item="bsManageTag " open="(" separator="," close=")">
#{bsManageTag}
<foreach collection="bsManageTags" item="tag" open="(" separator="," close=")">
#{tag}
</foreach>
</if>
</where>
ORDER BY m.id
</select>
<select id="selectBasSheepGroupMappingById" parameterType="Long" resultMap="BasSheepGroupMappingResult">
<include refid="selectBasSheepGroupMappingVo"/>
@@ -102,4 +97,32 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{id}
</foreach>
</delete>
<!-- 根据耳号查询羊只ID -->
<select id="selectSheepIdsByEarTags" parameterType="list" resultType="map">
SELECT id, manage_tags
FROM bas_sheep
WHERE manage_tags IN
<foreach collection="earTags" item="tag" open="(" separator="," close=")">
#{tag}
</foreach>
</select>
<!-- 批量插入 -->
<insert id="batchInsert" parameterType="java.util.List">
INSERT INTO bas_sheep_group_mapping (sheep_id, group_id)
VALUES
<foreach collection="list" item="item" separator=",">
(#{item.sheepId}, #{item.groupId})
</foreach>
</insert>
<select id="selectListByGroupId"
resultMap="BasSheepGroupMappingResult">
SELECT id, sheep_id, group_id
FROM bas_sheep_group_mapping
WHERE group_id = #{groupId}
</select>
</mapper>

View File

@@ -94,223 +94,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectSheepFileVo"/>
where id = #{id}
</select>
<insert id="insertSheepFile" parameterType="SheepFile">
insert into sheep_file
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="bsManageTags != null">bs_manage_tags,</if>
<if test="ranchId != null">ranch_id,</if>
<if test="drRanch != null">dr_ranch,</if>
<if test="sheepfoldId != null">sheepfold_id,</if>
<if test="sheepfoldName != null">sheepfold_name,</if>
<if test="electronicTags != null">electronic_tags,</if>
<if test="varietyId != null">variety_id,</if>
<if test="variety != null">variety,</if>
<if test="family != null">family,</if>
<if test="name != null">name,</if>
<if test="gender != null">gender,</if>
<if test="birthday != null">birthday,</if>
<if test="dayAge != null">day_age,</if>
<if test="monthAge != null">month_age,</if>
<if test="parity != null">parity,</if>
<if test="birthWeight != null">birth_weight,</if>
<if test="weaningDate != null">weaning_date,</if>
<if test="statusId != null">status_id,</if>
<if test="weaningWeight != null">weaning_weight,</if>
<if test="currentWeight != null">current_weight,</if>
<if test="breedStatusId != null">breed_status_id,</if>
<if test="breed != null">breed,</if>
<if test="bsFatherId != null">bs_father_id,</if>
<if test="fatherManageTags != null">father_manage_tags,</if>
<if test="bsMotherId != null">bs_mother_id,</if>
<if test="motherManageTags != null">mother_manage_tags,</if>
<if test="receptorId != null">receptor_id,</if>
<if test="receptorManageTags != null">receptor_manage_tags,</if>
<if test="fatherFatherId != null">father_father_id,</if>
<if test="grandfatherManageTags != null">grandfather_manage_tags,</if>
<if test="fatherMotherId != null">father_mother_id,</if>
<if test="grandmotherManageTags != null">grandmother_manage_tags,</if>
<if test="fatherId != null">father_id,</if>
<if test="maternalGrandfatherManageTags != null">maternal_grandfather_manage_tags,</if>
<if test="motherId != null">mother_id,</if>
<if test="maternalGrandmotherManageTags != null">maternal_grandmother_manage_tags,</if>
<if test="matingDate != null">mating_date,</if>
<if test="matingTypeId != null">mating_type_id,</if>
<if test="pregDate != null">preg_date,</if>
<if test="lambingDate != null">lambing_date,</if>
<if test="lambingDay != null">lambing_day,</if>
<if test="matingDay != null">mating_day,</if>
<if test="gestationDay != null">gestation_day,</if>
<if test="expectedDate != null">expected_date,</if>
<if test="postLambingDay != null">post_lambing_day,</if>
<if test="lactationDay != null">lactation_day,</if>
<if test="anestrousDay != null">anestrous_day,</if>
<if test="matingCounts != null">mating_counts,</if>
<if test="matingTotal != null">mating_total,</if>
<if test="miscarriageCounts != null">miscarriage_counts,</if>
<if test="comment != null">comment,</if>
<if test="controlled != null">controlled,</if>
<if test="body != null">body,</if>
<if test="breast != null">breast,</if>
<if test="source != null">source,</if>
<if test="sourceDate != null">source_date,</if>
<if test="sourceRanchId != null">source_ranch_id,</if>
<if test="sourceRanch != null">source_ranch,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="isDelete != null">is_delete,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="bsManageTags != null">#{bsManageTags},</if>
<if test="ranchId != null">#{ranchId},</if>
<if test="drRanch != null">#{drRanch},</if>
<if test="sheepfoldId != null">#{sheepfoldId},</if>
<if test="sheepfoldName != null">#{sheepfoldName},</if>
<if test="electronicTags != null">#{electronicTags},</if>
<if test="varietyId != null">#{varietyId},</if>
<if test="variety != null">#{variety},</if>
<if test="family != null">#{family},</if>
<if test="name != null">#{name},</if>
<if test="gender != null">#{gender},</if>
<if test="birthday != null">#{birthday},</if>
<if test="dayAge != null">#{dayAge},</if>
<if test="monthAge != null">#{monthAge},</if>
<if test="parity != null">#{parity},</if>
<if test="birthWeight != null">#{birthWeight},</if>
<if test="weaningDate != null">#{weaningDate},</if>
<if test="statusId != null">#{statusId},</if>
<if test="weaningWeight != null">#{weaningWeight},</if>
<if test="currentWeight != null">#{currentWeight},</if>
<if test="breedStatusId != null">#{breedStatusId},</if>
<if test="breed != null">#{breed},</if>
<if test="bsFatherId != null">#{bsFatherId},</if>
<if test="fatherManageTags != null">#{fatherManageTags},</if>
<if test="bsMotherId != null">#{bsMotherId},</if>
<if test="motherManageTags != null">#{motherManageTags},</if>
<if test="receptorId != null">#{receptorId},</if>
<if test="receptorManageTags != null">#{receptorManageTags},</if>
<if test="fatherFatherId != null">#{fatherFatherId},</if>
<if test="grandfatherManageTags != null">#{grandfatherManageTags},</if>
<if test="fatherMotherId != null">#{fatherMotherId},</if>
<if test="grandmotherManageTags != null">#{grandmotherManageTags},</if>
<if test="fatherId != null">#{fatherId},</if>
<if test="maternalGrandfatherManageTags != null">#{maternalGrandfatherManageTags},</if>
<if test="motherId != null">#{motherId},</if>
<if test="maternalGrandmotherManageTags != null">#{maternalGrandmotherManageTags},</if>
<if test="matingDate != null">#{matingDate},</if>
<if test="matingTypeId != null">#{matingTypeId},</if>
<if test="pregDate != null">#{pregDate},</if>
<if test="lambingDate != null">#{lambingDate},</if>
<if test="lambingDay != null">#{lambingDay},</if>
<if test="matingDay != null">#{matingDay},</if>
<if test="gestationDay != null">#{gestationDay},</if>
<if test="expectedDate != null">#{expectedDate},</if>
<if test="postLambingDay != null">#{postLambingDay},</if>
<if test="lactationDay != null">#{lactationDay},</if>
<if test="anestrousDay != null">#{anestrousDay},</if>
<if test="matingCounts != null">#{matingCounts},</if>
<if test="matingTotal != null">#{matingTotal},</if>
<if test="miscarriageCounts != null">#{miscarriageCounts},</if>
<if test="comment != null">#{comment},</if>
<if test="controlled != null">#{controlled},</if>
<if test="body != null">#{body},</if>
<if test="breast != null">#{breast},</if>
<if test="source != null">#{source},</if>
<if test="sourceDate != null">#{sourceDate},</if>
<if test="sourceRanchId != null">#{sourceRanchId},</if>
<if test="sourceRanch != null">#{sourceRanch},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="isDelete != null">#{isDelete},</if>
</trim>
</insert>
<update id="updateSheepFile" parameterType="SheepFile">
update sheep_file
<trim prefix="SET" suffixOverrides=",">
<if test="bsManageTags != null">bs_manage_tags = #{bsManageTags},</if>
<if test="ranchId != null">ranch_id = #{ranchId},</if>
<if test="drRanch != null">dr_ranch = #{drRanch},</if>
<if test="sheepfoldId != null">sheepfold_id = #{sheepfoldId},</if>
<if test="sheepfoldName != null">sheepfold_name = #{sheepfoldName},</if>
<if test="electronicTags != null">electronic_tags = #{electronicTags},</if>
<if test="varietyId != null">variety_id = #{varietyId},</if>
<if test="variety != null">variety = #{variety},</if>
<if test="family != null">family = #{family},</if>
<if test="name != null">name = #{name},</if>
<if test="gender != null">gender = #{gender},</if>
<if test="birthday != null">birthday = #{birthday},</if>
<if test="dayAge != null">day_age = #{dayAge},</if>
<if test="monthAge != null">month_age = #{monthAge},</if>
<if test="parity != null">parity = #{parity},</if>
<if test="birthWeight != null">birth_weight = #{birthWeight},</if>
<if test="weaningDate != null">weaning_date = #{weaningDate},</if>
<if test="statusId != null">status_id = #{statusId},</if>
<if test="weaningWeight != null">weaning_weight = #{weaningWeight},</if>
<if test="currentWeight != null">current_weight = #{currentWeight},</if>
<if test="breedStatusId != null">breed_status_id = #{breedStatusId},</if>
<if test="breed != null">breed = #{breed},</if>
<if test="bsFatherId != null">bs_father_id = #{bsFatherId},</if>
<if test="fatherManageTags != null">father_manage_tags = #{fatherManageTags},</if>
<if test="bsMotherId != null">bs_mother_id = #{bsMotherId},</if>
<if test="motherManageTags != null">mother_manage_tags = #{motherManageTags},</if>
<if test="receptorId != null">receptor_id = #{receptorId},</if>
<if test="receptorManageTags != null">receptor_manage_tags = #{receptorManageTags},</if>
<if test="fatherFatherId != null">father_father_id = #{fatherFatherId},</if>
<if test="grandfatherManageTags != null">grandfather_manage_tags = #{grandfatherManageTags},</if>
<if test="fatherMotherId != null">father_mother_id = #{fatherMotherId},</if>
<if test="grandmotherManageTags != null">grandmother_manage_tags = #{grandmotherManageTags},</if>
<if test="fatherId != null">father_id = #{fatherId},</if>
<if test="maternalGrandfatherManageTags != null">maternal_grandfather_manage_tags = #{maternalGrandfatherManageTags},</if>
<if test="motherId != null">mother_id = #{motherId},</if>
<if test="maternalGrandmotherManageTags != null">maternal_grandmother_manage_tags = #{maternalGrandmotherManageTags},</if>
<if test="matingDate != null">mating_date = #{matingDate},</if>
<if test="matingTypeId != null">mating_type_id = #{matingTypeId},</if>
<if test="pregDate != null">preg_date = #{pregDate},</if>
<if test="lambingDate != null">lambing_date = #{lambingDate},</if>
<if test="lambingDay != null">lambing_day = #{lambingDay},</if>
<if test="matingDay != null">mating_day = #{matingDay},</if>
<if test="gestationDay != null">gestation_day = #{gestationDay},</if>
<if test="expectedDate != null">expected_date = #{expectedDate},</if>
<if test="postLambingDay != null">post_lambing_day = #{postLambingDay},</if>
<if test="lactationDay != null">lactation_day = #{lactationDay},</if>
<if test="anestrousDay != null">anestrous_day = #{anestrousDay},</if>
<if test="matingCounts != null">mating_counts = #{matingCounts},</if>
<if test="matingTotal != null">mating_total = #{matingTotal},</if>
<if test="miscarriageCounts != null">miscarriage_counts = #{miscarriageCounts},</if>
<if test="comment != null">comment = #{comment},</if>
<if test="controlled != null">controlled = #{controlled},</if>
<if test="body != null">body = #{body},</if>
<if test="breast != null">breast = #{breast},</if>
<if test="source != null">source = #{source},</if>
<if test="sourceDate != null">source_date = #{sourceDate},</if>
<if test="sourceRanchId != null">source_ranch_id = #{sourceRanchId},</if>
<if test="sourceRanch != null">source_ranch = #{sourceRanch},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="isDelete != null">is_delete = #{isDelete},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteSheepFileById" parameterType="Long">
delete from sheep_file where id = #{id}
</delete>
<delete id="deleteSheepFileByIds" parameterType="String">
delete from sheep_file where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<select id="selectSheepByManageTags" parameterType="String" resultMap="SheepFileResult">
<include refid="selectSheepFileVo"/>
where bs_manage_tags = #{tags}
</select>
</mapper>

View File

@@ -43,7 +43,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
</select>
<select id="selectSwMedicineUsageById" parameterType="Long" resultMap="SwMedicineUsageSwMedicineUsageDetailsResult">
<select id="selectSwMedicineUsageById" parameterType="Integer" resultMap="SwMedicineUsageSwMedicineUsageDetailsResult">
select id, name, use_type, update_by, update_time, create_by, create_time
from sw_medicine_usage
where id = #{id}
@@ -108,7 +108,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
</delete>
<delete id="deleteSwMedicineUsageDetailsByMediUsage" parameterType="Long">
<delete id="deleteSwMedicineUsageDetailsByMediUsage" parameterType="Integer">
delete from sw_medicine_usage_details where medi_usage = #{mediUsage}
</delete>

View File

@@ -8,6 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="id" column="id" />
<result property="diagId" column="diag_id" />
<result property="sheepId" column="sheep_id" />
<result property="sheepNo" column="manage_tags"/>
<result property="variety" column="variety" />
<result property="sheepType" column="sheep_type" />
<result property="monthAge" column="month_age" />
@@ -18,6 +19,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="gestDay" column="gest_day" />
<result property="datetime" column="datetime" />
<result property="diseaseId" column="disease_id" />
<result property="diseaseName" column="disease_name"/>
<result property="diseasePid" column="disease_pid" />
<result property="veterinary" column="veterinary" />
<result property="usageId" column="usage_id" />
@@ -29,7 +31,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectTreatmentVo">
select id, diag_id, sheep_id, variety, sheep_type, month_age, gender, parity, breed, lact_day, gest_day, datetime, disease_id, disease_pid, veterinary, usage_id, comment, update_by, update_time, create_by, create_time from sw_treatment
select t.id, diag_id, sheep_id, variety, sheep_type, month_age, t.gender, t.parity, breed, lact_day, gest_day, datetime, disease_id, disease_pid, veterinary, usage_id, t.comment, t.update_by, t.update_time, t.create_by, t.create_time,
bs.manage_tags,
sd.name disease_name
from sw_treatment t
left join bas_sheep bs on t.sheep_id = bs.id
left join sw_disease sd on t.disease_id = sd.id
</sql>
<select id="selectTreatmentList" parameterType="Treatment" resultMap="TreatmentResult">
@@ -44,7 +51,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectTreatmentById" parameterType="Long" resultMap="TreatmentResult">
<include refid="selectTreatmentVo"/>
where id = #{id}
where t.id = #{id}
</select>
<insert id="insertTreatment" parameterType="Treatment" useGeneratedKeys="true" keyProperty="id">
@@ -95,6 +102,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim>
</insert>
<insert id="insertTreatmentList" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id">
insert into sw_treatment
(diag_id, sheep_id, variety, sheep_type, month_age, gender,
parity, breed, lact_day, gest_day, datetime,
disease_id, disease_pid, veterinary, usage_id,
comment, update_by, update_time, create_by, create_time)
values
<foreach collection="list" item="t" separator=",">
(#{t.diagId}, #{t.sheepId}, #{t.variety}, #{t.sheepType},
#{t.monthAge}, #{t.gender}, #{t.parity}, #{t.breed},
#{t.lactDay}, #{t.gestDay}, #{t.datetime}, #{t.diseaseId},
#{t.diseasePid}, #{t.veterinary},#{t.usageId}, #{t.comment},
#{t.updateBy}, #{t.updateTime},#{t.createBy}, #{t.createTime})
</foreach>
</insert>
<update id="updateTreatment" parameterType="Treatment">
update sw_treatment
<trim prefix="SET" suffixOverrides=",">

View File

@@ -1,62 +1,61 @@
<?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">
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zhyc.module.dairyProducts.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" />
<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
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>
<if test="source != null and source != ''">
AND source LIKE CONCAT('%', #{source}, '%')
</if>
<if test="datetime != null">
AND datetime = #{datetime}
</if>
</where>
</select>
<!-- 根据ID查询 -->
<select id="selectNpFreshMilkInspById" parameterType="Long" resultMap="NpFreshMilkInspResult">
<include refid="selectNpFreshMilkInspVo"/>
where id = #{id}
WHERE id = #{id}
</select>
<!-- 新增 -->
<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=",">
<if test="source != null">source,</if>
<if test="datetime != null">datetime,</if>
@@ -75,7 +74,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="commnet != null">commnet,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
</trim>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="source != null">#{source},</if>
<if test="datetime != null">#{datetime},</if>
@@ -94,11 +93,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="commnet != null">#{commnet},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
</trim>
</trim>
</insert>
<!-- 修改 -->
<update id="updateNpFreshMilkInsp" parameterType="NpFreshMilkInsp">
update np_fresh_milk_insp
UPDATE np_fresh_milk_insp
<trim prefix="SET" suffixOverrides=",">
<if test="source != null">source = #{source},</if>
<if test="datetime != null">datetime = #{datetime},</if>
@@ -115,18 +115,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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}
WHERE id = #{id}
</update>
<!-- 单个删除 -->
<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 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=")">
#{id}
</foreach>

View File

@@ -26,7 +26,11 @@
</resultMap>
<sql id="selectNpYogurtInspVo">
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
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
</sql>
<select id="selectNpYogurtInspList" parameterType="NpYogurtInsp" resultMap="NpYogurtInspResult">
@@ -40,7 +44,7 @@
</if>
</where>
</select>
<select id="selectNpYogurtInspById" parameterType="Long" resultMap="NpYogurtInspResult">
<include refid="selectNpYogurtInspVo"/>
where id = #{id}
@@ -117,7 +121,7 @@
</delete>
<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=")">
#{id}
</foreach>