ImAccountService.java
2.47 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
package cn.fw.hermes.sdk.api;
import cn.fw.data.base.domain.common.Message;
import cn.fw.hermes.sdk.api.para.AccountCondition;
import cn.fw.hermes.sdk.api.result.AccountResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
/**
* @Author: Chenery
* @Date: 2021/2/2 15:48
*/
@FeignClient(value = "fw-hermes")
public interface ImAccountService {
/**
* 用户注册
*
* @param accountCondition 注册用户对象
* @return 注册后的账户对象
*/
@PostMapping("/api/account/register")
Message<AccountResult> userRegister(@RequestBody AccountCondition accountCondition);
/**
* 注册
*
* 过时的方法 {@link this#userRegister(AccountCondition)}
* @param userId 用户id
* @param userName 用户名
* @param faceUrl 用户头像
* @param isStaff 是否是工作人员
* @return 返回用户账号信息单位 秒
*/
@Deprecated
@GetMapping("/api/im/register")
Message<AccountResult> register(@RequestParam("userId") Long userId, @RequestParam("userName") String userName,
@RequestParam(value = "faceUrl", required = false) String faceUrl,
@RequestParam("isStaff") boolean isStaff);
/**
* 获取签名
*
* @param userId 用户id
* @param expire 签名过期时间(单位:秒 默认10天)签名未过期不生效
* @param isStaff 是否是app使用人员(false则为会员)
* @return
*/
@Deprecated
@GetMapping("/api/im/getSig")
Message<AccountResult> getSig(@RequestParam("userId") Long userId, @RequestParam(value = "expire", required = false) Long expire,
@RequestParam("isStaff") boolean isStaff);
/**
* 踢下线接口
*
* @param userId 用户ID
* @return
*/
@Deprecated
@GetMapping("/api/im/kick")
Message<Boolean> kick(@RequestParam("userId") Long userId);
/**
* 获取IM账号
*
* @param userId 用户id
* @param isStaff 是否是业务人员
* @return
*/
@GetMapping("/api/im/getIdentifier")
Message<String> getIdentifier(@RequestParam("userId") Long userId, @RequestParam("isStaff") boolean isStaff);
}