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
bfbd9aae
Commit
bfbd9aae
authored
Sep 10, 2018
by
zhz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
store
parent
40d672b3
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
1 addition
and
51 deletions
+1
-51
Goods.php
application/controllers/Goods.php
+0
-0
GoodsCommonService.php
application/models/Business/Goods/GoodsCommonService.php
+0
-1
StoreService.php
application/models/Business/Store/StoreService.php
+0
-21
MemberCenterService.php
application/models/Business/User/MemberCenterService.php
+0
-28
Store.php
application/models/DAO/Store.php
+1
-1
No files found.
application/controllers/Goods.php
100755 → 100644
View file @
bfbd9aae
File mode changed from 100755 to 100644
application/models/Business/Goods/GoodsCommonService.php
View file @
bfbd9aae
...
...
@@ -293,7 +293,6 @@ class GoodsCommonServiceModel extends \Business\AbstractModel
$attrs
=
$this
->
getAttr
(
$goodsCommonId
,
$memberId
);
$commonInfo
=
$attrs
[
'commonInfo'
];
$commonInfo
[
'goods_image'
]
=
\Our\ImageUtil
::
getGoodsImgUrl
(
$commonInfo
[
'goods_image'
]);
//所在地
$area
=
''
;
if
(
$commonInfo
[
'areaid_1'
]
&&
$commonInfo
[
'areaid_2'
]){
...
...
application/models/Business/Store/StoreService.php
View file @
bfbd9aae
...
...
@@ -14,21 +14,6 @@ class StoreServiceModel extends \Business\AbstractModel{
public
function
init
()
{
}
// public function get($storeId,$label = true){
// $storeInstance = \DAO\StoreModel::getInstance();
// $storeInfo = \Our\RedisHelper::cachedFunction(\Redis\Db6\StoreRedisModel::getInstance(),array(&$storeInstance, 'getInfoById'),array($storeId));
// if(!$storeInfo){
// \Error\ErrorModel::throwException(\Error\CodeConfigModel::storeNotExistOrClose);
// }
//
// if($label){
// //店铺头像
// $storeLabel = $storeInstance->getStoreLabelSrc($storeInfo['store_label']);
//
// return array($storeInfo,$storeLabel);
// }
// return $storeInfo;
// }
/**
* 获取店铺首页渲染信息
...
...
@@ -62,12 +47,6 @@ class StoreServiceModel extends \Business\AbstractModel{
\DAO\SaleMemberModel
::
getInstance
()
->
insertOrUpdate
(
array
(
'sale_id'
=>
$sale
[
'member_id'
],
'sale_act_id'
=>
$sale
[
'sale_act_id'
],
'member_id'
=>
$memberId
,
'store_id'
=>
$storeId
));
}
}
// $storeMember['storeId'] = $storeId;
// $storeMember['memberId'] = $memberId;
// $storeMember['type'] = \Our\ApiConst::storeQrcodeMember;
// $storeMembers[] = $storeMember;
// $storeMemberDao = \DAO\StoreMemberModel::getInstance(\Our\DbNameConst::masterDBConnectName);
// $result = $storeMemberDao->addBatch($storeMembers);
}
else
{
$sess
=
\Yaf\Session
::
getInstance
();
$scan_store_ids
=
$sess
->
get
(
'scan_store_ids'
);
...
...
application/models/Business/User/MemberCenterService.php
View file @
bfbd9aae
...
...
@@ -224,34 +224,6 @@ class MemberCenterServiceModel extends \Business\AbstractModel
$list
=
\Our\RedisHelper
::
cachedFunction
(
\Redis\Db4\FavoritesRedisModel
::
getInstance
(),
array
(
&
$favoritesInstance
,
'getList'
),
array
(
$where
,
$field
,
$pageIndex
,
$pageSize
,
$memberId
),
\Our\ApiConst
::
oneDaySecond
,
array
(
$memberId
));
$goods
=
array
();
if
(
is_array
(
$list
)
&&
!
empty
(
$list
)){
// $storeIds = array_column($list,'store_id');
// $storeIds = array_unique($storeIds);
// foreach ($storeIds as $storeId) {
// $tempStores = [];
// $queryStores = [];
// $storeDAO = \DAO\StoreModel::getInstance();
// $exist = \Our\RedisHelper::cachedFunctionExist(\Redis\Db6\StoreRedisModel::getInstance(),array(&$storeDAO, 'getInfoById'),array($storeId),array($storeId));
// if($exist) {
// $storeInfo = \Our\RedisHelper::cachedFunction(\Redis\Db6\StoreRedisModel::getInstance(),array(&$storeDAO, 'getInfoById'),array($storeId),\Our\ApiConst::sevenDaySecond,array($storeId));
// $tempStores[] = $storeInfo;
// }elseif ($exist === false) {
// $queryStores[] = $storeId;
// }
// }
// if($queryStores) {
// var_dump($queryStores);
// $storeList = $storeDAO->getList('store_id in('.implode(',',$queryStores).')',\Our\ApiConst::zero,$pageSize);
// if($storeList) {
// foreach ($storeList as $store) {
// \Our\RedisHelper::setCachedFunction(\Redis\Db6\StoreRedisModel::getInstance(),array(&$storeDAO, 'getInfoById'),$store,array($storeId),\Our\ApiConst::sevenDaySecond,array($storeId));
// $tempStores[] = $store;
// }
// }
// }
// $stores = [];
// foreach ($tempStores as $store) {
// $stores[$store['store_id']] = [$store['store_state'],$store['open_flag']];
// }
foreach
(
$list
as
$v
){
//if($stores['store_id'] && $stores['store_id']['open_flag'] == 1 && $stores['store_id']['store_state'] == 1) {
$goods
[]
=
array
(
'favid'
=>
$v
[
'favid'
],
'goodsCommonId'
=>
$v
[
'goods_commonid'
],
'goodsImage'
=>
\Our\ImageUtil
::
getGoodsImgUrl
(
$v
[
'goods_image'
],
\Our\ImageConst
::
goodsCollectionImgSize
),
'goodsName'
=>
$v
[
'goods_name'
],
'goodsPrice'
=>
$v
[
'goods_price'
],
'goodsId'
=>
$v
[
'goods_id'
]);
...
...
application/models/DAO/Store.php
View file @
bfbd9aae
...
...
@@ -268,7 +268,7 @@ class StoreModel extends \DAO\AbstractModel
public
function
get
(
$storeId
,
$label
=
true
)
{
$storeInfo
=
\Our\RedisHelper
::
cachedFunction
(
\Redis\Db6\StoreRedisModel
::
getInstance
(),
array
(
&
$this
,
'getInfoById'
),
array
(
$storeId
),
\Our\ApiConst
::
sevenDaySecond
,
array
(
$storeId
));
if
(
!
$storeInfo
){
if
(
!
$storeInfo
||
$storeInfo
[
'open_flag'
]
==
0
||
$storeInfo
[
'store_state'
]
!=
1
){
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
storeNotExistOrClose
);
}
...
...
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