package com.qmth.exam.reserve.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.qmth.boot.core.collection.PageResult;
import com.qmth.exam.reserve.bean.login.LoginUser;
import com.qmth.exam.reserve.bean.stdapply.CategoryVO;
import com.qmth.exam.reserve.bean.student.StudentInfo;
import com.qmth.exam.reserve.bean.student.StudentReq;
import com.qmth.exam.reserve.bean.student.StudentVO;
import com.qmth.exam.reserve.bean.student.WechatBindReq;
import com.qmth.exam.reserve.entity.StudentEntity;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;

public interface StudentService extends IService<StudentEntity> {

    StudentEntity findByStudentCode(Long applyTaskId, String studentCode);

    StudentEntity findByOpenIdAndUid(String openId, String uid);

    StudentEntity findLessInfoByStudentId(Long studentId);

    StudentInfo findInfoByStudentId(Long studentId);

    int findStudentApplyNumberById(Long studentId);

    void bindingWechat(WechatBindReq req);

    void unbindWechatByStudentId(Long studentId);

    List<StudentEntity> listNoFinishStudent(Long taskId, Boolean cancel);

    List<CategoryVO> listNoFinishCategory(Long taskId, Boolean cancel);

    PageResult<StudentVO> pageStudent(StudentReq req);

    void delete(Long[] studentIds, LoginUser loginUser);

    void modifyApplyNumber(Long studentId, Long operateId, Integer applyNumber);

    void uploadStudentPhotoAsync(Long operateId, MultipartFile file) throws IOException;

    void updateStudentApplyNumber(Long studentId);

    void uploadStudentPhoto(Long operateId, MultipartFile file);
}
