package com.ruoyi.powerdistribution.service.impl;

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.powerdistribution.mapper.PdmScoreRankManagerMapper;
import com.ruoyi.powerdistribution.domain.PdmScoreRankManager;
import com.ruoyi.powerdistribution.service.IPdmScoreRankManagerService;

/**
 * 负责人积分排名Service业务层处理
 *
 * @author ruoyi
 * @date 2024-12-05
 */
@Service
public class PdmScoreRankManagerServiceImpl implements IPdmScoreRankManagerService
{
    @Autowired
    private PdmScoreRankManagerMapper pdmScoreRankManagerMapper;

    /**
     * 查询负责人积分排名
     *
     * @param id 负责人积分排名主键
     * @return 负责人积分排名
     */
    @Override
    public PdmScoreRankManager selectPdmScoreRankManagerById(Long id)
    {
        return pdmScoreRankManagerMapper.selectPdmScoreRankManagerById(id);
    }

    /**
     * 查询负责人积分排名列表
     *
     * @param pdmScoreRankManager 负责人积分排名
     * @return 负责人积分排名
     */
    @Override
    public List<PdmScoreRankManager> selectPdmScoreRankManagerList(PdmScoreRankManager pdmScoreRankManager)
    {
        return pdmScoreRankManagerMapper.selectPdmScoreRankManagerList(pdmScoreRankManager);
    }

    /**
     * 新增负责人积分排名
     *
     * @param pdmScoreRankManager 负责人积分排名
     * @return 结果
     */
    @Override
    public int insertPdmScoreRankManager(PdmScoreRankManager pdmScoreRankManager)
    {
        pdmScoreRankManager.setCreateTime(DateUtils.getNowDate());
        return pdmScoreRankManagerMapper.insertPdmScoreRankManager(pdmScoreRankManager);
    }

    /**
     * 修改负责人积分排名
     *
     * @param pdmScoreRankManager 负责人积分排名
     * @return 结果
     */
    @Override
    public int updatePdmScoreRankManager(PdmScoreRankManager pdmScoreRankManager)
    {
        pdmScoreRankManager.setUpdateTime(DateUtils.getNowDate());
        return pdmScoreRankManagerMapper.updatePdmScoreRankManager(pdmScoreRankManager);
    }

    /**
     * 批量删除负责人积分排名
     *
     * @param ids 需要删除的负责人积分排名主键
     * @return 结果
     */
    @Override
    public int deletePdmScoreRankManagerByIds(Long[] ids)
    {
        return pdmScoreRankManagerMapper.deletePdmScoreRankManagerByIds(ids);
    }

    /**
     * 删除负责人积分排名信息
     *
     * @param id 负责人积分排名主键
     * @return 结果
     */
    @Override
    public int deletePdmScoreRankManagerById(Long id)
    {
        return pdmScoreRankManagerMapper.deletePdmScoreRankManagerById(id);
    }
}
