package com.yida.data.user.feign;

import com.yida.data.common.core.common.ResultBean;
import com.yida.data.common.core.entity.constant.FebsServerConstant;
import com.yida.data.common.core.entity.user.EduUserFace;
import com.yida.data.user.dto.UpdateFaceGroupUserStatusDTO;

import com.yida.data.user.fallback.RemoteUserFaceServiceFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = FebsServerConstant.EDU_USER, contextId = "userFaceService",
        fallbackFactory = RemoteUserFaceServiceFallback.class)
public interface RemoteUserFaceService {

    /**
     * 获取用户人脸信息
     *
     * @param userId 用户id
     * @param type   用户类型，0-学生，1-职工
     * @return com.yida.data.common.core.common.ResultBean<com.yida.data.common.core.entity.user.EduUserFace>
     * @author ZYJ
     * @date 2023/2/2 16:59
     */
    @GetMapping("/in/face/getFaceByUser")
    ResultBean<EduUserFace> getFaceByUser(@RequestParam("userId") Long userId,
                                          @RequestParam("type") Integer type);

    @GetMapping("/in/face/delFaceByUser")
    ResultBean delFaceByUser(@RequestParam("userId") Long userId,
                             @RequestParam("type") Integer type);

    @PostMapping("/in/face/updateFaceGroupUserStatus")
    ResultBean updateFaceGroupUserStatus(@RequestBody UpdateFaceGroupUserStatusDTO dto);
}
