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.BuyerProjectMemberMapper;
import com.ruoyi.buyerapi.domain.BuyerProjectMember;
import com.ruoyi.buyerapi.service.IBuyerProjectMemberService;

/**
 * 立项管理成员Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-09-22
 */
@Service
public class BuyerProjectMemberServiceImpl implements IBuyerProjectMemberService 
{
    @Autowired
    private BuyerProjectMemberMapper buyerProjectMemberMapper;

    /**
     * 查询立项管理成员
     * 
     * @param id 立项管理成员主键
     * @return 立项管理成员
     */
    @Override
    public BuyerProjectMember selectBuyerProjectMemberById(String id)
    {
        return buyerProjectMemberMapper.selectBuyerProjectMemberById(id);
    }

    /**
     * 查询立项管理成员列表
     * 
     * @param buyerProjectMember 立项管理成员
     * @return 立项管理成员
     */
    @Override
    public List<BuyerProjectMember> selectBuyerProjectMemberList(BuyerProjectMember buyerProjectMember)
    {
        return buyerProjectMemberMapper.selectBuyerProjectMemberList(buyerProjectMember);
    }

    /**
     * 新增立项管理成员
     * 
     * @param buyerProjectMember 立项管理成员
     * @return 结果
     */
    @Override
    public int insertBuyerProjectMember(BuyerProjectMember buyerProjectMember)
    {
        buyerProjectMember.setCreateTime(DateUtils.getNowDate());
        return buyerProjectMemberMapper.insertBuyerProjectMember(buyerProjectMember);
    }

    /**
     * 修改立项管理成员
     * 
     * @param buyerProjectMember 立项管理成员
     * @return 结果
     */
    @Override
    public int updateBuyerProjectMember(BuyerProjectMember buyerProjectMember)
    {
        buyerProjectMember.setUpdateTime(DateUtils.getNowDate());
        return buyerProjectMemberMapper.updateBuyerProjectMember(buyerProjectMember);
    }

    /**
     * 批量删除立项管理成员
     * 
     * @param ids 需要删除的立项管理成员主键
     * @return 结果
     */
    @Override
    public int deleteBuyerProjectMemberByIds(String[] ids)
    {
        return buyerProjectMemberMapper.deleteBuyerProjectMemberByIds(ids);
    }

    /**
     * 删除立项管理成员信息
     * 
     * @param id 立项管理成员主键
     * @return 结果
     */
    @Override
    public int deleteBuyerProjectMemberById(String id)
    {
        return buyerProjectMemberMapper.deleteBuyerProjectMemberById(id);
    }
}
