<?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.artfess.sysConfig.persistence.dao.AppTagsRelationDao">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.artfess.sysConfig.persistence.model.AppTagsRelation">
        <id column="ID_" property="id" />
        <result column="APP_ID_" property="appId" />
        <result column="TAG_ID_" property="tagId" />
        <result column="TENANT_ID_" property="tenantId" />
    </resultMap>

    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        ID_, APP_ID_, TAG_ID_, TENANT_ID_
    </sql>

    <select id="getAppIdsByTagIds" resultType="java.lang.String"  parameterType="java.lang.String">
        SELECT APP_ID_ FROM PORTAL_APP_TAGS_RELATION WHERE TAG_ID_ IN
        <foreach collection="tagIds" item="item" open="(" close=")" separator=",">
            #{item}
        </foreach>
    </select>

</mapper>
