package com.crm.pay.dao.repository;

import com.crm.rely.backend.dao.repository.BaseRepository;
import com.crm.rely.backend.model.pojo.table.FinanceDepositSerialMappingTable;
import org.springframework.data.jpa.repository.Lock;
import org.springframework.stereotype.Repository;

import javax.persistence.LockModeType;

/**
 * @author: houn
 */
@Repository
public interface FinanceDepositSerialMappingRepository extends BaseRepository<FinanceDepositSerialMappingTable> {

    @Lock(LockModeType.PESSIMISTIC_WRITE)
    FinanceDepositSerialMappingTable findFirstById(Long id);


    FinanceDepositSerialMappingTable getFirstById(Long id);

    FinanceDepositSerialMappingTable getFirstByIdAndPayType(Long id, String payType);
}
