| | |
| | | </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} |
| | |
| | | </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"> |
| | |
| | | </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"> |
| | |
| | | </insert> |
| | | |
| | | <delete id="deleteAuth"> |
| | | delete from lf.sys_auth where id = #{id} |
| | | 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} |
| | | </foreach>; |
| | | delete from lf.sys_auth where id in |
| | | <foreach item="id" collection="ids" index="index" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </foreach>; |
| | | </delete> |
| | | |
| | | <update id="updateAuth"> |