package com.fs.company.service.impl;

import java.util.List;
import com.fs.common.utils.DateUtils;
import com.fs.company.vo.CompanyProfitVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fs.company.mapper.CompanyProfitMapper;
import com.fs.company.domain.CompanyProfit;
import com.fs.company.service.ICompanyProfitService;

/**
 * 提现Service业务层处理
 * 
 * @author fs
 * @date 2022-07-04
 */
@Service
public class CompanyProfitServiceImpl implements ICompanyProfitService 
{
    @Autowired
    private CompanyProfitMapper companyProfitMapper;

    /**
     * 查询提现
     * 
     * @param profitId 提现ID
     * @return 提现
     */
    @Override
    public CompanyProfit selectCompanyProfitById(Long profitId)
    {
        return companyProfitMapper.selectCompanyProfitById(profitId);
    }

    /**
     * 查询提现列表
     * 
     * @param companyProfit 提现
     * @return 提现
     */
    @Override
    public List<CompanyProfit> selectCompanyProfitList(CompanyProfit companyProfit)
    {
        return companyProfitMapper.selectCompanyProfitList(companyProfit);
    }

    /**
     * 新增提现
     * 
     * @param companyProfit 提现
     * @return 结果
     */
    @Override
    public int insertCompanyProfit(CompanyProfit companyProfit)
    {
        companyProfit.setCreateTime(DateUtils.getNowDate());
        return companyProfitMapper.insertCompanyProfit(companyProfit);
    }

    /**
     * 修改提现
     * 
     * @param companyProfit 提现
     * @return 结果
     */
    @Override
    public int updateCompanyProfit(CompanyProfit companyProfit)
    {
        companyProfit.setUpdateTime(DateUtils.getNowDate());
        return companyProfitMapper.updateCompanyProfit(companyProfit);
    }

    /**
     * 批量删除提现
     * 
     * @param profitIds 需要删除的提现ID
     * @return 结果
     */
    @Override
    public int deleteCompanyProfitByIds(Long[] profitIds)
    {
        return companyProfitMapper.deleteCompanyProfitByIds(profitIds);
    }

    /**
     * 删除提现信息
     * 
     * @param profitId 提现ID
     * @return 结果
     */
    @Override
    public int deleteCompanyProfitById(Long profitId)
    {
        return companyProfitMapper.deleteCompanyProfitById(profitId);
    }

    @Override
    public List<CompanyProfitVO> selectCompanyProfitListVO(CompanyProfit companyProfit) {
        return companyProfitMapper.selectCompanyProfitListVO(companyProfit);
    }

    @Override
    public int deleteCompanyProfitByCompanyId(Long companyId) {
        return companyProfitMapper.deleteCompanyProfitByCompanyId(companyId);
    }
}
