package com.yida.data.user.service;


import com.baomidou.mybatisplus.extension.service.IService;
import com.yida.data.common.core.entity.constant.FebsConstant;
import com.yida.data.common.core.entity.user.EduUserFace;
import com.yida.data.user.vo.IssueFacePercentVO;
import com.yida.data.user.vo.UserInfoVO;

import org.springframework.scheduling.annotation.Async;
import org.springframework.web.multipart.MultipartFile;

import java.io.File;
import java.util.List;

import javax.servlet.http.HttpServletResponse;

/**
 * 用户人脸图像 Service接口
 *
 * @author zhanghaijun
 * @date 2021-06-16 14:14:52
 */
public interface EduUserFaceService extends IService<EduUserFace> {
    String uploadUserFace(MultipartFile file, Long id, String name, Long schoolId, Integer type);

    @Async(FebsConstant.ASYNC_POOL)
    void uploadUserFaceBatch(String file, Long schoolId, Integer type, Long userId, Integer importType);

    void uploadImage(File file, Long id, String name, Integer type);

    IssueFacePercentVO getIssuePercent(Long faceGroupId);

    /**
     * 更新人脸
     *
     * @param picPath 人脸图片路径
     * @param id      用户id
     * @param name    用户名称
     * @param type    用户类型，0-学生，1-职工
     */
    void updateUserFace(String picPath, Long id, String name, Integer type);

    /**
     * 下载上传失败人脸
     */
    void downloadImportFail(Long sysUserId, HttpServletResponse response);

    /**
     * 下载下发失败用户数据
     */
    void downloadIssueFail(List<UserInfoVO> data, HttpServletResponse response);
}
