package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ProposalUserMapper;
import com.ruoyi.system.domain.ProposalUser;
import com.ruoyi.system.service.IProposalUserService;

/**
 * 提案人员Service业务层处理
 * 
 * @author boman
 * @date 2024-03-07
 */
@Service
public class ProposalUserServiceImpl implements IProposalUserService 
{
    @Autowired
    private ProposalUserMapper proposalUserMapper;

    /**
     * 查询提案人员
     * 
     * @param id 提案人员主键
     * @return 提案人员
     */
    @Override
    public ProposalUser selectProposalUserById(Long id)
    {
        return proposalUserMapper.selectProposalUserById(id);
    }

    /**
     * 查询提案人员列表
     * 
     * @param proposalUser 提案人员
     * @return 提案人员
     */
    @Override
    public List<ProposalUser> selectProposalUserList(ProposalUser proposalUser)
    {
        return proposalUserMapper.selectProposalUserList(proposalUser);
    }

    /**
     * 新增提案人员
     * 
     * @param proposalUser 提案人员
     * @return 结果
     */
    @Override
    public int insertProposalUser(ProposalUser proposalUser)
    {
        return proposalUserMapper.insertProposalUser(proposalUser);
    }

    /**
     * 修改提案人员
     * 
     * @param proposalUser 提案人员
     * @return 结果
     */
    @Override
    public int updateProposalUser(ProposalUser proposalUser)
    {
        return proposalUserMapper.updateProposalUser(proposalUser);
    }

    /**
     * 批量删除提案人员
     * 
     * @param ids 需要删除的提案人员主键
     * @return 结果
     */
    @Override
    public int deleteProposalUserByIds(Long[] ids)
    {
        return proposalUserMapper.deleteProposalUserByIds(ids);
    }

    /**
     * 删除提案人员信息
     * 
     * @param id 提案人员主键
     * @return 结果
     */
    @Override
    public int deleteProposalUserById(Long id)
    {
        return proposalUserMapper.deleteProposalUserById(id);
    }

    @Override
    public int verify(ProposalUser proposalUser) {
        proposalUser.setType("2");
        return proposalUserMapper.updateProposalUserVerify(proposalUser);
    }
}
