wangrenhuang
2023-05-22 9f29abe0654aa7c5566883329395f6ee22877ead
提交 | 用户 | 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  */
39a067 14 @FeignClient(name="phi-platform-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
0fd24f 54     /**
a5b35d 55      *获取企业微信通讯录token
0fd24f 56      * 转化使用 WxTokenDt
F 57      * @param getTokenDto 对象
58      * @return
59      */
60     @PostMapping(value = "/account_token/communi/get_token")
61     Result corpCommonToken(@RequestBody GetTokenDto getTokenDto,
62                            @RequestHeader(name = "appId",required = true) String appId,
63                            @RequestHeader(name = "sign",required = true) String sign,
64                            @RequestHeader(name = "appIdCode",required = false) String appIdCode);
65
a5b35d 66     /**
F 67      *获取企业微信联系我token
68      * 转化使用 WxTokenDt
69      * @param getTokenDto 对象
70      * @return
71      */
72     @PostMapping(value = "/account_token/contact/get_token")
73     Result corpContactToken(@RequestBody GetTokenDto getTokenDto,
74                            @RequestHeader(name = "appId",required = true) String appId,
75                            @RequestHeader(name = "sign",required = true) String sign,
76                            @RequestHeader(name = "appIdCode",required = false) String appIdCode);
77
ddd881 78 }