package com.zioinfo.mall.inventory.mapper;

import com.zioinfo.mall.inventory.MallInventory;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface InventoryMapper {
    List<MallInventory> findAll(@Param("lowStock") Boolean lowStock);
    MallInventory findById(@Param("id") Long id);
    MallInventory findBySku(@Param("sku") String sku);
    int insert(MallInventory inv);
    int adjust(@Param("id") Long id, @Param("delta") int delta);
    int setErpSync(@Param("id") Long id, @Param("status") String status, @Param("onHand") Integer onHand);
}
