123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170 |
- <?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.DicIoPropertyMapper" >
- <resultMap id="BaseResultMap" type="com.xinxin.topro.inpnurseservice.mysqlmodel.DicIoProperty" >
- <id column="DIP_ID" property="dipId" jdbcType="INTEGER" />
- <result column="DIO_ID" property="dioId" jdbcType="INTEGER" />
- <result column="DIP_PropCode" property="dicPropCode" jdbcType="VARCHAR" />
- <result column="DIP_PropName" property="dipPropName" jdbcType="VARCHAR" />
- <result column="DIP_Operation_Time" property="dipOperationTime" jdbcType="TIMESTAMP" />
- <result column="DIP_Operator" property="dipOperator" jdbcType="VARCHAR" />
- <result column="DIP_SupID" property="dipSupId" jdbcType="INTEGER" />
- <result column="DIP_IsDel" property="dipIsDel" jdbcType="INTEGER" />
- </resultMap>
- <sql id="Base_Column_List" >
- DIP_ID, DIO_ID, DIP_PropCode, DIP_PropName, DIP_Operation_Time, DIP_Operator, DIP_SupID, DIP_IsDel
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
- select
- <include refid="Base_Column_List" />
- from dic_io_property
- where DIP_IsDel = 0 and DIP_ID = #{dipId,jdbcType=INTEGER}
- </select>
- <select id="selectByCode" resultMap="BaseResultMap" parameterType="java.lang.String" >
- select
- <include refid="Base_Column_List" />
- from dic_io_property
- where DIP_IsDel = 0 and DIP_PropCode = #{code,jdbcType=VARCHAR}
- </select>
- <select id="selectByDio" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
- select
- <include refid="Base_Column_List" />
- from dic_io_property
- where DIP_IsDel = 0 and DIP_SupID = 0 and DIO_ID = #{dioId,jdbcType=INTEGER}
- </select>
- <select id="selectByIds" resultMap="BaseResultMap" parameterType="List" >
- select
- <include refid="Base_Column_List" />
- from dic_io_property
- where DIP_IsDel = 0 and DIP_ID in
- <foreach collection="list" item="item" index="index" separator="," open="(" close=")">
- #{item,jdbcType=INTEGER}
- </foreach>
- </select>
- <select id="selectBySupId" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
- select
- <include refid="Base_Column_List" />
- from dic_io_property
- where DIP_IsDel = 0 and DIP_SupID = #{id,jdbcType=INTEGER}
- </select>
- <select id="selectBySupList" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from dic_io_property
- where DIP_IsDel = 0 and DIP_SupID in
- <foreach collection="list" item="item" separator="," index="index" open="(" close=")">
- #{item,jdbcType=INTEGER}
- </foreach>
- </select>
- <select id="selectAll" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from dic_io_property
- where DIP_IsDel = 0
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
- delete from dic_io_property
- where DIP_ID = #{dipId,jdbcType=INTEGER}
- </delete>
- <insert id="insertSelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.DicIoProperty" >
- insert into dic_io_property
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="dipId != null" >
- DIP_ID,
- </if>
- <if test="dioId != null" >
- DIO_ID,
- </if>
- <if test="dipPropCode != null" >
- DIP_PropCode,
- </if>
- <if test="dipPropName != null" >
- DIP_PropName,
- </if>
- <if test="dipOperationTime != null" >
- DIP_Operation_Time,
- </if>
- <if test="dipOperator != null" >
- DIP_Operator,
- </if>
- <if test="dipSupId != null" >
- DIP_SupID,
- </if>
- <if test="dipIsDel != null" >
- DIP_IsDel,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="dipId != null" >
- #{dipId,jdbcType=INTEGER},
- </if>
- <if test="dioId != null" >
- #{dioId,jdbcType=INTEGER},
- </if>
- <if test="dipPropCode != null" >
- #{dipPropCode,jdbcType=VARCHAR},
- </if>
- <if test="dipPropName != null" >
- #{dipPropName,jdbcType=VARCHAR},
- </if>
- <if test="dipOperationTime != null" >
- #{dipOperationTime,jdbcType=TIMESTAMP},
- </if>
- <if test="dipOperator != null" >
- #{dipOperator,jdbcType=VARCHAR},
- </if>
- <if test="dipSupId != null" >
- #{dipSupId,jdbcType=INTEGER},
- </if>
- <if test="dipIsDel != null" >
- #{dipIsDel,jdbcType=INTEGER},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.DicIoProperty" >
- update dic_io_property
- <set >
- <if test="dioId != null" >
- DIO_ID = #{dioId,jdbcType=INTEGER},
- </if>
- <if test="dipPropCode != null" >
- DIP_PropCode = #{dipPropCode,jdbcType=VARCHAR},
- </if>
- <if test="dipPropName != null" >
- DIP_PropName = #{dipPropName,jdbcType=VARCHAR},
- </if>
- <if test="dipOperationTime != null" >
- DIP_Operation_Time = #{dipOperationTime,jdbcType=TIMESTAMP},
- </if>
- <if test="dipOperator != null" >
- DIP_Operator = #{dipOperator,jdbcType=VARCHAR},
- </if>
- <if test="dipSupId != null" >
- DIP_SupID = #{dipSupId,jdbcType=INTEGER},
- </if>
- <if test="dipIsDel != null" >
- DIP_IsDel = #{dipIsDel,jdbcType=INTEGER},
- </if>
- </set>
- where DIP_ID = #{dipId,jdbcType=INTEGER}
- </update>
- <select id="selectAllValueByHiId" resultMap="BaseResultMap">
- select <include refid="Base_Column_List"/>
- from dic_io_property ip
- where DIP_IsDel = 0
- and DIP_SupID != 0
- and DIP_PropCode is not null
- and exists(select 1 from dic_io di where di.DIO_ID = ip.DIO_ID and di.DIO_IsDel = 0 and (di.HI_ID = #{hiId,jdbcType=INTEGER} or di.HI_ID = 0))
- </select>
- </mapper>
|