BizObjPpMapper.xml 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.jjt.biz.mapper.BizObjPpMapper">
  6. <resultMap type="BizObjPp" id="BizObjPpResult">
  7. <result property="objPpId" column="OBJ_PP_ID"/>
  8. <result property="objId" column="OBJ_ID"/>
  9. <result property="ppName" column="PP_NAME"/>
  10. <result property="ppKey" column="PP_KEY"/>
  11. <result property="ppType" column="PP_TYPE"/>
  12. <result property="ppAddr" column="PP_ADDR"/>
  13. <result property="createBy" column="CREATE_BY"/>
  14. <result property="createTime" column="CREATE_TIME"/>
  15. <result property="updateBy" column="UPDATE_BY"/>
  16. <result property="updateTime" column="UPDATE_TIME"/>
  17. <result property="remark" column="REMARK"/>
  18. </resultMap>
  19. <sql id="selectBizObjPpVo">
  20. select OBJ_PP_ID,
  21. OBJ_ID,
  22. PP_NAME,
  23. PP_KEY,
  24. PP_TYPE,
  25. PP_ADDR,
  26. CREATE_BY,
  27. CREATE_TIME,
  28. UPDATE_BY,
  29. UPDATE_TIME,
  30. REMARK
  31. from biz_obj_pp
  32. </sql>
  33. <select id="selectBizObjPpList" parameterType="BizObjPp" resultMap="BizObjPpResult">
  34. <include refid="selectBizObjPpVo"/>
  35. <where>
  36. <if test="objId != null ">
  37. and OBJ_ID = #{objId}
  38. </if>
  39. <if test="ppName != null and ppName != ''">
  40. and PP_NAME like concat('%', #{ppName}, '%')
  41. </if>
  42. <if test="ppKey != null and ppKey != ''">
  43. and PP_KEY = #{ppKey}
  44. </if>
  45. <if test="ppType != null and ppType != ''">
  46. and PP_TYPE = #{ppType}
  47. </if>
  48. <if test="ppAddr != null and ppAddr != ''">
  49. and PP_ADDR = #{ppAddr}
  50. </if>
  51. <if test="createBy != null and createBy != ''">
  52. and CREATE_BY = #{createBy}
  53. </if>
  54. <if test="createTime != null ">
  55. and CREATE_TIME = #{createTime}
  56. </if>
  57. <if test="updateBy != null and updateBy != ''">
  58. and UPDATE_BY = #{updateBy}
  59. </if>
  60. <if test="updateTime != null ">
  61. and UPDATE_TIME = #{updateTime}
  62. </if>
  63. <if test="remark != null and remark != ''">
  64. and REMARK = #{remark}
  65. </if>
  66. </where>
  67. </select>
  68. <select id="selectBizObjPpByObjPpId" parameterType="Long"
  69. resultMap="BizObjPpResult">
  70. <include refid="selectBizObjPpVo"/>
  71. where OBJ_PP_ID = #{objPpId}
  72. </select>
  73. <insert id="insertBizObjPp" parameterType="BizObjPp" useGeneratedKeys="true"
  74. keyProperty="objPpId">
  75. insert into biz_obj_pp
  76. <trim prefix="(" suffix=")" suffixOverrides=",">
  77. <if test="objId != null">OBJ_ID,
  78. </if>
  79. <if test="ppName != null">PP_NAME,
  80. </if>
  81. <if test="ppKey != null">PP_KEY,
  82. </if>
  83. <if test="ppType != null">PP_TYPE,
  84. </if>
  85. <if test="ppAddr != null">PP_ADDR,
  86. </if>
  87. <if test="createBy != null">CREATE_BY,
  88. </if>
  89. <if test="createTime != null">CREATE_TIME,
  90. </if>
  91. <if test="updateBy != null">UPDATE_BY,
  92. </if>
  93. <if test="updateTime != null">UPDATE_TIME,
  94. </if>
  95. <if test="remark != null">REMARK,
  96. </if>
  97. </trim>
  98. <trim prefix="values (" suffix=")" suffixOverrides=",">
  99. <if test="objId != null">#{objId},
  100. </if>
  101. <if test="ppName != null">#{ppName},
  102. </if>
  103. <if test="ppKey != null">#{ppKey},
  104. </if>
  105. <if test="ppType != null">#{ppType},
  106. </if>
  107. <if test="ppAddr != null">#{ppAddr},
  108. </if>
  109. <if test="createBy != null">#{createBy},
  110. </if>
  111. <if test="createTime != null">#{createTime},
  112. </if>
  113. <if test="updateBy != null">#{updateBy},
  114. </if>
  115. <if test="updateTime != null">#{updateTime},
  116. </if>
  117. <if test="remark != null">#{remark},
  118. </if>
  119. </trim>
  120. </insert>
  121. <update id="updateBizObjPp" parameterType="BizObjPp">
  122. update biz_obj_pp
  123. <trim prefix="SET" suffixOverrides=",">
  124. <if test="objId != null">OBJ_ID =
  125. #{objId},
  126. </if>
  127. <if test="ppName != null">PP_NAME =
  128. #{ppName},
  129. </if>
  130. <if test="ppKey != null">PP_KEY =
  131. #{ppKey},
  132. </if>
  133. <if test="ppType != null">PP_TYPE =
  134. #{ppType},
  135. </if>
  136. <if test="ppAddr != null">PP_ADDR =
  137. #{ppAddr},
  138. </if>
  139. <if test="createBy != null">CREATE_BY =
  140. #{createBy},
  141. </if>
  142. <if test="createTime != null">CREATE_TIME =
  143. #{createTime},
  144. </if>
  145. <if test="updateBy != null">UPDATE_BY =
  146. #{updateBy},
  147. </if>
  148. <if test="updateTime != null">UPDATE_TIME =
  149. #{updateTime},
  150. </if>
  151. <if test="remark != null">REMARK =
  152. #{remark},
  153. </if>
  154. </trim>
  155. where OBJ_PP_ID = #{objPpId}
  156. </update>
  157. <delete id="deleteBizObjPpByObjPpId" parameterType="Long">
  158. delete
  159. from biz_obj_pp
  160. where OBJ_PP_ID = #{objPpId}
  161. </delete>
  162. <delete id="deleteBizObjPpByObjPpIds" parameterType="String">
  163. delete from biz_obj_pp where OBJ_PP_ID in
  164. <foreach item="objPpId" collection="array" open="(" separator="," close=")">
  165. #{objPpId}
  166. </foreach>
  167. </delete>
  168. </mapper>