package com.crm.ucard.dao.repository;

import com.crm.rely.backend.core.pojo.table.ucard.CardGlobalPaymentOrderTable;
import com.crm.rely.backend.dao.repository.BaseRepository;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.data.jpa.repository.Lock;

import javax.persistence.LockModeType;

@Mapper
public interface CardGlobalPaymentOrderRepository extends BaseRepository<CardGlobalPaymentOrderTable> {

    @Lock(LockModeType.PESSIMISTIC_WRITE)
    CardGlobalPaymentOrderTable findByOrderNo(Long orderNo);

    CardGlobalPaymentOrderTable getFirstById(Long id);

}
