package com.crm.manager.dao.repository;

import com.crm.rely.backend.core.pojo.table.CustomGroupHideTable;
import com.crm.rely.backend.core.pojo.table.CustomGroupLeverageTable;
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;

/**
 * Created by max on 2020/7/8.
 */
@Repository
public interface CustomGroupHideRepository extends BaseRepository<CustomGroupHideTable> {

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

    List<CustomGroupHideTable> findAllByGroupId(Long groupId);

    List<CustomGroupHideTable> findAllByGroupIdIn(List<Long> groupIds);

    List<CustomGroupHideTable> getAllByGroupId(Long groupId);

    List<CustomGroupHideTable> getAllByGroupIdIn(List<Long> groupIds);
}
