SysRoleMenuMapper.xml 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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.base.mysqlmapper.SysRoleMenuMapper" >
  4. <resultMap id="BaseResultMap" type="com.xinxin.topro.base.mysqlmodel.SysRoleMenu" >
  5. <id column="RM_ID" property="rmId" jdbcType="INTEGER" />
  6. <result column="SM_ID" property="smId" jdbcType="INTEGER" />
  7. <result column="RM_IsDel" property="rmIsdel" jdbcType="INTEGER" />
  8. <result column="SR_ID" property="srId" jdbcType="INTEGER" />
  9. </resultMap>
  10. <sql id="Base_Column_List" >
  11. RM_ID, SM_ID, RM_IsDel, SR_ID
  12. </sql>
  13. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
  14. select
  15. <include refid="Base_Column_List" />
  16. from sys_role_menu
  17. where RM_ID = #{rmId,jdbcType=INTEGER}
  18. </select>
  19. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
  20. delete from sys_role_menu
  21. where RM_ID = #{rmId,jdbcType=INTEGER}
  22. </delete>
  23. <insert id="insert" parameterType="com.xinxin.topro.base.mysqlmodel.SysRoleMenu" >
  24. insert into sys_role_menu (RM_ID, SM_ID, RM_IsDel,
  25. SR_ID)
  26. values (#{rmId,jdbcType=INTEGER}, #{smId,jdbcType=INTEGER}, #{rmIsdel,jdbcType=INTEGER},
  27. #{srId,jdbcType=INTEGER})
  28. </insert>
  29. <insert id="insertSelective" parameterType="com.xinxin.topro.base.mysqlmodel.SysRoleMenu" >
  30. insert into sys_role_menu
  31. <trim prefix="(" suffix=")" suffixOverrides="," >
  32. <if test="rmId != null" >
  33. RM_ID,
  34. </if>
  35. <if test="smId != null" >
  36. SM_ID,
  37. </if>
  38. <if test="rmIsdel != null" >
  39. RM_IsDel,
  40. </if>
  41. <if test="srId != null" >
  42. SR_ID,
  43. </if>
  44. </trim>
  45. <trim prefix="values (" suffix=")" suffixOverrides="," >
  46. <if test="rmId != null" >
  47. #{rmId,jdbcType=INTEGER},
  48. </if>
  49. <if test="smId != null" >
  50. #{smId,jdbcType=INTEGER},
  51. </if>
  52. <if test="rmIsdel != null" >
  53. #{rmIsdel,jdbcType=INTEGER},
  54. </if>
  55. <if test="srId != null" >
  56. #{srId,jdbcType=INTEGER},
  57. </if>
  58. </trim>
  59. </insert>
  60. <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.base.mysqlmodel.SysRoleMenu" >
  61. update sys_role_menu
  62. <set >
  63. <if test="smId != null" >
  64. SM_ID = #{smId,jdbcType=INTEGER},
  65. </if>
  66. <if test="rmIsdel != null" >
  67. RM_IsDel = #{rmIsdel,jdbcType=INTEGER},
  68. </if>
  69. <if test="srId != null" >
  70. SR_ID = #{srId,jdbcType=INTEGER},
  71. </if>
  72. </set>
  73. where RM_ID = #{rmId,jdbcType=INTEGER}
  74. </update>
  75. <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.base.mysqlmodel.SysRoleMenu" >
  76. update sys_role_menu
  77. set SM_ID = #{smId,jdbcType=INTEGER},
  78. RM_IsDel = #{rmIsdel,jdbcType=INTEGER},
  79. SR_ID = #{srId,jdbcType=INTEGER}
  80. where RM_ID = #{rmId,jdbcType=INTEGER}
  81. </update>
  82. </mapper>