
package com.tmerclub.cloud.product.mapper;

import com.tmerclub.cloud.product.dto.StockChangeReasonDTO;
import com.tmerclub.cloud.product.model.StockChangeReason;
import com.tmerclub.cloud.product.vo.StockChangeReasonVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 出入库原因
 *
 * @author lhd
 * @date 2022-06-22 16:57:27
 */
public interface StockChangeReasonMapper {

    /**
     * 根据出入库原因id获取出入库原因
     *
     * @param stockChangeReasonId 出入库原因id
     * @return 出入库原因
     */
    StockChangeReason getByStockChangeReasonId(@Param("stockChangeReasonId") Long stockChangeReasonId);

    /**
     * 保存出入库原因
     * @param stockChangeReason 出入库原因
     */
    void save(@Param("stockChangeReason") StockChangeReason stockChangeReason);

    /**
     * 更新出入库原因
     * @param stockChangeReason 出入库原因
     */
    void update(@Param("stockChangeReason") StockChangeReason stockChangeReason);

    /**
     * 根据出入库原因id删除出入库原因
     * @param stockChangeReasonId
     */
    void deleteById(@Param("stockChangeReasonId") Long stockChangeReasonId);

    /**
     * 分页获取出入库原因列表
     * @return 出入库原因列表
     * @param stockChangeReasonDTO
     */
    List<StockChangeReasonVO> pageByParams(@Param("stockChangeReason") StockChangeReasonDTO stockChangeReasonDTO);

    /**
     * 根据店铺id获取
     * @param stockChangeReasonDTO
     * @return
     */
    List<StockChangeReasonVO> getByShopId(@Param("stockChangeReasonDTO") StockChangeReasonDTO stockChangeReasonDTO);


}
