ViewColumnRepository.java 954 Bytes
Newer Older
shenggui.li committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
package com.reyun.repository;

import com.reyun.model.UserViewColumn;
import com.reyun.model.ViewColumn;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * Created by nolan on 28/12/2016.
 * description:
 */
public interface ViewColumnRepository extends JpaRepository<ViewColumn, Long> {

    @Query(value = "select * from view_column  where industory = ?1 and menu=?2", nativeQuery = true)
    List<ViewColumn> findByIndustory(String industory, String menu);

    @Query(value = "select * from view_column  where type = ?1", nativeQuery = true)
    List<ViewColumn> findByType(String sdkEventConfig);

    @Query(value = "select * from view_column  where industory = ?1 and menu=?2 and fieldcode != ?3", nativeQuery = true)
    List<ViewColumn> findByIndustoryAndNotFieldCode(String commonColumns, String menu, String fieldCode);
}