feat(0): [java]-[wechat-ferry-mvn]-新版本适配

1.SDK更新39.3.3版本
2.XmlMsg消息类型修改
3.RoomData内部转换修改
This commit is contained in:
chandler 2024-12-23 19:46:07 +08:00
parent fd9dd2ab64
commit f3ac990ecc
11 changed files with 744 additions and 251 deletions

View File

@ -9,12 +9,13 @@
### 环境准备
| 名称 | 版本 | 备注 |
|-------|-----------|----|
| JDK | 1.8+ | √ |
| Maven | 3.8+ | √ |
| 微信 | 3.9.10.27 | √ |
| MySQL | 8.0+ | 备用 |
| 名称 | 版本 | 备注 |
|-----------------|-----------|----|
| JDK | 1.8+ | √ |
| Maven | 3.8+ | √ |
| 微信 | 3.9.11.25 | √ |
| WeChatFerry-SDK | 39.3.3 | √ |
| MySQL | 8.0+ | 备用 |
### 下载文件

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,28 +0,0 @@
package com.wechat.ferry.config;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.web.server.ErrorPage;
import org.springframework.boot.web.server.ErrorPageRegistrar;
import org.springframework.boot.web.server.ErrorPageRegistry;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Component;
/**
* 配置类-配置错误页面转发首页
*
* @author chandler
* @date 2024-10-04 10:21
*/
@Slf4j
@Configuration
@Component
public class ErrorPageConfig implements ErrorPageRegistrar {
@Override
public void registerErrorPages(ErrorPageRegistry registry) {
ErrorPage error404Page = new ErrorPage(HttpStatus.NOT_FOUND, "/index.html");
registry.addErrorPages(error404Page);
}
}

View File

@ -37,6 +37,7 @@ import lombok.extern.slf4j.Slf4j;
/**
* 处理层-微信客户端
* version39.3.3
*
* @author Changhua
* @date 2023-12-06 22:11

View File

@ -323,6 +323,7 @@ public class WeChatDllServiceImpl implements WeChatDllService {
}
vo.setGroupNickName(nickName);
vo.setState(String.valueOf(member.getState()));
// TODO 待补充
list.add(vo);
}
} catch (InvalidProtocolBufferException e) {

View File

@ -4,6 +4,7 @@ import java.util.Map;
import javax.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import org.springframework.util.ObjectUtils;

View File

@ -14,11 +14,6 @@ spring:
mvc:
pathmatch:
matching-strategy: ant_path_matcher
# 打成jar包必须添加如下配置才能找到页面
thymeleaf:
mode: HTML
cache: false
prefix: classpath:/templates
# 日志配置
logging:

View File

@ -117,7 +117,7 @@ message XmlMsg
string receiver = 1; //
string content = 2; // xml
string path = 3; //
int32 type = 4; //
uint64 type = 4; //
}
message MsgTypes { map<int32, string> types = 1; }
@ -236,19 +236,22 @@ message ForwardMsg
}
// RoomData内部转换
message RoomData {
repeated RoomMember members = 1;
int32 field_2 = 2;
int32 field_3 = 3;
int32 field_4 = 4;
int32 room_capacity = 5;
int32 field_6 = 6;
int64 field_7 = 7;
int64 field_8 = 8;
message RoomData
{
message RoomMember {
string wxid = 1;
string name = 2;
int32 state = 3;
string wxid = 1;
optional string name = 2; //
int32 state = 3;
}
repeated RoomMember members = 1;
optional int32 field_2 = 2;
int32 field_3 = 3;
optional int32 field_4 = 4;
int32 capacity = 5;
optional string field_6 = 6;
int32 field_7 = 7;
int32 field_8 = 8;
repeated string admins = 9; //
}