package com.ssj.service.sys.template;

import com.ssj.bean.sys.template.CommentTemplate;
import com.ssj.framework.core.common.service.BaseService;
import com.ssj.service.kmt.dto.CompositionCommentLevelDto;
import com.ssj.service.kmt.dto.CompositionCommentTypeDto;
import com.ssj.service.kmt.request.CompositionDetailRequest;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Map;

/**
 * @author Mount Liu
 * @date 2019/8/13
 */
public interface CommentTemplateService extends BaseService<CommentTemplate, String> {

    Page<CommentTemplate> findByPage(Map<String, Object> params, Pageable sp);

    /**
     * 查询所有的作文评语模板，按模块分组
     * @return
     */
    List<CompositionCommentTypeDto> findAllCommentTemplateGroup(String grade, String homeworkPictureId);

    /**
     * 查询作文模板列表
     * @param ids
     * @return
     */
    List<CommentTemplate> findByIds (List<String> ids);

    /**
     * 根据作业图片id查询作文评语
     * @param homeworkPictureId 作业图片id
     */
    List<CommentTemplate> findByHomeworkPictureId(String homeworkPictureId);

    /**
     * 查询作文类型和维度
     * @return
     */
    List<CompositionCommentTypeDto> findTypeNameAndModule(String grade, String homeworkPictureId);

    /**
     * 查询作文类型和维度详情
     * @return
     */
    List<CompositionCommentLevelDto> findCommentDetailByTypeAndModule (CompositionDetailRequest request);
}
