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
ae71e50a
Commit
ae71e50a
authored
Sep 06, 2018
by
liuyuzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试购物车
parent
5f058bd6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
Goods.php
application/models/DAO/Goods.php
+3
-3
StoreTopSaleGoods.php
application/models/DAO/Goods/StoreTopSaleGoods.php
+1
-1
LinkMySQL.php
application/models/Mysql/LinkMySQL.php
+1
-1
No files found.
application/models/DAO/Goods.php
View file @
ae71e50a
...
...
@@ -313,12 +313,12 @@ class GoodsModel extends \DAO\AbstractModel {
$updateAllSql
=
$baseSql
;
$dataIds
=
array
();
for
(
$i
=
0
;
$i
<
count
(
$datas
);
$i
++
)
{
$updateSql
=
\Our\Common
::
format
(
" WHEN
{
0
}
THEN goods_storage
{
2}{1
}
,"
,
$datas
[
$i
][
'goodsId'
],
$datas
[
$i
][
'goodsNum'
],
\Our\ArrayConst
::
ops
[
$op
]);
$updateSql
=
\Our\Common
::
format
(
" WHEN
{
0
}
THEN goods_storage
{
2}{1
}
END
,"
,
$datas
[
$i
][
'goodsId'
],
$datas
[
$i
][
'goodsNum'
],
\Our\ArrayConst
::
ops
[
$op
]);
$dataIds
[]
=
$datas
[
$i
][
'goodsId'
];
$updateAllSql
.=
$updateSql
;
if
(
$i
%
1000
==
0
&&
$i
!=
0
)
{
$updateAllSql
=
trim
(
$updateAllSql
,
','
);
$updateAllSql
.=
\Our\Common
::
format
(
'
END
where goods_id in ({0})'
,
implode
(
','
,
$dataIds
));
$updateAllSql
.=
\Our\Common
::
format
(
' where goods_id in ({0})'
,
implode
(
','
,
$dataIds
));
$one
=
$this
->
db
->
update
(
$this
->
_tableName
)
->
query
(
$updateAllSql
);
if
(
!
$one
)
{
$error
++
;
...
...
@@ -329,7 +329,7 @@ class GoodsModel extends \DAO\AbstractModel {
}
if
(
$updateAllSql
!=
$baseSql
)
{
$updateAllSql
=
trim
(
$updateAllSql
,
','
);
$updateAllSql
.=
\Our\Common
::
format
(
'
END
where goods_id in ({0})'
,
implode
(
','
,
$dataIds
));
$updateAllSql
.=
\Our\Common
::
format
(
' where goods_id in ({0})'
,
implode
(
','
,
$dataIds
));
$one
=
$this
->
db
->
update
(
$this
->
_tableName
)
->
query
(
$updateAllSql
);
if
(
!
$one
)
{
$error
++
;
...
...
application/models/DAO/Goods/StoreTopSaleGoods.php
View file @
ae71e50a
...
...
@@ -61,7 +61,7 @@ class StoreTopSaleGoodsModel extends \DAO\AbstractModel{
if
(
$storeGoods
)
{
$orderGoods
=
empty
(
$orderGoods
)
?
$storeGoods
:
array_merge
(
$orderGoods
,
$storeGoods
);
}
else
{
$singleStoreGoods
=
$this
->
getList
(
array
(
'store_id'
=>
$storeId
));
$singleStoreGoods
=
$this
->
getList
(
array
(
'store_id'
=>
$storeId
,
'goods_commonid'
=>
array
(
'neq'
,
''
)
));
if
(
$singleStoreGoods
){
$ordesGoods
=
empty
(
$orderGoods
)
?
$singleStoreGoods
:
array_merge
(
$orderGoods
,
$singleStoreGoods
);
$storeTopSaleGoodsRedis
->
update
(
$storeId
,
$singleStoreGoods
,
\Our\ApiConst
::
oneDaySecond
);
...
...
application/models/Mysql/LinkMySQL.php
100755 → 100644
View file @
ae71e50a
...
...
@@ -935,7 +935,7 @@ class LinkMySQLModel{
return
false
;
}
}
else
{
if
(
empty
(
$array
)
||
!
$key
||
(
count
(
$array
)
!=
2
)
||
$array
[
1
]
===
''
||
$array
[
1
]
===
null
)
{
if
(
empty
(
$array
)
||
!
$key
||
(
count
(
$array
)
!=
2
))
{
return
false
;
}
}
...
...
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