package com.agri.system.service.impl;

import com.agri.common.utils.DateUtils;
import com.agri.system.domain.SysRequireList;
import com.agri.system.mapper.SysRequireListMapper;
import com.agri.system.service.ISysRequireListService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 需求清单Service业务层处理
 * 
 * @author lld
 * @date 2026-01-11
 */
@Service
public class SysRequireListServiceImpl extends ServiceImpl<SysRequireListMapper, SysRequireList> implements ISysRequireListService
{

    /**
     * 查询需求清单
     * 
     * @param id 需求清单主键
     * @return 需求清单
     */
    @Override
    public SysRequireList selectSysRequireListById(Long id)
    {
        return baseMapper.selectSysRequireListById(id);
    }

    /**
     * 查询需求清单列表
     * 
     * @param sysRequireList 需求清单
     * @return 需求清单
     */
    @Override
    public List<SysRequireList> selectSysRequireListList(SysRequireList sysRequireList)
    {
        return baseMapper.selectSysRequireListList(sysRequireList);
    }

    /**
     * 新增需求清单
     * 
     * @param sysRequireList 需求清单
     * @return 结果
     */
    @Override
    public int insertSysRequireList(SysRequireList sysRequireList)
    {
        sysRequireList.setCreateTime(DateUtils.getNowDate());
        return baseMapper.insertSysRequireList(sysRequireList);
    }

    /**
     * 修改需求清单
     * 
     * @param sysRequireList 需求清单
     * @return 结果
     */
    @Override
    public int updateSysRequireList(SysRequireList sysRequireList)
    {
        sysRequireList.setUpdateTime(DateUtils.getNowDate());
        return baseMapper.updateSysRequireList(sysRequireList);
    }

    /**
     * 批量删除需求清单
     * 
     * @param ids 需要删除的需求清单主键
     * @return 结果
     */
    @Override
    public int deleteSysRequireListByIds(Long[] ids)
    {
        return baseMapper.deleteSysRequireListByIds(ids);
    }

    /**
     * 删除需求清单信息
     * 
     * @param id 需求清单主键
     * @return 结果
     */
    @Override
    public int deleteSysRequireListById(Long id)
    {
        return baseMapper.deleteSysRequireListById(id);
    }
}
