Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
my-yaf-project
Project
Project
Details
Activity
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
chenchuanwen
my-yaf-project
Commits
10a09617
Commit
10a09617
authored
Jan 04, 2019
by
liuyuzhen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'lyz' of git.shenbd.com:qm-develop/shenbd into lyz_version1
parents
406b4311
2a5d1e5e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
OrderConfirmUtil.php
application/library/Order/OrderConfirmUtil.php
+2
-2
PBundling.php
application/models/DAO/PBundling.php
+2
-2
No files found.
application/library/Order/OrderConfirmUtil.php
View file @
10a09617
...
@@ -933,7 +933,7 @@ class OrderConfirmUtil {
...
@@ -933,7 +933,7 @@ class OrderConfirmUtil {
if
(
$blGoodsList
){
if
(
$blGoodsList
){
$dbName
=
\Our\DbNameConst
::
masterDBConnectName
;
$dbName
=
\Our\DbNameConst
::
masterDBConnectName
;
$pBundlingDao
=
\DAO\PBundlingModel
::
getInstance
(
$dbName
);
$pBundlingDao
=
\DAO\PBundlingModel
::
getInstance
(
$dbName
);
$pBundlingResult
=
$pBundlingDao
->
updateBlStorage
(
$blGoodsList
);
$pBundlingResult
=
$pBundlingDao
->
updateBlStorage
(
$blGoodsList
,
$op
);
if
(
!
$pBundlingResult
){
if
(
!
$pBundlingResult
){
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
blGoodsStorageToDBFailedForOrder
);
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
blGoodsStorageToDBFailedForOrder
);
}
}
...
@@ -970,7 +970,7 @@ class OrderConfirmUtil {
...
@@ -970,7 +970,7 @@ class OrderConfirmUtil {
$goodsDao
=
\DAO\GoodsModel
::
getInstance
();
$goodsDao
=
\DAO\GoodsModel
::
getInstance
();
if
(
$blGoodsList
){
if
(
$blGoodsList
){
foreach
(
$blGoodsList
as
$key
=>
$blGoods
){
foreach
(
$blGoodsList
as
$key
=>
$blGoods
){
$pBundlingCacheResult
=
$pBundlingDao
->
opBlGoodsStorage
(
$key
,
$blGoods
[
'blStorage'
]);
//组合销售库存删减
$pBundlingCacheResult
=
$pBundlingDao
->
opBlGoodsStorage
(
$key
,
$blGoods
[
'blStorage'
]
,
$op
);
//组合销售库存删减
if
(
$pBundlingCacheResult
===
false
){
if
(
$pBundlingCacheResult
===
false
){
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
blGoodsStorageToCacheFailedForOrder
);
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
blGoodsStorageToCacheFailedForOrder
);
}
}
...
...
application/models/DAO/PBundling.php
View file @
10a09617
...
@@ -125,7 +125,7 @@ class PBundlingModel extends \DAO\AbstractModel {
...
@@ -125,7 +125,7 @@ class PBundlingModel extends \DAO\AbstractModel {
return
$result
;
return
$result
;
}
}
public
function
updateBlStorage
(
$dataList
){
public
function
updateBlStorage
(
$dataList
,
$op
=
\Our\ApiConst
::
minus
){
$datas
=
array_values
(
$dataList
);
$datas
=
array_values
(
$dataList
);
$this
->
setDb
(
\Our\DbNameConst
::
masterDBConnectName
);
$this
->
setDb
(
\Our\DbNameConst
::
masterDBConnectName
);
$error
=
0
;
$error
=
0
;
...
@@ -133,7 +133,7 @@ class PBundlingModel extends \DAO\AbstractModel {
...
@@ -133,7 +133,7 @@ class PBundlingModel extends \DAO\AbstractModel {
$updateAllSql
=
$baseSql
;
$updateAllSql
=
$baseSql
;
$dataIds
=
array
();
$dataIds
=
array
();
for
(
$i
=
0
;
$i
<
count
(
$datas
);
$i
++
)
{
for
(
$i
=
0
;
$i
<
count
(
$datas
);
$i
++
)
{
$updateSql
=
\Our\Common
::
format
(
" WHEN
{
0
}
THEN bl_storage
-
{
1
}
"
,
$datas
[
$i
][
'blId'
],
$datas
[
$i
][
'blStorage'
]);
$updateSql
=
\Our\Common
::
format
(
" WHEN
{
0
}
THEN bl_storage
{
2}{1
}
"
,
$datas
[
$i
][
'blId'
],
$datas
[
$i
][
'blStorage'
],
\Our\ArrayConst
::
ops
[
$op
]);
$dataIds
[]
=
$datas
[
$i
][
'blId'
];
$dataIds
[]
=
$datas
[
$i
][
'blId'
];
$updateAllSql
.=
$updateSql
;
$updateAllSql
.=
$updateSql
;
if
(
$i
%
1000
==
0
&&
$i
!=
0
)
{
if
(
$i
%
1000
==
0
&&
$i
!=
0
)
{
...
...
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