package com.crm.manager.dao.repository;

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

import javax.persistence.LockModeType;

/**
 * @program: crm-backend
 * @description:
 * @author: houn
 * @create: 2020-12-28 16:25
 */
@Repository
public interface CustomCompanyRepository extends BaseRepository<CustomCompanyTable> {

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

    CustomCompanyTable getFirstById(Long id);

}
