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
31b1284a
Commit
31b1284a
authored
Jan 17, 2019
by
zhz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
店铺关注缓存
parent
80f8ad79
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
13 deletions
+8
-13
FavoritesStore.php
application/models/DAO/FavoritesStore.php
+8
-13
No files found.
application/models/DAO/FavoritesStore.php
View file @
31b1284a
...
...
@@ -204,26 +204,21 @@ class FavoritesStoreModel extends \DAO\AbstractModel {
//更新店铺收藏数
$this
->
getFavoritesStoreCountByStoreId
(
$storeId
,
$type
==
1
?
-
1
:
1
);
}
// if(is_array($storeIds) && count($storeIds) <= 20){
// foreach ($storeIds as $v){
// \Our\RedisHelper::delCachedFunction(\Redis\Db6\FavoritesStoreRedisModel::getInstance(),array(&$this, 'getOne'),array('*',array('store_id'=>$v,'member_id'=>$memberId)),array($memberId));
// }
//// }elseif (!is_array($storeIds)){
//// \Our\RedisHelper::delCachedFunction(\Redis\Db6\FavoritesStoreRedisModel::getInstance(),array(&$this, 'getOne'),array('*',array('store_id'=>$storeIds,'member_id'=>$memberId)),array($memberId));
// }else{
// \Our\RedisHelper::delCachedFunction(\Redis\Db6\FavoritesStoreRedisModel::getInstance(),array(&$this, 'getOne'),array(),array($memberId));
// }
$favoritesRedis
=
\Redis\Db6\FavoritesStoreRedisModel
::
getInstance
();
\Our\RedisHelper
::
delCachedFunction
(
$favoritesRedis
,
array
(
&
$this
,
'getOne'
),
array
(),
array
(
$memberId
));
if
(
is_array
(
$storeIds
)
&&
count
(
$storeIds
)
<=
20
){
foreach
(
$storeIds
as
$v
){
\Our\RedisHelper
::
delCachedFunction
(
$favoritesRedis
,
array
(
&
$this
,
'getOne'
),
array
(
'*'
,
array
(
'store_id'
=>
$v
,
'member_id'
=>
$memberId
)),
array
(
$memberId
));
}
}
else
{
\Our\RedisHelper
::
delCachedFunction
(
$favoritesRedis
,
array
(
&
$this
,
'getOne'
),
array
(),
array
(
$memberId
));
}
\Our\RedisHelper
::
delCachedFunction
(
$favoritesRedis
,
array
(
&
$this
,
'getFavoritesStores'
),
array
(),
array
(
$memberId
));
\Our\RedisHelper
::
delCachedFunction
(
$favoritesRedis
,
array
(
&
$this
,
'selectList'
),
array
(),
array
(
$memberId
));
if
(
$type
==
1
)
{
$favoritesRedis
->
tableDelAll
(
$favoritesRedis
->
tableKeys
(
'myFavoritesStore'
.
$favoritesRedis
::
DELIMITER
.
$memberId
.
'_'
));
}
\Our\RedisHelper
::
delCachedFunction
(
\Redis\Db6\FavoritesStoreRedisModel
::
getInstance
(),
array
(
&
$this
,
'getFavoritesStores'
),
array
(),
array
(
$memberId
));
\Our\RedisHelper
::
delCachedFunction
(
\Redis\Db6\FavoritesStoreRedisModel
::
getInstance
(),
array
(
&
$this
,
'selectList'
),
array
(),
array
(
$memberId
));
\Our\RedisHelper
::
delCachedFunction
(
\Redis\Db6\QmStoreClassRedisModel
::
getInstance
(),
array
(
\DAO\QmStoreClassModel
::
getInstance
(),
'selectByWhere'
),
array
(),
array
(
'*member_'
.
$memberId
.
'*'
));
//更新个人中心首页数量
\DAO\MemberModel
::
getInstance
()
->
_changeNum
(
\Our\NameConst
::
storeCollection
,
$memberId
,
$type
==
1
?
-
(
count
(
$storeIds
))
:
count
(
$storeIds
));
...
...
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