| 123456789101112131415161718192021222324252627282930313233 |
- <?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.yt.zhylplat.dao.TSysUseraccountMapper">
- <select id="selectUserAccountByRoleId" resultType="com.yt.zhylplat.entity.TSysUseraccount">
- select
- *
- from
- T_Sys_UserAccount ua
- where
- F_DeleteFlag = 0
- and
- F_DeptId = #{fDeptid}
- <if test="yhCompanyId != null">
- and yh_company_id = #{yhCompanyId}
- </if>
- <if test="roleIds != null and roleIds != ''">
- and EXISTS (
- select
- 1
- from
- T_Sys_UserRoles
- where
- F_UserId = ua.F_UserId
- and
- find_in_set(F_RoleId, #{roleIds})
- )
- </if>
- </select>
- </mapper>
|