|
|
@@ -10,7 +10,7 @@
|
|
|
id, role_name, role_type ,creater,create_time as createTime
|
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
- select
|
|
|
+ select
|
|
|
<include refid="Base_Column_List" />
|
|
|
from role
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
@@ -82,7 +82,7 @@
|
|
|
</update>
|
|
|
<insert id="insertBatch" parameterType="com.goafanti.common.model.Role">
|
|
|
insert into role (id, name)
|
|
|
- values
|
|
|
+ values
|
|
|
<foreach item="item" index="index" collection="list" separator=",">
|
|
|
(#{item.id,jdbcType=VARCHAR}, #{item.name,jdbcType=VARCHAR})
|
|
|
</foreach>
|
|
|
@@ -110,15 +110,15 @@
|
|
|
</select>
|
|
|
<delete id="deleteByPrimaryKeys" parameterType="java.lang.String">
|
|
|
delete from role
|
|
|
- where id in
|
|
|
- <foreach item="item" index="index" collection="list" open="(" separator="," close=")">
|
|
|
- #{item,jdbcType=VARCHAR}
|
|
|
+ where id in
|
|
|
+ <foreach item="item" index="index" collection="list" open="(" separator="," close=")">
|
|
|
+ #{item,jdbcType=VARCHAR}
|
|
|
</foreach>
|
|
|
</delete>
|
|
|
- <!-- ******************************************************************** -->
|
|
|
+ <!-- ******************************************************************** -->
|
|
|
<select id="selectRoleList" resultType="com.goafanti.permission.bo.RoleBo">
|
|
|
select id,role_name as roleName,role_type as roleType,creater,create_time as createTime
|
|
|
- from role
|
|
|
+ from role
|
|
|
where role_type <![CDATA[ < ]]> 999999
|
|
|
<if test="roleName !=null">
|
|
|
AND role_name like CONCAT('%',#{roleName,jdbcType=VARCHAR},'%')
|
|
|
@@ -137,7 +137,7 @@
|
|
|
AND role_name like CONCAT('%',#{roleName,jdbcType=VARCHAR},'%')
|
|
|
</if>
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<select id="selectRolePList" resultType="com.goafanti.permission.bo.RolePermissionBo">
|
|
|
select tr.id as rid, tr.role_name as rname, tr.role_type,tp.id as pid,tp.name as pname,tp.url
|
|
|
from role tr
|
|
|
@@ -147,14 +147,14 @@
|
|
|
tr.id=#{id,jdbcType=VARCHAR}
|
|
|
</select>
|
|
|
<select id="selectCountByRoleId" parameterType="java.lang.String" resultType="java.lang.Integer">
|
|
|
- select
|
|
|
- count(0)
|
|
|
- from user_role
|
|
|
- where
|
|
|
- rid in
|
|
|
- <foreach item="item" index="index" collection="list" open="(" separator="," close=")">
|
|
|
- #{item,jdbcType=VARCHAR}
|
|
|
- </foreach>
|
|
|
+ select
|
|
|
+ count(0)
|
|
|
+ from user_role
|
|
|
+ where
|
|
|
+ rid in
|
|
|
+ <foreach item="item" index="index" collection="list" open="(" separator="," close=")">
|
|
|
+ #{item,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
</select>
|
|
|
<select id="selectIdByName" parameterType="java.lang.String" resultType="java.lang.String">
|
|
|
select
|
|
|
@@ -179,4 +179,12 @@
|
|
|
and
|
|
|
id!=#{id,jdbcType=VARCHAR}
|
|
|
</select>
|
|
|
-</mapper>
|
|
|
+ <select id="selectByIdList" resultMap="BaseResultMap">
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ from role where id in
|
|
|
+ <foreach item="item" index="index" collection="list" open="(" separator="," close=")">
|
|
|
+ #{item,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ </select>
|
|
|
+</mapper>
|