123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 |
- <?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.DicPartPositionMapper" >
- <resultMap id="BaseResultMap" type="com.xinxin.topro.inpnurseservice.mysqlmodel.DicPartPosition" >
- <id column="DPL_ID" property="dplId" jdbcType="INTEGER" />
- <result column="DPL_Part_Code" property="dplPartCode" jdbcType="VARCHAR" />
- <result column="DPL_Position_Code" property="dplPositionCode" jdbcType="VARCHAR" />
- <result column="DPL_IsDel" property="dplIsdel" jdbcType="INTEGER" />
- <result column="HI_ID" property="hiId" jdbcType="INTEGER" />
- <result column="DPL_UserId" property="dplUserid" jdbcType="VARCHAR" />
- <result column="DPL_UpdateTime" property="dplUpdatetime" jdbcType="TIMESTAMP" />
- </resultMap>
- <sql id="Base_Column_List" >
- DPL_ID, DPL_Part_Code, DPL_Position_Code, DPL_IsDel, HI_ID, DPL_UserId, DPL_UpdateTime
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
- select
- <include refid="Base_Column_List" />
- from dic_part_position
- where DPL_IsDel = 0 and DPL_ID = #{dplId,jdbcType=INTEGER}
- </select>
- <select id="selectByPartPosition" resultType="com.xinxin.topro.inpnurseservice.response.InpPartPositionInfoResponse" parameterType="java.lang.String" >
- SELECT
- sdd.SDD_ID as sddId,sdd.SD_ID as sdId,sdd.SDD_Detail_Code as sddDetailCode,sdd.SDD_Detail_Name as sddDetailName
- FROM `sys_dictionary_detail` sdd
- LEFT JOIN dic_part_position dpp
- ON sdd.SDD_Detail_Code = dpp.DPL_Position_Code
- where dpp.DPL_IsDel = 0 AND sdd.SDD_IsDel = 0 AND
- dpp.DPL_Part_Code = #{dplPartCode,jdbcType=VARCHAR}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
- delete from dic_part_position
- where DPL_ID = #{dplId,jdbcType=INTEGER}
- </delete>
- <insert id="insertSelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.DicPartPosition" >
- insert into dic_part_position
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="dplId != null" >
- DPL_ID,
- </if>
- <if test="dplPartCode != null" >
- DPL_Part_Code,
- </if>
- <if test="dplPositionCode != null" >
- DPL_Position_Code,
- </if>
- <if test="dplIsdel != null" >
- DPL_IsDel,
- </if>
- <if test="hiId != null" >
- HI_ID,
- </if>
- <if test="dplUserid != null" >
- DPL_UserId,
- </if>
- <if test="dplUpdatetime != null" >
- DPL_UpdateTime,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="dplId != null" >
- #{dplId,jdbcType=INTEGER},
- </if>
- <if test="dplPartCode != null" >
- #{dplPartCode,jdbcType=VARCHAR},
- </if>
- <if test="dplPositionCode != null" >
- #{dplPositionCode,jdbcType=VARCHAR},
- </if>
- <if test="dplIsdel != null" >
- #{dplIsdel,jdbcType=INTEGER},
- </if>
- <if test="hiId != null" >
- #{hiId,jdbcType=INTEGER},
- </if>
- <if test="dplUserid != null" >
- #{dplUserid,jdbcType=VARCHAR},
- </if>
- <if test="dplUpdatetime != null" >
- #{dplUpdatetime,jdbcType=TIMESTAMP},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.DicPartPosition" >
- update dic_part_position
- <set >
- <if test="dplPartCode != null" >
- DPL_Part_Code = #{dplPartCode,jdbcType=VARCHAR},
- </if>
- <if test="dplPositionCode != null" >
- DPL_Position_Code = #{dplPositionCode,jdbcType=VARCHAR},
- </if>
- <if test="dplIsdel != null" >
- DPL_IsDel = #{dplIsdel,jdbcType=INTEGER},
- </if>
- <if test="hiId != null" >
- HI_ID = #{hiId,jdbcType=INTEGER},
- </if>
- <if test="dplUserid != null" >
- DPL_UserId = #{dplUserid,jdbcType=VARCHAR},
- </if>
- <if test="dplUpdatetime != null" >
- DPL_UpdateTime = #{dplUpdatetime,jdbcType=TIMESTAMP},
- </if>
- </set>
- where DPL_ID = #{dplId,jdbcType=INTEGER}
- </update>
- </mapper>
|