package com.fdkankan.platform.api.feign;

import com.fdkankan.common.response.ResultData;
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 getCameraByChildName(@RequestParam(value = "childName",required = false) String childName);

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

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

    /**
     *
     * @return company
     */
    @PostMapping("/getCompanyById")
    ResultData getCompanyById(@RequestParam(value = "companyId", required = false) Long companyId) ;
    /**
     *
     * @return company
     */
    @PostMapping("/getUserByName")
    ResultData getUserByName(@RequestParam(value = "userName", required = false) String userName) ;
}
