适配新版本

This commit is contained in:
sg 2024-02-22 15:44:30 +08:00
parent 3b5f191bf2
commit b5cc83be77
5 changed files with 30 additions and 20 deletions

View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId> <artifactId>spring-boot-starter-parent</artifactId>
<version>3.1.0</version> <version>3.2.2</version>
<relativePath/> <!-- lookup parent from repository --> <relativePath/> <!-- lookup parent from repository -->
</parent> </parent>
<groupId>com.example</groupId> <groupId>com.example</groupId>
@ -14,7 +14,8 @@
<name>wxhk</name> <name>wxhk</name>
<description>wxhk</description> <description>wxhk</description>
<properties> <properties>
<java.version>17</java.version> <java.version>21</java.version>
<vertx-web-client.version>4.5.3</vertx-web-client.version>
</properties> </properties>
<dependencies> <dependencies>
<dependency> <dependency>
@ -39,7 +40,7 @@
<dependency> <dependency>
<groupId>io.netty</groupId> <groupId>io.netty</groupId>
<artifactId>netty-all</artifactId> <artifactId>netty-all</artifactId>
<version>4.1.92.Final</version> <version>4.1.105.Final</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.squareup.okhttp3</groupId> <groupId>com.squareup.okhttp3</groupId>
@ -50,22 +51,22 @@
<dependency> <dependency>
<groupId>io.vertx</groupId> <groupId>io.vertx</groupId>
<artifactId>vertx-core</artifactId> <artifactId>vertx-core</artifactId>
<version>4.4.2</version> <version>${vertx-web-client.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.vertx</groupId> <groupId>io.vertx</groupId>
<artifactId>vertx-web</artifactId> <artifactId>vertx-web</artifactId>
<version>4.4.2</version> <version>${vertx-web-client.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.vertx</groupId> <groupId>io.vertx</groupId>
<artifactId>vertx-web-client</artifactId> <artifactId>vertx-web-client</artifactId>
<version>4.4.2</version> <version>${vertx-web-client.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.vertx</groupId> <groupId>io.vertx</groupId>
<artifactId>vertx-mysql-client</artifactId> <artifactId>vertx-mysql-client</artifactId>
<version>4.4.2</version> <version>${vertx-web-client.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>

View File

@ -36,7 +36,7 @@ public class HttpAsyncUtil {
} }
public static Future<HttpResponse<Buffer>> exec(Type type, JsonObject object, Handler<AsyncResult<HttpResponse<Buffer>>> handler) { public static Future<HttpResponse<Buffer>> exec(Type type, JsonObject object, Handler<AsyncResult<HttpResponse<Buffer>>> handler) {
return client.post(InitWeChat.wxPort, "localhost", "/api/?type=" + type.getType()) return client.post(InitWeChat.wxPort, "localhost", "/api/" + type.getType())
.sendJsonObject(object) .sendJsonObject(object)
.onComplete(handler) .onComplete(handler)
; ;
@ -45,22 +45,31 @@ public class HttpAsyncUtil {
} }
public enum Type { public enum Type {
检查微信登陆("0"), 检查微信登陆("checkLogin"),
获取登录信息("1"), 获取登录信息("userInfo"),
发送文本("2"), 发送文本("sendTextMsg"),
发送at文本("3"), 转发消息("forwardMsg"),
发送at文本("sendAtText"),
发送图片("5"), 发送图片("5"),
发送文件("6"), 发送文件("sendFileMsg"),
开启hook("9"), 开启hook("hookSyncMsg"),
关闭hook("10"), 关闭hook("unhookSyncMsg"),
添加好友("20"), 添加好友("20"),
通过好友申请("23"), 通过好友申请("23"),
获取群成员("25"), 获取群成员("getMemberFromChatRoom"),
获取群成员昵称("26"), 获取群成员基础信息("getContactProfile"),
删除群成员("27"), 获取群详情("getChatRoomDetailInfo"),
添加群成员("addMemberToChatRoom"),
修改群昵称("modifyNickname"),
删除群成员("delMemberFromChatRoom"),
置顶群消息("topMsg"),
取消置顶群消息("removeTopMsg"),
邀请入群("InviteMemberToChatRoom"),
确认收款("45"), 确认收款("45"),
联系人列表("46"), 联系人列表("getContactList"),
查询微信信息("55"), 查询微信信息("55"),
下载附件("downloadAttach"),
解码("decodeImage"),
; ;

View File

@ -1,4 +1,4 @@
wx.path=D:\\Program Files (x86)\\Tencent\\WeChat\\[3.9.2.23]\\WeChat.exe wx.path=D:\\Program Files (x86)\\Tencent\\WeChat\\WeChat.exe
wx.port=19088 wx.port=19088
spring.profiles.active=local spring.profiles.active=local
vertx.port=8080 vertx.port=8080