IOmgPaymentAttemptService.java 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. package com.ruoyi.system.omgpay.service;
  2. import com.ruoyi.system.omgpay.domain.OmgPaymentAttempt;
  3. import com.ruoyi.system.omgpay.domain.OmgPaymentOrderSnapshot;
  4. import java.util.Date;
  5. import java.util.List;
  6. /**
  7. * Transaction-participating operations needed to create one OMG payment attempt.
  8. */
  9. public interface IOmgPaymentAttemptService {
  10. OmgPaymentOrderSnapshot selectOrderForUpdate(String ddId);
  11. OmgPaymentOrderSnapshot selectOrder(String ddId);
  12. /** Current read that makes committed active attempts visible during duplicate classification. */
  13. OmgPaymentAttempt selectActiveCreatedByDdIdForUpdate(String ddId);
  14. OmgPaymentAttempt selectActiveCreatedByDdId(String ddId);
  15. OmgPaymentAttempt selectPaidByDdId(String ddId);
  16. /** Current read that classifies a committed MerchantTradeNo unique-key collision. */
  17. OmgPaymentAttempt selectByMerchantTradeNoForUpdate(String merchantTradeNo);
  18. OmgPaymentAttempt selectByMerchantTradeNo(String merchantTradeNo);
  19. List<OmgPaymentAttempt> scanDueCreated(Date now, int limit);
  20. int reserveDueQuery(Long id, Date now, Date nextQueryTime);
  21. OmgPaymentAttempt createCreated(String ddId, String merchantTradeNo, Long storeId,
  22. String merchantId, Integer amount,
  23. String hashKeySnapshot, String hashIvSnapshot);
  24. int markProductionEnvironment(Long attemptId);
  25. int markPaid(OmgPaymentAttempt paymentFacts);
  26. int markFailed(OmgPaymentAttempt paymentFacts);
  27. int supersedeCreated(Long id);
  28. int supersedeOtherCreated(String ddId, Long paidAttemptId);
  29. int markOrderPaid(String ddId);
  30. int countOtherPaidAttempts(String ddId, Long attemptId);
  31. }