123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134 |
- <?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.sysservice.dao.mysqlmapper.DicCatheterPartMapper" >
- <resultMap id="BaseResultMap" type="com.xinxin.topro.sysservice.dao.mysqlmodel.DicCatheterPart" >
- <id column="DCP_ID" property="dcpId" jdbcType="INTEGER" />
- <result column="DC_ID" property="dcId" jdbcType="INTEGER" />
- <result column="DCP_Part" property="dcpPart" jdbcType="VARCHAR" />
- <result column="DIP_Operation_Time" property="dipOperationTime" jdbcType="TIMESTAMP" />
- <result column="DIP_Operator" property="dipOperator" jdbcType="VARCHAR" />
- <result column="DIP_IsDel" property="dipIsdel" jdbcType="INTEGER" />
- </resultMap>
- <sql id="Base_Column_List" >
- DCP_ID, DC_ID, DCP_Part, DIP_Operation_Time, DIP_Operator, DIP_IsDel
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
- select
- <include refid="Base_Column_List" />
- from dic_catheter_part
- where DCP_ID = #{dcpId,jdbcType=INTEGER}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
- delete from dic_catheter_part
- where DCP_ID = #{dcpId,jdbcType=INTEGER}
- </delete>
- <insert id="insert" parameterType="com.xinxin.topro.sysservice.dao.mysqlmodel.DicCatheterPart" >
- insert into dic_catheter_part (DCP_ID, DC_ID, DCP_Part,
- DIP_Operation_Time, DIP_Operator, DIP_IsDel
- )
- values (#{dcpId,jdbcType=INTEGER}, #{dcId,jdbcType=INTEGER}, #{dcpPart,jdbcType=VARCHAR},
- now(), #{dipOperator,jdbcType=VARCHAR}, #{dipIsdel,jdbcType=INTEGER}
- )
- </insert>
- <insert id="insertSelective" parameterType="com.xinxin.topro.sysservice.dao.mysqlmodel.DicCatheterPart" >
- insert into dic_catheter_part
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="dcpId != null" >
- DCP_ID,
- </if>
- <if test="dcId != null" >
- DC_ID,
- </if>
- <if test="dcpPart != null" >
- DCP_Part,
- </if>
- <if test="dipOperationTime != null" >
- DIP_Operation_Time,
- </if>
- <if test="dipOperator != null" >
- DIP_Operator,
- </if>
- <if test="dipIsdel != null" >
- DIP_IsDel,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="dcpId != null" >
- #{dcpId,jdbcType=INTEGER},
- </if>
- <if test="dcId != null" >
- #{dcId,jdbcType=INTEGER},
- </if>
- <if test="dcpPart != null" >
- #{dcpPart,jdbcType=VARCHAR},
- </if>
- <if test="dipOperationTime != null" >
- #{dipOperationTime,jdbcType=TIMESTAMP},
- </if>
- <if test="dipOperator != null" >
- #{dipOperator,jdbcType=VARCHAR},
- </if>
- <if test="dipIsdel != null" >
- #{dipIsdel,jdbcType=INTEGER},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.sysservice.dao.mysqlmodel.DicCatheterPart" >
- update dic_catheter_part
- <set >
- <if test="dcId != null" >
- DC_ID = #{dcId,jdbcType=INTEGER},
- </if>
- <if test="dcpPart != null" >
- DCP_Part = #{dcpPart,jdbcType=VARCHAR},
- </if>
- <if test="dipOperator != null" >
- DIP_Operator = #{dipOperator,jdbcType=VARCHAR},
- </if>
- <if test="dipIsdel != null" >
- DIP_IsDel = #{dipIsdel,jdbcType=INTEGER},
- </if>
- now(),
- </set>
- where DCP_ID = #{dcpId,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.sysservice.dao.mysqlmodel.DicCatheterPart" >
- update dic_catheter_part
- set
- DIP_Operation_Time = now(),
- DIP_Operator = #{dipOperator,jdbcType=VARCHAR},
- DIP_IsDel = #{dipIsdel,jdbcType=INTEGER}
- where DCP_ID = #{dcpId,jdbcType=INTEGER}
- </update>
- <insert id="batchInsertPart" parameterType="java.util.List">
- insert into dic_catheter_part (DC_ID, DCP_Part,
- DIP_Operation_Time, DIP_Operator, DIP_IsDel)
- values
- <foreach collection="list" separator="," item="item">
- (#{item.dcId,jdbcType=INTEGER}, #{item.dcpPart,jdbcType=VARCHAR},
- now(), #{item.dipOperator,jdbcType=VARCHAR}, #{item.dipIsdel,jdbcType=INTEGER}
- )
- </foreach>
- </insert>
- <select id="selectByIds" resultMap="BaseResultMap" parameterType="java.util.List">
- select <include refid="Base_Column_List"/>
- from dic_catheter_part
- where DIP_IsDel = 0
- and DCP_Part IN
- <foreach collection="list" separator="," open="(" close=")" item="item">
- #{item}
- </foreach>
- </select>
- <update id="deleteById">
- update dic_catheter_part
- set DIP_IsDel = -1,
- DIP_Operator = #{dipOperator,jdbcType=VARCHAR},
- DIP_Operation_Time = now()
- where DC_ID = #{dcId,jdbcType=INTEGER}
- </update>
- </mapper>
|