<?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.hygf.api.mapper.UserEmpowerMapper">

    <select id="georgcodelist" resultType="Map">

        select ORG_CODE orgCode from privilege_company where  COMPANY_TYPE='region' and LEVEL='outer_company'

        <if test="orgs != null and orgs.size() >0">
            and  ORG_CODE not in
            <foreach collection="orgs" item="item" index="index" open="(" close=")" separator=",">
                #{item}
            </foreach>
        </if>

    </select>
<insert id="upuserrole">

INSERT INTO `amos_project`.`privilege_user_org_role` ( `SEQUENCE_NBR`, `REC_DATE`, `REC_USER_ID`, `USER_ID`,
`COMPANY_SEQ`,
`DEPARTMENT_SEQ`,
`AGENCY_CODE`,
 `ROLE_SEQ` )
VALUES
	( #{id},
	sysdate(),
	#{userId},
	#{userId},
	#{com},
	 null,
	'JXIOP',
	#{role} );

</insert>
</mapper>
