gdg
2020-12-23 6207311d7df3d47d27fdd78de33f49875550f52f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?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.nanometer.smartlab.dao.OpeLaboratoryReserveDao">
    <resultMap id="OpeLaboratoryReserve" type="com.nanometer.smartlab.entity.OpeLaboratoryReserve">
        <id property="id" column="id"/>
        <result property="reagentId" column="reagent_id"></result>
        <result property="articleNumber" column="article_number"></result>
        <result property="reserve" column="reserve"></result>
        <result property="updateTime" column="update_time"></result>
        <result property="validFlag" column="valid_flag" typeHandler="com.nanometer.smartlab.entity.handler.ValidFlagHandler"></result>
        <result property="userId" column="user_id"></result>
        <result property="houseId" column="house_id"></result>
        <result property="containerId" column="container_id"></result>
    </resultMap>
 
    <insert id="insertOpeLaboratoryReserve" parameterType="com.nanometer.smartlab.entity.OpeLaboratoryReserve">
        insert into ope_laboratory_reserve(id, reagent_id, article_number,reserve, valid_flag, update_time,user_id,house_id,container_id)
        values (#{id},#{reagentId},#{articleNumber},#{reserve},#{validFlag},now(),#{userId},#{houseId},#{containerId})
    </insert>
    <select id="selectByReId" resultMap="OpeLaboratoryReserve">
        select * from ope_laboratory_reserve where reagent_id=#{id}
    </select>
 
    <update id="updateByReId" parameterType="java.util.Map">
        update ope_laboratory_reserve set reagent_id=#{newReId} where reagent_id=#{oldReId}
    </update>
 
 
</mapper>