package com.bonus.material.warehouse.service.impl;

import java.util.List;
import com.bonus.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.bonus.material.warehouse.mapper.WhTeamLeaseInfoMapper;
import com.bonus.material.warehouse.domain.WhTeamLeaseInfo;
import com.bonus.material.warehouse.service.IWhTeamLeaseInfoService;

/**
 * 二级库租赁信息Service业务层处理
 * 
 * @author xsheng
 * @date 2024-09-27
 */
@Service
public class WhTeamLeaseInfoServiceImpl implements IWhTeamLeaseInfoService 
{
    @Autowired
    private WhTeamLeaseInfoMapper whTeamLeaseInfoMapper;

    /**
     * 查询二级库租赁信息
     * 
     * @param id 二级库租赁信息主键
     * @return 二级库租赁信息
     */
    @Override
    public WhTeamLeaseInfo selectWhTeamLeaseInfoById(Long id)
    {
        return whTeamLeaseInfoMapper.selectWhTeamLeaseInfoById(id);
    }

    /**
     * 查询二级库租赁信息列表
     * 
     * @param whTeamLeaseInfo 二级库租赁信息
     * @return 二级库租赁信息
     */
    @Override
    public List<WhTeamLeaseInfo> selectWhTeamLeaseInfoList(WhTeamLeaseInfo whTeamLeaseInfo)
    {
        return whTeamLeaseInfoMapper.selectWhTeamLeaseInfoList(whTeamLeaseInfo);
    }

    /**
     * 新增二级库租赁信息
     * 
     * @param whTeamLeaseInfo 二级库租赁信息
     * @return 结果
     */
    @Override
    public int insertWhTeamLeaseInfo(WhTeamLeaseInfo whTeamLeaseInfo)
    {
        whTeamLeaseInfo.setCreateTime(DateUtils.getNowDate());
        return whTeamLeaseInfoMapper.insertWhTeamLeaseInfo(whTeamLeaseInfo);
    }

    /**
     * 修改二级库租赁信息
     * 
     * @param whTeamLeaseInfo 二级库租赁信息
     * @return 结果
     */
    @Override
    public int updateWhTeamLeaseInfo(WhTeamLeaseInfo whTeamLeaseInfo)
    {
        whTeamLeaseInfo.setUpdateTime(DateUtils.getNowDate());
        return whTeamLeaseInfoMapper.updateWhTeamLeaseInfo(whTeamLeaseInfo);
    }

    /**
     * 批量删除二级库租赁信息
     * 
     * @param ids 需要删除的二级库租赁信息主键
     * @return 结果
     */
    @Override
    public int deleteWhTeamLeaseInfoByIds(Long[] ids)
    {
        return whTeamLeaseInfoMapper.deleteWhTeamLeaseInfoByIds(ids);
    }

    /**
     * 删除二级库租赁信息信息
     * 
     * @param id 二级库租赁信息主键
     * @return 结果
     */
    @Override
    public int deleteWhTeamLeaseInfoById(Long id)
    {
        return whTeamLeaseInfoMapper.deleteWhTeamLeaseInfoById(id);
    }
}
