package com.njcn.device.biz.commApi;

import com.njcn.common.pojo.constant.ServerInfo;
import com.njcn.common.pojo.response.HttpResult;
import com.njcn.device.biz.commApi.fallback.CommLedgerDeptClientFallbackFactory;
import com.njcn.user.pojo.po.Dept;
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 java.util.List;

/**
 * 仅供pms系统修改单位部门时候调用，同步修改pms台账表里的单位部门
 * @author cdf
 * @date 2023/4/24
 */
@FeignClient(
        value = ServerInfo.DEVICE,
        contextId = "pmsLedger",
        path = "pmsLedger",
        fallbackFactory = CommLedgerDeptClientFallbackFactory.class)
public interface CommLedgerDeptClient {


    /**
     *
     * @author cdf
     * @date 2023/5/15
     */
    @PostMapping("update")
    HttpResult<Object> update(@RequestBody Dept dept);


    @GetMapping("/existMonitorDeptTree")
    HttpResult<List<Dept>> existMonitorDeptTree();


}
