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

import com.ruoyi.project.system.domain.ZhGroupInfo;
import com.ruoyi.project.system.mapper.ZhGroupInfoMapper;
import com.ruoyi.project.system.service.IZhGroupInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 团队Service业务层处理
 *
 * @author zhu
 * @date 2023-12-26
 */
@Service
public class ZhGroupInfoServiceImpl implements IZhGroupInfoService {
    @Autowired
    private ZhGroupInfoMapper zhGroupInfoMapper;

    /**
     * 查询团队
     *
     * @param id 团队主键
     * @return 团队
     */
    @Override
    public ZhGroupInfo selectZhGroupInfoById(Long id) {
        return zhGroupInfoMapper.selectZhGroupInfoById(id);
    }

    /**
     * 查询团队列表
     *
     * @param zhGroupInfo 团队
     * @return 团队
     */
    @Override
    public List<ZhGroupInfo> selectZhGroupInfoList(ZhGroupInfo zhGroupInfo) {
        return zhGroupInfoMapper.selectZhGroupInfoList(zhGroupInfo);
    }

    /**
     * 新增团队
     *
     * @param zhGroupInfo 团队
     * @return 结果
     */
    @Override
    public int insertZhGroupInfo(ZhGroupInfo zhGroupInfo) {
        return zhGroupInfoMapper.insertZhGroupInfo(zhGroupInfo);
    }

    /**
     * 修改团队
     *
     * @param zhGroupInfo 团队
     * @return 结果
     */
    @Override
    public int updateZhGroupInfo(ZhGroupInfo zhGroupInfo) {
        return zhGroupInfoMapper.updateZhGroupInfo(zhGroupInfo);
    }

    /**
     * 修改团队
     *
     * @param zhGroupInfo 团队
     * @return 结果
     */
    @Override
    public int updateZhGroupInfoByGroupId(ZhGroupInfo zhGroupInfo) {
        return zhGroupInfoMapper.updateZhGroupInfoByGroupId(zhGroupInfo);
    }

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

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