Bez popisu

TSysUseraccountMapper.xml 946B

123456789101112131415161718192021222324252627282930313233
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="com.yt.zhylplat.dao.TSysUseraccountMapper">
  4. <select id="selectUserAccountByRoleId" resultType="com.yt.zhylplat.entity.TSysUseraccount">
  5. select
  6. *
  7. from
  8. T_Sys_UserAccount ua
  9. where
  10. F_DeleteFlag = 0
  11. and
  12. F_DeptId = #{fDeptid}
  13. <if test="yhCompanyId != null">
  14. and yh_company_id = #{yhCompanyId}
  15. </if>
  16. <if test="roleIds != null and roleIds != ''">
  17. and EXISTS (
  18. select
  19. 1
  20. from
  21. T_Sys_UserRoles
  22. where
  23. F_UserId = ua.F_UserId
  24. and
  25. find_in_set(F_RoleId, #{roleIds})
  26. )
  27. </if>
  28. </select>
  29. </mapper>