package com.pavis.admin.aigc.mapper;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import top.continew.starter.data.mp.base.BaseMapper;
import com.pavis.admin.aigc.model.entity.AppKnowledgeDO;

import java.util.List;

/**
 * 应用和知识库关联 Mapper
 *
 * @author semi
 * @since 2025/05/26 17:28
 */
public interface AppKnowledgeMapper extends BaseMapper<AppKnowledgeDO> {
    /**
     * 根据appId查询knowledgeIds集合
     * 
     * @param id app主键id
     * @return 用户信息
     */
    @Select("SELECT knowledge_id FROM aigc_app_knowledge WHERE app_id = #{id}")
    List<Long> selectByKnowledgeIds(@Param("id") Long id);
}