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
53805da0
Commit
53805da0
authored
Aug 27, 2018
by
wwccw0591
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master_dev' of git.shenbd.com:qm-develop/shenbd into ccw
parents
acf382a6
15035075
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
6 deletions
+40
-6
GoodsClassService.php
application/models/Business/Goods/GoodsClassService.php
+12
-0
StoreService.php
application/models/Business/Store/StoreService.php
+12
-0
FootprintService.php
application/models/Business/User/FootprintService.php
+16
-6
No files found.
application/models/Business/Goods/GoodsClassService.php
View file @
53805da0
...
...
@@ -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 @
53805da0
...
...
@@ -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
;
...
...
application/models/Business/User/FootprintService.php
View file @
53805da0
...
...
@@ -46,14 +46,14 @@ class FootprintServiceModel extends \Business\AbstractModel
if
(
$viewTime
===
0
){
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
ViewTimeNotExist
);
}
$viewTime
+=
\Our\ApiConst
::
oneDaySecond
;
//
$viewTime += \Our\ApiConst::oneDaySecond;
// if($pageSize === 0){
// \Error\ErrorModel::throwException(\Error\CodeConfigModel::commonError);
// }
$acts
=
\DAO\SaleMemberModel
::
getInstance
()
->
isJoinPlatform
(
$memberId
);
$browseDAO
=
\DAO\GoodsBrowseModel
::
getInstance
();
$commonDAO
=
\DAO\GoodsCommonModel
::
getInstance
();
$where1
=
"member_id =
{
$memberId
}
AND browse
time <
"
.
$viewTime
;
$where1
=
"member_id =
{
$memberId
}
AND browse
date =
"
.
$viewTime
;
$field
=
'goods_commonid,browsedate,group_id'
;
//$limit = array($pageIndex*$pageSize,$pageSize);
...
...
@@ -82,19 +82,21 @@ class FootprintServiceModel extends \Business\AbstractModel
'goodsPrice'
=>
$goodsCommon
[
'goods_price'
],
'viewDate'
=>
$dates
[
$v
]
];
$footPrints
[]
=
$temp
;
//$footPrints[] = $temp;
$goodsCommons
[
$goodsCommon
[
'goods_commonid'
]]
=
$temp
;
}
}
}
else
{
$acts
=
array_keys
(
$acts
);
$field
=
'han_goods_common.goods_commonid AS goodsCommonId,goods_name AS goodsName,goods_image AS goodsImage,goods_price AS goodsPrice'
;
$list
=
\Our\RedisHelper
::
cachedFunction
(
\Redis\Db4\GoodsCommonRedisModel
::
getInstance
(),
array
(
&
$commonDAO
,
'getListWithSale'
),
array
(
$where
,
$field
,
$acts
,[],[],
''
,
false
),
\Our\ApiConst
::
oneMinute
);
$list
=
\Our\RedisHelper
::
cachedFunction
(
\Redis\Db4\GoodsCommonRedisModel
::
getInstance
(),
array
(
&
$commonDAO
,
'getListWithSale'
),
array
(
$where
,
$field
,
$acts
,[],[],
''
,
false
),
\Our\ApiConst
::
oneMinute
);
;
if
(
$list
){
foreach
(
$list
as
$goodsCommon
)
{
$goodsCommon
[
'goodsImage'
]
=
\Our\ImageUtil
::
getGoodsImgUrl
(
$goodsCommon
[
'goodsImage'
],
360
);
$goodsCommon
[
'viewDate'
]
=
$dates
[
$goodsCommon
[
'goodsCommonId'
]];
$goodsCommon
[
'groupId'
]
=
0
;
$footPrints
[]
=
$goodsCommon
;
//$footPrints[] = $goodsCommon;
$goodsCommons
[
$goodsCommon
[
'goodsCommonId'
]]
=
$goodsCommon
;
}
}
}
...
...
@@ -115,10 +117,18 @@ class FootprintServiceModel extends \Business\AbstractModel
'goodsPrice'
=>
$group
[
'discountPrice'
],
'viewDate'
=>
$dates
[
$group
[
'blId'
]]
];
$
footPrints
[
]
=
$temp
;
$
groups
[
$group
[
'blId'
]
]
=
$temp
;
}
}
}
foreach
(
$browseList
as
$browse
)
{
if
(
$browse
[
'goods_commonid'
])
{
$footPrints
[]
=
$goodsCommons
[
$browse
[
'goods_commonid'
]];
}
if
(
$browse
[
'group_id'
])
{
$footPrints
[]
=
$groups
[
$browse
[
'group_id'
]];
}
}
}
return
array
(
'footprints'
=>
$footPrints
);
}
...
...
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