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

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.system.mapper.projectV2.XmProjectInvestorMapper;
import com.ruoyi.system.domain.projectV2.XmProjectInvestor;
import com.ruoyi.system.service.projectV2.IXmProjectInvestorService;

/**
 * 项目投资方 关联project(一对多关系)Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-02-23
 */
@Service
public class XmProjectInvestorServiceImpl implements IXmProjectInvestorService 
{
    @Autowired
    private XmProjectInvestorMapper xmProjectInvestorMapper;

    /**
     * 查询项目投资方 关联project(一对多关系)
     * 
     * @param id 项目投资方 关联project(一对多关系)ID
     * @return 项目投资方 关联project(一对多关系)
     */
    @Override
    public XmProjectInvestor selectXmProjectInvestorById(Long id)
    {
        return xmProjectInvestorMapper.selectXmProjectInvestorById(id);
    }

    /**
     * 查询项目投资方 关联project(一对多关系)列表
     * 
     * @param xmProjectInvestor 项目投资方 关联project(一对多关系)
     * @return 项目投资方 关联project(一对多关系)
     */
    @Override
    public List<XmProjectInvestor> selectXmProjectInvestorList(XmProjectInvestor xmProjectInvestor)
    {
        return xmProjectInvestorMapper.selectXmProjectInvestorList(xmProjectInvestor);
    }

    /**
     * 新增项目投资方 关联project(一对多关系)
     * 
     * @param xmProjectInvestor 项目投资方 关联project(一对多关系)
     * @return 结果
     */
    @Override
    public int insertXmProjectInvestor(XmProjectInvestor xmProjectInvestor)
    {
        xmProjectInvestor.setCreateTime(DateUtils.getNowDate());
        return xmProjectInvestorMapper.insertXmProjectInvestor(xmProjectInvestor);
    }

    /**
     * 修改项目投资方 关联project(一对多关系)
     * 
     * @param xmProjectInvestor 项目投资方 关联project(一对多关系)
     * @return 结果
     */
    @Override
    public int updateXmProjectInvestor(XmProjectInvestor xmProjectInvestor)
    {
        xmProjectInvestor.setUpdateTime(DateUtils.getNowDate());
        return xmProjectInvestorMapper.updateXmProjectInvestor(xmProjectInvestor);
    }

    /**
     * 批量删除项目投资方 关联project(一对多关系)
     * 
     * @param ids 需要删除的项目投资方 关联project(一对多关系)ID
     * @return 结果
     */
    @Override
    public int deleteXmProjectInvestorByIds(Long[] ids)
    {
        return xmProjectInvestorMapper.deleteXmProjectInvestorByIds(ids);
    }

    /**
     * 删除项目投资方 关联project(一对多关系)信息
     * 
     * @param id 项目投资方 关联project(一对多关系)ID
     * @return 结果
     */
    @Override
    public int deleteXmProjectInvestorById(Long id)
    {
        return xmProjectInvestorMapper.deleteXmProjectInvestorById(id);
    }
}
