ModuleRepository.java
849 Bytes
package com.bsth.repository;
import java.util.List;
import java.util.Set;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.data.jpa.repository.EntityGraph;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
import com.bsth.entity.sys.Module;
@Repository
public interface ModuleRepository extends BaseRepository<Module, Integer>{
@Query("select m from Module m where m.groupType in ?1")
List<Module> findByGroupType(String[] groupType);
List<Module> findByPId(Integer pId);
@Query("select m from Module m where m.id in ?1")
Set<Module> findByIds(List<Integer> ids);
@EntityGraph(value = "carConfigInfo_xl_cl", type = EntityGraph.EntityGraphType.FETCH)
@Override
List<Module> findAll(Specification<Module> spec);
}