2025-07-13 12:45:13 +08:00
|
|
|
<?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">
|
2025-07-18 15:27:22 +08:00
|
|
|
<mapper namespace="com.zhyc.module.base.mapper.SheepFileMapper">
|
2025-07-13 12:45:13 +08:00
|
|
|
|
|
|
|
|
<resultMap type="SheepFile" id="SheepFileResult">
|
|
|
|
|
<result property="id" column="id" />
|
|
|
|
|
<result property="bsManageTags" column="bs_manage_tags" />
|
|
|
|
|
<result property="ranchId" column="ranch_id" />
|
|
|
|
|
<result property="drRanch" column="dr_ranch" />
|
|
|
|
|
<result property="sheepfoldId" column="sheepfold_id" />
|
|
|
|
|
<result property="sheepfoldName" column="sheepfold_name" />
|
|
|
|
|
<result property="electronicTags" column="electronic_tags" />
|
|
|
|
|
<result property="varietyId" column="variety_id" />
|
|
|
|
|
<result property="variety" column="variety" />
|
|
|
|
|
<result property="family" column="family" />
|
|
|
|
|
<result property="name" column="name" />
|
|
|
|
|
<result property="gender" column="gender" />
|
|
|
|
|
<result property="birthday" column="birthday" />
|
|
|
|
|
<result property="dayAge" column="day_age" />
|
|
|
|
|
<result property="monthAge" column="month_age" />
|
|
|
|
|
<result property="parity" column="parity" />
|
|
|
|
|
<result property="birthWeight" column="birth_weight" />
|
|
|
|
|
<result property="weaningDate" column="weaning_date" />
|
|
|
|
|
<result property="statusId" column="status_id" />
|
|
|
|
|
<result property="weaningWeight" column="weaning_weight" />
|
|
|
|
|
<result property="currentWeight" column="current_weight" />
|
|
|
|
|
<result property="breedStatusId" column="breed_status_id" />
|
|
|
|
|
<result property="breed" column="breed" />
|
|
|
|
|
<result property="bsFatherId" column="bs_father_id" />
|
|
|
|
|
<result property="fatherManageTags" column="father_manage_tags" />
|
|
|
|
|
<result property="bsMotherId" column="bs_mother_id" />
|
|
|
|
|
<result property="motherManageTags" column="mother_manage_tags" />
|
|
|
|
|
<result property="receptorId" column="receptor_id" />
|
|
|
|
|
<result property="receptorManageTags" column="receptor_manage_tags" />
|
|
|
|
|
<result property="fatherFatherId" column="father_father_id" />
|
|
|
|
|
<result property="grandfatherManageTags" column="grandfather_manage_tags" />
|
|
|
|
|
<result property="fatherMotherId" column="father_mother_id" />
|
|
|
|
|
<result property="grandmotherManageTags" column="grandmother_manage_tags" />
|
|
|
|
|
<result property="fatherId" column="father_id" />
|
|
|
|
|
<result property="maternalGrandfatherManageTags" column="maternal_grandfather_manage_tags" />
|
|
|
|
|
<result property="motherId" column="mother_id" />
|
|
|
|
|
<result property="maternalGrandmotherManageTags" column="maternal_grandmother_manage_tags" />
|
|
|
|
|
<result property="matingDate" column="mating_date" />
|
|
|
|
|
<result property="matingTypeId" column="mating_type_id" />
|
|
|
|
|
<result property="pregDate" column="preg_date" />
|
|
|
|
|
<result property="lambingDate" column="lambing_date" />
|
|
|
|
|
<result property="lambingDay" column="lambing_day" />
|
|
|
|
|
<result property="matingDay" column="mating_day" />
|
|
|
|
|
<result property="gestationDay" column="gestation_day" />
|
|
|
|
|
<result property="expectedDate" column="expected_date" />
|
|
|
|
|
<result property="postLambingDay" column="post_lambing_day" />
|
|
|
|
|
<result property="lactationDay" column="lactation_day" />
|
|
|
|
|
<result property="anestrousDay" column="anestrous_day" />
|
|
|
|
|
<result property="matingCounts" column="mating_counts" />
|
|
|
|
|
<result property="matingTotal" column="mating_total" />
|
|
|
|
|
<result property="miscarriageCounts" column="miscarriage_counts" />
|
|
|
|
|
<result property="comment" column="comment" />
|
|
|
|
|
<result property="controlled" column="controlled" />
|
|
|
|
|
<result property="body" column="body" />
|
|
|
|
|
<result property="breast" column="breast" />
|
|
|
|
|
<result property="source" column="source" />
|
|
|
|
|
<result property="sourceDate" column="source_date" />
|
|
|
|
|
<result property="sourceRanchId" column="source_ranch_id" />
|
|
|
|
|
<result property="sourceRanch" column="source_ranch" />
|
|
|
|
|
<result property="updateBy" column="update_by" />
|
|
|
|
|
<result property="updateTime" column="update_time" />
|
|
|
|
|
<result property="createBy" column="create_by" />
|
|
|
|
|
<result property="createTime" column="create_time" />
|
|
|
|
|
<result property="isDelete" column="is_delete" />
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<sql id="selectSheepFileVo">
|
|
|
|
|
select id, bs_manage_tags, ranch_id, dr_ranch, sheepfold_id, sheepfold_name, electronic_tags, variety_id, variety, family, name, gender, birthday, day_age, month_age, parity, birth_weight, weaning_date, status_id, weaning_weight, current_weight, breed_status_id, breed, bs_father_id, father_manage_tags, bs_mother_id, mother_manage_tags, receptor_id, receptor_manage_tags, father_father_id, grandfather_manage_tags, father_mother_id, grandmother_manage_tags, father_id, maternal_grandfather_manage_tags, mother_id, maternal_grandmother_manage_tags, mating_date, mating_type_id, preg_date, lambing_date, lambing_day, mating_day, gestation_day, expected_date, post_lambing_day, lactation_day, anestrous_day, mating_counts, mating_total, miscarriage_counts, comment, controlled, body, breast, source, source_date, source_ranch_id, source_ranch, update_by, update_time, create_by, create_time, is_delete from sheep_file
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<select id="selectSheepFileList" parameterType="SheepFile" resultMap="SheepFileResult">
|
|
|
|
|
<include refid="selectSheepFileVo"/>
|
|
|
|
|
<where>
|
|
|
|
|
<if test="id != null "> and id = #{id}</if>
|
|
|
|
|
<if test="bsManageTags != null and bsManageTags != ''"> and bs_manage_tags = #{bsManageTags}</if>
|
|
|
|
|
<if test="drRanch != null and drRanch != ''"> and dr_ranch = #{drRanch}</if>
|
|
|
|
|
<if test="electronicTags != null and electronicTags != ''"> and electronic_tags = #{electronicTags}</if>
|
|
|
|
|
<if test="variety != null and variety != ''"> and variety = #{variety}</if>
|
|
|
|
|
<if test="name != null and name != ''"> and name = #{name}</if>
|
|
|
|
|
<if test="gender != null "> and gender = #{gender}</if>
|
|
|
|
|
<if test="statusId != null "> and status_id = #{statusId}</if>
|
|
|
|
|
<if test="breed != null and breed != ''"> and breed = #{breed}</if>
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectSheepFileById" parameterType="Long" resultMap="SheepFileResult">
|
|
|
|
|
<include refid="selectSheepFileVo"/>
|
|
|
|
|
where id = #{id}
|
|
|
|
|
</select>
|
2025-07-21 19:28:38 +08:00
|
|
|
<select id="selectSheepByManageTags" parameterType="String" resultMap="SheepFileResult">
|
|
|
|
|
<include refid="selectSheepFileVo"/>
|
|
|
|
|
where bs_manage_tags = #{tags}
|
|
|
|
|
</select>
|
2025-07-15 18:40:22 +08:00
|
|
|
|
|
|
|
|
|
2025-07-13 12:45:13 +08:00
|
|
|
</mapper>
|