package com.cool.store.mapper;

import com.cool.store.entity.ExpenseMappingDO;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

/**
 * 费用单流水调整单映射表 Mapper
 */
public interface ExpenseMappingMapper extends Mapper<ExpenseMappingDO> {

    /**
     * 根据网商交易流水号查询
     */
    ExpenseMappingDO getByTradeNo(@Param("tradeNo") String tradeNo);

    /**
     * 根据费用单号查询
     */
    ExpenseMappingDO getByRelatedAdjustmentNo(@Param("relatedAdjustmentNo") String relatedAdjustmentNo);

    /**
     * 批量插入
     */
    int batchInsert(@Param("list") List<ExpenseMappingDO> list);

    /**
     * 根据交易流水号列表批量查询
     */
    List<ExpenseMappingDO> listByTradeNos(@Param("tradeNos") List<String> tradeNos);

    /**
     * 根据费用单号查询列表
     */
    List<ExpenseMappingDO> listByRelatedAdjustmentNo(@Param("relatedAdjustmentNo") String relatedAdjustmentNo);

    /**
     * 根据费用单号列表批量查询
     */
    List<ExpenseMappingDO> listByRelatedAdjustmentNoList(@Param("relatedAdjustmentNos") List<String> relatedAdjustmentNos);
}
