package com.ruoyi.interfaces.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.interfaces.mapper.MdDataSetApiMapper;
import com.ruoyi.interfaces.domain.MdDataSetApi;
import com.ruoyi.interfaces.service.IMdDataSetApiService;

/**
 * api数据集Service业务层处理
 * 
 * @author 朱得糠
 * @date 2025-09-02
 */
@Service
public class MdDataSetApiServiceImpl implements IMdDataSetApiService 
{
    @Autowired
    private MdDataSetApiMapper mdDataSetApiMapper;

    /**
     * 查询api数据集
     * 
     * @param dcCode api数据集主键
     * @return api数据集
     */
    @Override
    public MdDataSetApi selectMdDataSetApiByDcCode(String dcCode)
    {
        return mdDataSetApiMapper.selectMdDataSetApiByDcCode(dcCode);
    }

    /**
     * 查询api数据集列表
     * 
     * @param mdDataSetApi api数据集
     * @return api数据集
     */
    @Override
    public List<MdDataSetApi> selectMdDataSetApiList(MdDataSetApi mdDataSetApi)
    {
        return mdDataSetApiMapper.selectMdDataSetApiList(mdDataSetApi);
    }

    /**
     * 新增api数据集
     * 
     * @param mdDataSetApi api数据集
     * @return 结果
     */
    @Override
    public int insertMdDataSetApi(MdDataSetApi mdDataSetApi)
    {
        return mdDataSetApiMapper.insertMdDataSetApi(mdDataSetApi);
    }

    /**
     * 修改api数据集
     * 
     * @param mdDataSetApi api数据集
     * @return 结果
     */
    @Override
    public int updateMdDataSetApi(MdDataSetApi mdDataSetApi)
    {
        return mdDataSetApiMapper.updateMdDataSetApi(mdDataSetApi);
    }

    /**
     * 批量删除api数据集
     * 
     * @param ids 需要删除的api数据集主键
     * @return 结果
     */
    @Override
    public int deleteMdDataSetApiByIds(Long[] ids)
    {
        return mdDataSetApiMapper.deleteMdDataSetApiByIds(ids);
    }

    /**
     * 删除api数据集信息
     * 
     * @param id api数据集主键
     * @return 结果
     */
    @Override
    public int deleteMdDataSetApiByDcCode(String id)
    {
        return mdDataSetApiMapper.deleteMdDataSetApiByDcCode(id);
    }
}
