package com.jeequan.jeepay.service.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.jeequan.jeepay.db.entity.OrderProfitSettRecord;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 订单分润结算记录 Mapper 接口
 * </p>
 *
 * @author [mybatis plus generator]
 * @since 2022-03-22
 */
public interface OrderProfitSettRecordMapper extends BaseMapper<OrderProfitSettRecord> {

    /** 查询需要结算的 支付订单号列表 */
    IPage<String> queryWaitSettPayOrderIdList(IPage<?> page, @Param("errorOrderIdList") List<String> errorOrderIdList);

    /** 查询分润情况 **/
    List<OrderProfitSettRecord> queryOrderProfitSum(@Param("payOrderId") String payOrderId, @Param("infoId") String infoId, @Param("infoType") String infoType);

    /** 查询服务商分润 **/
    List<Map<String, Object>> selectAgentProfit(@Param("param") Map<String, Object> paramMap);

}
