package com.crm.pay.dao.repository;

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

import javax.persistence.LockModeType;

/**
 * @program: crm-backend
 * @description:
 * @author: houn
 * @create: 2019-07-25 16:25
 */
@Repository
public interface CustomInfoRepository extends BaseRepository<CustomInfoTable> {

    CustomInfoTable getFirstById(Long id);

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

    @Lock(LockModeType.PESSIMISTIC_WRITE)
    CustomInfoTable findFirstByCId(Long cId);

    CustomInfoTable getFirstByCId(Long cId);
}
