<?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.cloud.user.dao.SysPermissionDao">
|
|
<sql id="where">
|
<where>
|
<if test="permission != null and permission != ''">
|
and t.permission like concat('%', #{permission}, '%')
|
</if>
|
<if test="name != null and name != ''">
|
and t.name like concat('%', #{name}, '%')
|
</if>
|
</where>
|
</sql>
|
<select id="count" resultType="int">
|
select count(*) from sys_permission t
|
<include refid="where" />
|
</select>
|
|
<select id="findData" resultType="com.cloud.model.sys.SysPermission">
|
select * from sys_permission t
|
<include refid="where" />
|
order by t.id desc
|
<if test="start != null and start >= 0 and length != null and length > 0">
|
limit #{start}, #{length}
|
</if>
|
</select>
|
</mapper>
|