package com.xhpc.evcs.jpa;

import com.xhpc.order.domain.XhpcHistoryOrder;
import com.xhpc.order.domain.XhpcPlaceholderOrder;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.repository.query.QueryByExampleExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 占位费
 *
 * @author yuyang
 * @Date 2025-07-08 16:13
 */
@Repository
public interface PlaceholderIOrderRepository extends JpaRepository<XhpcPlaceholderOrder, Long>,
        QueryByExampleExecutor<XhpcPlaceholderOrder>, JpaSpecificationExecutor<XhpcPlaceholderOrder>, PagingAndSortingRepository<XhpcPlaceholderOrder, Long> {

    List<XhpcPlaceholderOrder> findTop100ByPlaceholderOrderIdGreaterThanEqualAndOperatorIdEvcsAndConfirmResultOrderByPlaceholderOrderIdAsc(Long placeholderOrderId,String OperatorIdEvcs,int confirmResult);

    List<XhpcPlaceholderOrder> findTop100ByOperatorIdEvcsAndConfirmResultLessThanOrderByPlaceholderOrderIdAsc(String OperatorIdEvcs,int confirmResult);

    List<XhpcPlaceholderOrder> findTop100ByOperatorIdEvcsAndConfirmResultOrderByPlaceholderOrderIdAsc(String OperatorIdEvcs,int confirmResult);

    List<XhpcPlaceholderOrder> findTop100ByOperatorIdEvcsAndTypeAndConfirmResultOrderByPlaceholderOrderIdAsc(String OperatorIdEvcs,int type,int confirmResult);


    XhpcPlaceholderOrder findByPlaceholderOrderIdAndOperatorIdEvcsAndConfirmResultOrderByPlaceholderOrderIdAsc(Long placeholderOrderId,String OperatorIdEvcs,int confirmResult);

    XhpcPlaceholderOrder findByPlaceholderOrderIdAndOperatorIdEvcsAndTypeAndConfirmResultOrderByPlaceholderOrderIdAsc(Long placeholderOrderId,String OperatorIdEvcs,int type,int confirmResult);

    XhpcPlaceholderOrder findByPlaceholderOrderId(Long placeholderOrderId);
    XhpcPlaceholderOrder findByPlaceholderOrderNumber(String placeholderOrderNumber);

    XhpcPlaceholderOrder findByInternetSerialNumber(String internetSerialNumber);


}
