package com.reyun.repository;

import com.reyun.model.Notice;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;

import java.util.Date;
import java.util.List;

/**
 * Created by sunhao on 17/3/1.
 */
@Transactional
public interface NoticeRepository  extends JpaRepository<Notice, Long> {

    @Query(value = "select * from notice n where n.isdeploy is true and  (io_account = ?1 or io_account = -1)", nativeQuery = true)
    List<Notice> listRecentDeployNotice(Long account);


}
