ImRoleItemRelMapper.xml 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271
  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.minpay.db.table.mapper.ImRoleItemRelMapper" >
  4. <resultMap id="BaseResultMap" type="com.minpay.db.table.model.ImRoleItemRel" >
  5. <!--
  6. WARNING - @mbggenerated
  7. This element is automatically generated by MyBatis Generator, do not modify.
  8. -->
  9. <id column="RIR_ITEMID" property="itemid" jdbcType="VARCHAR" />
  10. <id column="RIR_ROLEID" property="roleid" jdbcType="VARCHAR" />
  11. <result column="RIR_AUTHROLE" property="authrole" jdbcType="VARCHAR" />
  12. <result column="RIR_AUTHTYPE" property="authtype" jdbcType="VARCHAR" />
  13. <result column="RIR_AUTHSHAPE" property="authshape" jdbcType="CHAR" />
  14. </resultMap>
  15. <sql id="Example_Where_Clause" >
  16. <!--
  17. WARNING - @mbggenerated
  18. This element is automatically generated by MyBatis Generator, do not modify.
  19. -->
  20. <where >
  21. <foreach collection="oredCriteria" item="criteria" separator="or" >
  22. <if test="criteria.valid" >
  23. <trim prefix="(" suffix=")" prefixOverrides="and" >
  24. <foreach collection="criteria.criteria" item="criterion" >
  25. <choose >
  26. <when test="criterion.noValue" >
  27. and ${criterion.condition}
  28. </when>
  29. <when test="criterion.singleValue" >
  30. and ${criterion.condition} #{criterion.value}
  31. </when>
  32. <when test="criterion.betweenValue" >
  33. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  34. </when>
  35. <when test="criterion.listValue" >
  36. and ${criterion.condition}
  37. <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
  38. #{listItem}
  39. </foreach>
  40. </when>
  41. </choose>
  42. </foreach>
  43. </trim>
  44. </if>
  45. </foreach>
  46. </where>
  47. </sql>
  48. <sql id="Update_By_Example_Where_Clause" >
  49. <!--
  50. WARNING - @mbggenerated
  51. This element is automatically generated by MyBatis Generator, do not modify.
  52. -->
  53. <where >
  54. <foreach collection="example.oredCriteria" item="criteria" separator="or" >
  55. <if test="criteria.valid" >
  56. <trim prefix="(" suffix=")" prefixOverrides="and" >
  57. <foreach collection="criteria.criteria" item="criterion" >
  58. <choose >
  59. <when test="criterion.noValue" >
  60. and ${criterion.condition}
  61. </when>
  62. <when test="criterion.singleValue" >
  63. and ${criterion.condition} #{criterion.value}
  64. </when>
  65. <when test="criterion.betweenValue" >
  66. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  67. </when>
  68. <when test="criterion.listValue" >
  69. and ${criterion.condition}
  70. <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
  71. #{listItem}
  72. </foreach>
  73. </when>
  74. </choose>
  75. </foreach>
  76. </trim>
  77. </if>
  78. </foreach>
  79. </where>
  80. </sql>
  81. <sql id="Base_Column_List" >
  82. <!--
  83. WARNING - @mbggenerated
  84. This element is automatically generated by MyBatis Generator, do not modify.
  85. -->
  86. RIR_ITEMID, RIR_ROLEID, RIR_AUTHROLE, RIR_AUTHTYPE, RIR_AUTHSHAPE
  87. </sql>
  88. <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.minpay.db.table.model.ImRoleItemRelExample" >
  89. <!--
  90. WARNING - @mbggenerated
  91. This element is automatically generated by MyBatis Generator, do not modify.
  92. -->
  93. select
  94. <if test="distinct" >
  95. distinct
  96. </if>
  97. <include refid="Base_Column_List" />
  98. from im_role_item_rel
  99. <if test="_parameter != null" >
  100. <include refid="Example_Where_Clause" />
  101. </if>
  102. <if test="orderByClause != null" >
  103. order by ${orderByClause}
  104. </if>
  105. </select>
  106. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="com.minpay.db.table.model.ImRoleItemRelKey" >
  107. <!--
  108. WARNING - @mbggenerated
  109. This element is automatically generated by MyBatis Generator, do not modify.
  110. -->
  111. select
  112. <include refid="Base_Column_List" />
  113. from im_role_item_rel
  114. where RIR_ITEMID = #{itemid,jdbcType=VARCHAR}
  115. and RIR_ROLEID = #{roleid,jdbcType=VARCHAR}
  116. </select>
  117. <delete id="deleteByPrimaryKey" parameterType="com.minpay.db.table.model.ImRoleItemRelKey" >
  118. <!--
  119. WARNING - @mbggenerated
  120. This element is automatically generated by MyBatis Generator, do not modify.
  121. -->
  122. delete from im_role_item_rel
  123. where RIR_ITEMID = #{itemid,jdbcType=VARCHAR}
  124. and RIR_ROLEID = #{roleid,jdbcType=VARCHAR}
  125. </delete>
  126. <delete id="deleteByExample" parameterType="com.minpay.db.table.model.ImRoleItemRelExample" >
  127. <!--
  128. WARNING - @mbggenerated
  129. This element is automatically generated by MyBatis Generator, do not modify.
  130. -->
  131. delete from im_role_item_rel
  132. <if test="_parameter != null" >
  133. <include refid="Example_Where_Clause" />
  134. </if>
  135. </delete>
  136. <insert id="insert" parameterType="com.minpay.db.table.model.ImRoleItemRel" >
  137. <!--
  138. WARNING - @mbggenerated
  139. This element is automatically generated by MyBatis Generator, do not modify.
  140. -->
  141. insert into im_role_item_rel (RIR_ITEMID, RIR_ROLEID, RIR_AUTHROLE,
  142. RIR_AUTHTYPE, RIR_AUTHSHAPE)
  143. values (#{itemid,jdbcType=VARCHAR}, #{roleid,jdbcType=VARCHAR}, #{authrole,jdbcType=VARCHAR},
  144. #{authtype,jdbcType=VARCHAR}, #{authshape,jdbcType=CHAR})
  145. </insert>
  146. <insert id="insertSelective" parameterType="com.minpay.db.table.model.ImRoleItemRel" >
  147. <!--
  148. WARNING - @mbggenerated
  149. This element is automatically generated by MyBatis Generator, do not modify.
  150. -->
  151. insert into im_role_item_rel
  152. <trim prefix="(" suffix=")" suffixOverrides="," >
  153. <if test="itemid != null" >
  154. RIR_ITEMID,
  155. </if>
  156. <if test="roleid != null" >
  157. RIR_ROLEID,
  158. </if>
  159. <if test="authrole != null" >
  160. RIR_AUTHROLE,
  161. </if>
  162. <if test="authtype != null" >
  163. RIR_AUTHTYPE,
  164. </if>
  165. <if test="authshape != null" >
  166. RIR_AUTHSHAPE,
  167. </if>
  168. </trim>
  169. <trim prefix="values (" suffix=")" suffixOverrides="," >
  170. <if test="itemid != null" >
  171. #{itemid,jdbcType=VARCHAR},
  172. </if>
  173. <if test="roleid != null" >
  174. #{roleid,jdbcType=VARCHAR},
  175. </if>
  176. <if test="authrole != null" >
  177. #{authrole,jdbcType=VARCHAR},
  178. </if>
  179. <if test="authtype != null" >
  180. #{authtype,jdbcType=VARCHAR},
  181. </if>
  182. <if test="authshape != null" >
  183. #{authshape,jdbcType=CHAR},
  184. </if>
  185. </trim>
  186. </insert>
  187. <select id="countByExample" parameterType="com.minpay.db.table.model.ImRoleItemRelExample" resultType="java.lang.Integer" >
  188. <!--
  189. WARNING - @mbggenerated
  190. This element is automatically generated by MyBatis Generator, do not modify.
  191. -->
  192. select count(*) from im_role_item_rel
  193. <if test="_parameter != null" >
  194. <include refid="Example_Where_Clause" />
  195. </if>
  196. </select>
  197. <update id="updateByExampleSelective" parameterType="map" >
  198. <!--
  199. WARNING - @mbggenerated
  200. This element is automatically generated by MyBatis Generator, do not modify.
  201. -->
  202. update im_role_item_rel
  203. <set >
  204. <if test="record.itemid != null" >
  205. RIR_ITEMID = #{record.itemid,jdbcType=VARCHAR},
  206. </if>
  207. <if test="record.roleid != null" >
  208. RIR_ROLEID = #{record.roleid,jdbcType=VARCHAR},
  209. </if>
  210. <if test="record.authrole != null" >
  211. RIR_AUTHROLE = #{record.authrole,jdbcType=VARCHAR},
  212. </if>
  213. <if test="record.authtype != null" >
  214. RIR_AUTHTYPE = #{record.authtype,jdbcType=VARCHAR},
  215. </if>
  216. <if test="record.authshape != null" >
  217. RIR_AUTHSHAPE = #{record.authshape,jdbcType=CHAR},
  218. </if>
  219. </set>
  220. <if test="_parameter != null" >
  221. <include refid="Update_By_Example_Where_Clause" />
  222. </if>
  223. </update>
  224. <update id="updateByExample" parameterType="map" >
  225. <!--
  226. WARNING - @mbggenerated
  227. This element is automatically generated by MyBatis Generator, do not modify.
  228. -->
  229. update im_role_item_rel
  230. set RIR_ITEMID = #{record.itemid,jdbcType=VARCHAR},
  231. RIR_ROLEID = #{record.roleid,jdbcType=VARCHAR},
  232. RIR_AUTHROLE = #{record.authrole,jdbcType=VARCHAR},
  233. RIR_AUTHTYPE = #{record.authtype,jdbcType=VARCHAR},
  234. RIR_AUTHSHAPE = #{record.authshape,jdbcType=CHAR}
  235. <if test="_parameter != null" >
  236. <include refid="Update_By_Example_Where_Clause" />
  237. </if>
  238. </update>
  239. <update id="updateByPrimaryKeySelective" parameterType="com.minpay.db.table.model.ImRoleItemRel" >
  240. <!--
  241. WARNING - @mbggenerated
  242. This element is automatically generated by MyBatis Generator, do not modify.
  243. -->
  244. update im_role_item_rel
  245. <set >
  246. <if test="authrole != null" >
  247. RIR_AUTHROLE = #{authrole,jdbcType=VARCHAR},
  248. </if>
  249. <if test="authtype != null" >
  250. RIR_AUTHTYPE = #{authtype,jdbcType=VARCHAR},
  251. </if>
  252. <if test="authshape != null" >
  253. RIR_AUTHSHAPE = #{authshape,jdbcType=CHAR},
  254. </if>
  255. </set>
  256. where RIR_ITEMID = #{itemid,jdbcType=VARCHAR}
  257. and RIR_ROLEID = #{roleid,jdbcType=VARCHAR}
  258. </update>
  259. <update id="updateByPrimaryKey" parameterType="com.minpay.db.table.model.ImRoleItemRel" >
  260. <!--
  261. WARNING - @mbggenerated
  262. This element is automatically generated by MyBatis Generator, do not modify.
  263. -->
  264. update im_role_item_rel
  265. set RIR_AUTHROLE = #{authrole,jdbcType=VARCHAR},
  266. RIR_AUTHTYPE = #{authtype,jdbcType=VARCHAR},
  267. RIR_AUTHSHAPE = #{authshape,jdbcType=CHAR}
  268. where RIR_ITEMID = #{itemid,jdbcType=VARCHAR}
  269. and RIR_ROLEID = #{roleid,jdbcType=VARCHAR}
  270. </update>
  271. </mapper>