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.XmProjectPersionMapper;
import com.ruoyi.system.domain.projectV2.XmProjectPersion;
import com.ruoyi.system.service.projectV2.IXmProjectPersionService;

/**
 * 项目投资方-自然人Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-02-23
 */
@Service
public class XmProjectPersionServiceImpl implements IXmProjectPersionService 
{
    @Autowired
    private XmProjectPersionMapper xmProjectPersionMapper;

    /**
     * 查询项目投资方-自然人
     * 
     * @param id 项目投资方-自然人ID
     * @return 项目投资方-自然人
     */
    @Override
    public XmProjectPersion selectXmProjectPersionById(Long id)
    {
        return xmProjectPersionMapper.selectXmProjectPersionById(id);
    }

    /**
     * 查询项目投资方-自然人列表
     * 
     * @param xmProjectPersion 项目投资方-自然人
     * @return 项目投资方-自然人
     */
    @Override
    public List<XmProjectPersion> selectXmProjectPersionList(XmProjectPersion xmProjectPersion)
    {
        return xmProjectPersionMapper.selectXmProjectPersionList(xmProjectPersion);
    }

    /**
     * 新增项目投资方-自然人
     * 
     * @param xmProjectPersion 项目投资方-自然人
     * @return 结果
     */
    @Override
    public int insertXmProjectPersion(XmProjectPersion xmProjectPersion)
    {
        xmProjectPersion.setCreateTime(DateUtils.getNowDate());
        return xmProjectPersionMapper.insertXmProjectPersion(xmProjectPersion);
    }

    /**
     * 修改项目投资方-自然人
     * 
     * @param xmProjectPersion 项目投资方-自然人
     * @return 结果
     */
    @Override
    public int updateXmProjectPersion(XmProjectPersion xmProjectPersion)
    {
        xmProjectPersion.setUpdateTime(DateUtils.getNowDate());
        return xmProjectPersionMapper.updateXmProjectPersion(xmProjectPersion);
    }

    /**
     * 批量删除项目投资方-自然人
     * 
     * @param ids 需要删除的项目投资方-自然人ID
     * @return 结果
     */
    @Override
    public int deleteXmProjectPersionByIds(Long[] ids)
    {
        return xmProjectPersionMapper.deleteXmProjectPersionByIds(ids);
    }

    /**
     * 删除项目投资方-自然人信息
     * 
     * @param id 项目投资方-自然人ID
     * @return 结果
     */
    @Override
    public int deleteXmProjectPersionById(Long id)
    {
        return xmProjectPersionMapper.deleteXmProjectPersionById(id);
    }
}
