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

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.system.domain.project.BmCompanyShareholder;
import com.ruoyi.system.mapper.project.BmCompanyShareholderMapper;
import com.ruoyi.system.service.project.IBmCompanyShareholderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
 * 注册企业股东构成Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-03-05
 */
@Service
public class BmCompanyShareholderServiceImpl implements IBmCompanyShareholderService
{
    @Autowired
    private BmCompanyShareholderMapper bmCompanyShareholderMapper;

    /**
     * 查询注册企业股东构成
     * 
     * @param id 注册企业股东构成ID
     * @return 注册企业股东构成
     */
    @Override
    public BmCompanyShareholder selectBmCompanyShareholderById(Long id)
    {
        return bmCompanyShareholderMapper.selectBmCompanyShareholderById(id);
    }

    /**
     * 查询注册企业股东构成列表
     * 
     * @param bmCompanyShareholder 注册企业股东构成
     * @return 注册企业股东构成
     */
    @Override
    public List<BmCompanyShareholder> selectBmCompanyShareholderList(BmCompanyShareholder bmCompanyShareholder)
    {
        return bmCompanyShareholderMapper.selectBmCompanyShareholderList(bmCompanyShareholder);
    }

    /**
     * 新增注册企业股东构成
     * 
     * @param bmCompanyShareholder 注册企业股东构成
     * @return 结果
     */
    @Override
    public int insertBmCompanyShareholder(BmCompanyShareholder bmCompanyShareholder)
    {
        bmCompanyShareholder.setCreateTime(DateUtils.getNowDate());
        bmCompanyShareholder.setCreateBy(SecurityUtils.getUsername());
        return bmCompanyShareholderMapper.insertBmCompanyShareholder(bmCompanyShareholder);
    }

    /**
     * 修改注册企业股东构成
     * 
     * @param bmCompanyShareholder 注册企业股东构成
     * @return 结果
     */
    @Override
    public int updateBmCompanyShareholder(BmCompanyShareholder bmCompanyShareholder)
    {
        bmCompanyShareholder.setUpdateTime(DateUtils.getNowDate());
        bmCompanyShareholder.setUpdateBy(SecurityUtils.getUsername());
        return bmCompanyShareholderMapper.updateBmCompanyShareholder(bmCompanyShareholder);
    }

    /**
     * 批量删除注册企业股东构成
     * 
     * @param ids 需要删除的注册企业股东构成ID
     * @return 结果
     */
    @Override
    public int deleteBmCompanyShareholderByIds(Long[] ids)
    {
        return bmCompanyShareholderMapper.deleteBmCompanyShareholderByIds(ids);
    }

    /**
     * 删除注册企业股东构成信息
     * 
     * @param id 注册企业股东构成ID
     * @return 结果
     */
    @Override
    public int deleteBmCompanyShareholderById(Long id)
    {
        return bmCompanyShareholderMapper.deleteBmCompanyShareholderById(id);
    }
}
