package com.crm.custom.dao.repository;

import com.crm.rely.backend.model.pojo.table.UserInfoTable;
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: 2019-09-21 16:25
 */
@Repository
public interface UserInfoRepository extends BaseRepository<UserInfoTable> {

    UserInfoTable getFirstById(Long id);

    @Lock(LockModeType.PESSIMISTIC_WRITE)
    UserInfoTable findFirstById(Long id);
}
