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

import com.ssj.bean.sys.homework.domain.HomeworkPictureErrorCheck;
import com.ssj.dao.sys.homework.dao.HomeworkPictureErrorCheckDao;
import com.ssj.framework.core.common.service.BaseServiceImpl;
import com.ssj.service.sys.homework.service.HomeworkPictureErrorCheckService;
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;

/**
 * @Author: chchen
 * @Description
 * @Date Create in 15:40 2019/10/9
 * @Modified By
 */
@Service
@Transactional
public class HomeworkPictureErrorCheckServiceImpl  extends BaseServiceImpl<HomeworkPictureErrorCheck, String> implements HomeworkPictureErrorCheckService {
    private Logger logger = LoggerFactory.getLogger(this.getClass());

    @Autowired
    private HomeworkPictureErrorCheckDao dao;

    @Override
    public PagingAndSortingRepository<HomeworkPictureErrorCheck, String> getDao() {
        return dao;
    }

    @Override
    public List<HomeworkPictureErrorCheck> find13ErrorCheck() {
        return dao.findByTypeAndErrorHowDetailsIsNull(13);
    }

    @Override
    public HomeworkPictureErrorCheck findErrorCheckByHomeworkPictureIdAndType(String homeworkPictureId, int type) {
        return dao.findByHomeworkPictureIdAndType(homeworkPictureId, type);
    }
}
