123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139 |
- <?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.InpComplicationSymptomMapper" >
- <resultMap id="BaseResultMap" type="com.xinxin.topro.inpnurseservice.mysqlmodel.InpComplicationSymptom" >
- <id column="ICS_ID" property="icsId" jdbcType="INTEGER" />
- <result column="ICOM_ID" property="icomId" jdbcType="INTEGER" />
- <result column="ICS_Code" property="icsCode" jdbcType="VARCHAR" />
- <result column="ICS_Name" property="icsName" jdbcType="VARCHAR" />
- <result column="ICS_Recordor" property="icsRecordor" jdbcType="VARCHAR" />
- <result column="ICS_Record_Time" property="icsRecordTime" jdbcType="TIMESTAMP" />
- <result column="ICS_IsDel" property="icsIsdel" jdbcType="INTEGER" />
- </resultMap>
- <sql id="Base_Column_List" >
- ICS_ID, ICOM_ID, ICS_Code, ICS_Name, ICS_Recordor, ICS_Record_Time, ICS_IsDel
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
- select
- <include refid="Base_Column_List" />
- from inp_complication_symptom
- where ICS_ID = #{icsId,jdbcType=INTEGER}
- </select>
- <insert id="insert" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpComplicationSymptom" >
- insert into inp_complication_symptom (ICS_ID, ICOM_ID, ICS_Code,
- ICS_Name, ICS_Recordor, ICS_Record_Time,
- ICS_IsDel)
- values (#{icsId,jdbcType=INTEGER}, #{icomId,jdbcType=INTEGER}, #{icsCode,jdbcType=VARCHAR},
- #{icsName,jdbcType=VARCHAR}, #{icsRecordor,jdbcType=VARCHAR}, #{icsRecordTime,jdbcType=TIMESTAMP},
- #{icsIsdel,jdbcType=INTEGER})
- </insert>
- <insert id="insertSelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpComplicationSymptom" >
- insert into inp_complication_symptom
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="icsId != null" >
- ICS_ID,
- </if>
- <if test="icomId != null" >
- ICOM_ID,
- </if>
- <if test="icsCode != null" >
- ICS_Code,
- </if>
- <if test="icsName != null" >
- ICS_Name,
- </if>
- <if test="icsRecordor != null" >
- ICS_Recordor,
- </if>
- <if test="icsRecordTime != null" >
- ICS_Record_Time,
- </if>
- <if test="icsIsdel != null" >
- ICS_IsDel,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="icsId != null" >
- #{icsId,jdbcType=INTEGER},
- </if>
- <if test="icomId != null" >
- #{icomId,jdbcType=INTEGER},
- </if>
- <if test="icsCode != null" >
- #{icsCode,jdbcType=VARCHAR},
- </if>
- <if test="icsName != null" >
- #{icsName,jdbcType=VARCHAR},
- </if>
- <if test="icsRecordor != null" >
- #{icsRecordor,jdbcType=VARCHAR},
- </if>
- <if test="icsRecordTime != null" >
- #{icsRecordTime,jdbcType=TIMESTAMP},
- </if>
- <if test="icsIsdel != null" >
- #{icsIsdel,jdbcType=INTEGER},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpComplicationSymptom" >
- update inp_complication_symptom
- <set >
- <if test="icomId != null" >
- ICOM_ID = #{icomId,jdbcType=INTEGER},
- </if>
- <if test="icsCode != null" >
- ICS_Code = #{icsCode,jdbcType=VARCHAR},
- </if>
- <if test="icsName != null" >
- ICS_Name = #{icsName,jdbcType=VARCHAR},
- </if>
- <if test="icsRecordor != null" >
- ICS_Recordor = #{icsRecordor,jdbcType=VARCHAR},
- </if>
- <if test="icsRecordTime != null" >
- ICS_Record_Time = #{icsRecordTime,jdbcType=TIMESTAMP},
- </if>
- <if test="icsIsdel != null" >
- ICS_IsDel = #{icsIsdel,jdbcType=INTEGER},
- </if>
- </set>
- where ICS_ID = #{icsId,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpComplicationSymptom" >
- update inp_complication_symptom
- set ICOM_ID = #{icomId,jdbcType=INTEGER},
- ICS_Code = #{icsCode,jdbcType=VARCHAR},
- ICS_Name = #{icsName,jdbcType=VARCHAR},
- ICS_Recordor = #{icsRecordor,jdbcType=VARCHAR},
- ICS_Record_Time = #{icsRecordTime,jdbcType=TIMESTAMP},
- ICS_IsDel = #{icsIsdel,jdbcType=INTEGER}
- where ICS_ID = #{icsId,jdbcType=INTEGER}
- </update>
- <insert id="batchInsert">
- insert into inp_complication_symptom (ICOM_ID, ICS_Code,
- ICS_Name, ICS_Recordor, ICS_Record_Time,
- ICS_IsDel)
- values
- <foreach collection="list" item="item" separator=",">
- (#{item.icomId,jdbcType=INTEGER}, #{item.icsCode,jdbcType=VARCHAR},
- #{item.icsName,jdbcType=VARCHAR}, #{item.icsRecordor,jdbcType=VARCHAR}, now(),
- 0)
- </foreach>
- </insert>
- <update id="delByIcomId">
- update inp_complication_symptom
- set ICS_IsDel = -1,
- ICS_Recordor = #{icsRecordor,jdbcType=VARCHAR},
- ICS_Record_Time = now()
- where ICOM_ID = #{icomId,jdbcType=INTEGER}
- </update>
- <select id="selectDicIdByIcomId" resultType="java.lang.String">
- select ICS_Code from inp_complication_symptom
- where ICOM_ID = #{icomId,jdbcType=INTEGER}
- and ICS_IsDel = 0
- </select>
- </mapper>
|