charging_pile/common/target/classes/mapper/SystemAuthAdminMapper.xml

32 lines
1.2 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.hcy.common.mapper.system.SystemAuthAdminMapper">
<select id="list" resultType="com.hcy.common.dto.SystemAuthAdminDto">
SELECT
t.*,
sd.NAME AS dept
FROM
la_system_auth_admin t
LEFT JOIN la_system_auth_role sr ON sr.id = t.role
LEFT JOIN la_system_auth_dept sd ON sd.id = t.dept_id
<where>
t.is_delete = 0
and sr.id NOT IN ( 1, 2, 11 )
<if test="param.role != null and param.role != ''">
and FIND_IN_SET(#{param.role},t.role)
</if>
<if test="param.username != null and param.username != ''">
and t.username like concat('%',#{param.username},'%')
</if>
<if test="param.nickname != null and param.nickname != ''">
and t.nickname like concat('%',#{param.nickname},'%')
</if>
</where>
ORDER BY
t.id DESC,
t.sort DESC
</select>
</mapper>