package com.fdkankan.platform.api.feign;

import com.fdkankan.common.response.ResultData;
import com.fdkankan.common.user.SSOUser;
import com.fdkankan.platform.api.vo.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "4dkankan-center-platform")
@RequestMapping("/platform/feign")
public interface PlatformClient {

    /**
     *
     * @return Camera
     */
    @PostMapping("/getCameraByChildName")
    ResultData<Camera> getCameraByChildName(@RequestParam(value = "childName",required = false) String childName);

    /**
     *
     * @return CameraDetail
     */
    @PostMapping("/getCameraDetailByCameraId")
    ResultData<CameraDetail> getCameraDetailByCameraId(@RequestParam(value = "cameraId",required = false) Long cameraId);

    /**
     *
     * @return CameraDetail
     */
    @PostMapping("/updateCameraDetailByCameraIdAndSpace")
    ResultData<CameraDetail> updateCameraDetailByCameraIdAndSpace(@RequestParam(value = "cameraId", required = false) Long cameraId,
                                                           @RequestParam(value = "space", required = false) Long space);
    /**
     *
     * @return Camera
     */
    @PostMapping("/getCameraBySnCode")
    ResultData<Camera> getCameraBySnCode(@RequestParam(value = "snCode", required = false) String snCode);
    /**
     *
     * @return SSOUser
     */
    @PostMapping("/getSSOUserByUserId")
    ResultData<SSOUser> getSSOUserByUserId(@RequestParam(value = "userId", required = false) Long userId) ;

    /**
     *
     * @return company
     */
    @PostMapping("/getCompanyById")
    ResultData<Company> getCompanyById(@RequestParam(value = "companyId", required = false) Long companyId) ;
    /**
     *
     * @return user
     */
    @PostMapping("/getUserByName")
    ResultData<User> getUserByName(@RequestParam(value = "userName", required = false) String userName) ;
    /**
     *
     * @return UserIncrement
     */
    @PostMapping("/getUserIncrementByCameraId")
    UserIncrement getUserIncrementByCameraId(@RequestParam(value = "cameraId", required = false) Long cameraId);
}
