提交 | 用户 | age
|
ddd881
|
1 |
package com.hz.his.feign.service.platform; |
F |
2 |
|
|
3 |
import com.hx.resultTool.Result; |
|
4 |
import com.hz.his.dto.token.GetTokenDto; |
|
5 |
import org.springframework.cloud.openfeign.FeignClient; |
|
6 |
import org.springframework.web.bind.annotation.PostMapping; |
|
7 |
import org.springframework.web.bind.annotation.RequestBody; |
|
8 |
import org.springframework.web.bind.annotation.RequestHeader; |
|
9 |
|
|
10 |
/** |
|
11 |
* 这里这个name 需要填写 请求的服务提供者的注册到nacos Server上面的服务名,path 是请求接口前缀 |
|
12 |
* url :指定地址(token统一拿线上,所以需要指定) |
|
13 |
*/ |
9435ca
|
14 |
@FeignClient(name="phi-platfrom-service",url = "https://phiapi.phiskin.com",path = "/phip",contextId = "phip-token") |
ddd881
|
15 |
public interface SWxTokenService { |
F |
16 |
|
|
17 |
/** |
|
18 |
*获取小程序企业微信应用token |
|
19 |
* 转化使用 WxTokenDt |
|
20 |
* @param getTokenDto 对象 |
|
21 |
* @return |
|
22 |
*/ |
|
23 |
@PostMapping(value = "/account_token/apply/get_token") |
|
24 |
Result corpApplyToken(@RequestBody GetTokenDto getTokenDto, |
|
25 |
@RequestHeader(name = "appId",required = true) String appId, |
|
26 |
@RequestHeader(name = "sign",required = true) String sign, |
|
27 |
@RequestHeader(name = "appIdCode",required = false) String appIdCode); |
|
28 |
|
|
29 |
/** |
|
30 |
*获取小程序普通token |
|
31 |
* 转化使用 WxTokenDt |
|
32 |
* @param getTokenDto 对象 |
|
33 |
* @return |
|
34 |
*/ |
|
35 |
@PostMapping(value = "/account_token/mp/get_token") |
|
36 |
Result mpToken(@RequestBody GetTokenDto getTokenDto, |
|
37 |
@RequestHeader(name = "appId",required = true) String appId, |
|
38 |
@RequestHeader(name = "sign",required = true) String sign, |
|
39 |
@RequestHeader(name = "appIdCode",required = false) String appIdCode); |
|
40 |
|
|
41 |
|
|
42 |
/** |
|
43 |
*获取公众号普通token |
|
44 |
* 转化使用 WxTokenDt |
|
45 |
* @param getTokenDto 对象 |
|
46 |
* @return |
|
47 |
*/ |
|
48 |
@PostMapping(value = "/account_token/weChat/get_token") |
|
49 |
Result weChatToken(@RequestBody GetTokenDto getTokenDto, |
|
50 |
@RequestHeader(name = "appId",required = true) String appId, |
|
51 |
@RequestHeader(name = "sign",required = true) String sign, |
|
52 |
@RequestHeader(name = "appIdCode",required = false) String appIdCode); |
|
53 |
|
|
54 |
} |