<?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.hotent.portal.persistence.dao.PortalBizSystemOrgAuthDao">

	<select id="getOrgAuthSystem" resultType="com.hotent.uc.api.impl.model.Org">
	 	select * from (select uo.* from uc_org uo left join portal_biz_system_org_auth uor on uor.ORG_ID_ = uo.ID_
		where uor.SYS_CODE_ = #{sysCode} and uor.DATA_TYPE_=#{type} ) uo
			${ew.customSqlSegment}
	</select>


	<select id="getOrgAuthSystemUser" resultType="com.hotent.uc.api.impl.model.UserFacade">
	 	select * from (select uo.* from uc_user uo left join portal_biz_system_org_auth uor on uor.ORG_ID_ = uo.ID_
		where uor.SYS_CODE_ = #{sysCode} and uor.DATA_TYPE_=#{type} ) uo
			${ew.customSqlSegment}
	</select>


</mapper>
