package com.crm.manager.dao.repository;

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

import javax.persistence.LockModeType;
import java.util.List;

@Repository
public interface SysLoginTypeRepository extends BaseRepository<SysLoginTypeTable> {

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

    List<SysLoginTypeTable> findAllByIdIn(List<Long> ids);

    SysLoginTypeTable getFirstById(Long id);

    SysLoginTypeTable findByComPointAndHide(Integer comPoint, Integer hide);
}
