OmgPaymentAttemptMapper.java 1.4 KB

12345678910111213141516171819202122232425262728293031323334
  1. package com.ruoyi.system.omgpay.mapper;
  2. import com.ruoyi.system.omgpay.domain.OmgPaymentAttempt;
  3. import com.ruoyi.system.omgpay.domain.OmgPaymentOrderSnapshot;
  4. import org.apache.ibatis.annotations.Param;
  5. /**
  6. * Persistence boundary for locking order facts and appending OMG payment attempts.
  7. */
  8. public interface OmgPaymentAttemptMapper {
  9. OmgPaymentOrderSnapshot selectOrderForUpdate(@Param("ddId") String ddId);
  10. /** Current read used both before creation and after an active-order unique-key conflict. */
  11. OmgPaymentAttempt selectActiveCreatedByDdIdForUpdate(@Param("ddId") String ddId);
  12. /** Current read used after an insert conflict to classify a committed trade-number collision. */
  13. OmgPaymentAttempt selectByMerchantTradeNoForUpdate(@Param("merchantTradeNo") String merchantTradeNo);
  14. /** Preliminary read used to discover the order before locks are acquired in order-first sequence. */
  15. OmgPaymentAttempt selectByMerchantTradeNo(@Param("merchantTradeNo") String merchantTradeNo);
  16. int insertCreated(OmgPaymentAttempt row);
  17. int markPaid(OmgPaymentAttempt row);
  18. int markFailed(OmgPaymentAttempt row);
  19. int supersedeOtherCreated(@Param("ddId") String ddId, @Param("paidAttemptId") Long paidAttemptId,
  20. @Param("updateTime") java.util.Date updateTime);
  21. int markOrderPaid(@Param("ddId") String ddId);
  22. int countOtherPaidAttempts(@Param("ddId") String ddId, @Param("attemptId") Long attemptId);
  23. }