<?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="org.jeecg.modules.system.mapper.SysPackPermissionMapper">

    <select id="getPermissionsByPackId" resultType="java.lang.String">
        select permission_id from sys_tenant_pack_perms
        where
        pack_id = #{packId}
    </select>

    <!--删除产品包对应的菜单权限-->
    <delete id="deletePackPermByTenantIds">
        delete from sys_tenant_pack_perms
        where pack_id in(
            select id from sys_tenant_pack where tenant_id in
            <foreach collection="tenantIdList" index="index" item="tenantId" open="(" separator="," close=")">
                #{tenantId}
            </foreach>
        )
    </delete>
</mapper>