OpsClient.java 1.13 KB
package com.viontech.fanxing.task.feign;

import com.viontech.fanxing.commons.model.*;
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}")
    JsonMessageUtil.JsonMessage<StoreConfig> getStoreConfigById(@PathVariable("id") Long storeConfigId);

    @GetMapping("/contents")
    JsonMessageUtil.JsonMessage<List<Content>> getContentByName(@RequestParam("name") String name);

    @GetMapping("/channels")
    JsonMessageUtil.JsonMessage<List<Channel>> getChannelByChannelUnid(@RequestParam("channelUnid") String channelUnid);

    @GetMapping("/dictCodes")
    JsonMessageUtil.JsonMessage<List<DictCode>> getDictCodeByUnid(@RequestParam("unid") String unid);

    @PostMapping("/logs")
    JsonMessageUtil.JsonMessage<Log> addLog(@RequestBody LogVo logVo);

}