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

import com.viontech.fanxing.commons.model.Channel;
import com.viontech.fanxing.commons.model.Content;
import com.viontech.fanxing.commons.model.DictCode;
import com.viontech.fanxing.commons.model.StoreConfig;
import com.viontech.keliu.util.JsonMessageUtil;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

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);


}