28 lines
996 B
XML
28 lines
996 B
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="net.maku.system.dao.SysUserDao">
|
||
|
|
|
||
|
|
<select id="getList" resultType="net.maku.system.entity.SysUserEntity">
|
||
|
|
select t1.*, (select t2.name from sys_org t2 where t2.id = t1.org_id) orgName
|
||
|
|
from sys_user t1 where t1.super_admin = 0
|
||
|
|
<if test="username != null and username.trim() != ''">
|
||
|
|
and t1.username like #{username}
|
||
|
|
</if>
|
||
|
|
<if test="mobile != null and mobile.trim() != ''">
|
||
|
|
and t1.mobile like #{mobile}
|
||
|
|
</if>
|
||
|
|
<if test="orgId != null and orgId.trim() != ''">
|
||
|
|
and t1.org_id = #{orgId}
|
||
|
|
</if>
|
||
|
|
<if test="gender != null and gender.trim() != ''">
|
||
|
|
and t1.gender = #{gender}
|
||
|
|
</if>
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<select id="getById" resultType="net.maku.system.entity.SysUserEntity">
|
||
|
|
select t1.*, (select t2.name from sys_org t2 where t2.id = t1.org_id) orgName from sys_user t1
|
||
|
|
where t1.id = #{id}
|
||
|
|
</select>
|
||
|
|
|
||
|
|
</mapper>
|