PtServiceParamMapper.xml 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  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.ruoyi.interfaces.mapper.PtServiceParamMapper">
  4. <resultMap id="BaseResultMap" type="com.ruoyi.interfaces.domain.PtServiceParam">
  5. <id column="SRV_ID" jdbcType="VARCHAR" property="srvId"/>
  6. <id column="PARAM_CODE" jdbcType="VARCHAR" property="paramCode"/>
  7. <result column="PARAM_NAME" jdbcType="VARCHAR" property="paramName"/>
  8. <result column="PARAM_TYPE" jdbcType="VARCHAR" property="paramType"/>
  9. <result column="PARAM_VALUE" jdbcType="VARCHAR" property="paramValue"/>
  10. <result column="PARAM_FORMAT" jdbcType="VARCHAR" property="paramFormat"/>
  11. <result column="PARAM_NOTE" jdbcType="VARCHAR" property="paramNote"/>
  12. <result column="SORT" jdbcType="INTEGER" property="sort"/>
  13. </resultMap>
  14. <sql id="Base_Column_List">
  15. SRV_ID
  16. , PARAM_CODE, PARAM_NAME, PARAM_TYPE, PARAM_VALUE, PARAM_FORMAT, PARAM_NOTE,SORT
  17. </sql>
  18. <select id="selectByPrimaryKey" parameterType="com.ruoyi.interfaces.domain.PtServiceParamKey"
  19. resultMap="BaseResultMap">
  20. select
  21. <include refid="Base_Column_List"/>
  22. from PT_SERVICE_PARAM
  23. where SRV_ID = #{srvId,jdbcType=VARCHAR}
  24. and PARAM_CODE = #{paramCode,jdbcType=VARCHAR}
  25. </select>
  26. <delete id="deleteByPrimaryKey" parameterType="com.ruoyi.interfaces.domain.PtServiceParamKey">
  27. delete
  28. from PT_SERVICE_PARAM
  29. where SRV_ID = #{srvId,jdbcType=VARCHAR}
  30. and PARAM_CODE = #{paramCode,jdbcType=VARCHAR}
  31. </delete>
  32. <delete id="deleteBySrvId" parameterType="string">
  33. delete
  34. from PT_SERVICE_PARAM
  35. where SRV_ID = #{srvId,jdbcType=VARCHAR}
  36. </delete>
  37. <insert id="insert" parameterType="com.ruoyi.interfaces.domain.PtServiceParam">
  38. insert into PT_SERVICE_PARAM (SRV_ID, PARAM_CODE, PARAM_NAME,
  39. PARAM_TYPE, PARAM_VALUE, PARAM_FORMAT,
  40. PARAM_NOTE,SORT)
  41. values (#{srvId,jdbcType=VARCHAR}, #{paramCode,jdbcType=VARCHAR}, #{paramName,jdbcType=VARCHAR},
  42. #{paramType,jdbcType=VARCHAR}, #{paramValue,jdbcType=VARCHAR}, #{paramFormat,jdbcType=VARCHAR},
  43. #{paramNote,jdbcType=VARCHAR},#{sort,jdbcType=INTEGER})
  44. </insert>
  45. <insert id="insertSelective" parameterType="com.ruoyi.interfaces.domain.PtServiceParam">
  46. insert into PT_SERVICE_PARAM
  47. <trim prefix="(" suffix=")" suffixOverrides=",">
  48. <if test="srvId != null">
  49. SRV_ID,
  50. </if>
  51. <if test="paramCode != null">
  52. PARAM_CODE,
  53. </if>
  54. <if test="paramName != null">
  55. PARAM_NAME,
  56. </if>
  57. <if test="paramType != null">
  58. PARAM_TYPE,
  59. </if>
  60. <if test="paramValue != null">
  61. PARAM_VALUE,
  62. </if>
  63. <if test="paramFormat != null">
  64. PARAM_FORMAT,
  65. </if>
  66. <if test="paramNote != null">
  67. PARAM_NOTE,
  68. </if>
  69. </trim>
  70. <trim prefix="values (" suffix=")" suffixOverrides=",">
  71. <if test="srvId != null">
  72. #{srvId,jdbcType=VARCHAR},
  73. </if>
  74. <if test="paramCode != null">
  75. #{paramCode,jdbcType=VARCHAR},
  76. </if>
  77. <if test="paramName != null">
  78. #{paramName,jdbcType=VARCHAR},
  79. </if>
  80. <if test="paramType != null">
  81. #{paramType,jdbcType=VARCHAR},
  82. </if>
  83. <if test="paramValue != null">
  84. #{paramValue,jdbcType=VARCHAR},
  85. </if>
  86. <if test="paramFormat != null">
  87. #{paramFormat,jdbcType=VARCHAR},
  88. </if>
  89. <if test="paramNote != null">
  90. #{paramNote,jdbcType=VARCHAR},
  91. </if>
  92. </trim>
  93. </insert>
  94. <update id="updateByPrimaryKeySelective" parameterType="com.ruoyi.interfaces.domain.PtServiceParam">
  95. update PT_SERVICE_PARAM
  96. <set>
  97. <if test="paramName != null">
  98. PARAM_NAME = #{paramName,jdbcType=VARCHAR},
  99. </if>
  100. <if test="paramType != null">
  101. PARAM_TYPE = #{paramType,jdbcType=VARCHAR},
  102. </if>
  103. <if test="paramValue != null">
  104. PARAM_VALUE = #{paramValue,jdbcType=VARCHAR},
  105. </if>
  106. <if test="paramFormat != null">
  107. PARAM_FORMAT = #{paramFormat,jdbcType=VARCHAR},
  108. </if>
  109. <if test="paramNote != null">
  110. PARAM_NOTE = #{paramNote,jdbcType=VARCHAR},
  111. </if>
  112. </set>
  113. where SRV_ID = #{srvId,jdbcType=VARCHAR}
  114. and PARAM_CODE = #{paramCode,jdbcType=VARCHAR}
  115. </update>
  116. <update id="updateByPrimaryKey" parameterType="com.ruoyi.interfaces.domain.PtServiceParam">
  117. update PT_SERVICE_PARAM
  118. set PARAM_NAME = #{paramName,jdbcType=VARCHAR},
  119. PARAM_TYPE = #{paramType,jdbcType=VARCHAR},
  120. PARAM_VALUE = #{paramValue,jdbcType=VARCHAR},
  121. PARAM_FORMAT = #{paramFormat,jdbcType=VARCHAR},
  122. PARAM_NOTE = #{paramNote,jdbcType=VARCHAR}
  123. where SRV_ID = #{srvId,jdbcType=VARCHAR}
  124. and PARAM_CODE = #{paramCode,jdbcType=VARCHAR}
  125. </update>
  126. <!--查询数据列表-->
  127. <select id="selectAll" parameterType="string" resultMap="BaseResultMap">
  128. select
  129. <include refid="Base_Column_List"/>
  130. from PT_SERVICE_PARAM where SRV_ID = #{srvId,jdbcType=VARCHAR}
  131. order by sort
  132. </select>
  133. <select id="listBySrvId" parameterType="string" resultMap="BaseResultMap">
  134. SELECT
  135. <include refid="Base_Column_List"/>
  136. FROM PT_SERVICE_PARAM
  137. WHERE SRV_ID = #{srvId,jdbcType=VARCHAR}
  138. order by sort
  139. </select>
  140. </mapper>