package com.willalp.canteen.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.List;

import com.willalp.canteen.service.IHsCanteenScrkService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.willalp.canteen.mapper.HsCanteenScrkMapper;
import com.willalp.canteen.domain.HsCanteenScrk;

/**
 * 食材入库Service业务层处理
 *
 * @author songyu
 * @date 2021-11-26
 */
@Service
public class HsCanteenScrkServiceImpl extends ServiceImpl<HsCanteenScrkMapper, HsCanteenScrk>  implements IHsCanteenScrkService
{
    @Autowired
    private HsCanteenScrkMapper hsCanteenScrkMapper;

    /**
     * 查询食材入库
     *
     * @param recordId 食材入库主键
     * @return 食材入库
     */
    @Override
    public HsCanteenScrk selectHsCanteenScrkByRecordId(String recordId)
    {
        return hsCanteenScrkMapper.selectHsCanteenScrkByRecordId(recordId);
    }

    /**
     * 查询食材入库列表
     *
     * @param hsCanteenScrk 食材入库
     * @return 食材入库
     */
    @Override
    public List<HsCanteenScrk> selectHsCanteenScrkList(HsCanteenScrk hsCanteenScrk)
    {
        return hsCanteenScrkMapper.selectHsCanteenScrkList(hsCanteenScrk);
    }

    /**
     * 新增食材入库
     *
     * @param hsCanteenScrk 食材入库
     * @return 结果
     */
    @Override
    public int insertHsCanteenScrk(HsCanteenScrk hsCanteenScrk)
    {
        return hsCanteenScrkMapper.insertHsCanteenScrk(hsCanteenScrk);
    }

    /**
     * 修改食材入库
     *
     * @param hsCanteenScrk 食材入库
     * @return 结果
     */
    @Override
    public int updateHsCanteenScrk(HsCanteenScrk hsCanteenScrk)
    {
        return hsCanteenScrkMapper.updateHsCanteenScrk(hsCanteenScrk);
    }

    /**
     * 批量删除食材入库
     *
     * @param recordIds 需要删除的食材入库主键
     * @return 结果
     */
    @Override
    public int deleteHsCanteenScrkByRecordIds(String[] recordIds)
    {
        return hsCanteenScrkMapper.deleteHsCanteenScrkByRecordIds(recordIds);
    }

    /**
     * 删除食材入库信息
     *
     * @param recordId 食材入库主键
     * @return 结果
     */
    @Override
    public int deleteHsCanteenScrkByRecordId(String recordId)
    {
        return hsCanteenScrkMapper.deleteHsCanteenScrkByRecordId(recordId);
    }

    @Override
    public List<HsCanteenScrk> getScList(String jgid) {
        return hsCanteenScrkMapper.getScList(jgid);
    }

}
