You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.3 KiB
44 lines
1.3 KiB
/**
|
|
* Copyright (c) 2018 人人开源 All rights reserved.
|
|
*
|
|
* https://www.renren.io
|
|
*
|
|
* 版权所有,侵权必究!
|
|
*/
|
|
|
|
package com.epmet.feign;
|
|
|
|
import com.epmet.commons.tools.constant.ServiceConstant;
|
|
import com.epmet.feign.fallback.ParamsFeignClientFallback;
|
|
import org.springframework.cloud.openfeign.FeignClient;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.PathVariable;
|
|
import org.springframework.web.bind.annotation.PutMapping;
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
|
/**
|
|
* 参数接口
|
|
*
|
|
* @author Mark sunlightcs@gmail.com
|
|
* @since 1.1.0
|
|
*/
|
|
@FeignClient(name = ServiceConstant.EPMET_ADMIN_SERVER, fallback = ParamsFeignClientFallback.class)
|
|
public interface ParamsFeignClient {
|
|
|
|
/**
|
|
* 根据参数编码,获取参数值
|
|
* @param paramCode 参数编码
|
|
* @return 返回参数值
|
|
*/
|
|
@GetMapping("sys/params/code/{paramCode}")
|
|
String getValue(@PathVariable("paramCode") String paramCode);
|
|
|
|
/**
|
|
* 根据参数编码,更新参数值
|
|
* @param paramCode 参数编码
|
|
* @param paramValue 参数值
|
|
*/
|
|
@PutMapping("sys/params/code/{paramCode}")
|
|
void updateValueByCode(@PathVariable("paramCode") String paramCode, @RequestParam("paramValue") String paramValue);
|
|
|
|
}
|
|
|