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
ae54a12e
Commit
ae54a12e
authored
Jun 26, 2021
by
luhongguang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of
https://git.yidian-inc.com:8021/bp/goods
into develop
parents
4ea17d0c
78615580
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
186 additions
and
59 deletions
+186
-59
MarketingException.php
application/exception/custom/MarketingException.php
+5
-0
Marketing.php
application/modules/Marketing/controllers/Marketing.php
+17
-1
MarketingService.php
application/services/marketing/MarketingService.php
+119
-15
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.
application/exception/custom/MarketingException.php
View file @
ae54a12e
...
@@ -21,5 +21,10 @@ class MarketingException extends BaseException
...
@@ -21,5 +21,10 @@ class MarketingException extends BaseException
7
=>
'更新失败'
,
7
=>
'更新失败'
,
8
=>
'开始时间不能为空'
,
8
=>
'开始时间不能为空'
,
9
=>
'结束时间不能为空'
,
9
=>
'结束时间不能为空'
,
10
=>
'活动时间开始不能小于等于当天日期'
,
11
=>
'活动时间结束不能小于等于当天日期'
,
12
=>
'勾选商品不能为空'
,
13
=>
'商品在其他互动已勾选'
,
14
=>
'开始时间不能大于等于结束时间'
,
];
];
}
}
\ No newline at end of file
application/modules/Marketing/controllers/Marketing.php
View file @
ae54a12e
...
@@ -19,7 +19,7 @@ class MarketingController extends Base
...
@@ -19,7 +19,7 @@ class MarketingController extends Base
}
}
/**
/**
*
添加团长
*
创建活动
* 后台管理
* 后台管理
*
*
*/
*/
...
@@ -31,6 +31,22 @@ class MarketingController extends Base
...
@@ -31,6 +31,22 @@ class MarketingController extends Base
$this
->
success
();
$this
->
success
();
}
}
}
}
/**
* op后台获取创建活动
* 需要勾选的商品
*
* @param $params
* @return array|mixed
*/
public
function
marketing_goods_listAction
()
{
$params
=
$this
->
params
;
$goodsList
=
MarketingService
::
marketingGooodsList
(
$params
);
if
(
!
empty
(
$goodsList
))
{
$this
->
success
(
$goodsList
);
}
}
...
...
application/services/marketing/MarketingService.php
View file @
ae54a12e
...
@@ -5,16 +5,62 @@ namespace App\Services\marketing;
...
@@ -5,16 +5,62 @@ namespace App\Services\marketing;
use
App\Models\marketing\mysql\Marketing
;
use
App\Models\marketing\mysql\Marketing
;
use
App\Models\marketing\mysql\MarketingGoods
;
use
App\Models\marketing\mysql\MarketingGoods
;
use
App\Models\goods\mysql\GoodsSku
;
use
Api\PhpUtils\Validate\Validate
;
use
Api\PhpUtils\Validate\Validate
;
use
Api\PhpServices\Idgen\Idgen
;
use
Api\PhpServices\Idgen\Idgen
;
use
App\Exception\custom\MarketingException
;
use
App\Exception\custom\MarketingException
;
use
Api\PhpServices\Sensitive\Sensitive
;
use
Api\PhpServices\Sensitive\Sensitive
;
class
MarketingService
class
MarketingService
{
{
/**
/**
*
查询
*
op 后台获取活动需要参加的商品
*
*
* @param $params
* @return array|mixed
*/
public
static
function
marketingGooodsList
(
$params
=
''
)
{
$startTime
=
!
empty
(
$params
[
'start_time'
])
?
$params
[
'start_time'
]
:
''
;
$endTime
=
!
empty
(
$params
[
'end_time'
])
?
$params
[
'end_time'
]
:
''
;
$goodsData
=
[
"OR"
=>
[
"start_time[>=]"
=>
$startTime
,
"end_time[>=]"
=>
$startTime
,
],
];
$tmpMarketingList
=
Marketing
::
getMarketingList
(
$goodsData
);
if
(
!
empty
(
$tmpMarketingList
))
{
$tmpMarketingId
=
array_column
(
$tmpMarketingList
,
'marketing_id'
);
}
$marketingGoodsList
=
MarketingGoods
::
marketingGoodsList
([
'marketing_id'
=>
$tmpMarketingId
]);
if
(
!
empty
(
$marketingGoodsList
))
{
$tmpGoodsSkuId
=
array_column
(
$marketingGoodsList
,
'goods_sku_id'
);
}
$where
=
[
'online_status'
=>
1
,
];
// $goodsSkuList = GoodsSku::select('*', $where);
//$goodsSkuList =GoodsSku::getRecordMaster($where);
$goodsSkuList
=
GoodsSku
::
getRecord
(
$where
);
print_r
(
$goodsSkuList
);
}
/**
* op 后台列表查询
*
* @param $params
* @return array|mixed
*/
*/
public
static
function
marketingList
(
$params
)
public
static
function
marketingList
(
$params
)
{
{
...
@@ -34,6 +80,16 @@ class MarketingService
...
@@ -34,6 +80,16 @@ class MarketingService
$where
[
'online_status'
]
=
$params
[
'online_status'
];
$where
[
'online_status'
]
=
$params
[
'online_status'
];
}
}
if
(
!
empty
(
$params
[
'goods_sku_id'
]))
{
$goodsSkuId
=
$params
[
'goods_sku_id'
];
$marketingGoodsList
=
MarketingGoods
::
marketingGoodsList
([
'goods_sku_id'
=>
$goodsSkuId
]);
$marketingId
=
array_column
(
$marketingGoodsList
,
'marketing_id'
);
if
(
!
empty
(
$where
[
'marketing_id'
]))
{
array_push
(
$marketingId
,
$where
[
'marketing_id'
]);
}
$where
[
'marketing_id'
]
=
$marketingId
;
}
$where
[
'ORDER'
]
=
[
"create_time"
=>
"DESC"
];
$where
[
'ORDER'
]
=
[
"create_time"
=>
"DESC"
];
$where
[
'LIMIT'
]
=
[
$page
,
$limit
];
$where
[
'LIMIT'
]
=
[
$page
,
$limit
];
$list
=
Marketing
::
getRecords
(
$where
);
$list
=
Marketing
::
getRecords
(
$where
);
...
@@ -44,7 +100,12 @@ class MarketingService
...
@@ -44,7 +100,12 @@ class MarketingService
return
$data
;
return
$data
;
}
}
/**
* 创建互动
*
* @param $params
* @return array|mixed
*/
public
static
function
addMarketing
(
$params
){
public
static
function
addMarketing
(
$params
){
$marketingName
=
!
empty
(
$params
[
'marketing_name'
])
?
$params
[
'marketing_name'
]
:
''
;
$marketingName
=
!
empty
(
$params
[
'marketing_name'
])
?
$params
[
'marketing_name'
]
:
''
;
...
@@ -53,23 +114,27 @@ class MarketingService
...
@@ -53,23 +114,27 @@ class MarketingService
$createUserEmail
=
!
empty
(
$params
[
'op_cur_user'
])
?
$params
[
'op_cur_user'
]
:
''
;
$createUserEmail
=
!
empty
(
$params
[
'op_cur_user'
])
?
$params
[
'op_cur_user'
]
:
''
;
$startTime
=
!
empty
(
$params
[
'start_time'
])
?
$params
[
'start_time'
]
:
''
;
$startTime
=
!
empty
(
$params
[
'start_time'
])
?
$params
[
'start_time'
]
:
''
;
$endTime
=
!
empty
(
$params
[
'end_time'
])
?
$params
[
'end_time'
]
:
''
;
$endTime
=
!
empty
(
$params
[
'end_time'
])
?
$params
[
'end_time'
]
:
''
;
$type
=
!
empty
(
$params
[
'
type'
])
?
$params
[
'
type'
]
:
1
;
$type
=
!
empty
(
$params
[
'
marketing_type'
])
?
$params
[
'marketing_
type'
]
:
1
;
$goodsSkuId
=
!
empty
(
$params
[
'goods_sku_id'
])
?
explode
(
","
,
$params
[
'goods_sku_id'
])
:
[];
$goodsSkuId
=
!
empty
(
$params
[
'goods_sku_id'
])
?
explode
(
","
,
$params
[
'goods_sku_id'
])
:
[];
if
(
empty
(
$goodsSkuId
))
{
throw
new
MarketingException
([
'cus'
=>
12
]);
}
if
(
empty
(
$marketingName
))
{
if
(
empty
(
$marketingName
))
{
throw
new
MarketingException
([
'cus'
=>
0
]);
throw
new
MarketingException
([
'cus'
=>
0
]);
}
}
//
if (empty($firstCommissionRate)) {
if
(
empty
(
$firstCommissionRate
))
{
//
throw new MarketingException(['cus'=>3]);
throw
new
MarketingException
([
'cus'
=>
3
]);
//
}
}
//
if (empty($secondCommissionRate)) {
if
(
empty
(
$secondCommissionRate
))
{
//
throw new MarketingException(['cus'=>4]);
throw
new
MarketingException
([
'cus'
=>
4
]);
//
}
}
if
(
self
::
utf8Strlen
(
$marketingName
)
>
4
0
)
{
if
(
self
::
utf8Strlen
(
$marketingName
)
>
5
0
)
{
throw
new
MarketingException
([
'cus'
=>
1
]);
throw
new
MarketingException
([
'cus'
=>
1
]);
}
}
...
@@ -78,8 +143,47 @@ class MarketingService
...
@@ -78,8 +143,47 @@ class MarketingService
}
}
if
(
empty
(
$endTime
))
{
if
(
empty
(
$endTime
))
{
throw
new
MarketingException
([
'cus'
=>
9
]);
throw
new
MarketingException
([
'cus'
=>
9
]);
}
if
(
$startTime
<=
date
(
"Y-m-d"
))
{
throw
new
MarketingException
([
'cus'
=>
10
]);
}
if
(
$endTime
<=
date
(
"Y-m-d"
))
{
throw
new
MarketingException
([
'cus'
=>
11
]);
}
if
(
$startTime
>=
$endTime
)
{
throw
new
MarketingException
([
'cus'
=>
14
]);
}
$tmpMarketingId
=
[];
$tmpGoodsSkuId
=
[];
$goodsData
=
[
"OR"
=>
[
"start_time[>=]"
=>
$startTime
,
"end_time[>=]"
=>
$startTime
,
],
];
$tmpMarketingList
=
Marketing
::
getMarketingList
(
$goodsData
);
if
(
!
empty
(
$tmpMarketingList
))
{
$tmpMarketingId
=
array_column
(
$tmpMarketingList
,
'marketing_id'
);
}
$marketingGoodsList
=
MarketingGoods
::
marketingGoodsList
([
'marketing_id'
=>
$tmpMarketingId
]);
if
(
!
empty
(
$marketingGoodsList
))
{
$tmpGoodsSkuId
=
array_column
(
$marketingGoodsList
,
'goods_sku_id'
);
}
if
(
!
empty
(
$tmpGoodsSkuId
))
{
if
(
array_intersect
(
$goodsSkuId
,
$tmpGoodsSkuId
))
{
throw
new
MarketingException
([
'cus'
=>
13
]);
}
}
}
$detectParams
=
[
$detectParams
=
[
'businessId'
=>
1
,
'businessId'
=>
1
,
...
@@ -109,7 +213,7 @@ class MarketingService
...
@@ -109,7 +213,7 @@ class MarketingService
'start_time'
=>
$startTime
,
'start_time'
=>
$startTime
,
'end_time'
=>
$endTime
,
'end_time'
=>
$endTime
,
'online_status'
=>
1
,
'online_status'
=>
1
,
'type'
=>
$type
,
'
marketing_
type'
=>
$type
,
'update_user_email'
=>
$createUserEmail
,
'update_user_email'
=>
$createUserEmail
,
'update_time'
=>
date
(
"Y-m-d H:i:s"
),
'update_time'
=>
date
(
"Y-m-d H:i:s"
),
'create_time'
=>
date
(
"Y-m-d H:i:s"
),
'create_time'
=>
date
(
"Y-m-d H:i:s"
),
...
@@ -124,8 +228,8 @@ class MarketingService
...
@@ -124,8 +228,8 @@ class MarketingService
foreach
(
$goodsSkuId
as
$key
=>
$value
)
{
foreach
(
$goodsSkuId
as
$key
=>
$value
)
{
$colums
[
$key
][
'marketing_id'
]
=
$marketingId
;
$colums
[
$key
][
'marketing_id'
]
=
$marketingId
;
$colums
[
$key
][
'goods_spu_id'
]
=
$value
;
$colums
[
$key
][
'goods_spu_id'
]
=
''
;
$colums
[
$key
][
'goods_sku_id'
]
=
''
;
$colums
[
$key
][
'goods_sku_id'
]
=
$value
;
$colums
[
$key
][
'update_time'
]
=
date
(
"Y-m-d H:i:s"
);
$colums
[
$key
][
'update_time'
]
=
date
(
"Y-m-d H:i:s"
);
$colums
[
$key
][
'create_time'
]
=
date
(
"Y-m-d H:i:s"
);
$colums
[
$key
][
'create_time'
]
=
date
(
"Y-m-d H:i:s"
);
}
}
...
...
vendor/api/php_utils/src/Mysql/MysqlBase.php
View file @
ae54a12e
...
@@ -129,7 +129,7 @@ abstract class MysqlBase
...
@@ -129,7 +129,7 @@ abstract class MysqlBase
if
(
in_array
(
$method
,
self
::
$writeFuncitonList
))
{
if
(
in_array
(
$method
,
self
::
$writeFuncitonList
))
{
// 写操作
// 写操作
$type
=
static
::
WRITE
;
$type
=
static
::
WRITE
;
self
::
$dbConnect
[
$type
]
=
self
::
getConnection
(
$type
);
self
::
$dbConnect
[
static
::
CONFIG_INDEX
.
':'
.
$type
]
=
self
::
getConnection
(
$type
);
if
(
strpos
(
$method
,
'Master'
)
!==
false
)
{
if
(
strpos
(
$method
,
'Master'
)
!==
false
)
{
$method
=
substr_replace
(
$method
,
''
,
-
6
);
$method
=
substr_replace
(
$method
,
''
,
-
6
);
}
}
...
@@ -137,7 +137,7 @@ abstract class MysqlBase
...
@@ -137,7 +137,7 @@ abstract class MysqlBase
}
elseif
(
in_array
(
$method
,
self
::
$readFunctionList
))
{
}
elseif
(
in_array
(
$method
,
self
::
$readFunctionList
))
{
// 读操作
// 读操作
$type
=
static
::
READ
;
$type
=
static
::
READ
;
self
::
$dbConnect
[
$type
]
=
self
::
getConnection
(
$type
);
self
::
$dbConnect
[
static
::
CONFIG_INDEX
.
':'
.
$type
]
=
self
::
getConnection
(
$type
);
array_unshift
(
$arguments
,
static
::
TABLE_NAME
);
array_unshift
(
$arguments
,
static
::
TABLE_NAME
);
}
elseif
(
strpos
(
$method
,
'query'
)
!==
false
)
{
}
elseif
(
strpos
(
$method
,
'query'
)
!==
false
)
{
// Medoo原生SQL操作
// Medoo原生SQL操作
...
@@ -146,17 +146,17 @@ abstract class MysqlBase
...
@@ -146,17 +146,17 @@ abstract class MysqlBase
$type
=
static
::
WRITE
;
$type
=
static
::
WRITE
;
}
}
$method
=
'query'
;
$method
=
'query'
;
self
::
$dbConnect
[
$type
]
=
self
::
getConnection
(
$type
);
self
::
$dbConnect
[
static
::
CONFIG_INDEX
.
':'
.
$type
]
=
self
::
getConnection
(
$type
);
}
else
{
}
else
{
throw
new
\Exception
(
"use undefined Medoo function:"
.
$method
.
"-"
.
json_encode
(
$arguments
));
throw
new
\Exception
(
"use undefined Medoo function:"
.
$method
.
"-"
.
json_encode
(
$arguments
));
}
}
self
::
$dbCurrentConnect
=
self
::
$dbConnect
[
$type
];
self
::
$dbCurrentConnect
=
self
::
$dbConnect
[
static
::
CONFIG_INDEX
.
':'
.
$type
];
self
::
$sqlResut
=
call_user_func_array
([
self
::
$dbConnect
[
$type
],
$method
],
$arguments
);
self
::
$sqlResut
=
call_user_func_array
([
self
::
$dbConnect
[
static
::
CONFIG_INDEX
.
':'
.
$type
],
$method
],
$arguments
);
if
(
!
self
::
catchError
(
$method
,
$arguments
))
{
if
(
!
self
::
catchError
(
$method
,
$arguments
))
{
// 如果失败重试一次
// 如果失败重试一次
self
::
$dbCurrentConnect
=
self
::
$dbConnect
[
$type
]
=
self
::
getConnection
(
$type
);
self
::
$dbCurrentConnect
=
self
::
$dbConnect
[
static
::
CONFIG_INDEX
.
':'
.
$type
]
=
self
::
getConnection
(
$type
);
self
::
$sqlResut
=
call_user_func_array
([
self
::
$dbConnect
[
$type
],
$method
],
$arguments
);
self
::
$sqlResut
=
call_user_func_array
([
self
::
$dbConnect
[
static
::
CONFIG_INDEX
.
':'
.
$type
],
$method
],
$arguments
);
if
(
!
self
::
catchError
(
$method
,
$arguments
))
{
if
(
!
self
::
catchError
(
$method
,
$arguments
))
{
return
false
;
return
false
;
}
}
...
@@ -173,11 +173,11 @@ abstract class MysqlBase
...
@@ -173,11 +173,11 @@ abstract class MysqlBase
*/
*/
public
static
function
getConnection
(
$type
,
$flush
=
false
)
public
static
function
getConnection
(
$type
,
$flush
=
false
)
{
{
if
(
!
isset
(
self
::
$dbConnect
[
$type
])
||
$flush
)
{
if
(
!
isset
(
self
::
$dbConnect
[
static
::
CONFIG_INDEX
.
':'
.
$type
])
||
$flush
)
{
self
::
$dbConnect
[
$type
]
=
new
Medoo
(
self
::
getDbConf
(
$type
));
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
...
@@ -402,13 +402,13 @@ abstract class MysqlBase
public
static
function
debug
()
public
static
function
debug
()
{
{
$type
=
static
::
WRITE
;
$type
=
static
::
WRITE
;
self
::
$dbConnect
[
$type
]
=
self
::
getConnection
(
$type
);
self
::
$dbConnect
[
static
::
CONFIG_INDEX
.
':'
.
$type
]
=
self
::
getConnection
(
$type
);
self
::
$dbConnect
[
$type
]
->
debug
();
self
::
$dbConnect
[
static
::
CONFIG_INDEX
.
':'
.
$type
]
->
debug
();
$type
=
static
::
READ
;
$type
=
static
::
READ
;
self
::
$dbConnect
[
$type
]
=
self
::
getConnection
(
$type
);
self
::
$dbConnect
[
static
::
CONFIG_INDEX
.
':'
.
$type
]
=
self
::
getConnection
(
$type
);
self
::
$dbConnect
[
$type
]
->
debug
();
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
...
@@ -420,11 +420,11 @@ abstract class MysqlBase
{
{
$ret
=
[];
$ret
=
[];
$type
=
static
::
WRITE
;
$type
=
static
::
WRITE
;
self
::
$dbConnect
[
$type
]
=
self
::
getConnection
(
$type
);
self
::
$dbConnect
[
static
::
CONFIG_INDEX
.
':'
.
$type
]
=
self
::
getConnection
(
$type
);
$ret
[
$type
]
=
self
::
$dbConnect
[
$type
]
->
log
();
$ret
[
$type
]
=
self
::
$dbConnect
[
static
::
CONFIG_INDEX
.
':'
.
$type
]
->
log
();
$type
=
static
::
READ
;
$type
=
static
::
READ
;
self
::
$dbConnect
[
$type
]
=
self
::
getConnection
(
$type
);
self
::
$dbConnect
[
static
::
CONFIG_INDEX
.
':'
.
$type
]
=
self
::
getConnection
(
$type
);
$ret
[
$type
]
=
self
::
$dbConnect
[
$type
]
->
log
();
$ret
[
$type
]
=
self
::
$dbConnect
[
static
::
CONFIG_INDEX
.
':'
.
$type
]
->
log
();
return
$ret
;
return
$ret
;
}
}
...
@@ -447,9 +447,9 @@ abstract class MysqlBase
...
@@ -447,9 +447,9 @@ abstract class MysqlBase
public
static
function
beginTransaction
()
public
static
function
beginTransaction
()
{
{
$type
=
static
::
WRITE
;
$type
=
static
::
WRITE
;
self
::
$dbConnect
[
$type
]
=
self
::
getConnection
(
$type
);
self
::
$dbConnect
[
static
::
CONFIG_INDEX
.
':'
.
$type
]
=
self
::
getConnection
(
$type
);
if
(
!
self
::
$dbConnect
[
$type
]
->
pdo
->
inTransaction
())
{
if
(
!
self
::
$dbConnect
[
static
::
CONFIG_INDEX
.
':'
.
$type
]
->
pdo
->
inTransaction
())
{
return
self
::
$dbConnect
[
$type
]
->
pdo
->
beginTransaction
();
return
self
::
$dbConnect
[
static
::
CONFIG_INDEX
.
':'
.
$type
]
->
pdo
->
beginTransaction
();
}
}
return
false
;
return
false
;
}
}
...
@@ -462,9 +462,9 @@ abstract class MysqlBase
...
@@ -462,9 +462,9 @@ abstract class MysqlBase
public
static
function
commit
()
public
static
function
commit
()
{
{
$type
=
static
::
WRITE
;
$type
=
static
::
WRITE
;
self
::
$dbConnect
[
$type
]
=
self
::
getConnection
(
$type
);
self
::
$dbConnect
[
static
::
CONFIG_INDEX
.
':'
.
$type
]
=
self
::
getConnection
(
$type
);
if
(
self
::
$dbConnect
[
$type
]
->
pdo
->
inTransaction
())
{
if
(
self
::
$dbConnect
[
static
::
CONFIG_INDEX
.
':'
.
$type
]
->
pdo
->
inTransaction
())
{
return
self
::
$dbConnect
[
$type
]
->
pdo
->
commit
();
return
self
::
$dbConnect
[
static
::
CONFIG_INDEX
.
':'
.
$type
]
->
pdo
->
commit
();
}
}
return
false
;
return
false
;
}
}
...
@@ -477,9 +477,9 @@ abstract class MysqlBase
...
@@ -477,9 +477,9 @@ abstract class MysqlBase
public
static
function
rollback
()
public
static
function
rollback
()
{
{
$type
=
static
::
WRITE
;
$type
=
static
::
WRITE
;
self
::
$dbConnect
[
$type
]
=
self
::
getConnection
(
$type
);
self
::
$dbConnect
[
static
::
CONFIG_INDEX
.
':'
.
$type
]
=
self
::
getConnection
(
$type
);
if
(
self
::
$dbConnect
[
$type
]
->
pdo
->
inTransaction
())
{
if
(
self
::
$dbConnect
[
static
::
CONFIG_INDEX
.
':'
.
$type
]
->
pdo
->
inTransaction
())
{
return
self
::
$dbConnect
[
$type
]
->
pdo
->
rollback
();
return
self
::
$dbConnect
[
static
::
CONFIG_INDEX
.
':'
.
$type
]
->
pdo
->
rollback
();
}
}
return
false
;
return
false
;
}
}
...
@@ -492,7 +492,7 @@ abstract class MysqlBase
...
@@ -492,7 +492,7 @@ abstract class MysqlBase
public
static
function
action
(
callable
$actions
)
public
static
function
action
(
callable
$actions
)
{
{
$type
=
static
::
WRITE
;
$type
=
static
::
WRITE
;
self
::
$dbConnect
[
$type
]
=
self
::
getConnection
(
$type
);
self
::
$dbConnect
[
static
::
CONFIG_INDEX
.
':'
.
$type
]
=
self
::
getConnection
(
$type
);
return
self
::
$dbConnect
[
$type
]
->
action
(
$actions
);
return
self
::
$dbConnect
[
static
::
CONFIG_INDEX
.
':'
.
$type
]
->
action
(
$actions
);
}
}
}
}
vendor/api/php_utils/src/Mysql/MysqlClusterBase.php
View file @
ae54a12e
...
@@ -198,7 +198,7 @@ abstract class MysqlClusterBase
...
@@ -198,7 +198,7 @@ abstract class MysqlClusterBase
}
}
}
}
$end_time
=
microtime
(
true
);
$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
);
return
self
::
formatResult
(
$method
,
$arguments
);
}
}
...
...
vendor/composer/InstalledVersions.php
View file @
ae54a12e
...
@@ -32,7 +32,7 @@ private static $installed = array (
...
@@ -32,7 +32,7 @@ private static $installed = array (
'aliases'
=>
'aliases'
=>
array
(
array
(
),
),
'reference'
=>
'
7111c7a581d9d2216005db71482bf7ecdb031a49
'
,
'reference'
=>
'
48662ee0ac551270f90d09cda3f0a1ab5d45c556
'
,
'name'
=>
'yidian/yaf_demo'
,
'name'
=>
'yidian/yaf_demo'
,
),
),
'versions'
=>
'versions'
=>
...
@@ -45,7 +45,7 @@ private static $installed = array (
...
@@ -45,7 +45,7 @@ private static $installed = array (
array
(
array
(
0
=>
'9999999-dev'
,
0
=>
'9999999-dev'
,
),
),
'reference'
=>
'
8db8da38dc52e83358dfcb59aa7dcc259b4a80f6
'
,
'reference'
=>
'
3a118172e1f4bb413ccbef92c037f4f3255b388a
'
,
),
),
'api/php_utils'
=>
'api/php_utils'
=>
array
(
array
(
...
@@ -55,7 +55,7 @@ private static $installed = array (
...
@@ -55,7 +55,7 @@ private static $installed = array (
array
(
array
(
0
=>
'9999999-dev'
,
0
=>
'9999999-dev'
,
),
),
'reference'
=>
'
68a14dcde67b6d838b4933550a9356e5c78060b3
'
,
'reference'
=>
'
16949fb782de0488cf192e3cd9d4e1268377294d
'
,
),
),
'bacon/bacon-qr-code'
=>
'bacon/bacon-qr-code'
=>
array
(
array
(
...
@@ -335,7 +335,7 @@ private static $installed = array (
...
@@ -335,7 +335,7 @@ private static $installed = array (
'aliases'
=>
'aliases'
=>
array
(
array
(
),
),
'reference'
=>
'
7111c7a581d9d2216005db71482bf7ecdb031a49
'
,
'reference'
=>
'
48662ee0ac551270f90d09cda3f0a1ab5d45c556
'
,
),
),
),
),
);
);
...
...
vendor/composer/autoload_classmap.php
View file @
ae54a12e
...
@@ -97,6 +97,7 @@ return array(
...
@@ -97,6 +97,7 @@ return array(
'App\\Models\\goods\\mysql\\GoodsSnapshot'
=>
$baseDir
.
'/application/models/goods/mysql/GoodsSnapshot.php'
,
'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\\GoodsSpu'
=>
$baseDir
.
'/application/models/goods/mysql/GoodsSpu.php'
,
'App\\Models\\goods\\mysql\\InventoryOperationRecord'
=>
$baseDir
.
'/application/models/goods/mysql/InventoryOperationRecord.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\\Shop'
=>
$baseDir
.
'/application/models/goods/mysql/Shop.php'
,
'App\\Models\\goods\\mysql\\Tcc'
=>
$baseDir
.
'/application/models/goods/mysql/Tcc.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'
,
'App\\Models\\marketing\\mysql\\Distributor'
=>
$baseDir
.
'/application/models/marketing/mysql/Distributor.php'
,
...
...
vendor/composer/autoload_static.php
View file @
ae54a12e
...
@@ -326,6 +326,7 @@ class ComposerStaticInit48fd9e88279ffd9162a19bdedd5d5a0a
...
@@ -326,6 +326,7 @@ class ComposerStaticInit48fd9e88279ffd9162a19bdedd5d5a0a
'App\\Models\\goods\\mysql\\GoodsSnapshot'
=>
__DIR__
.
'/../..'
.
'/application/models/goods/mysql/GoodsSnapshot.php'
,
'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\\GoodsSpu'
=>
__DIR__
.
'/../..'
.
'/application/models/goods/mysql/GoodsSpu.php'
,
'App\\Models\\goods\\mysql\\InventoryOperationRecord'
=>
__DIR__
.
'/../..'
.
'/application/models/goods/mysql/InventoryOperationRecord.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\\Shop'
=>
__DIR__
.
'/../..'
.
'/application/models/goods/mysql/Shop.php'
,
'App\\Models\\goods\\mysql\\Tcc'
=>
__DIR__
.
'/../..'
.
'/application/models/goods/mysql/Tcc.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'
,
'App\\Models\\marketing\\mysql\\Distributor'
=>
__DIR__
.
'/../..'
.
'/application/models/marketing/mysql/Distributor.php'
,
...
...
vendor/composer/installed.json
View file @
ae54a12e
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
"source"
:
{
"source"
:
{
"type"
:
"git"
,
"type"
:
"git"
,
"url"
:
"https://git.yidian-inc.com:8021/bp/php_services.git"
,
"url"
:
"https://git.yidian-inc.com:8021/bp/php_services.git"
,
"reference"
:
"
8db8da38dc52e83358dfcb59aa7dcc259b4a80f6
"
"reference"
:
"
3a118172e1f4bb413ccbef92c037f4f3255b388a
"
},
},
"require"
:
{
"require"
:
{
"api/php_utils"
:
"dev-master"
,
"api/php_utils"
:
"dev-master"
,
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
"perftools/php-profiler"
:
"^0.18.0"
,
"perftools/php-profiler"
:
"^0.18.0"
,
"php"
:
"7.2.*"
"php"
:
"7.2.*"
},
},
"time"
:
"2021-06-25T11:
08:53
+00:00"
,
"time"
:
"2021-06-25T11:
16:31
+00:00"
,
"default-branch"
:
true
,
"default-branch"
:
true
,
"type"
:
"library"
,
"type"
:
"library"
,
"installation-source"
:
"source"
,
"installation-source"
:
"source"
,
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
"source"
:
{
"source"
:
{
"type"
:
"git"
,
"type"
:
"git"
,
"url"
:
"https://git.yidian-inc.com:8021/bp/php_utils.git"
,
"url"
:
"https://git.yidian-inc.com:8021/bp/php_utils.git"
,
"reference"
:
"
68a14dcde67b6d838b4933550a9356e5c78060b3
"
"reference"
:
"
16949fb782de0488cf192e3cd9d4e1268377294d
"
},
},
"require"
:
{
"require"
:
{
"elasticsearch/elasticsearch"
:
"~7.0"
,
"elasticsearch/elasticsearch"
:
"~7.0"
,
...
@@ -46,7 +46,7 @@
...
@@ -46,7 +46,7 @@
"mongodb/mongodb"
:
"1.4.3"
,
"mongodb/mongodb"
:
"1.4.3"
,
"php"
:
"7.2.*"
"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
,
"default-branch"
:
true
,
"type"
:
"library"
,
"type"
:
"library"
,
"installation-source"
:
"source"
,
"installation-source"
:
"source"
,
...
...
vendor/composer/installed.php
View file @
ae54a12e
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
'aliases'
=>
'aliases'
=>
array
(
array
(
),
),
'reference'
=>
'
7111c7a581d9d2216005db71482bf7ecdb031a49
'
,
'reference'
=>
'
48662ee0ac551270f90d09cda3f0a1ab5d45c556
'
,
'name'
=>
'yidian/yaf_demo'
,
'name'
=>
'yidian/yaf_demo'
,
),
),
'versions'
=>
'versions'
=>
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
array
(
array
(
0
=>
'9999999-dev'
,
0
=>
'9999999-dev'
,
),
),
'reference'
=>
'
8db8da38dc52e83358dfcb59aa7dcc259b4a80f6
'
,
'reference'
=>
'
3a118172e1f4bb413ccbef92c037f4f3255b388a
'
,
),
),
'api/php_utils'
=>
'api/php_utils'
=>
array
(
array
(
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
array
(
array
(
0
=>
'9999999-dev'
,
0
=>
'9999999-dev'
,
),
),
'reference'
=>
'
68a14dcde67b6d838b4933550a9356e5c78060b3
'
,
'reference'
=>
'
16949fb782de0488cf192e3cd9d4e1268377294d
'
,
),
),
'bacon/bacon-qr-code'
=>
'bacon/bacon-qr-code'
=>
array
(
array
(
...
@@ -309,7 +309,7 @@
...
@@ -309,7 +309,7 @@
'aliases'
=>
'aliases'
=>
array
(
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