12345678910111213141516171819202122232425262728293031323334353637383940 |
- <?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.hz.employmentsite.mapper.cquery.UserInfoCQuery">
- <select id="getList" resultType="com.hz.employmentsite.vo.baseSettings.SiteUserVo">
- select siteUser.*,dic_userRole.Name as RoleName,dic_gender.Name as GenderName,site.SiteName
- ,inSites.InstitutionID as institutionID,site.regionCode
- from pc_site_user siteUser
- left join pc_site site on siteUser.siteID = site.siteID
- left join (select * from sys_dictionary_item where DictionaryCode ='UserType' ) dic_userRole on siteUser.RoleID = dic_userRole.Value
- left join (select * from sys_dictionary_item where DictionaryCode ='Gender' ) dic_gender on siteUser.Gender = dic_gender.Value
- left join pc_site_institution inSites on site.SiteID = inSites.SiteID
- left join pc_institution institution on inSites.institutionID = institution.InstitutionID
- where 1=1
- <if test="siteUserIDList!='' and siteUserIDList!=null">
- and siteUserID in (${siteUserIDList})
- </if>
- <if test="siteUserName!='' and siteUserName!=null">
- and siteUser.siteUserName like Concat('%',#{siteUserName},'%')
- </if>
- <if test="siteID!='' and siteID!=null">
- and siteUser.siteID = #{siteID}
- </if>
- <if test="roleName!='' and roleName!=null">
- and dic_userRole.Name = #{roleName}
- </if>
- <if test="regionCode!='' and regionCode!=null">
- and site.regionCode = #{regionCode}
- </if>
- </select>
- <select id="getListBySiteID" resultType="com.hz.employmentsite.vo.baseSettings.SiteUserVo">
- select siteUser.*,dic_userRole.Name as RoleName,dic_gender.Name as GenderName from pc_site_user siteUser
- left join (select * from sys_dictionary_item where DictionaryCode ='UserType' ) dic_userRole on siteUser.RoleID = dic_userRole.Value
- left join (select * from sys_dictionary_item where DictionaryCode ='Gender' ) dic_gender on siteUser.Gender = dic_gender.Value
- where 1=1
- <if test="siteID!='' and siteID!=null">
- and siteID = #{siteID}
- </if>
- </select>
- </mapper>
|