业务结构调整
This commit is contained in:
@@ -0,0 +1,84 @@
|
||||
<?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.produce.breed.mapper.ScPregnancyRecordMapper">
|
||||
|
||||
<resultMap type="ScPregnancyRecord" id="ScPregnancyRecordResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="datetime" column="datetime" />
|
||||
<result property="result" column="result" />
|
||||
<result property="number" column="number" />
|
||||
<result property="technician" column="technician" />
|
||||
<result property="way" column="way" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectScPregnancyRecordVo">
|
||||
select id, datetime, result, number, technician, way, create_by, create_time from sc_pregnancy_record
|
||||
</sql>
|
||||
|
||||
<select id="selectScPregnancyRecordList" parameterType="ScPregnancyRecord" resultMap="ScPregnancyRecordResult">
|
||||
<include refid="selectScPregnancyRecordVo"/>
|
||||
<where>
|
||||
<if test="datetime != null "> and datetime = #{datetime}</if>
|
||||
<if test="result != null and result != ''"> and result = #{result}</if>
|
||||
<if test="number != null "> and number = #{number}</if>
|
||||
<if test="technician != null and technician != ''"> and technician = #{technician}</if>
|
||||
<if test="way != null "> and way = #{way}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectScPregnancyRecordById" parameterType="Long" resultMap="ScPregnancyRecordResult">
|
||||
<include refid="selectScPregnancyRecordVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertScPregnancyRecord" parameterType="ScPregnancyRecord" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sc_pregnancy_record
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="datetime != null">datetime,</if>
|
||||
<if test="result != null">result,</if>
|
||||
<if test="number != null">number,</if>
|
||||
<if test="technician != null">technician,</if>
|
||||
<if test="way != null">way,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="datetime != null">#{datetime},</if>
|
||||
<if test="result != null">#{result},</if>
|
||||
<if test="number != null">#{number},</if>
|
||||
<if test="technician != null">#{technician},</if>
|
||||
<if test="way != null">#{way},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateScPregnancyRecord" parameterType="ScPregnancyRecord">
|
||||
update sc_pregnancy_record
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="datetime != null">datetime = #{datetime},</if>
|
||||
<if test="result != null">result = #{result},</if>
|
||||
<if test="number != null">number = #{number},</if>
|
||||
<if test="technician != null">technician = #{technician},</if>
|
||||
<if test="way != null">way = #{way},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteScPregnancyRecordById" parameterType="Long">
|
||||
delete from sc_pregnancy_record where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteScPregnancyRecordByIds" parameterType="String">
|
||||
delete from sc_pregnancy_record where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user