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
bc4bee74
Commit
bc4bee74
authored
Aug 27, 2018
by
liuyuzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除店铺广告缓存
parent
98551452
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
0 deletions
+24
-0
GoodsClassService.php
application/models/Business/Goods/GoodsClassService.php
+12
-0
StoreService.php
application/models/Business/Store/StoreService.php
+12
-0
No files found.
application/models/Business/Goods/GoodsClassService.php
View file @
bc4bee74
...
...
@@ -333,6 +333,18 @@ class GoodsClassServiceModel extends \Business\AbstractModel{
return
$adv
;
}
/**
* 删除店铺分类顶部缓存
* @param $gcId
* @param $storeId
*/
public
function
deleteStoreTopClassAdvsFromCache
(
$storeId
,
$gcId
){
$goodsClassImageDao
=
\DAO\Adv\GoodsClassImageModel
::
getInstance
();
\Our\RedisHelper
::
delCachedFunction
(
\Redis\Db9\GoodsClassImageRedisModel
::
getInstance
(),
array
(
&
$this
,
'getStoreTopClassAdvs'
),
array
(
$storeId
,
$gcId
));
\Our\RedisHelper
::
delCachedFunction
(
\Redis\Db9\GoodsClassImageRedisModel
::
getInstance
(),
array
(
&
$goodsClassImageDao
,
'find'
),
array
(
array
(
'store_id'
=>
$storeId
,
'gc_id'
=>
$gcId
)));
}
public
function
getStoreTopClassAdvs
(
$storeId
,
$gcId
){
$goodsClassImage
=
\DAO\Adv\GoodsClassImageModel
::
getInstance
()
->
findByStoreIdAndGcId
(
$storeId
,
$gcId
);
$adv
[
'isSwiper'
]
=
\Our\ApiConst
::
zero
;
...
...
application/models/Business/Store/StoreService.php
View file @
bc4bee74
...
...
@@ -881,6 +881,18 @@ class StoreServiceModel extends \Business\AbstractModel{
$gc_names
=
\Our\RedisHelper
::
cachedFunction
(
\Redis\Db4\GoodsClassImageRedisModel
::
getInstance
(),
array
(
&
$this
,
'getRecommendClass'
),
array
(
$storeId
),
\Our\ApiConst
::
oneDaySecond
,
array
(
$storeId
));
return
$gc_names
;
}
/**
* 删除首页店铺及分类缓存
* @param $cityCode
*/
public
function
deleteStoreAndStoreClassCacheByCitycode
(
$cityCode
){
\DAO\QmStoreClassModel
::
getInstance
()
->
delStoreClassesCache
(
$cityCode
);
$storeDao
=
\DAO\StoreModel
::
getInstance
();
$storeDao
->
delNearbyStoresCache
(
$cityCode
);
$storeDao
->
delStoresCacheByCityCode
(
$cityCode
);
}
/**
*/
private
static
$_instance
=
null
;
...
...
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