From e8a5942bd0ac1188281cda29c882bb0e107896dc Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期四, 13 十月 2022 16:56:32 +0800 Subject: [PATCH] 1 --- src/main/resources/mapper/sys/AuthMapper.xml | 26 +++++++++++++++++++++++--- 1 files changed, 23 insertions(+), 3 deletions(-) diff --git a/src/main/resources/mapper/sys/AuthMapper.xml b/src/main/resources/mapper/sys/AuthMapper.xml index 3ec62ba..be313ae 100644 --- a/src/main/resources/mapper/sys/AuthMapper.xml +++ b/src/main/resources/mapper/sys/AuthMapper.xml @@ -1,8 +1,6 @@ <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.lf.server.mapper.sys.AuthMapper"> - - <!-- 缁熻琛屾暟 --> <select id="selectCount" resultType="java.lang.Integer" parameterType="java.lang.String"> select count(*) from lf.sys_auth <where> @@ -12,7 +10,6 @@ </where> </select> - <!-- 鍒嗛〉鏌ヨ --> <select id="selectByPage" resultType="com.lf.server.entity.sys.AuthEntity"> select * from lf.sys_auth <where> @@ -24,6 +21,29 @@ limit #{limit} offset #{offset} </select> + <select id="selectCountForMenu" resultType="java.lang.Integer" parameterType="java.lang.String"> + select count(a.*) from lf.sys_auth a where not exists (select b.id from lf.sys_menu_auth b + <where> + b.authid = a.id + <if test="menuid != null"> + and b.menuid = #{menuid} + </if> + </where> + ) + </select> + + <select id="selectByPageForMenu" resultType="com.lf.server.entity.sys.AuthEntity"> + select a.* from lf.sys_auth a where not exists (select b.id from lf.sys_menu_auth b + <where> + b.authid = a.id + <if test="menuid != null"> + and b.menuid = #{menuid} + </if> + </where> + ) + order by a.id + limit #{limit} offset #{offset} + </select> <select id="selectAuthAll" resultType="com.lf.server.entity.sys.AuthEntity"> select * from lf.sys_auth order by id -- Gitblit v1.9.3