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
c67ed664
Commit
c67ed664
authored
Aug 17, 2018
by
liuyuzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除缓存
parent
e2f657e5
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
1 deletion
+24
-1
Adv.php
application/models/DAO/Adv/Adv.php
+0
-1
QmStoreClass.php
application/models/DAO/QmStoreClass.php
+10
-0
Store.php
application/models/DAO/Store.php
+14
-0
No files found.
application/models/DAO/Adv/Adv.php
View file @
c67ed664
...
...
@@ -51,7 +51,6 @@ class AdvModel extends \DAO\AbstractModel{
public
function
delAdvCache
(
$positionId
){
\Our\Log
::
getInstance
()
->
write
(
'调用广告位'
.
$positionId
);
\Our\RedisHelper
::
delCachedFunction
(
\Redis\Db9\AdvRedisModel
::
getInstance
(),
array
(
&
$this
,
'getPostionAdv'
),
array
(),
array
(
$positionId
));
}
...
...
application/models/DAO/QmStoreClass.php
View file @
c67ed664
...
...
@@ -56,6 +56,7 @@ class QmStoreClassModel extends \DAO\AbstractModel{
return
false
;
}
/**
* 获取店铺可经营的电偶分类信息
* @param $storeId
...
...
@@ -90,4 +91,13 @@ class QmStoreClassModel extends \DAO\AbstractModel{
return
$result
;
}
/**
* 删除签约店铺缓存
* @param $cityCode
* @throws \Our\Exception
*/
public
function
delStoreClassesCache
(
$cityCode
){
\Our\RedisHelper
::
delCachedFunction
(
\Redis\Db6\QmStoreClassRedisModel
::
getInstance
(),
array
(
&
$this
,
'getStoreClasses'
),
array
(),
array
(
$cityCode
));
}
}
\ No newline at end of file
application/models/DAO/Store.php
View file @
c67ed664
...
...
@@ -236,6 +236,10 @@ class StoreModel extends \DAO\AbstractModel
return
$stores
;
}
public
function
delStoresCacheByCityCode
(
$cityCode
){
\Our\RedisHelper
::
delCachedFunction
(
\Redis\Db6\StoreRedisModel
::
getInstance
(),
array
(
&
$this
,
'getOnlineStores'
),
array
(),
array
(
$cityCode
));
}
/**
* 获取当前城市对应正在经营店铺列表
* @param $cityCode 当前城市编码
...
...
@@ -251,6 +255,11 @@ class StoreModel extends \DAO\AbstractModel
return
$stores
;
}
public
function
deleteExpressStores
(
$field
=
'store_id,store_longitude,store_latitude,max_sign_rang,max_sales_rang,store_sales_scope'
){
$storeClassCondition
=
" and express_distribution = 1 "
;
\Our\RedisHelper
::
delCachedFunction
(
\Redis\Db6\StoreRedisModel
::
getInstance
(),
array
(
&
$this
,
'getOnlineStores'
),
array
(
array
(
$storeClassCondition
,
$field
)));
}
public
function
getNearbyStores
(
$cityCode
,
$storeIds
)
{
$condition
=
" and store_citycode = '"
.
$cityCode
.
"' and store_id in ("
.
implode
(
','
,
$storeIds
)
.
")"
;
...
...
@@ -258,6 +267,11 @@ class StoreModel extends \DAO\AbstractModel
$returnStores
=
\Our\RedisHelper
::
cachedFunction
(
\Redis\Db6\StoreRedisModel
::
getInstance
(),
array
(
&
$this
,
'getOnlineStores'
),
array
(
$condition
,
$field
),
\Our\ApiConst
::
oneHour
,
array
(
$cityCode
));
return
$returnStores
;
}
public
function
delNearbyStoresCache
(
$cityCode
){
\Our\RedisHelper
::
delCachedFunction
(
\Redis\Db6\StoreRedisModel
::
getInstance
(),
array
(
&
$this
,
'getOnlineStores'
),
array
(),
array
(
$cityCode
));
}
public
function
getAddress
(
$storeId
){
$storeInfo
=
\Our\RedisHelper
::
cachedFunction
(
\Redis\Db6\StoreRedisModel
::
getInstance
(),
array
(
&
$this
,
'getInfoById'
),
array
(
$storeId
),
\Our\ApiConst
::
sevenDaySecond
,
array
(
$storeId
));
...
...
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