package com.liangjian.dataplatform.member.dao.primary;

import com.liangjian.dataplatform.member.entity.po.primary.LayoutConfig;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * @Author: 黄子奇
 * @Date: 2019/9/26 14:16
 */
public interface LayoutConfigRepository extends JpaRepository<LayoutConfig, String>, JpaSpecificationExecutor<LayoutConfig> {

    @Query("SELECT l from LayoutConfig l where l.name='' or l.name is null ORDER BY l.id ")
    List<LayoutConfig> getOne(Pageable pageable);

    LayoutConfig queryByName(String name);
}
