package com.microservices.dms.achievementLibrary.service.impl;

import java.util.List;
import com.microservices.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.microservices.dms.achievementLibrary.mapper.AchievementTeamMapper;
import com.microservices.dms.achievementLibrary.domain.AchievementTeam;
import com.microservices.dms.achievementLibrary.service.IAchievementTeamService;

/**
 * 成果团队Service业务层处理
 * 
 * @author microservices
 * @date 2025-04-23
 */
@Service
public class AchievementTeamServiceImpl implements IAchievementTeamService 
{
    @Autowired
    private AchievementTeamMapper achievementTeamMapper;

    /**
     * 查询成果团队
     * 
     * @param id 成果团队主键
     * @return 成果团队
     */
    @Override
    public AchievementTeam selectAchievementTeamById(Long id)
    {
        return achievementTeamMapper.selectAchievementTeamById(id);
    }

    /**
     * 查询成果团队列表
     * 
     * @param achievementTeam 成果团队
     * @return 成果团队
     */
    @Override
    public List<AchievementTeam> selectAchievementTeamList(AchievementTeam achievementTeam)
    {
        return achievementTeamMapper.selectAchievementTeamList(achievementTeam);
    }

    /**
     * 新增成果团队
     * 
     * @param achievementTeam 成果团队
     * @return 结果
     */
    @Override
    public int insertAchievementTeam(AchievementTeam achievementTeam)
    {
        achievementTeam.setCreateTime(DateUtils.getNowDate());
        return achievementTeamMapper.insertAchievementTeam(achievementTeam);
    }

    /**
     * 修改成果团队
     * 
     * @param achievementTeam 成果团队
     * @return 结果
     */
    @Override
    public int updateAchievementTeam(AchievementTeam achievementTeam)
    {
        achievementTeam.setUpdateTime(DateUtils.getNowDate());
        return achievementTeamMapper.updateAchievementTeam(achievementTeam);
    }

    /**
     * 批量删除成果团队
     * 
     * @param ids 需要删除的成果团队主键
     * @return 结果
     */
    @Override
    public int deleteAchievementTeamByIds(Long[] ids)
    {
        return achievementTeamMapper.deleteAchievementTeamByIds(ids);
    }

    /**
     * 删除成果团队信息
     * 
     * @param id 成果团队主键
     * @return 结果
     */
    @Override
    public int deleteAchievementTeamById(Long id)
    {
        return achievementTeamMapper.deleteAchievementTeamById(id);
    }
}
