package com.ruoyi.warehouse.mapper;

import java.math.BigDecimal;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.ruoyi.warehouse.domain.StockInfo;

public interface StockInfoMapper
{
    public List<StockInfo> selectStockInfoList(StockInfo stockInfo);

    public StockInfo selectStockInfoById(Long id);

    public StockInfo selectStockInfoByAreaProduct(@Param("areaId") Long areaId, @Param("productId") Long productId);

    public StockInfo selectStockInfoByAreaProductForUpdate(@Param("areaId") Long areaId, @Param("productId") Long productId);

    public int upsertIncreaseStock(@Param("areaId") Long areaId, @Param("productId") Long productId, @Param("stockNum") BigDecimal stockNum);

    public int deductStock(@Param("areaId") Long areaId, @Param("productId") Long productId, @Param("stockNum") BigDecimal stockNum);

    public int upsertSetStock(@Param("areaId") Long areaId, @Param("productId") Long productId, @Param("stockNum") BigDecimal stockNum);
}
