1
This commit is contained in:
parent
9dd5b83c34
commit
e1ed493313
@ -44,7 +44,9 @@ class IndexController extends BaseApiController
|
|||||||
|
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
return json([1]);
|
$now_money=$this->request->get('money');
|
||||||
|
$a= (new User())->update(['now_money'=>$now_money],['id'=>366]);
|
||||||
|
return json($a);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -196,15 +196,15 @@ class User extends BaseModel
|
|||||||
})->field("FROM_UNIXTIME($create_time,'$timeType') as days,count(id) as num")->group('days')->select()->toArray();
|
})->field("FROM_UNIXTIME($create_time,'$timeType') as days,count(id) as num")->group('days')->select()->toArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
// public static function onBeforeUpdate($data)
|
public static function onBeforeWrite($data)
|
||||||
// {
|
{
|
||||||
// var_dump($data->toArray());
|
var_dump($data->toArray());
|
||||||
// channelLog($data->toArray()??[], 'user', '更新前');
|
channelLog($data->toArray()??[], 'user', '更新前');
|
||||||
// }
|
}
|
||||||
// public static function onAfterUpdate($data)
|
public static function onAfterWrite($data)
|
||||||
// {
|
{
|
||||||
// var_dump($data->toArray());
|
var_dump($data->toArray());
|
||||||
|
|
||||||
// channelLog($data->toArray()??[], 'user', '更新后');
|
channelLog($data->toArray()??[], 'user', '更新后');
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
"php": ">=8.1",
|
"php": ">=8.1",
|
||||||
"workerman/webman-framework": "^1.5.22",
|
"workerman/webman-framework": "^1.5.22",
|
||||||
"monolog/monolog": "^2.2",
|
"monolog/monolog": "^2.2",
|
||||||
"webman/think-orm": "v1.1.1",
|
"webman/think-orm": "v1.1.3",
|
||||||
"vlucas/phpdotenv": "^5.4",
|
"vlucas/phpdotenv": "^5.4",
|
||||||
"psr/container": "^1.1.1",
|
"psr/container": "^1.1.1",
|
||||||
"ext-json": "*",
|
"ext-json": "*",
|
||||||
|
22
composer.lock
generated
22
composer.lock
generated
@ -4,7 +4,7 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "fb2dcd2b6d5f80016cfae906588f8bb9",
|
"content-hash": "883e9ccf0087df3fcbef974d5c9317f3",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "aliyuncs/oss-sdk-php",
|
"name": "aliyuncs/oss-sdk-php",
|
||||||
@ -7319,23 +7319,17 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "webman/think-orm",
|
"name": "webman/think-orm",
|
||||||
"version": "v1.1.1",
|
"version": "v1.1.3",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/webman-php/think-orm.git",
|
"url": "https://github.com/webman-php/think-orm.git",
|
||||||
"reference": "9f1e525c5c4b5a2e1eee6a4f82ef5d23c69139a2"
|
"reference": "1c20a9bbedf8a3c0b741f19b175eb929907101c6"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/webman-php/think-orm/zipball/9f1e525c5c4b5a2e1eee6a4f82ef5d23c69139a2",
|
"url": "https://api.github.com/repos/webman-php/think-orm/zipball/1c20a9bbedf8a3c0b741f19b175eb929907101c6",
|
||||||
"reference": "9f1e525c5c4b5a2e1eee6a4f82ef5d23c69139a2",
|
"reference": "1c20a9bbedf8a3c0b741f19b175eb929907101c6",
|
||||||
"shasum": "",
|
"shasum": ""
|
||||||
"mirrors": [
|
|
||||||
{
|
|
||||||
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
|
|
||||||
"preferred": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"topthink/think-orm": "^2.0.53 || ^3.0.0",
|
"topthink/think-orm": "^2.0.53 || ^3.0.0",
|
||||||
@ -7353,9 +7347,9 @@
|
|||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/webman-php/think-orm/issues",
|
"issues": "https://github.com/webman-php/think-orm/issues",
|
||||||
"source": "https://github.com/webman-php/think-orm/tree/v1.1.1"
|
"source": "https://github.com/webman-php/think-orm/tree/v1.1.3"
|
||||||
},
|
},
|
||||||
"time": "2023-04-23T14:40:18+00:00"
|
"time": "2024-08-14T03:46:14+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "webmozart/assert",
|
"name": "webmozart/assert",
|
||||||
|
14
vendor/composer/installed.json
vendored
14
vendor/composer/installed.json
vendored
@ -7268,24 +7268,24 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "webman/think-orm",
|
"name": "webman/think-orm",
|
||||||
"version": "v1.1.1",
|
"version": "v1.1.3",
|
||||||
"version_normalized": "1.1.1.0",
|
"version_normalized": "1.1.3.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/webman-php/think-orm.git",
|
"url": "https://github.com/webman-php/think-orm.git",
|
||||||
"reference": "9f1e525c5c4b5a2e1eee6a4f82ef5d23c69139a2"
|
"reference": "1c20a9bbedf8a3c0b741f19b175eb929907101c6"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/webman-php/think-orm/zipball/9f1e525c5c4b5a2e1eee6a4f82ef5d23c69139a2",
|
"url": "https://api.github.com/repos/webman-php/think-orm/zipball/1c20a9bbedf8a3c0b741f19b175eb929907101c6",
|
||||||
"reference": "9f1e525c5c4b5a2e1eee6a4f82ef5d23c69139a2",
|
"reference": "1c20a9bbedf8a3c0b741f19b175eb929907101c6",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"topthink/think-orm": "^2.0.53 || ^3.0.0",
|
"topthink/think-orm": "^2.0.53 || ^3.0.0",
|
||||||
"workerman/webman-framework": "^1.2.1"
|
"workerman/webman-framework": "^1.2.1"
|
||||||
},
|
},
|
||||||
"time": "2023-04-23T14:40:18+00:00",
|
"time": "2024-08-14T03:46:14+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"installation-source": "dist",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
@ -7299,7 +7299,7 @@
|
|||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/webman-php/think-orm/issues",
|
"issues": "https://github.com/webman-php/think-orm/issues",
|
||||||
"source": "https://github.com/webman-php/think-orm/tree/v1.1.1"
|
"source": "https://github.com/webman-php/think-orm/tree/v1.1.3"
|
||||||
},
|
},
|
||||||
"install-path": "../webman/think-orm"
|
"install-path": "../webman/think-orm"
|
||||||
},
|
},
|
||||||
|
6
vendor/composer/installed.php
vendored
6
vendor/composer/installed.php
vendored
@ -993,9 +993,9 @@
|
|||||||
'dev_requirement' => false,
|
'dev_requirement' => false,
|
||||||
),
|
),
|
||||||
'webman/think-orm' => array(
|
'webman/think-orm' => array(
|
||||||
'pretty_version' => 'v1.1.1',
|
'pretty_version' => 'v1.1.3',
|
||||||
'version' => '1.1.1.0',
|
'version' => '1.1.3.0',
|
||||||
'reference' => '9f1e525c5c4b5a2e1eee6a4f82ef5d23c69139a2',
|
'reference' => '1c20a9bbedf8a3c0b741f19b175eb929907101c6',
|
||||||
'type' => 'library',
|
'type' => 'library',
|
||||||
'install_path' => __DIR__ . '/../webman/think-orm',
|
'install_path' => __DIR__ . '/../webman/think-orm',
|
||||||
'aliases' => array(),
|
'aliases' => array(),
|
||||||
|
2
vendor/webman/think-orm/src/ThinkOrm.php
vendored
2
vendor/webman/think-orm/src/ThinkOrm.php
vendored
@ -40,7 +40,7 @@ class ThinkOrm implements Bootstrap
|
|||||||
}
|
}
|
||||||
foreach ($instances as $connection) {
|
foreach ($instances as $connection) {
|
||||||
/* @var \think\db\connector\Mysql $connection */
|
/* @var \think\db\connector\Mysql $connection */
|
||||||
if (in_array($connection->getConfig('type'), ['mysql', 'oracle', 'sqlsrv'])) {
|
if (in_array($connection->getConfig('type'), ['mysql', 'oracle', 'sqlsrv']) && method_exists($connection, 'getPdo') && $connection->getPdo()) {
|
||||||
try {
|
try {
|
||||||
$connection->query('select 1');
|
$connection->query('select 1');
|
||||||
} catch (Throwable $e) {}
|
} catch (Throwable $e) {}
|
||||||
|
@ -27,8 +27,6 @@ return [
|
|||||||
'prefix' => '',
|
'prefix' => '',
|
||||||
// 断线重连
|
// 断线重连
|
||||||
'break_reconnect' => true,
|
'break_reconnect' => true,
|
||||||
// 关闭SQL监听日志
|
|
||||||
'trigger_sql' => false,
|
|
||||||
// 自定义分页类
|
// 自定义分页类
|
||||||
'bootstrap' => ''
|
'bootstrap' => ''
|
||||||
],
|
],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user