SysRoleMapper.xml 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  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.SysRoleMapper" >
  4. <resultMap id="BaseResultMap" type="com.xinxin.topro.base.mysqlmodel.SysRole" >
  5. <id column="SR_ID" property="srId" jdbcType="INTEGER" />
  6. <result column="SR_Name" property="srName" jdbcType="VARCHAR" />
  7. <result column="SR_Describe" property="srDescribe" jdbcType="VARCHAR" />
  8. <result column="SR_Sort" property="srSort" jdbcType="INTEGER" />
  9. <result column="UI_ID_Add" property="uiIdAdd" jdbcType="VARCHAR" />
  10. <result column="SR_AddDate" property="srAdddate" jdbcType="TIMESTAMP" />
  11. <result column="UI_ID_Update" property="uiIdUpdate" jdbcType="VARCHAR" />
  12. <result column="SR_UpdateDate" property="srUpdatedate" jdbcType="TIMESTAMP" />
  13. <result column="SR_IsDel" property="srIsdel" jdbcType="INTEGER" />
  14. <result column="HI_ID" property="hiId" jdbcType="INTEGER" />
  15. </resultMap>
  16. <sql id="Base_Column_List" >
  17. SR_ID, SR_Name, SR_Describe, SR_Sort, UI_ID_Add, SR_AddDate, UI_ID_Update, SR_UpdateDate,
  18. SR_IsDel, HI_ID
  19. </sql>
  20. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
  21. select
  22. <include refid="Base_Column_List" />
  23. from sys_role
  24. where SR_ID = #{srId,jdbcType=INTEGER}
  25. </select>
  26. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
  27. delete from sys_role
  28. where SR_ID = #{srId,jdbcType=INTEGER}
  29. </delete>
  30. <insert id="insert" parameterType="com.xinxin.topro.base.mysqlmodel.SysRole" >
  31. insert into sys_role (SR_ID, SR_Name, SR_Describe,
  32. SR_Sort, UI_ID_Add, SR_AddDate,
  33. UI_ID_Update, SR_UpdateDate, SR_IsDel,
  34. HI_ID)
  35. values (#{srId,jdbcType=INTEGER}, #{srName,jdbcType=VARCHAR}, #{srDescribe,jdbcType=VARCHAR},
  36. #{srSort,jdbcType=INTEGER}, #{uiIdAdd,jdbcType=VARCHAR}, #{srAdddate,jdbcType=TIMESTAMP},
  37. #{uiIdUpdate,jdbcType=VARCHAR}, #{srUpdatedate,jdbcType=TIMESTAMP}, #{srIsdel,jdbcType=INTEGER},
  38. #{hiId,jdbcType=INTEGER})
  39. </insert>
  40. <insert id="insertSelective" parameterType="com.xinxin.topro.base.mysqlmodel.SysRole" >
  41. insert into sys_role
  42. <trim prefix="(" suffix=")" suffixOverrides="," >
  43. <if test="srId != null" >
  44. SR_ID,
  45. </if>
  46. <if test="srName != null" >
  47. SR_Name,
  48. </if>
  49. <if test="srDescribe != null" >
  50. SR_Describe,
  51. </if>
  52. <if test="srSort != null" >
  53. SR_Sort,
  54. </if>
  55. <if test="uiIdAdd != null" >
  56. UI_ID_Add,
  57. </if>
  58. <if test="srAdddate != null" >
  59. SR_AddDate,
  60. </if>
  61. <if test="uiIdUpdate != null" >
  62. UI_ID_Update,
  63. </if>
  64. <if test="srUpdatedate != null" >
  65. SR_UpdateDate,
  66. </if>
  67. <if test="srIsdel != null" >
  68. SR_IsDel,
  69. </if>
  70. <if test="hiId != null" >
  71. HI_ID,
  72. </if>
  73. </trim>
  74. <trim prefix="values (" suffix=")" suffixOverrides="," >
  75. <if test="srId != null" >
  76. #{srId,jdbcType=INTEGER},
  77. </if>
  78. <if test="srName != null" >
  79. #{srName,jdbcType=VARCHAR},
  80. </if>
  81. <if test="srDescribe != null" >
  82. #{srDescribe,jdbcType=VARCHAR},
  83. </if>
  84. <if test="srSort != null" >
  85. #{srSort,jdbcType=INTEGER},
  86. </if>
  87. <if test="uiIdAdd != null" >
  88. #{uiIdAdd,jdbcType=VARCHAR},
  89. </if>
  90. <if test="srAdddate != null" >
  91. #{srAdddate,jdbcType=TIMESTAMP},
  92. </if>
  93. <if test="uiIdUpdate != null" >
  94. #{uiIdUpdate,jdbcType=VARCHAR},
  95. </if>
  96. <if test="srUpdatedate != null" >
  97. #{srUpdatedate,jdbcType=TIMESTAMP},
  98. </if>
  99. <if test="srIsdel != null" >
  100. #{srIsdel,jdbcType=INTEGER},
  101. </if>
  102. <if test="hiId != null" >
  103. #{hiId,jdbcType=INTEGER},
  104. </if>
  105. </trim>
  106. </insert>
  107. <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.base.mysqlmodel.SysRole" >
  108. update sys_role
  109. <set >
  110. <if test="srName != null" >
  111. SR_Name = #{srName,jdbcType=VARCHAR},
  112. </if>
  113. <if test="srDescribe != null" >
  114. SR_Describe = #{srDescribe,jdbcType=VARCHAR},
  115. </if>
  116. <if test="srSort != null" >
  117. SR_Sort = #{srSort,jdbcType=INTEGER},
  118. </if>
  119. <if test="uiIdAdd != null" >
  120. UI_ID_Add = #{uiIdAdd,jdbcType=VARCHAR},
  121. </if>
  122. <if test="srAdddate != null" >
  123. SR_AddDate = #{srAdddate,jdbcType=TIMESTAMP},
  124. </if>
  125. <if test="uiIdUpdate != null" >
  126. UI_ID_Update = #{uiIdUpdate,jdbcType=VARCHAR},
  127. </if>
  128. <if test="srUpdatedate != null" >
  129. SR_UpdateDate = #{srUpdatedate,jdbcType=TIMESTAMP},
  130. </if>
  131. <if test="srIsdel != null" >
  132. SR_IsDel = #{srIsdel,jdbcType=INTEGER},
  133. </if>
  134. <if test="hiId != null" >
  135. HI_ID = #{hiId,jdbcType=INTEGER},
  136. </if>
  137. </set>
  138. where SR_ID = #{srId,jdbcType=INTEGER}
  139. </update>
  140. <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.base.mysqlmodel.SysRole" >
  141. update sys_role
  142. set SR_Name = #{srName,jdbcType=VARCHAR},
  143. SR_Describe = #{srDescribe,jdbcType=VARCHAR},
  144. SR_Sort = #{srSort,jdbcType=INTEGER},
  145. UI_ID_Add = #{uiIdAdd,jdbcType=VARCHAR},
  146. SR_AddDate = #{srAdddate,jdbcType=TIMESTAMP},
  147. UI_ID_Update = #{uiIdUpdate,jdbcType=VARCHAR},
  148. SR_UpdateDate = #{srUpdatedate,jdbcType=TIMESTAMP},
  149. SR_IsDel = #{srIsdel,jdbcType=INTEGER},
  150. HI_ID = #{hiId,jdbcType=INTEGER}
  151. where SR_ID = #{srId,jdbcType=INTEGER}
  152. </update>
  153. </mapper>