提交 | 用户 | 时间
|
e7c126
|
1 |
package com.iailab.module.system.api.social; |
H |
2 |
|
|
3 |
import com.iailab.framework.common.pojo.CommonResult; |
|
4 |
import com.iailab.module.system.api.social.dto.SocialWxJsapiSignatureRespDTO; |
|
5 |
import com.iailab.module.system.api.social.dto.SocialWxPhoneNumberInfoRespDTO; |
|
6 |
import com.iailab.module.system.enums.ApiConstants; |
|
7 |
import io.swagger.v3.oas.annotations.Operation; |
|
8 |
import io.swagger.v3.oas.annotations.Parameter; |
|
9 |
import io.swagger.v3.oas.annotations.Parameters; |
|
10 |
import io.swagger.v3.oas.annotations.tags.Tag; |
|
11 |
import org.springframework.cloud.openfeign.FeignClient; |
|
12 |
import org.springframework.web.bind.annotation.GetMapping; |
|
13 |
import org.springframework.web.bind.annotation.RequestParam; |
|
14 |
|
1ecdfb
|
15 |
@FeignClient(name = ApiConstants.NAME) |
e7c126
|
16 |
@Tag(name = "RPC 服务 - 社交应用") |
H |
17 |
public interface SocialClientApi { |
|
18 |
|
|
19 |
String PREFIX = ApiConstants.PREFIX + "/social-client"; |
|
20 |
|
|
21 |
@GetMapping(PREFIX + "/get-authorize-url") |
|
22 |
@Operation(summary = "获得社交平台的授权 URL") |
|
23 |
@Parameters({ |
|
24 |
@Parameter(name = "socialType", description = "社交平台的类型", example = "1", required = true), |
|
25 |
@Parameter(name = "userType", description = "用户类型", example = "1", required = true), |
|
26 |
@Parameter(name = "redirectUri", description = "重定向 URL", example = "https://www.baidu.com", required = true) |
|
27 |
}) |
|
28 |
CommonResult<String> getAuthorizeUrl(@RequestParam("socialType") Integer socialType, |
|
29 |
@RequestParam("userType") Integer userType, |
|
30 |
@RequestParam("redirectUri") String redirectUri); |
|
31 |
|
|
32 |
@GetMapping(PREFIX + "/create-wx-mp-jsapi-signature") |
|
33 |
@Operation(summary = "创建微信公众号 JS SDK 初始化所需的签名") |
|
34 |
@Parameters({ |
|
35 |
@Parameter(name = "userType", description = "用户类型", example = "1", required = true), |
|
36 |
@Parameter(name = "url", description = "访问 URL", example = "https://www.baidu.com", required = true) |
|
37 |
}) |
|
38 |
CommonResult<SocialWxJsapiSignatureRespDTO> createWxMpJsapiSignature(@RequestParam("userType") Integer userType, |
|
39 |
@RequestParam("url") String url); |
|
40 |
|
|
41 |
@GetMapping(PREFIX + "/create-wx-ma-phone-number-info") |
|
42 |
@Operation(summary = "获得微信小程序的手机信息") |
|
43 |
@Parameters({ |
|
44 |
@Parameter(name = "userType", description = "用户类型", example = "1", required = true), |
|
45 |
@Parameter(name = "phoneCode", description = "手机授权码", example = "iailab11", required = true) |
|
46 |
}) |
|
47 |
CommonResult<SocialWxPhoneNumberInfoRespDTO> getWxMaPhoneNumberInfo(@RequestParam("userType") Integer userType, |
|
48 |
@RequestParam("phoneCode") String phoneCode); |
|
49 |
|
|
50 |
} |