You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
71 lines
2.5 KiB
XML
71 lines
2.5 KiB
XML
<?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.glxp.api.admin.dao.auth.AuthPermissionRuleDao" >
|
|
|
|
<select id="listByIdIn" resultType="com.glxp.api.admin.entity.auth.AuthPermissionRule">
|
|
SELECT `name`
|
|
FROM auth_permission_rule
|
|
where id IN
|
|
<foreach collection="list" item="id" index="index" open="(" close=")" separator=",">
|
|
#{id}
|
|
</foreach>
|
|
</select>
|
|
|
|
<select id="listByPid" resultType="com.glxp.api.admin.entity.auth.AuthPermissionRule">
|
|
SELECT `id`,`pid`,`name`,`title`,`status`,`condition`,`listorder`
|
|
FROM auth_permission_rule
|
|
where pid = #{pid}
|
|
</select>
|
|
|
|
<select id="listAll" resultType="com.glxp.api.admin.entity.auth.AuthPermissionRule">
|
|
SELECT `id`,`pid`,`name`,`title`,`status`,`condition`,`listorder`
|
|
FROM auth_permission_rule
|
|
</select>
|
|
|
|
<select id="findByName" resultType="com.glxp.api.admin.entity.auth.AuthPermissionRule">
|
|
SELECT `id`
|
|
FROM auth_permission_rule
|
|
where `name` = #{name}
|
|
limit 1
|
|
</select>
|
|
|
|
<insert id="insertAuthPermissionRule" keyProperty="id" parameterType="com.glxp.api.admin.entity.auth.AuthPermissionRule">
|
|
INSERT INTO auth_permission_rule(pid,`name`,`title`,`status`,`condition`,`listorder`,create_time,update_time)
|
|
values
|
|
(#{pid},
|
|
#{name},
|
|
#{title},
|
|
#{status},
|
|
<choose>
|
|
<when test="condition != null">
|
|
#{condition},
|
|
</when>
|
|
<otherwise>
|
|
'',
|
|
</otherwise>
|
|
</choose>
|
|
#{listorder},
|
|
#{createTime},
|
|
#{updateTime})
|
|
</insert>
|
|
|
|
<update id="updateAuthPermissionRule" parameterType="com.glxp.api.admin.entity.auth.AuthPermissionRule">
|
|
UPDATE auth_permission_rule
|
|
<set>
|
|
<if test="pid != null">pid=#{pid},</if>
|
|
<if test="name != null">`name`=#{name},</if>
|
|
<if test="title != null">title=#{title},</if>
|
|
<if test="status != null">`status`=#{status},</if>
|
|
<if test="condition != null">`condition`=#{condition},</if>
|
|
<if test="listorder != null">`listorder`=#{listorder},</if>
|
|
<if test="updateTime != null">update_time=#{updateTime},</if>
|
|
</set>
|
|
WHERE id=#{id}
|
|
</update>
|
|
|
|
<delete id="deleteById" parameterType="java.lang.Long">
|
|
delete from auth_permission_rule where id = #{id}
|
|
</delete>
|
|
|
|
</mapper> |