package com.ruoyi.buyerapi.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.buyerapi.mapper.BuyerSubjectContentMapper;
import com.ruoyi.buyerapi.domain.BuyerSubjectContent;
import com.ruoyi.buyerapi.service.IBuyerSubjectContentService;

/**
 * 科密对应关系Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-09-19
 */
@Service
public class BuyerSubjectContentServiceImpl implements IBuyerSubjectContentService 
{
    @Autowired
    private BuyerSubjectContentMapper buyerSubjectContentMapper;

    /**
     * 查询科密对应关系
     * 
     * @param id 科密对应关系主键
     * @return 科密对应关系
     */
    @Override
    public BuyerSubjectContent selectBuyerSubjectContentById(String id)
    {
        return buyerSubjectContentMapper.selectBuyerSubjectContentById(id);
    }

    /**
     * 查询科密对应关系列表
     * 
     * @param buyerSubjectContent 科密对应关系
     * @return 科密对应关系
     */
    @Override
    public List<BuyerSubjectContent> selectBuyerSubjectContentList(BuyerSubjectContent buyerSubjectContent)
    {
        return buyerSubjectContentMapper.selectBuyerSubjectContentList(buyerSubjectContent);
    }

    /**
     * 新增科密对应关系
     * 
     * @param buyerSubjectContent 科密对应关系
     * @return 结果
     */
    @Override
    public int insertBuyerSubjectContent(BuyerSubjectContent buyerSubjectContent)
    {
        buyerSubjectContent.setCreateTime(DateUtils.getNowDate());
        return buyerSubjectContentMapper.insertBuyerSubjectContent(buyerSubjectContent);
    }

    /**
     * 修改科密对应关系
     * 
     * @param buyerSubjectContent 科密对应关系
     * @return 结果
     */
    @Override
    public int updateBuyerSubjectContent(BuyerSubjectContent buyerSubjectContent)
    {
        buyerSubjectContent.setUpdateTime(DateUtils.getNowDate());
        return buyerSubjectContentMapper.updateBuyerSubjectContent(buyerSubjectContent);
    }

    /**
     * 批量删除科密对应关系
     * 
     * @param ids 需要删除的科密对应关系主键
     * @return 结果
     */
    @Override
    public int deleteBuyerSubjectContentByIds(String[] ids)
    {
        return buyerSubjectContentMapper.deleteBuyerSubjectContentByIds(ids);
    }

    /**
     * 删除科密对应关系信息
     * 
     * @param id 科密对应关系主键
     * @return 结果
     */
    @Override
    public int deleteBuyerSubjectContentById(String id)
    {
        return buyerSubjectContentMapper.deleteBuyerSubjectContentById(id);
    }
}
