package com.ssj.service.conch.conch.service;

import com.ssj.bean.conch.conch.dto.HomeworkRecordDto;
import com.ssj.framework.core.util.ResponseEntity;
import com.ssj.service.conch.conch.padrequest.PadPhoneLoginRequest;
import com.ssj.service.conch.conch.padrequest.PadUploadHomeworkRequest;
import com.ssj.service.conch.conch.padrequest.PadUploadPictureRequest;
import com.ssj.service.conch.conch.padrequest.PadVipIdRequest;
import com.ssj.service.conch.conch.vo.HomeworkFeedbackPadVO;
import com.ssj.service.conch.parents.request.version4.SwipePadLoginReq;
import org.springframework.data.domain.Pageable;


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

/**
 * @author yangcan
 * 类描述:小塾学伴PAD业务接口
 * 创建时间:2019/11/6 16:50
 */
public interface ConchPadService{

    /**
     * 小塾学伴ipad,android设备登录
     * @param request
     * @param type 平台类型:(6:小塾学伴pad端  3:小塾学伴学生app端)
     * @return
     */
    ResponseEntity phoneLogin(PadPhoneLoginRequest request,int type);

    ResponseEntity newPhoneLogin(PadPhoneLoginRequest request);

    /**
     * 手机登录后确认小孩获取token
     * @param request
     * @param type 平台类型:(6:小塾学伴pad端  3:小塾学伴学生app端)
     * @return
     */
    ResponseEntity getChildInfo(PadVipIdRequest request,int type);

    ResponseEntity personalCenter(String userId,int type);

    ResponseEntity home(String userId);

    ResponseEntity swipeQrCode(String qrCode);

    /**
     * 查询作业记录
     * @param vipId
     * @param type 1历史记录， 0 今日作业
     * @return
     */
    List<HomeworkRecordDto> findHomeworkRecord  (String vipId, int type);

    /**
     * 查询作业记录
     * @param vipId
     * @return
     */
    List<HomeworkRecordDto> findHomeworkRecordByVipId  (String vipId);


    /**
     * 开始作业，返回作业id
     * @param vipId
     * @param courseName
     * @param currentTime
     * @return
     */
    Map<String, Object> startHomework (String vipId, String courseName, Long currentTime);

    /**
     * 结束计时
     * @param vipId
     * @param courseName
     * @param endTime
     * @param usedTime
     */
    Map<String, Object> endHomework (String vipId, String courseName, Long endTime, Long usedTime);

    /**
     * 上传图片后调用的上传作业接口
     * @param request
     */
    Map<String, Object> uploadHomeworkPicture (PadUploadPictureRequest request) throws Exception;

    /**
     * 无网络上传作业图片
     * @param request
     * @return
     * @throws Exception
     */
    ResponseEntity noNetworkUploadHomeworkPicture (PadUploadHomeworkRequest request) throws  Exception;


    /**
     * 删除作业计时
     * @param vipId
     * @param courseName
     * @param usedTime
     */
    void deleteHomework (String vipId, String courseName, long usedTime);

    /**
     *  查询作业批改反馈详情
     * @param homeworkId 作业计时记录id
     * @param type 0 未知，1最后一张，2不是最后一张
     * @return 反馈详情
     */
    HomeworkFeedbackPadVO homeworkFeedbackDetails(String homeworkId, int type);

    /**
     * 绑定小孩和设备关系
     * @param request
     * @param type 平台类型:(6:小塾学伴pad端  3:小塾学伴学生app端)
     * @return
     */
    public ResponseEntity bindPad(SwipePadLoginReq request, int type);

    /**
     * 获取登录状态
     * @param padCode
     * @param type 平台类型:(6:小塾学伴pad端  3:小塾学伴学生app端)
     * @return
     */
    ResponseEntity getLoginStatus(String padCode,int type);


    /**
     * 查看小相册
     * @Param vipId
     * @Return
     */
    ResponseEntity findSmartTimeList(String vipId, Pageable pageable);

    ResponseEntity newHome(String userId);

    ResponseEntity setIsRemind(String userId,int isRemind,int type);

    ResponseEntity cancelStudentPadRole(String userId);
}
