OpsClient.java 2.21 KB
package com.viontech.fanxing.commons.feign;

import com.alibaba.fastjson.JSONObject;
import com.viontech.fanxing.commons.model.*;
import com.viontech.fanxing.commons.model.main.ImageKeepConfig;
import com.viontech.fanxing.commons.vo.LogVo;
import com.viontech.keliu.util.JsonMessageUtil;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * .
 *
 * @author 谢明辉
 * @date 2021/7/20
 */

@Component
@FeignClient(value = "fanxing-ops")
public interface OpsClient {

    /**
     * 获取存储配置
     */
    @GetMapping("/storeConfigs/{id}")
    JSONObject getStoreConfigById(@PathVariable("id") Long storeConfigId);

    /**
     * 获取文本内容
     */
    @GetMapping("/contents")
    JsonMessageUtil.JsonMessage<List<Content>> getContentByName(@RequestParam("name") String name);

    /**
     * 根据 channelUnid 获取对应视频设备信息
     */
    @GetMapping("/channels")
    JsonMessageUtil.JsonMessage<List<Channel>> getChannelByChannelUnid(@RequestParam("channelUnid") String channelUnid);

    /**
     * 通过 unid 获取字典
     */
    @GetMapping("/dictCodes")
    JsonMessageUtil.JsonMessage<List<DictCode>> getDictCodeByUnid(@RequestParam("unid") String unid);

    /**
     * 获取所有字典编码
     */
    @GetMapping("/dictCodes")
    JsonMessageUtil.JsonMessage<List<DictCode>> getDictCodes();

    /**
     * 获取所有字典
     */
    @GetMapping("/dictCates")
    JsonMessageUtil.JsonMessage<List<DictCate>> getDictCates();

    /**
     * 添加日志
     */
    @PostMapping("/logs")
    JsonMessageUtil.JsonMessage<Log> addLog(@RequestBody LogVo logVo);

    /**
     * 获取所有转发列表
     */
    @GetMapping("/forwards")
    JsonMessageUtil.JsonMessage<List<Forward>> getForwards();

    /**
     * 通过id修改转发列表
     */
    @PostMapping("/forwards/{id}")
    JsonMessageUtil.JsonMessage<Forward> updateForwardById(@PathVariable("id") Long id, @RequestBody Forward forward);

    /**
     * 获取存储方案配置
     */
    @GetMapping("/contents/imageKeepConfig")
    JsonMessageUtil.JsonMessage<ImageKeepConfig> getImageKeepConfig();

}