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

import com.ssj.bean.sys.compositioncomment.domain.CompositionComment;
import com.ssj.dao.sys.compositioncomment.dao.CompositionCommentDao;
import com.ssj.framework.core.common.service.BaseServiceImpl;
import com.ssj.service.sys.compositioncomment.service.CompositionCommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author yrf
 * @description
 * @time 2019/8/27 17:12
 */
@Service
public class CompositionCommentServiceImpl extends BaseServiceImpl<CompositionComment, String> implements CompositionCommentService {

    @Autowired
    private CompositionCommentDao compositionCommentDao;

    @Override
    public PagingAndSortingRepository<CompositionComment, String> getDao() {
        return compositionCommentDao;
    }

    @Override
    public void deleteByHomeworkPictureId(String homeworkPictureId) {
        compositionCommentDao.deleteByHomeworkPictureId(homeworkPictureId);
    }

    @Override
    public List<CompositionComment> findByHomeworkPictureId(String homeworkPictureId) {
        return compositionCommentDao.findByHomeworkPictureId(homeworkPictureId);
    }
}
