UserService.java
2.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
package com.topdraw.dockingapi.http;
import com.alibaba.fastjson.JSONObject;
import com.dtflys.forest.annotation.BaseRequest;
import com.dtflys.forest.annotation.Body;
import com.dtflys.forest.annotation.Post;
import com.topdraw.dockingapi.config.Decode;
import com.topdraw.dockingapi.config.Encode;
import com.topdraw.dockingapi.entity.DecodeBody;
import java.util.Map;
/**
* @author wenxin
* @version 1.0
* @date 2024/5/23 下午4:36
*/
@BaseRequest(
baseURL = "{baseUrl}", // 默认域名
headers = {
"Content-Type:application/json" // 默认请求头
},
sslProtocol = "TLS" // 默认单向SSL协议
)
public interface UserService {
/**
* 检查指定手机号是否注册
* 请求体明文
* {
* "phoneNum": "15211111111"
* }
*
* @param body 密文 key是encrypt value是加密以后的密码
* @return isRegister(是否已注册,0:未注册;1:已注册)
*/
@Post("/cpc-ms-service-user/user/yk/checkIsRegisterByPhoneNum")
@Encode("${key}")
@Decode("${key}")
DecodeBody<JSONObject> checkIsRegisterByPhoneNum(@Body @Encode Map<String,?> body);
/**
* 用户注册
* 请求体明文
* {
* "phoneNum":"15211111111",
* "token":"333333333"
* }
*
* @param body 密文 key是encrypt value是加密以后的密码
* @return errcode(错误代码,0:成功;非0:失败)
*/
@Post("/cpc-ms-service-user/user/yk/privateRegister")
@Encode("${key}")
@Decode("${key}")
DecodeBody<Object> privateRegister(@Body @Encode Map<String,?> body);
/**
* 用户登录获取用户信息
* 请求体明文
* {
* "phoneNum":"15211111111",
* "token":"2313123123"
* }
*
* @param body 密文 key是encrypt value是加密以后的密码
* @return 用户信息
*/
@Post("/cpc-ms-service-user/login/yk/privateLogin")
@Encode("${key}")
@Decode("${key}")
DecodeBody<Object> privateLogin(@Body @Encode Map<String,?> body);
/**
* 获取用户手机号码
*
* @param body authCode
* @return 手机号
*/
@Post("/cpc-ms-service-user/user/yk/getUserInfoByAuthCode")
JSONObject getUserInfoByAuthCode(@Body JSONObject body);
}