mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-03 14:55:36 +08:00
Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 28f7f20728 | |||
| 235256d679 | |||
| 626d569858 | |||
| 0492179bdd | |||
| 1dfd1de5c1 | |||
| d15d01c32b | |||
|
|
c9f4278d9b | ||
|
|
6aa0540c9e | ||
|
|
9689dc9db1 | ||
|
|
c20e3324d4 | ||
| 303f44cd2b | |||
| 66b73973b4 | |||
|
|
0ff4e52ed3 | ||
| b6d1f724e9 |
@@ -1,6 +1,22 @@
|
||||
# 更新日志(v2 版本)
|
||||
|
||||
## 2.3.0
|
||||
## v2.3.5 (build 398)
|
||||
|
||||
> 更新时间:2021.3.23
|
||||
|
||||
- 修复:MySQL 数据库查询导致的一系列问题
|
||||
- 修复:内存泄露问题
|
||||
|
||||
> 2.3.2-2.3.4 版本由于操作失误导致代码不完整,请直接使用 2.3.5 即可。
|
||||
|
||||
## v2.3.1
|
||||
|
||||
> 更新时间:2021.3.18
|
||||
|
||||
- 规范代码,修复一个小报错的 bug
|
||||
|
||||
|
||||
## v2.3.0
|
||||
|
||||
> 更新时间:2021.3.16
|
||||
|
||||
@@ -14,7 +30,7 @@
|
||||
|
||||
注:本次升级建议升级后合并全局配置文件,有一些新加的内容。
|
||||
|
||||
## 2.2.11
|
||||
## v2.2.11
|
||||
|
||||
> 更新时间:2021.3.13
|
||||
|
||||
|
||||
14
mkdocs.yml
14
mkdocs.yml
@@ -72,12 +72,9 @@ nav:
|
||||
- 事件分发器: event/event-dispatcher.md
|
||||
- 框架组件:
|
||||
- 框架组件: component/index.md
|
||||
- 机器人 API: component/robot-api.md
|
||||
- CQ 码(多媒体消息): component/cqcode.md
|
||||
- 上下文: component/context.md
|
||||
- 聊天机器人组件:
|
||||
- 机器人 API: component/robot-api.md
|
||||
- CQ 码(多媒体消息): component/cqcode.md
|
||||
- 机器人消息处理: component/message-util.md
|
||||
- Token 验证: component/access-token.md
|
||||
- 存储:
|
||||
- LightCache 轻量缓存: component/light-cache.md
|
||||
- MySQL 数据库: component/mysql.md
|
||||
@@ -85,15 +82,13 @@ nav:
|
||||
- ZMAtomic 原子计数器: component/atomics.md
|
||||
- SpinLock 自旋锁: component/spin-lock.md
|
||||
- 文件管理: component/data-provider.md
|
||||
- HTTP 服务器工具类:
|
||||
- HTTP 和 WebSocket 客户端: component/zmrequest.md
|
||||
- HTTP 路由管理: component/route-manager.md
|
||||
- 协程池: component/coroutine-pool.md
|
||||
- 单例类: component/singleton-trait.md
|
||||
- ZMUtil 杂项: component/zmutil.md
|
||||
- 全局方法: component/global-functions.md
|
||||
- HTTP 和 WebSocket 客户端: component/zmrequest.md
|
||||
- Console 终端: component/console.md
|
||||
- TaskWorker 管理: component/task-worker.md
|
||||
- Token 验证: component/access-token.md
|
||||
- 进阶开发:
|
||||
- 进阶开发: advanced/index.md
|
||||
- 框架剖析: advanced/framework-structure.md
|
||||
@@ -102,7 +97,6 @@ nav:
|
||||
- 内部类文件手册: advanced/inside-class.md
|
||||
- 接入 WebSocket 客户端: advanced/connect-ws-client.md
|
||||
- 框架多进程: advanced/multi-process.md
|
||||
- TaskWorker 提高并发: advanced/task-worker.md
|
||||
- 开发实战教程:
|
||||
- 编写管理员才能触发的功能: advanced/example/admin.md
|
||||
- FAQ: FAQ.md
|
||||
|
||||
@@ -29,25 +29,15 @@ trait CQAPI
|
||||
public function processWebsocketAPI($connection, $reply, $function = false) {
|
||||
$api_id = ZMAtomic::get("wait_msg_id")->add(1);
|
||||
$reply["echo"] = $api_id;
|
||||
SpinLock::lock("wait_api");
|
||||
$r = LightCacheInside::get("wait_api", "wait_api");
|
||||
$r[$api_id] = [
|
||||
"data" => $reply,
|
||||
"time" => microtime(true),
|
||||
"self_id" => $connection->getOption("connect_id"),
|
||||
"echo" => $api_id
|
||||
];
|
||||
LightCacheInside::set("wait_api", "wait_api", $r);
|
||||
SpinLock::unlock("wait_api");
|
||||
if (server()->push($connection->getFd(), json_encode($reply))) {
|
||||
if ($function === true) {
|
||||
return CoMessage::yieldByWS($r[$api_id], ["echo"], 60);
|
||||
} else {
|
||||
SpinLock::lock("wait_api");
|
||||
$r = LightCacheInside::get("wait_api", "wait_api");
|
||||
unset($r[$api_id]);
|
||||
LightCacheInside::set("wait_api", "wait_api", $r);
|
||||
SpinLock::unlock("wait_api");
|
||||
$obj = [
|
||||
"data" => $reply,
|
||||
"time" => microtime(true),
|
||||
"self_id" => $connection->getOption("connect_id"),
|
||||
"echo" => $api_id
|
||||
];
|
||||
return CoMessage::yieldByWS($obj, ["echo"], 60);
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
|
||||
@@ -18,8 +18,8 @@ use ZM\Utils\DataProvider;
|
||||
|
||||
class ConsoleApplication extends Application
|
||||
{
|
||||
const VERSION_ID = 388;
|
||||
const VERSION = "2.3.1";
|
||||
const VERSION_ID = 398;
|
||||
const VERSION = "2.3.5";
|
||||
|
||||
public function __construct(string $name = 'UNKNOWN') {
|
||||
define("ZM_VERSION_ID", self::VERSION_ID);
|
||||
|
||||
@@ -61,7 +61,7 @@ class Table
|
||||
if ($msg == "") {
|
||||
$msg .= $k . " $operator ? ";
|
||||
} else {
|
||||
$msg .= "AND " . $k . " $operator ?";
|
||||
$msg .= " AND " . $k . " $operator ?";
|
||||
}
|
||||
$param[] = $v;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user