package com.zhentao.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zhentao.entity.MyResourceTag;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 资源标签关联Mapper接口
 */
@Mapper
public interface MyResourceTagMapper extends BaseMapper<MyResourceTag> {
    
    /**
     * 根据资源ID删除所有标签关联
     * @param resourceId 资源ID
     * @return 删除数量
     */
    int deleteByResourceId(@Param("resourceId") Integer resourceId);
    
    /**
     * 根据资源ID查询所有标签ID
     * @param resourceId 资源ID
     * @return 标签ID列表
     */
    List<Integer> selectTagIdsByResourceId(@Param("resourceId") Integer resourceId);
}

