package com.ssj.service.sys.lesson.service.impl;

import com.ssj.bean.sys.lesson.domain.LessonGroup;
import com.ssj.dao.sys.lesson.dao.LessonGroupDao;
import com.ssj.framework.core.common.service.BaseServiceImpl;
import com.ssj.service.sys.lesson.service.LessonGroupService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class LessonGroupServiceImpl extends BaseServiceImpl<LessonGroup, String> implements LessonGroupService {

    private final Logger logger = LoggerFactory.getLogger(this.getClass());

    @Autowired
    private LessonGroupDao lessonGroupDao;


    @Override
    public PagingAndSortingRepository<LessonGroup, String> getDao() {
        return lessonGroupDao;
    }

    @Override
    public LessonGroup findByIdAndTeacherIdAndPlanStatus(String lessonGroupId, String teacherId, Integer planStatus) {
        return lessonGroupDao.findByIdAndTeacherIdAndPlanStatus(lessonGroupId, teacherId, planStatus);
    }

	@Override
	public LessonGroup findByIdAndMasterId(String lessonGroupId, String masterId) {
		return lessonGroupDao.findByIdAndMasterId(lessonGroupId,masterId);
	}

    @Override
    public void checkAndAdjustLessonGroup(String teacherId, String masterId) {

    }

    @Override
    public List<LessonGroup> findByVipId(String vipId) {
        return lessonGroupDao.findByVipId(vipId);
    }

}
