package com.yihu.wlyy.service.app.sports;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import com.yihu.wlyy.entity.education.Sports;
import com.yihu.wlyy.entity.education.SportsType;
import com.yihu.wlyy.repository.education.SportsDao;
import com.yihu.wlyy.repository.education.SportsTypeDao;
import com.yihu.wlyy.service.BaseService;

@Component
@Transactional(rollbackFor = Exception.class)
public class SportsService extends BaseService {

	@Autowired
	private SportsTypeDao sportsTypeDao;

	@Autowired
	private SportsDao sportsDao;

	/**
	 * 查询所有的运动强度
	 * @return
	 */
	public List<SportsType> finsAllSportsType() {
		return sportsTypeDao.findAll();
	}
	
	/**
	 * 查询所有的运动类型
	 * @return
	 */
	public List<Sports> finsAllSports() {
		return sportsDao.findAll();
	}

}
