<?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.yeejoin.amos.boot.module.jxiop.biz.amosprojectmapper.UserEmpowerMapper">



    <select id="getCompanyBoList" resultType="com.yeejoin.amos.feign.privilege.model.CompanyModel">

        SELECT
        privilege_company.ORG_CODE orgCode,
        privilege_company.SEQUENCE_NBR sequenceNbr
        FROM  privilege_company  WHERE   privilege_company.IS_DELETED=0
            <if test="companyType != null and companyType != ''">
                AND privilege_company.COMPANY_TYPE=#{companyType}
            </if>
            <if test="level != null and level != ''">
                AND privilege_company.LEVEL=#{level}
            </if>
            <if test="companyOrgCode != null ">
                AND privilege_company.ORG_CODE IN
                <foreach collection="companyOrgCode" item="item" index="index" open="(" close=")" separator=",">
                    #{item}
                </foreach>
            </if>

    </select>

</mapper>
