package com.shkj.wms.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.shkj.wms.domain.BaseInventoryRatio;
import com.shkj.wms.mapper.BaseInventoryRatioMapper;
import com.shkj.wms.service.BaseInventoryRatioService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * (BaseInventoryRatio)表服务实现类
 *
 * @author Comair
 * @since 2024-01-17 14:35:06
 */
@Service("baseInventoryRatioService")
public class BaseInventoryRatioServiceImpl extends ServiceImpl<BaseInventoryRatioMapper, BaseInventoryRatio> implements BaseInventoryRatioService {

    @Resource
    BaseInventoryRatioMapper baseInventoryRatioMapper;

    @Override
    public List<BaseInventoryRatio> selectAll() {
        LambdaQueryWrapper<BaseInventoryRatio> queryWrapper = new LambdaQueryWrapper<BaseInventoryRatio>()
                .eq(BaseInventoryRatio::getIsDel, 0);
        List<BaseInventoryRatio> inventoryRatioList = baseInventoryRatioMapper.selectList(queryWrapper);
        return inventoryRatioList;
    }

    @Override
    public List<BaseInventoryRatio> getInfoByvehicheModel(String vehicheModel) {
        LambdaQueryWrapper<BaseInventoryRatio> queryWrapper = new LambdaQueryWrapper<BaseInventoryRatio>()
                .eq(BaseInventoryRatio::getIsDel, 0)
                .eq(BaseInventoryRatio::getVehicheModel, vehicheModel);
        List<BaseInventoryRatio> inventoryRatioList = baseInventoryRatioMapper.selectList(queryWrapper);
        return inventoryRatioList;
    }

    @Override
    public BaseInventoryRatio getInfoById(int id) {
        BaseInventoryRatio inventoryRatioList = baseInventoryRatioMapper.selectById(id);
        return inventoryRatioList;
    }
}

