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
dea92011
Commit
dea92011
authored
Sep 05, 2018
by
zhz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
goods
parent
610319fa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
+4
-5
GoodsCommonService.php
application/models/Business/Goods/GoodsCommonService.php
+3
-3
Abstract.php
application/models/Redis/Db4/Abstract.php
+1
-2
No files found.
application/models/Business/Goods/GoodsCommonService.php
View file @
dea92011
...
...
@@ -948,7 +948,7 @@ class GoodsCommonServiceModel extends \Business\AbstractModel
// }
$log
=
\Our\Log
::
getInstance
();
// $log->write(print_r($data, true));
$weekSales
=
$goodsCommonRedis
->
s
members
(
'weekSales:'
.
$storeId
);
$weekSales
=
$goodsCommonRedis
->
tableS
members
(
'weekSales:'
.
$storeId
);
$log
->
write
(
json_encode
(
$weekSales
));
if
(
$weekSales
)
{
$arr
=
array_merge
(
array_diff
(
$weekSales
,
$existIds
));
...
...
@@ -970,7 +970,7 @@ class GoodsCommonServiceModel extends \Business\AbstractModel
//$arr = $goodsCommonRedis->tableSRandMember('recommendGoods:'.$storeId,4-count($commonIds));
//$commonIds = array_merge($arr,$commonIds);
$weekSaleGoods
=
$goodsCommonRedis
->
s
members
(
'weekSaleGoods:'
.
$storeId
);
$weekSaleGoods
=
$goodsCommonRedis
->
tableS
members
(
'weekSaleGoods:'
.
$storeId
);
$log
->
write
(
json_encode
(
$weekSaleGoods
));
if
(
$weekSaleGoods
)
{
$arr
=
array_merge
(
array_diff
(
$weekSaleGoods
,
$existIds
));
...
...
@@ -988,7 +988,7 @@ class GoodsCommonServiceModel extends \Business\AbstractModel
}
}
}
$recommendGoods
=
$goodsCommonRedis
->
s
members
(
'recommendGoods:'
.
$storeId
);
$recommendGoods
=
$goodsCommonRedis
->
tableS
members
(
'recommendGoods:'
.
$storeId
);
$log
->
write
(
json_encode
(
$recommendGoods
));
if
(
$recommendGoods
)
{
$arr
=
array_merge
(
array_diff
(
$recommendGoods
,
$existIds
));
...
...
application/models/Redis/Db4/Abstract.php
View file @
dea92011
...
...
@@ -86,8 +86,7 @@ class AbstractModel extends \Redis\AbstractModel {
return
$this
->
sIsMember
(
$this
->
calcKey
(
$h
),
$value
);
}
public
function
tableSmembers
(
$key
)
{
$res
=
$this
->
smembers
(
$this
->
calcKey
(
$key
));
return
$res
;
return
$this
->
smembers
(
$this
->
calcKey
(
$key
));
}
public
function
tableKeyExists
(
$h
){
return
$this
->
exists
(
$this
->
calcKey
(
$h
));
...
...
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