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
2f8ce9a2
Commit
2f8ce9a2
authored
Jan 09, 2019
by
chenchuanwen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updateAddOrderLog
parent
7e8c3dd8
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
8 deletions
+14
-8
GoodsCommonService.php
application/models/Business/Goods/GoodsCommonService.php
+6
-3
Goods.php
application/models/DAO/Goods.php
+4
-2
GoodsCommon.php
application/models/DAO/GoodsCommon.php
+4
-3
No files found.
application/models/Business/Goods/GoodsCommonService.php
View file @
2f8ce9a2
...
@@ -1471,7 +1471,8 @@ class GoodsCommonServiceModel extends \Business\AbstractModel
...
@@ -1471,7 +1471,8 @@ class GoodsCommonServiceModel extends \Business\AbstractModel
$goodsModel
=
\DAO\GoodsModel
::
getInstance
();
$goodsModel
=
\DAO\GoodsModel
::
getInstance
();
for
(
$i
=
0
;
$i
<
2000
;
$i
++
){
for
(
$i
=
0
;
$i
<
2000
;
$i
++
){
$goodsStr
=
$goodsModel
->
getChangedGoodsStorage
();
$goodsStr
=
$goodsModel
->
getChangedGoodsStorage
();
\Our\Log
::
getInstance
()
->
write
(
$goodsStr
,
'/data/log/apptest'
);
echo
$goodsStr
.
"
\r\n
"
;
// \Our\Log::getInstance()->write($goodsStr,'/data/log/apptest');
if
(
$goodsStr
){
if
(
$goodsStr
){
$goods
=
unserialize
(
$goodsStr
);
$goods
=
unserialize
(
$goodsStr
);
$goodsModel
->
setDb
(
\Our\DbNameConst
::
masterDBConnectName
);
$goodsModel
->
setDb
(
\Our\DbNameConst
::
masterDBConnectName
);
...
@@ -1497,9 +1498,11 @@ class GoodsCommonServiceModel extends \Business\AbstractModel
...
@@ -1497,9 +1498,11 @@ class GoodsCommonServiceModel extends \Business\AbstractModel
* @return bool
* @return bool
*/
*/
public
function
updateAllStorageForPublish
(){
public
function
updateAllStorageForPublish
(){
\Our\Log
::
getInstance
()
->
write
(
'1执行失败'
,
'/data/log/apptest'
);
echo
"1执行失败"
.
"
\r\n
"
;
//\Our\Log::getInstance()->write('1执行失败','/data/log/apptest');
$this
->
updateGoodsStorageByRedisList
();
$this
->
updateGoodsStorageByRedisList
();
\Our\Log
::
getInstance
()
->
write
(
'2执行失败'
,
'/data/log/apptest'
);
echo
"2执行失败"
;
// \Our\Log::getInstance()->write('2执行失败','/data/log/apptest');
\DAO\PBundlingModel
::
getInstance
()
->
updateStorageByRedisList
();
\DAO\PBundlingModel
::
getInstance
()
->
updateStorageByRedisList
();
return
true
;
return
true
;
...
...
application/models/DAO/Goods.php
View file @
2f8ce9a2
...
@@ -63,10 +63,12 @@ class GoodsModel extends \DAO\AbstractModel {
...
@@ -63,10 +63,12 @@ class GoodsModel extends \DAO\AbstractModel {
}*/
}*/
}
}
$sql
.=
' where goods_id = '
.
$goods
[
'goods_id'
];
$sql
.=
' where goods_id = '
.
$goods
[
'goods_id'
];
\Our\Log
::
getInstance
()
->
write
(
$sql
.
' 执行失败'
,
'/data/log/apptest'
);
echo
"
$sql
.' 执行失败'"
.
"
\r\n
"
;
// \Our\Log::getInstance()->write($sql.' 执行失败','/data/log/apptest');
$result
=
$this
->
db
->
update
(
$this
->
_tableName
)
->
query
(
$sql
);
$result
=
$this
->
db
->
update
(
$this
->
_tableName
)
->
query
(
$sql
);
if
(
$result
===
false
){
if
(
$result
===
false
){
\Our\Log
::
getInstance
()
->
write
(
$sql
.
' 执行失败'
);
echo
$sql
.
"执行失败"
;
//\Our\Log::getInstance()->write($sql.' 执行失败');
}
}
return
$result
;
return
$result
;
}
}
...
...
application/models/DAO/GoodsCommon.php
View file @
2f8ce9a2
...
@@ -270,11 +270,12 @@ class GoodsCommonModel extends \DAO\AbstractModel {
...
@@ -270,11 +270,12 @@ class GoodsCommonModel extends \DAO\AbstractModel {
}
}
}
}
$sql
.=
' where goods_commonid = '
.
$goods
[
'goods_commonid'
];
$sql
.=
' where goods_commonid = '
.
$goods
[
'goods_commonid'
];
echo
$sql
.
' 执行失败273行'
;
\Our\Log
::
getInstance
()
->
write
(
$sql
.
' 执行失败'
,
'/data/log/apptest'
);
//
\Our\Log::getInstance()->write($sql.' 执行失败','/data/log/apptest');
$result
=
$this
->
db
->
update
(
$this
->
_tableName
)
->
query
(
$sql
);
$result
=
$this
->
db
->
update
(
$this
->
_tableName
)
->
query
(
$sql
);
if
(
$result
===
false
){
if
(
$result
===
false
){
\Our\Log
::
getInstance
()
->
write
(
$sql
.
' 执行失败'
);
echo
$sql
.
' 执行失败 GoodsCommon277行'
.
"
\r\n
"
;
//\Our\Log::getInstance()->write($sql.' 执行失败');
}
}
return
$result
;
return
$result
;
}
}
...
...
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