DicPartPositionMapper.xml 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
  3. <mapper namespace="com.xinxin.topro.inpnurseservice.mysqlmapper.DicPartPositionMapper" >
  4. <resultMap id="BaseResultMap" type="com.xinxin.topro.inpnurseservice.mysqlmodel.DicPartPosition" >
  5. <id column="DPL_ID" property="dplId" jdbcType="INTEGER" />
  6. <result column="DPL_Part_Code" property="dplPartCode" jdbcType="VARCHAR" />
  7. <result column="DPL_Position_Code" property="dplPositionCode" jdbcType="VARCHAR" />
  8. <result column="DPL_IsDel" property="dplIsdel" jdbcType="INTEGER" />
  9. <result column="HI_ID" property="hiId" jdbcType="INTEGER" />
  10. <result column="DPL_UserId" property="dplUserid" jdbcType="VARCHAR" />
  11. <result column="DPL_UpdateTime" property="dplUpdatetime" jdbcType="TIMESTAMP" />
  12. </resultMap>
  13. <sql id="Base_Column_List" >
  14. DPL_ID, DPL_Part_Code, DPL_Position_Code, DPL_IsDel, HI_ID, DPL_UserId, DPL_UpdateTime
  15. </sql>
  16. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
  17. select
  18. <include refid="Base_Column_List" />
  19. from dic_part_position
  20. where DPL_IsDel = 0 and DPL_ID = #{dplId,jdbcType=INTEGER}
  21. </select>
  22. <select id="selectByPartPosition" resultType="com.xinxin.topro.inpnurseservice.response.InpPartPositionInfoResponse" parameterType="java.lang.String" >
  23. SELECT
  24. sdd.SDD_ID as sddId,sdd.SD_ID as sdId,sdd.SDD_Detail_Code as sddDetailCode,sdd.SDD_Detail_Name as sddDetailName
  25. FROM `sys_dictionary_detail` sdd
  26. LEFT JOIN dic_part_position dpp
  27. ON sdd.SDD_Detail_Code = dpp.DPL_Position_Code
  28. where dpp.DPL_IsDel = 0 AND sdd.SDD_IsDel = 0 AND
  29. dpp.DPL_Part_Code = #{dplPartCode,jdbcType=VARCHAR}
  30. </select>
  31. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
  32. delete from dic_part_position
  33. where DPL_ID = #{dplId,jdbcType=INTEGER}
  34. </delete>
  35. <insert id="insertSelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.DicPartPosition" >
  36. insert into dic_part_position
  37. <trim prefix="(" suffix=")" suffixOverrides="," >
  38. <if test="dplId != null" >
  39. DPL_ID,
  40. </if>
  41. <if test="dplPartCode != null" >
  42. DPL_Part_Code,
  43. </if>
  44. <if test="dplPositionCode != null" >
  45. DPL_Position_Code,
  46. </if>
  47. <if test="dplIsdel != null" >
  48. DPL_IsDel,
  49. </if>
  50. <if test="hiId != null" >
  51. HI_ID,
  52. </if>
  53. <if test="dplUserid != null" >
  54. DPL_UserId,
  55. </if>
  56. <if test="dplUpdatetime != null" >
  57. DPL_UpdateTime,
  58. </if>
  59. </trim>
  60. <trim prefix="values (" suffix=")" suffixOverrides="," >
  61. <if test="dplId != null" >
  62. #{dplId,jdbcType=INTEGER},
  63. </if>
  64. <if test="dplPartCode != null" >
  65. #{dplPartCode,jdbcType=VARCHAR},
  66. </if>
  67. <if test="dplPositionCode != null" >
  68. #{dplPositionCode,jdbcType=VARCHAR},
  69. </if>
  70. <if test="dplIsdel != null" >
  71. #{dplIsdel,jdbcType=INTEGER},
  72. </if>
  73. <if test="hiId != null" >
  74. #{hiId,jdbcType=INTEGER},
  75. </if>
  76. <if test="dplUserid != null" >
  77. #{dplUserid,jdbcType=VARCHAR},
  78. </if>
  79. <if test="dplUpdatetime != null" >
  80. #{dplUpdatetime,jdbcType=TIMESTAMP},
  81. </if>
  82. </trim>
  83. </insert>
  84. <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.DicPartPosition" >
  85. update dic_part_position
  86. <set >
  87. <if test="dplPartCode != null" >
  88. DPL_Part_Code = #{dplPartCode,jdbcType=VARCHAR},
  89. </if>
  90. <if test="dplPositionCode != null" >
  91. DPL_Position_Code = #{dplPositionCode,jdbcType=VARCHAR},
  92. </if>
  93. <if test="dplIsdel != null" >
  94. DPL_IsDel = #{dplIsdel,jdbcType=INTEGER},
  95. </if>
  96. <if test="hiId != null" >
  97. HI_ID = #{hiId,jdbcType=INTEGER},
  98. </if>
  99. <if test="dplUserid != null" >
  100. DPL_UserId = #{dplUserid,jdbcType=VARCHAR},
  101. </if>
  102. <if test="dplUpdatetime != null" >
  103. DPL_UpdateTime = #{dplUpdatetime,jdbcType=TIMESTAMP},
  104. </if>
  105. </set>
  106. where DPL_ID = #{dplId,jdbcType=INTEGER}
  107. </update>
  108. </mapper>