package com.yida.data.attendance.feign;

import com.yida.data.attendance.dto.AddLeaveRequestStrategyDTO;
import com.yida.data.attendance.fallback.RemoteAttendanceDeviceServiceFallback;
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.EduFaceGroupStrategy;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(value = FebsServerConstant.EDU_ATTENDANCE, contextId = "attendanceStrategyServiceClient",
        fallbackFactory = RemoteAttendanceDeviceServiceFallback.class)
public interface RemoteAttendanceStrategyService {

    /**
     * 保存策略并绑定人员信息
     *
     * @param eduFaceGroupStrategy 人脸组-策略信息
     * @return com.yida.data.common.core.common.ResultBean<java.lang.String>
     * @author ZYJ
     * @date 2022/12/13 10:51
     */
    @PostMapping("/in/deviceStrategy/saveStrategyAndUser")
    ResultBean<String> saveStrategyAndUser(@RequestBody EduFaceGroupStrategy eduFaceGroupStrategy);

    /**
     * 删除策略
     *
     * @param eduFaceGroupStrategy 人脸策略信息
     * @return com.yida.data.common.core.common.ResultBean<java.lang.String>
     * @author ZYJ
     * @date 2022/12/21 15:44
     */
    @PostMapping("/in/deviceStrategy/deleteStrategy")
    ResultBean<String> deleteStrategy(@RequestBody EduFaceGroupStrategy eduFaceGroupStrategy);

    /**
     * 绑定对应的人员-策略信息
     *
     * @param eduFaceGroupStrategy 人脸策略信息
     * @return com.yida.data.common.core.common.ResultBean<java.lang.String>
     * @author ZYJ
     * @date 2022/12/22 16:25
     */
    @PostMapping("/in/deviceStrategy/bindUserStrategy")
    ResultBean<String> bindUserStrategy(@RequestBody EduFaceGroupStrategy eduFaceGroupStrategy);

    /**
     * 解绑对应的人员-策略信息
     *
     * @param eduFaceGroupStrategy 人脸策略信息
     * @return com.yida.data.common.core.common.ResultBean<java.lang.String>
     * @author ZYJ
     * @date 2022/12/26 10:16
     */
    @PostMapping("/in/deviceStrategy/unBindUserStrategy")
    ResultBean<String> unBindUserStrategy(@RequestBody EduFaceGroupStrategy eduFaceGroupStrategy);

    /**
     * 删除并保存策略(包含人员信息)
     *
     * @param eduFaceGroupStrategy 人脸策略信息
     * @return com.yida.data.common.core.common.ResultBean<java.lang.String>
     * @author ZYJ
     * @date 2023/1/9 15:12
     */
    @PostMapping("/in/deviceStrategy/deleteAndSaveStrategy")
    ResultBean<String> deleteAndSaveStrategy(@RequestBody EduFaceGroupStrategy eduFaceGroupStrategy);

    /**
     * 添加请假类型短策略
     *
     * @param dto 添加请假类型短策略请求类
     * @return com.yida.data.common.core.common.ResultBean<java.lang.String>
     * @author ZYJ
     * @date 2023/2/2 16:00
     */
    @PostMapping("/in/deviceStrategy/addLeaveRequestStrategy")
    ResultBean<String> addLeaveRequestStrategy(@RequestBody AddLeaveRequestStrategyDTO dto);
}
