package com.cool.store.mapper.order;

import com.cool.store.dto.fees.ExpenseTypeAmountDTO;
import com.cool.store.entity.order.StoreOrderOptionSnapshotDO;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface StoreOrderOptionSnapshotMapper extends Mapper<StoreOrderOptionSnapshotDO> {

    int insertBatch(@Param("list") List<StoreOrderOptionSnapshotDO> list);

    List<StoreOrderOptionSnapshotDO> listByOrderId(@Param("orderId") Long orderId);

    int deleteByOrderId(@Param("orderId") Long orderId);

    void batchUpdateQuantityAndAmount(@Param("list") List<StoreOrderOptionSnapshotDO> list);

    List<ExpenseTypeAmountDTO> getExpenseTypeAmountByOrderId(@Param("orderId") Long orderId);
}
