package com.yushu.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yushu.system.mapper.AiProviderMapper;
import com.yushu.system.domain.AiProvider;
import com.yushu.system.service.IAiProviderService;

/**
 * AI厂商Service业务层处理
 * 
 * @author yushu
 * @date 2024-11-06
 */
@Service
public class AiProviderServiceImpl implements IAiProviderService {
    @Autowired
    private AiProviderMapper aiProviderMapper;

    /**
     * 查询AI厂商
     * 
     * @param providerId AI厂商主键
     * @return AI厂商
     */
    @Override
    public AiProvider selectAiProviderByProviderId(Long providerId) {
        return aiProviderMapper.selectAiProviderByProviderId(providerId);
    }

    /**
     * 查询AI厂商列表
     * 
     * @param aiProvider AI厂商
     * @return AI厂商
     */
    @Override
    public List<AiProvider> selectAiProviderList(AiProvider aiProvider) {
        return aiProviderMapper.selectAiProviderList(aiProvider);
    }

    /**
     * 新增AI厂商
     * 
     * @param aiProvider AI厂商
     * @return 结果
     */
    @Override
    public int insertAiProvider(AiProvider aiProvider) {
        return aiProviderMapper.insertAiProvider(aiProvider);
    }

    /**
     * 修改AI厂商
     * 
     * @param aiProvider AI厂商
     * @return 结果
     */
    @Override
    public int updateAiProvider(AiProvider aiProvider) {
        return aiProviderMapper.updateAiProvider(aiProvider);
    }

    /**
     * 批量删除AI厂商
     * 
     * @param providerIds 需要删除的AI厂商主键
     * @return 结果
     */
    @Override
    public int deleteAiProviderByProviderIds(Long[] providerIds) {
        return aiProviderMapper.deleteAiProviderByProviderIds(providerIds);
    }

    /**
     * 删除AI厂商信息
     * 
     * @param providerId AI厂商主键
     * @return 结果
     */
    @Override
    public int deleteAiProviderByProviderId(Long providerId) {
        return aiProviderMapper.deleteAiProviderByProviderId(providerId);
    }
}

