2021-12-31 18:36:40 +08:00
|
|
|
package com.xjs.client;
|
2021-12-26 09:48:34 +08:00
|
|
|
|
2021-12-26 22:14:30 +08:00
|
|
|
import com.alibaba.fastjson.JSONObject;
|
2021-12-31 18:36:40 +08:00
|
|
|
import com.xjs.aop.ApiLog;
|
|
|
|
|
import com.xjs.client.factory.BaiduFeignFactory;
|
2021-12-26 11:33:01 +08:00
|
|
|
import com.xjs.translation.domain.qo.translation.BaiDuTranslationQo;
|
2021-12-26 09:48:34 +08:00
|
|
|
import org.springframework.cloud.openfeign.FeignClient;
|
|
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
|
|
2021-12-30 21:57:06 +08:00
|
|
|
import static com.xjs.consts.ApiConst.*;
|
2021-12-28 22:45:43 +08:00
|
|
|
|
2021-12-26 09:48:34 +08:00
|
|
|
/**
|
|
|
|
|
* @author xiejs
|
2021-12-29 11:30:46 +08:00
|
|
|
* @desc 百度翻译接口api调用
|
2021-12-26 09:48:34 +08:00
|
|
|
* @create 2021-12-25
|
|
|
|
|
*/
|
2021-12-29 11:30:46 +08:00
|
|
|
@FeignClient(name = "baidu", url = BAIDU_FY_URL, fallbackFactory = BaiduFeignFactory.class)
|
2021-12-26 09:48:34 +08:00
|
|
|
public interface BaiduFeignClient {
|
|
|
|
|
|
|
|
|
|
@PostMapping(headers = {"Content-Type=application/x-www-form-urlencoded"})
|
2021-12-28 22:45:43 +08:00
|
|
|
@ApiLog(name = BAIDU_FY,
|
2021-12-29 11:30:46 +08:00
|
|
|
url = BAIDU_FY_URL,
|
2021-12-26 15:41:51 +08:00
|
|
|
method = "Post")
|
2021-12-26 22:14:30 +08:00
|
|
|
JSONObject translationApi(BaiDuTranslationQo qo);
|
2021-12-26 09:48:34 +08:00
|
|
|
|
|
|
|
|
}
|