package com.ruoyi.system.service.impl.project;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.system.domain.project.BmProjectShareholder;
import com.ruoyi.system.mapper.project.BmProjectShareholderMapper;
import com.ruoyi.system.service.project.IBmProjectShareholderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 签约信息-添加股东构成Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-12-20
 */
@Service
public class BmProjectShareholderServiceImpl implements IBmProjectShareholderService
{
    @Autowired
    private BmProjectShareholderMapper bmProjectShareholderMapper;

    /**
     * 查询签约信息-添加股东构成
     * 
     * @param id 签约信息-添加股东构成ID
     * @return 签约信息-添加股东构成
     */
    @Override
    public BmProjectShareholder selectBmProjectShareholderById(Long id)
    {
        return bmProjectShareholderMapper.selectBmProjectShareholderById(id);
    }

    /**
     * 查询签约信息-添加股东构成列表
     * 
     * @param bmProjectShareholder 签约信息-添加股东构成
     * @return 签约信息-添加股东构成
     */
    @Override
    public List<BmProjectShareholder> selectBmProjectShareholderList(BmProjectShareholder bmProjectShareholder)
    {
        return bmProjectShareholderMapper.selectBmProjectShareholderList(bmProjectShareholder);
    }

    /**
     * 新增签约信息-添加股东构成
     * 
     * @param bmProjectShareholder 签约信息-添加股东构成
     * @return 结果
     */
    @Override
    public int insertBmProjectShareholder(BmProjectShareholder bmProjectShareholder)
    {
        bmProjectShareholder.setCreateTime(DateUtils.getNowDate());
        return bmProjectShareholderMapper.insertBmProjectShareholder(bmProjectShareholder);
    }

    /**
     * 修改签约信息-添加股东构成
     * 
     * @param bmProjectShareholder 签约信息-添加股东构成
     * @return 结果
     */
    @Override
    public int updateBmProjectShareholder(BmProjectShareholder bmProjectShareholder)
    {
        bmProjectShareholder.setUpdateTime(DateUtils.getNowDate());
        return bmProjectShareholderMapper.updateBmProjectShareholder(bmProjectShareholder);
    }

    /**
     * 批量删除签约信息-添加股东构成
     * 
     * @param ids 需要删除的签约信息-添加股东构成ID
     * @return 结果
     */
    @Override
    public int deleteBmProjectShareholderByIds(Long[] ids)
    {
        return bmProjectShareholderMapper.deleteBmProjectShareholderByIds(ids);
    }

    /**
     * 删除签约信息-添加股东构成信息
     * 
     * @param id 签约信息-添加股东构成ID
     * @return 结果
     */
    @Override
    public int deleteBmProjectShareholderById(Long id)
    {
        return bmProjectShareholderMapper.deleteBmProjectShareholderById(id);
    }
}
