package com.ssj.dao.weixin.zuoyb.dao;

import com.ssj.bean.weixin.zyb.domain.ZuoybWeek;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;


/** 
 * @author  ZhangCaibao 
 * @version 2017年9月6日 下午4:08:20 
 * 类说明 
 */
@Repository
public interface ZuoybWeekDao extends JpaRepository<ZuoybWeek, String>{

	@Query(nativeQuery = true, value = "SELECT  k.*  from     zyb_course  e    JOIN  zyb_week   k\n" +
			"on  k.zyb_course_id = e.id \n" +
			"where e.lib_id = ?1  and k.days =?2 and e.course_hour=?3")
	public List<ZuoybWeek> findByLibIdAndDaysAndHour(String libId,Integer days,String courseHour);
}
