123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115 |
- <?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.xinxin.topro.inpnurseservice.mysqlmapper.InpIoPropertyMapper" >
- <resultMap id="BaseResultMap" type="com.xinxin.topro.inpnurseservice.mysqlmodel.InpIoProperty" >
- <id column="IOP_ID" property="iopId" jdbcType="INTEGER" />
- <result column="IIO_ID" property="iioId" jdbcType="INTEGER" />
- <result column="DIP_ID" property="dipId" jdbcType="INTEGER" />
- <result column="IOP_Value" property="iopValue" jdbcType="VARCHAR" />
- <result column="IOP_IsDel" property="iopIsdel" jdbcType="INTEGER" />
- </resultMap>
- <sql id="Base_Column_List" >
- IOP_ID, IIO_ID, DIP_ID, IOP_Value, IOP_IsDel
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
- select
- <include refid="Base_Column_List" />
- from inp_io_property
- where IOP_ID = #{iopId,jdbcType=INTEGER}
- </select>
- <select id="selectBatchIo" resultMap="BaseResultMap" parameterType="List" >
- select
- <include refid="Base_Column_List" />
- from inp_io_property
- where IOP_IsDel = 0 and IIO_ID in
- <foreach collection="list" item="item" index="index" separator="," open="(" close=")">
- #{item,jdbcType=INTEGER}
- </foreach>
- </select>
- <select id="selectByDIOID" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
- select
- <include refid="Base_Column_List" />
- from inp_io_property
- where IOP_IsDel = 0 and IIO_ID = #{dioId,jdbcType=INTEGER}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
- delete from inp_io_property
- where IOP_ID = #{iopId,jdbcType=INTEGER}
- </delete>
- <insert id="insertSelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpIoProperty" >
- insert into inp_io_property
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="iopId != null" >
- IOP_ID,
- </if>
- <if test="iioId != null" >
- IIO_ID,
- </if>
- <if test="dipId != null" >
- DIP_ID,
- </if>
- <if test="iopValue != null" >
- IOP_Value,
- </if>
- <if test="iopIsdel != null" >
- IOP_IsDel,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="iopId != null" >
- #{iopId,jdbcType=INTEGER},
- </if>
- <if test="iioId != null" >
- #{iioId,jdbcType=INTEGER},
- </if>
- <if test="dipId != null" >
- #{dipId,jdbcType=INTEGER},
- </if>
- <if test="iopValue != null" >
- #{iopValue,jdbcType=VARCHAR},
- </if>
- <if test="iopIsdel != null" >
- #{iopIsdel,jdbcType=INTEGER},
- </if>
- </trim>
- </insert>
- <insert id="batchInsert" parameterType="java.util.List">
- insert into inp_io_property (IIO_ID, DIP_ID,IOP_Value)
- values
- <foreach collection="list" item="item" separator=",">
- (#{item.iioId,jdbcType=INTEGER}, #{item.dipId,jdbcType=INTEGER}, #{item.iopValue,jdbcType=VARCHAR})
- </foreach>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpIoProperty" >
- update inp_io_property
- <set >
- <if test="iioId != null" >
- IIO_ID = #{iioId,jdbcType=INTEGER},
- </if>
- <if test="dipId != null" >
- DIP_ID = #{dipId,jdbcType=INTEGER},
- </if>
- <if test="iopValue != null" >
- IOP_Value = #{iopValue,jdbcType=VARCHAR},
- </if>
- <if test="iopIsdel != null" >
- IOP_IsDel = #{iopIsdel,jdbcType=INTEGER},
- </if>
- </set>
- where IOP_ID = #{iopId,jdbcType=INTEGER}
- </update>
- <update id="updateByStatus" parameterType="java.lang.Integer" >
- update inp_io_property
- set IOP_IsDel = -1
- where IIO_ID = #{iioId,jdbcType=INTEGER}
- </update>
- </mapper>
|