SysRightMenuMapper.xml 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  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.pubservice.mysqlmapper.SysRightMenuMapper" >
  4. <resultMap id="BaseResultMap" type="com.xinxin.topro.pubservice.mysqlModel.SysRightMenu" >
  5. <id column="SRM_ID" property="srmId" jdbcType="INTEGER" />
  6. <result column="SS_ID" property="ssId" jdbcType="INTEGER" />
  7. <result column="SRM_Type" property="srmType" jdbcType="INTEGER" />
  8. <result column="SM_ID" property="smId" jdbcType="INTEGER" />
  9. <result column="SRM_MenuCode" property="srmMenucode" jdbcType="VARCHAR" />
  10. <result column="SRM_Level" property="srmLevel" jdbcType="INTEGER" />
  11. <result column="SRM_SupID" property="srmSupid" jdbcType="INTEGER" />
  12. <result column="SRM_Sort" property="srmSort" jdbcType="INTEGER" />
  13. <result column="SRM_Name" property="srmName" jdbcType="VARCHAR" />
  14. <result column="SRM_IsDel" property="srmIsdel" jdbcType="INTEGER" />
  15. </resultMap>
  16. <sql id="Base_Column_List" >
  17. SRM_ID, SS_ID, SRM_Type, SM_ID, SRM_MenuCode, SRM_Level, SRM_SupID, SRM_Sort, SRM_Name,
  18. SRM_IsDel
  19. </sql>
  20. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
  21. select
  22. <include refid="Base_Column_List" />
  23. from sys_right_menu
  24. where SRM_IsDel = 0 and SRM_ID = #{srmId,jdbcType=INTEGER}
  25. </select>
  26. <select id="getSystemSsId" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
  27. select
  28. <include refid="Base_Column_List" />
  29. from sys_right_menu
  30. where SRM_IsDel = 0 and SS_ID = #{ssId,jdbcType=INTEGER}
  31. </select>
  32. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
  33. delete from sys_right_menu
  34. where SRM_ID = #{srmId,jdbcType=INTEGER}
  35. </delete>
  36. <insert id="insert" parameterType="com.xinxin.topro.pubservice.mysqlModel.SysRightMenu" >
  37. insert into sys_right_menu (SRM_ID, SS_ID, SRM_Type,
  38. SM_ID, SRM_MenuCode, SRM_Level,
  39. SRM_SupID, SRM_Sort, SRM_Name,
  40. SRM_IsDel)
  41. values (#{srmId,jdbcType=INTEGER}, #{ssId,jdbcType=INTEGER}, #{srmType,jdbcType=INTEGER},
  42. #{smId,jdbcType=INTEGER}, #{srmMenucode,jdbcType=VARCHAR}, #{srmLevel,jdbcType=INTEGER},
  43. #{srmSupid,jdbcType=INTEGER}, #{srmSort,jdbcType=INTEGER}, #{srmName,jdbcType=VARCHAR},
  44. #{srmIsdel,jdbcType=INTEGER})
  45. </insert>
  46. <insert id="insertSelective" parameterType="com.xinxin.topro.pubservice.mysqlModel.SysRightMenu" >
  47. insert into sys_right_menu
  48. <trim prefix="(" suffix=")" suffixOverrides="," >
  49. <if test="srmId != null" >
  50. SRM_ID,
  51. </if>
  52. <if test="ssId != null" >
  53. SS_ID,
  54. </if>
  55. <if test="srmType != null" >
  56. SRM_Type,
  57. </if>
  58. <if test="smId != null" >
  59. SM_ID,
  60. </if>
  61. <if test="srmMenucode != null" >
  62. SRM_MenuCode,
  63. </if>
  64. <if test="srmLevel != null" >
  65. SRM_Level,
  66. </if>
  67. <if test="srmSupid != null" >
  68. SRM_SupID,
  69. </if>
  70. <if test="srmSort != null" >
  71. SRM_Sort,
  72. </if>
  73. <if test="srmName != null" >
  74. SRM_Name,
  75. </if>
  76. <if test="srmIsdel != null" >
  77. SRM_IsDel,
  78. </if>
  79. </trim>
  80. <trim prefix="values (" suffix=")" suffixOverrides="," >
  81. <if test="srmId != null" >
  82. #{srmId,jdbcType=INTEGER},
  83. </if>
  84. <if test="ssId != null" >
  85. #{ssId,jdbcType=INTEGER},
  86. </if>
  87. <if test="srmType != null" >
  88. #{srmType,jdbcType=INTEGER},
  89. </if>
  90. <if test="smId != null" >
  91. #{smId,jdbcType=INTEGER},
  92. </if>
  93. <if test="srmMenucode != null" >
  94. #{srmMenucode,jdbcType=VARCHAR},
  95. </if>
  96. <if test="srmLevel != null" >
  97. #{srmLevel,jdbcType=INTEGER},
  98. </if>
  99. <if test="srmSupid != null" >
  100. #{srmSupid,jdbcType=INTEGER},
  101. </if>
  102. <if test="srmSort != null" >
  103. #{srmSort,jdbcType=INTEGER},
  104. </if>
  105. <if test="srmName != null" >
  106. #{srmName,jdbcType=VARCHAR},
  107. </if>
  108. <if test="srmIsdel != null" >
  109. #{srmIsdel,jdbcType=INTEGER},
  110. </if>
  111. </trim>
  112. </insert>
  113. <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.pubservice.mysqlModel.SysRightMenu" >
  114. update sys_right_menu
  115. <set >
  116. <if test="ssId != null" >
  117. SS_ID = #{ssId,jdbcType=INTEGER},
  118. </if>
  119. <if test="srmType != null" >
  120. SRM_Type = #{srmType,jdbcType=INTEGER},
  121. </if>
  122. <if test="smId != null" >
  123. SM_ID = #{smId,jdbcType=INTEGER},
  124. </if>
  125. <if test="srmMenucode != null" >
  126. SRM_MenuCode = #{srmMenucode,jdbcType=VARCHAR},
  127. </if>
  128. <if test="srmLevel != null" >
  129. SRM_Level = #{srmLevel,jdbcType=INTEGER},
  130. </if>
  131. <if test="srmSupid != null" >
  132. SRM_SupID = #{srmSupid,jdbcType=INTEGER},
  133. </if>
  134. <if test="srmSort != null" >
  135. SRM_Sort = #{srmSort,jdbcType=INTEGER},
  136. </if>
  137. <if test="srmName != null" >
  138. SRM_Name = #{srmName,jdbcType=VARCHAR},
  139. </if>
  140. <if test="srmIsdel != null" >
  141. SRM_IsDel = #{srmIsdel,jdbcType=INTEGER},
  142. </if>
  143. </set>
  144. where SRM_ID = #{srmId,jdbcType=INTEGER}
  145. </update>
  146. <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.pubservice.mysqlModel.SysRightMenu" >
  147. update sys_right_menu
  148. set SS_ID = #{ssId,jdbcType=INTEGER},
  149. SRM_Type = #{srmType,jdbcType=INTEGER},
  150. SM_ID = #{smId,jdbcType=INTEGER},
  151. SRM_MenuCode = #{srmMenucode,jdbcType=VARCHAR},
  152. SRM_Level = #{srmLevel,jdbcType=INTEGER},
  153. SRM_SupID = #{srmSupid,jdbcType=INTEGER},
  154. SRM_Sort = #{srmSort,jdbcType=INTEGER},
  155. SRM_Name = #{srmName,jdbcType=VARCHAR},
  156. SRM_IsDel = #{srmIsdel,jdbcType=INTEGER}
  157. where SRM_ID = #{srmId,jdbcType=INTEGER}
  158. </update>
  159. </mapper>