管道基础大数据平台系统开发-【后端】-Server
1
13693261870
2024-12-06 042b07f18720af7559f30f5c0b50b770df4a85f6
src/main/resources/mapper/sys/AuthMapper.xml
@@ -11,7 +11,7 @@
    </select>
    <select id="selectByPage" resultType="com.lf.server.entity.sys.AuthEntity">
        select * from lf.sys_auth
        select a.*, fn_uname(create_user) createName, fn_uname(update_user) updateName from lf.sys_auth a
        <where>
            <if test="name != null">
                name = #{name}
@@ -33,7 +33,8 @@
    </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
        select a.*, fn_uname(create_user) createName, fn_uname(update_user) updateName
        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">
@@ -46,11 +47,15 @@
    </select>
    <select id="selectAuthAll" resultType="com.lf.server.entity.sys.AuthEntity">
        select * from lf.sys_auth order by id
        select a.*, fn_uname(create_user) createName, fn_uname(update_user) updateName
        from lf.sys_auth a
        order by id
    </select>
    <select id="selectAuth" resultType="com.lf.server.entity.sys.AuthEntity">
        select * from lf.sys_auth where id = #{id}
        select a.*, fn_uname(create_user) createName, fn_uname(update_user) updateName
        from lf.sys_auth a
        where id = #{id}
    </select>
    <insert id="insertAuth" parameterType="com.lf.server.entity.sys.AuthEntity">
@@ -70,11 +75,16 @@
    </insert>
    <delete id="deleteAuth">
        delete from lf.sys_role_menu_auth where menu_auth_id in (select id from lf.sys_menu_auth where authid = #{id});
        delete from lf.sys_menu_auth where authid = #{id};
        delete from lf.sys_auth where id = #{id};
    </delete>
    <delete id="deleteAuths"  >
        delete from lf.sys_role_menu_auth where menu_auth_id in (select id from lf.sys_menu_auth where authid in
        <foreach item="id" collection="ids" index="index" open="(" separator="," close=")">
            #{id}
        </foreach>);
        delete from lf.sys_menu_auth where authid in
        <foreach item="id" collection="ids" index="index" open="(" separator="," close=")">
            #{id}