Files
gofly-platform-services/zlt-business/user-center/src/main/resources/mapper/SysRoleMapper.xml
T

22 lines
700 B
XML
Raw Normal View History

2019-01-19 15:31:26 +08:00
<?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.central.user.mapper.SysRoleMapper">
<sql id="where">
<where>
<if test="r.name != null and r.name != ''">
and t.name like concat('%', #{r.name}, '%')
</if>
<if test="r.searchKey != null and r.searchKey != '' and r.searchKey=='name'">
and t.name like concat('%', #{r.searchValue}, '%')
</if>
</where>
</sql>
<select id="findList" resultType="com.central.common.model.SysRole">
select * from sys_role t
<include refid="where" />
order by t.id desc
</select>
</mapper>