Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
goods
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bp
goods
Commits
78615580
Commit
78615580
authored
Jun 26, 2021
by
jianghaiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update:set
parent
48662ee0
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
45 additions
and
43 deletions
+45
-43
MysqlBase.php
vendor/api/php_utils/src/Mysql/MysqlBase.php
+30
-30
MysqlClusterBase.php
vendor/api/php_utils/src/Mysql/MysqlClusterBase.php
+1
-1
InstalledVersions.php
vendor/composer/InstalledVersions.php
+4
-4
autoload_classmap.php
vendor/composer/autoload_classmap.php
+1
-0
autoload_static.php
vendor/composer/autoload_static.php
+1
-0
installed.json
vendor/composer/installed.json
+4
-4
installed.php
vendor/composer/installed.php
+4
-4
No files found.
vendor/api/php_utils/src/Mysql/MysqlBase.php
View file @
78615580
...
...
@@ -129,7 +129,7 @@ abstract class MysqlBase
if
(
in_array
(
$method
,
self
::
$writeFuncitonList
))
{
// 写操作
$type
=
static
::
WRITE
;
self
::
$dbConnect
[
$type
]
=
self
::
getConnection
(
$type
);
self
::
$dbConnect
[
static
::
CONFIG_INDEX
.
':'
.
$type
]
=
self
::
getConnection
(
$type
);
if
(
strpos
(
$method
,
'Master'
)
!==
false
)
{
$method
=
substr_replace
(
$method
,
''
,
-
6
);
}
...
...
@@ -137,7 +137,7 @@ abstract class MysqlBase
}
elseif
(
in_array
(
$method
,
self
::
$readFunctionList
))
{
// 读操作
$type
=
static
::
READ
;
self
::
$dbConnect
[
$type
]
=
self
::
getConnection
(
$type
);
self
::
$dbConnect
[
static
::
CONFIG_INDEX
.
':'
.
$type
]
=
self
::
getConnection
(
$type
);
array_unshift
(
$arguments
,
static
::
TABLE_NAME
);
}
elseif
(
strpos
(
$method
,
'query'
)
!==
false
)
{
// Medoo原生SQL操作
...
...
@@ -146,17 +146,17 @@ abstract class MysqlBase
$type
=
static
::
WRITE
;
}
$method
=
'query'
;
self
::
$dbConnect
[
$type
]
=
self
::
getConnection
(
$type
);
self
::
$dbConnect
[
static
::
CONFIG_INDEX
.
':'
.
$type
]
=
self
::
getConnection
(
$type
);
}
else
{
throw
new
\Exception
(
"use undefined Medoo function:"
.
$method
.
"-"
.
json_encode
(
$arguments
));
}
self
::
$dbCurrentConnect
=
self
::
$dbConnect
[
$type
];
self
::
$sqlResut
=
call_user_func_array
([
self
::
$dbConnect
[
$type
],
$method
],
$arguments
);
self
::
$dbCurrentConnect
=
self
::
$dbConnect
[
static
::
CONFIG_INDEX
.
':'
.
$type
];
self
::
$sqlResut
=
call_user_func_array
([
self
::
$dbConnect
[
static
::
CONFIG_INDEX
.
':'
.
$type
],
$method
],
$arguments
);
if
(
!
self
::
catchError
(
$method
,
$arguments
))
{
// 如果失败重试一次
self
::
$dbCurrentConnect
=
self
::
$dbConnect
[
$type
]
=
self
::
getConnection
(
$type
);
self
::
$sqlResut
=
call_user_func_array
([
self
::
$dbConnect
[
$type
],
$method
],
$arguments
);
self
::
$dbCurrentConnect
=
self
::
$dbConnect
[
static
::
CONFIG_INDEX
.
':'
.
$type
]
=
self
::
getConnection
(
$type
);
self
::
$sqlResut
=
call_user_func_array
([
self
::
$dbConnect
[
static
::
CONFIG_INDEX
.
':'
.
$type
],
$method
],
$arguments
);
if
(
!
self
::
catchError
(
$method
,
$arguments
))
{
return
false
;
}
...
...
@@ -173,11 +173,11 @@ abstract class MysqlBase
*/
public
static
function
getConnection
(
$type
,
$flush
=
false
)
{
if
(
!
isset
(
self
::
$dbConnect
[
$type
])
||
$flush
)
{
self
::
$dbConnect
[
$type
]
=
new
Medoo
(
self
::
getDbConf
(
$type
));
if
(
!
isset
(
self
::
$dbConnect
[
static
::
CONFIG_INDEX
.
':'
.
$type
])
||
$flush
)
{
self
::
$dbConnect
[
static
::
CONFIG_INDEX
.
':'
.
$type
]
=
new
Medoo
(
self
::
getDbConf
(
$type
));
}
return
self
::
$dbConnect
[
$type
];
return
self
::
$dbConnect
[
static
::
CONFIG_INDEX
.
':'
.
$type
];
}
/**
...
...
@@ -402,13 +402,13 @@ abstract class MysqlBase
public
static
function
debug
()
{
$type
=
static
::
WRITE
;
self
::
$dbConnect
[
$type
]
=
self
::
getConnection
(
$type
);
self
::
$dbConnect
[
$type
]
->
debug
();
self
::
$dbConnect
[
static
::
CONFIG_INDEX
.
':'
.
$type
]
=
self
::
getConnection
(
$type
);
self
::
$dbConnect
[
static
::
CONFIG_INDEX
.
':'
.
$type
]
->
debug
();
$type
=
static
::
READ
;
self
::
$dbConnect
[
$type
]
=
self
::
getConnection
(
$type
);
self
::
$dbConnect
[
$type
]
->
debug
();
self
::
$dbConnect
[
static
::
CONFIG_INDEX
.
':'
.
$type
]
=
self
::
getConnection
(
$type
);
self
::
$dbConnect
[
static
::
CONFIG_INDEX
.
':'
.
$type
]
->
debug
();
return
[
static
::
WRITE
=>
self
::
$dbConnect
[
static
::
WRITE
],
static
::
READ
=>
self
::
$dbConnect
[
static
::
READ
]];
return
[
static
::
CONFIG_INDEX
.
':'
.
static
::
WRITE
=>
self
::
$dbConnect
[
static
::
CONFIG_INDEX
.
':'
.
static
::
WRITE
],
static
::
CONFIG_INDEX
.
':'
.
static
::
READ
=>
self
::
$dbConnect
[
static
::
CONFIG_INDEX
.
':'
.
static
::
READ
]];
}
/**
...
...
@@ -420,11 +420,11 @@ abstract class MysqlBase
{
$ret
=
[];
$type
=
static
::
WRITE
;
self
::
$dbConnect
[
$type
]
=
self
::
getConnection
(
$type
);
$ret
[
$type
]
=
self
::
$dbConnect
[
$type
]
->
log
();
self
::
$dbConnect
[
static
::
CONFIG_INDEX
.
':'
.
$type
]
=
self
::
getConnection
(
$type
);
$ret
[
$type
]
=
self
::
$dbConnect
[
static
::
CONFIG_INDEX
.
':'
.
$type
]
->
log
();
$type
=
static
::
READ
;
self
::
$dbConnect
[
$type
]
=
self
::
getConnection
(
$type
);
$ret
[
$type
]
=
self
::
$dbConnect
[
$type
]
->
log
();
self
::
$dbConnect
[
static
::
CONFIG_INDEX
.
':'
.
$type
]
=
self
::
getConnection
(
$type
);
$ret
[
$type
]
=
self
::
$dbConnect
[
static
::
CONFIG_INDEX
.
':'
.
$type
]
->
log
();
return
$ret
;
}
...
...
@@ -447,9 +447,9 @@ abstract class MysqlBase
public
static
function
beginTransaction
()
{
$type
=
static
::
WRITE
;
self
::
$dbConnect
[
$type
]
=
self
::
getConnection
(
$type
);
if
(
!
self
::
$dbConnect
[
$type
]
->
pdo
->
inTransaction
())
{
return
self
::
$dbConnect
[
$type
]
->
pdo
->
beginTransaction
();
self
::
$dbConnect
[
static
::
CONFIG_INDEX
.
':'
.
$type
]
=
self
::
getConnection
(
$type
);
if
(
!
self
::
$dbConnect
[
static
::
CONFIG_INDEX
.
':'
.
$type
]
->
pdo
->
inTransaction
())
{
return
self
::
$dbConnect
[
static
::
CONFIG_INDEX
.
':'
.
$type
]
->
pdo
->
beginTransaction
();
}
return
false
;
}
...
...
@@ -462,9 +462,9 @@ abstract class MysqlBase
public
static
function
commit
()
{
$type
=
static
::
WRITE
;
self
::
$dbConnect
[
$type
]
=
self
::
getConnection
(
$type
);
if
(
self
::
$dbConnect
[
$type
]
->
pdo
->
inTransaction
())
{
return
self
::
$dbConnect
[
$type
]
->
pdo
->
commit
();
self
::
$dbConnect
[
static
::
CONFIG_INDEX
.
':'
.
$type
]
=
self
::
getConnection
(
$type
);
if
(
self
::
$dbConnect
[
static
::
CONFIG_INDEX
.
':'
.
$type
]
->
pdo
->
inTransaction
())
{
return
self
::
$dbConnect
[
static
::
CONFIG_INDEX
.
':'
.
$type
]
->
pdo
->
commit
();
}
return
false
;
}
...
...
@@ -477,9 +477,9 @@ abstract class MysqlBase
public
static
function
rollback
()
{
$type
=
static
::
WRITE
;
self
::
$dbConnect
[
$type
]
=
self
::
getConnection
(
$type
);
if
(
self
::
$dbConnect
[
$type
]
->
pdo
->
inTransaction
())
{
return
self
::
$dbConnect
[
$type
]
->
pdo
->
rollback
();
self
::
$dbConnect
[
static
::
CONFIG_INDEX
.
':'
.
$type
]
=
self
::
getConnection
(
$type
);
if
(
self
::
$dbConnect
[
static
::
CONFIG_INDEX
.
':'
.
$type
]
->
pdo
->
inTransaction
())
{
return
self
::
$dbConnect
[
static
::
CONFIG_INDEX
.
':'
.
$type
]
->
pdo
->
rollback
();
}
return
false
;
}
...
...
@@ -492,7 +492,7 @@ abstract class MysqlBase
public
static
function
action
(
callable
$actions
)
{
$type
=
static
::
WRITE
;
self
::
$dbConnect
[
$type
]
=
self
::
getConnection
(
$type
);
return
self
::
$dbConnect
[
$type
]
->
action
(
$actions
);
self
::
$dbConnect
[
static
::
CONFIG_INDEX
.
':'
.
$type
]
=
self
::
getConnection
(
$type
);
return
self
::
$dbConnect
[
static
::
CONFIG_INDEX
.
':'
.
$type
]
->
action
(
$actions
);
}
}
vendor/api/php_utils/src/Mysql/MysqlClusterBase.php
View file @
78615580
...
...
@@ -198,7 +198,7 @@ abstract class MysqlClusterBase
}
}
$end_time
=
microtime
(
true
);
MonUtil
::
dbMon
(
self
::
dbCurrentConnect
[
'server'
]
.
'_'
.
self
::
dbCurrentConnect
[
'port'
]
??
'unknow_mysql'
,
$method
,
'mysql'
,
$end_time
-
$start_time
);
MonUtil
::
dbMon
(
self
::
$dbCurrentConnect
[
'server'
]
.
'_'
.
self
::
$dbCurrentConnect
[
'port'
]
??
'unknow_mysql'
,
$method
,
'mysql'
,
$end_time
-
$start_time
);
return
self
::
formatResult
(
$method
,
$arguments
);
}
...
...
vendor/composer/InstalledVersions.php
View file @
78615580
...
...
@@ -32,7 +32,7 @@ private static $installed = array (
'aliases'
=>
array
(
),
'reference'
=>
'
7111c7a581d9d2216005db71482bf7ecdb031a49
'
,
'reference'
=>
'
48662ee0ac551270f90d09cda3f0a1ab5d45c556
'
,
'name'
=>
'yidian/yaf_demo'
,
),
'versions'
=>
...
...
@@ -45,7 +45,7 @@ private static $installed = array (
array
(
0
=>
'9999999-dev'
,
),
'reference'
=>
'
8db8da38dc52e83358dfcb59aa7dcc259b4a80f6
'
,
'reference'
=>
'
3a118172e1f4bb413ccbef92c037f4f3255b388a
'
,
),
'api/php_utils'
=>
array
(
...
...
@@ -55,7 +55,7 @@ private static $installed = array (
array
(
0
=>
'9999999-dev'
,
),
'reference'
=>
'
68a14dcde67b6d838b4933550a9356e5c78060b3
'
,
'reference'
=>
'
16949fb782de0488cf192e3cd9d4e1268377294d
'
,
),
'bacon/bacon-qr-code'
=>
array
(
...
...
@@ -335,7 +335,7 @@ private static $installed = array (
'aliases'
=>
array
(
),
'reference'
=>
'
7111c7a581d9d2216005db71482bf7ecdb031a49
'
,
'reference'
=>
'
48662ee0ac551270f90d09cda3f0a1ab5d45c556
'
,
),
),
);
...
...
vendor/composer/autoload_classmap.php
View file @
78615580
...
...
@@ -97,6 +97,7 @@ return array(
'App\\Models\\goods\\mysql\\GoodsSnapshot'
=>
$baseDir
.
'/application/models/goods/mysql/GoodsSnapshot.php'
,
'App\\Models\\goods\\mysql\\GoodsSpu'
=>
$baseDir
.
'/application/models/goods/mysql/GoodsSpu.php'
,
'App\\Models\\goods\\mysql\\InventoryOperationRecord'
=>
$baseDir
.
'/application/models/goods/mysql/InventoryOperationRecord.php'
,
'App\\Models\\goods\\mysql\\PaySuccessGoodsCallbackRecord'
=>
$baseDir
.
'/application/models/goods/mysql/PaySuccessGoodsCallbackRecord.php'
,
'App\\Models\\goods\\mysql\\Shop'
=>
$baseDir
.
'/application/models/goods/mysql/Shop.php'
,
'App\\Models\\goods\\mysql\\Tcc'
=>
$baseDir
.
'/application/models/goods/mysql/Tcc.php'
,
'App\\Models\\marketing\\mysql\\Distributor'
=>
$baseDir
.
'/application/models/marketing/mysql/Distributor.php'
,
...
...
vendor/composer/autoload_static.php
View file @
78615580
...
...
@@ -326,6 +326,7 @@ class ComposerStaticInit48fd9e88279ffd9162a19bdedd5d5a0a
'App\\Models\\goods\\mysql\\GoodsSnapshot'
=>
__DIR__
.
'/../..'
.
'/application/models/goods/mysql/GoodsSnapshot.php'
,
'App\\Models\\goods\\mysql\\GoodsSpu'
=>
__DIR__
.
'/../..'
.
'/application/models/goods/mysql/GoodsSpu.php'
,
'App\\Models\\goods\\mysql\\InventoryOperationRecord'
=>
__DIR__
.
'/../..'
.
'/application/models/goods/mysql/InventoryOperationRecord.php'
,
'App\\Models\\goods\\mysql\\PaySuccessGoodsCallbackRecord'
=>
__DIR__
.
'/../..'
.
'/application/models/goods/mysql/PaySuccessGoodsCallbackRecord.php'
,
'App\\Models\\goods\\mysql\\Shop'
=>
__DIR__
.
'/../..'
.
'/application/models/goods/mysql/Shop.php'
,
'App\\Models\\goods\\mysql\\Tcc'
=>
__DIR__
.
'/../..'
.
'/application/models/goods/mysql/Tcc.php'
,
'App\\Models\\marketing\\mysql\\Distributor'
=>
__DIR__
.
'/../..'
.
'/application/models/marketing/mysql/Distributor.php'
,
...
...
vendor/composer/installed.json
View file @
78615580
...
...
@@ -7,7 +7,7 @@
"source"
:
{
"type"
:
"git"
,
"url"
:
"https://git.yidian-inc.com:8021/bp/php_services.git"
,
"reference"
:
"
8db8da38dc52e83358dfcb59aa7dcc259b4a80f6
"
"reference"
:
"
3a118172e1f4bb413ccbef92c037f4f3255b388a
"
},
"require"
:
{
"api/php_utils"
:
"dev-master"
,
...
...
@@ -15,7 +15,7 @@
"perftools/php-profiler"
:
"^0.18.0"
,
"php"
:
"7.2.*"
},
"time"
:
"2021-06-25T11:
08:53
+00:00"
,
"time"
:
"2021-06-25T11:
16:31
+00:00"
,
"default-branch"
:
true
,
"type"
:
"library"
,
"installation-source"
:
"source"
,
...
...
@@ -34,7 +34,7 @@
"source"
:
{
"type"
:
"git"
,
"url"
:
"https://git.yidian-inc.com:8021/bp/php_utils.git"
,
"reference"
:
"
68a14dcde67b6d838b4933550a9356e5c78060b3
"
"reference"
:
"
16949fb782de0488cf192e3cd9d4e1268377294d
"
},
"require"
:
{
"elasticsearch/elasticsearch"
:
"~7.0"
,
...
...
@@ -46,7 +46,7 @@
"mongodb/mongodb"
:
"1.4.3"
,
"php"
:
"7.2.*"
},
"time"
:
"2021-06-2
5T07:16:2
8+00:00"
,
"time"
:
"2021-06-2
6T06:31:4
8+00:00"
,
"default-branch"
:
true
,
"type"
:
"library"
,
"installation-source"
:
"source"
,
...
...
vendor/composer/installed.php
View file @
78615580
...
...
@@ -6,7 +6,7 @@
'aliases'
=>
array
(
),
'reference'
=>
'
7111c7a581d9d2216005db71482bf7ecdb031a49
'
,
'reference'
=>
'
48662ee0ac551270f90d09cda3f0a1ab5d45c556
'
,
'name'
=>
'yidian/yaf_demo'
,
),
'versions'
=>
...
...
@@ -19,7 +19,7 @@
array
(
0
=>
'9999999-dev'
,
),
'reference'
=>
'
8db8da38dc52e83358dfcb59aa7dcc259b4a80f6
'
,
'reference'
=>
'
3a118172e1f4bb413ccbef92c037f4f3255b388a
'
,
),
'api/php_utils'
=>
array
(
...
...
@@ -29,7 +29,7 @@
array
(
0
=>
'9999999-dev'
,
),
'reference'
=>
'
68a14dcde67b6d838b4933550a9356e5c78060b3
'
,
'reference'
=>
'
16949fb782de0488cf192e3cd9d4e1268377294d
'
,
),
'bacon/bacon-qr-code'
=>
array
(
...
...
@@ -309,7 +309,7 @@
'aliases'
=>
array
(
),
'reference'
=>
'
7111c7a581d9d2216005db71482bf7ecdb031a49
'
,
'reference'
=>
'
48662ee0ac551270f90d09cda3f0a1ab5d45c556
'
,
),
),
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment