Skip to content

Commit 8561e05

Browse files
committed
Merge remote-tracking branch 'origin/dev' into dev
2 parents c208961 + 73a6657 commit 8561e05

File tree

12 files changed

+843
-826
lines changed

12 files changed

+843
-826
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ If you're using Maven, just add the following dependency in `pom.xml`.
2525
<dependency>
2626
<groupId>io.github.doocs</groupId>
2727
<artifactId>im-server-sdk-java</artifactId>
28-
<version>0.4.15</version>
28+
<version>0.4.18</version>
2929
</dependency>
3030
```
3131

README_CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ https://im.doocs.org
2525
<dependency>
2626
<groupId>io.github.doocs</groupId>
2727
<artifactId>im-server-sdk-java</artifactId>
28-
<version>0.4.15</version>
28+
<version>0.4.18</version>
2929
</dependency>
3030
```
3131

docs/guide/intro.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# 介绍
22

3-
本文档基于腾讯云 IM Server SDK Java <Badge type="tip" text="v0.4.15" vertical="top" /> 编写。
3+
本文档基于腾讯云 IM Server SDK Java <Badge type="tip" text="v0.4.18" vertical="top" /> 编写。
44

55
## 前提条件
66

docs/guide/quickstart.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010
<dependency>
1111
<groupId>io.github.doocs</groupId>
1212
<artifactId>im-server-sdk-java</artifactId>
13-
<version>0.4.15</version>
13+
<version>0.4.18</version>
1414
</dependency>
1515
```
1616

1717
### Gradle
1818

1919
```txt
20-
implementation group: 'io.github.doocs', name: 'im-server-sdk-java', version: '0.4.15'
20+
implementation group: 'io.github.doocs', name: 'im-server-sdk-java', version: '0.4.18'
2121
```
2222

2323
### 下载 JAR

package-lock.json

Lines changed: 717 additions & 810 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "qcloud-im-server-sdk-java",
3-
"version": "0.4.15",
3+
"version": "0.4.18",
44
"description": "腾讯云 IM 服务端 SDK API 文档 Java 版",
55
"scripts": {
66
"docs:dev": "vitepress dev docs",
@@ -18,6 +18,6 @@
1818
},
1919
"homepage": "https://github.com/doocs/qcloud-im-server-sdk-java#readme",
2020
"devDependencies": {
21-
"vitepress": "^1.6.3"
21+
"vitepress": "^2.0.0-alpha.6"
2222
}
2323
}

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>io.github.doocs</groupId>
88
<artifactId>im-server-sdk-java</artifactId>
9-
<version>0.4.15</version>
9+
<version>0.4.18</version>
1010
<packaging>jar</packaging>
1111

1212
<name>qcloud-im-server-sdk-java</name>

src/main/java/io/github/doocs/im/core/Account.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,23 @@ public MultiAccountImportResult multiAccountImport(MultiAccountImportRequest mul
7070
return HttpUtil.post(url, multiAccountImportRequest, MultiAccountImportResult.class, imClient.getConfig());
7171
}
7272

73+
/**
74+
* 导入多个账号(新版本,支持昵称和头像)
75+
*
76+
* @param multiAccountImportNewRequest 请求参数
77+
* @return 结果
78+
* @throws IOException 异常
79+
*/
80+
public MultiAccountImportResult multiAccountImportNew(MultiAccountImportNewRequest multiAccountImportNewRequest) throws IOException {
81+
String url = imClient.getUrl(SERVICE_NAME, MULTI_ACCOUNT_IMPORT_COMMAND);
82+
return HttpUtil.post(url, multiAccountImportNewRequest, MultiAccountImportResult.class, imClient.getConfig());
83+
}
84+
85+
public MultiAccountImportResult multiAccountImportNew(MultiAccountImportNewRequest multiAccountImportNewRequest, long random) throws IOException {
86+
String url = imClient.getUrl(SERVICE_NAME, MULTI_ACCOUNT_IMPORT_COMMAND, random);
87+
return HttpUtil.post(url, multiAccountImportNewRequest, MultiAccountImportResult.class, imClient.getConfig());
88+
}
89+
7390
/**
7491
* 删除账号
7592
*
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
package io.github.doocs.im.model.request;
2+
3+
import com.fasterxml.jackson.annotation.JsonInclude;
4+
import com.fasterxml.jackson.annotation.JsonProperty;
5+
6+
import java.io.Serializable;
7+
import java.util.List;
8+
9+
/**
10+
* 导入多个账号-请求参数
11+
*
12+
* @author dileex
13+
* @since 2024/12/19
14+
*/
15+
@JsonInclude(JsonInclude.Include.NON_NULL)
16+
public class MultiAccountImportNewRequest extends GenericRequest implements Serializable {
17+
private static final long serialVersionUID = 1096507781689811276L;
18+
19+
/**
20+
* 待导入的用户列表,单次最多导入100个用户
21+
*/
22+
@JsonProperty("AccountList")
23+
private List<AccountImportRequest> accountList;
24+
25+
public MultiAccountImportNewRequest() {
26+
}
27+
28+
public MultiAccountImportNewRequest(List<AccountImportRequest> accountList) {
29+
this.accountList = accountList;
30+
}
31+
32+
private MultiAccountImportNewRequest(Builder builder) {
33+
this.accountList = builder.accountList;
34+
}
35+
36+
public static Builder builder() {
37+
return new Builder();
38+
}
39+
40+
public List<AccountImportRequest> getAccountList() {
41+
return accountList;
42+
}
43+
44+
public void setAccountList(List<AccountImportRequest> accountList) {
45+
this.accountList = accountList;
46+
}
47+
48+
public static final class Builder {
49+
private List<AccountImportRequest> accountList;
50+
51+
private Builder() {
52+
}
53+
54+
public MultiAccountImportNewRequest build() {
55+
return new MultiAccountImportNewRequest(this);
56+
}
57+
58+
public Builder accountList(List<AccountImportRequest> accountList) {
59+
this.accountList = accountList;
60+
return this;
61+
}
62+
}
63+
}

src/main/java/io/github/doocs/im/model/request/SendGroupMsgRequest.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public class SendGroupMsgRequest extends GenericRequest implements Serializable
9393
* 支持群类型 Private、Public、ChatRoom
9494
*/
9595
@JsonProperty("To_Account")
96-
private String toAccount;
96+
private List<String> toAccount;
9797

9898
/**
9999
* 话题的 ID,仅社群支持此选项
@@ -125,7 +125,7 @@ public SendGroupMsgRequest(String groupId, Long random, List<TIMMsgElement> msgB
125125
public SendGroupMsgRequest(String groupId, Long random, String msgPriority, List<TIMMsgElement> msgBody,
126126
String fromAccount, OfflinePushInfo offlinePushInfo, List<String> forbidCallbackControl,
127127
Integer onlineOnlyFlag, List<String> sendMsgControl, String cloudCustomData,
128-
Integer supportMessageExtension, String toAccount, String topicId) {
128+
Integer supportMessageExtension, List<String> toAccount, String topicId) {
129129
this.groupId = groupId;
130130
this.random = random;
131131
this.msgPriority = msgPriority;
@@ -141,7 +141,7 @@ public SendGroupMsgRequest(String groupId, Long random, String msgPriority, List
141141
this.topicId = topicId;
142142
}
143143

144-
public SendGroupMsgRequest(String groupId, Long random, String msgPriority, List<TIMMsgElement> msgBody, String fromAccount, OfflinePushInfo offlinePushInfo, List<String> forbidCallbackControl, Integer onlineOnlyFlag, List<String> sendMsgControl, String cloudCustomData, Integer supportMessageExtension, String toAccount, String topicId, Integer needReadReceipt, List<GroupAtInfo> groupAtInfos) {
144+
public SendGroupMsgRequest(String groupId, Long random, String msgPriority, List<TIMMsgElement> msgBody, String fromAccount, OfflinePushInfo offlinePushInfo, List<String> forbidCallbackControl, Integer onlineOnlyFlag, List<String> sendMsgControl, String cloudCustomData, Integer supportMessageExtension, List<String> toAccount, String topicId, Integer needReadReceipt, List<GroupAtInfo> groupAtInfos) {
145145
this.groupId = groupId;
146146
this.random = random;
147147
this.msgPriority = msgPriority;
@@ -269,11 +269,11 @@ public void setSupportMessageExtension(Integer supportMessageExtension) {
269269
this.supportMessageExtension = supportMessageExtension;
270270
}
271271

272-
public String getToAccount() {
272+
public List<String> getToAccount() {
273273
return toAccount;
274274
}
275275

276-
public void setToAccount(String toAccount) {
276+
public void setToAccount(List<String> toAccount) {
277277
this.toAccount = toAccount;
278278
}
279279

@@ -314,7 +314,7 @@ public static final class Builder {
314314
private List<String> sendMsgControl;
315315
private String cloudCustomData;
316316
private Integer supportMessageExtension;
317-
private String toAccount;
317+
private List<String> toAccount;
318318
private String topicId;
319319
private Integer needReadReceipt;
320320

@@ -385,7 +385,7 @@ public Builder supportMessageExtension(Integer supportMessageExtension) {
385385
return this;
386386
}
387387

388-
public Builder toAccount(String toAccount) {
388+
public Builder toAccount(List<String> toAccount) {
389389
this.toAccount = toAccount;
390390
return this;
391391
}

0 commit comments

Comments
 (0)