package com.xhpc.activity.mapper;

import com.xhpc.activity.domain.XhpcHistoryOrderDomain;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * 历史订单信息 数据层
 *
 * @author ruoyi
 */
public interface XhpcHistoryOrderMapper {

    List<XhpcHistoryOrderDomain> selectUnsyncOrderList();

    String selectSyncedOrderIds();

    int selectUnsyncOrderListCount(@Param("endTime")String endTime);

    int updateStatusBatchByOrderIds(@Param("orderIds") String orderIds, @Param("status") Integer status);


    BigDecimal selectUnclearingAmount(@Param("operatorId")String operatorId);


    List<Map<String, Object>> getOrderPage(@Param("params")Map params);


    XhpcHistoryOrderDomain findOneBySerialNumber(String serialNumber);


    XhpcHistoryOrderDomain findOneByInternetSerialNumber(String internetSerialNumber);

    List<XhpcHistoryOrderDomain> findListByInternetSerialNumbers(@Param("orderNumbers") List<String> internetSerialNumbers);


    List<XhpcHistoryOrderDomain> findListByTimeBetween(@Param("startTime") String startTime,
                                                       @Param("endTime")String endTime,
                                                       @Param("chargingMode") String chargingMode,
                                                       @Param("tenantId")String tenantId);

    //获取平台新电途订单
    List<Map<String,Object>> getListPage(@Param("totalOrderNos")List<String> totalOrderNos,@Param("type")Integer type);

}
