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
11432ed0
Commit
11432ed0
authored
Oct 12, 2018
by
zhz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
seller
parent
d6b59222
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
MemberCenterService.php
application/models/Business/User/MemberCenterService.php
+5
-1
Store.php
application/models/DAO/Store.php
+7
-2
No files found.
application/models/Business/User/MemberCenterService.php
View file @
11432ed0
...
@@ -28,7 +28,11 @@ class MemberCenterServiceModel extends \Business\AbstractModel
...
@@ -28,7 +28,11 @@ class MemberCenterServiceModel extends \Business\AbstractModel
//是否配送员
//是否配送员
$memberInfo
[
'diliverymanId'
]
?
$memberCenter
[
'isDeliveryman'
]
=
1
:
$memberCenter
[
'isDeliveryman'
]
=
0
;
$memberInfo
[
'diliverymanId'
]
?
$memberCenter
[
'isDeliveryman'
]
=
1
:
$memberCenter
[
'isDeliveryman'
]
=
0
;
//是否店主
//是否店主
$memberInfo
[
'storeId'
]
?
$memberCenter
[
'isSeller'
]
=
1
:
$memberCenter
[
'isSeller'
]
=
0
;
$memberCenter
[
'isSeller'
]
=
0
;
if
(
$memberInfo
[
'storeId'
])
{
$store
=
\DAO\StoreModel
::
getInstance
()
->
getStoreInfoCache
(
$memberInfo
[
'storeId'
]);
$store
[
'is_own_shop'
]
?
$memberCenter
[
'isSeller'
]
=
0
:
$memberCenter
[
'isSeller'
]
=
1
;
}
if
(
!
empty
(
$memberInfo
[
'pushSet'
])){
if
(
!
empty
(
$memberInfo
[
'pushSet'
])){
$memberInfo
[
'pushSet'
]
=
unserialize
(
$memberInfo
[
'pushSet'
]);
$memberInfo
[
'pushSet'
]
=
unserialize
(
$memberInfo
[
'pushSet'
]);
...
...
application/models/DAO/Store.php
View file @
11432ed0
...
@@ -254,7 +254,7 @@ class StoreModel extends \DAO\AbstractModel
...
@@ -254,7 +254,7 @@ class StoreModel extends \DAO\AbstractModel
public
function
getAddress
(
$storeId
){
public
function
getAddress
(
$storeId
){
$storeInfo
=
\Our\RedisHelper
::
cachedFunction
(
\Redis\Db6\StoreRedisModel
::
getInstance
(),
array
(
&
$this
,
'getInfoById'
),
array
(
$storeId
),
\Our\ApiConst
::
sevenDaySecond
,
array
(
$storeId
)
);
$storeInfo
=
$this
->
getStoreInfoCache
(
$storeId
);
//地址
//地址
$address
=
''
;
$address
=
''
;
if
(
$storeInfo
[
'area_info'
]){
if
(
$storeInfo
[
'area_info'
]){
...
@@ -268,7 +268,7 @@ class StoreModel extends \DAO\AbstractModel
...
@@ -268,7 +268,7 @@ class StoreModel extends \DAO\AbstractModel
}
}
public
function
get
(
$storeId
,
$label
=
true
)
public
function
get
(
$storeId
,
$label
=
true
)
{
{
$storeInfo
=
\Our\RedisHelper
::
cachedFunction
(
\Redis\Db6\StoreRedisModel
::
getInstance
(),
array
(
&
$this
,
'getInfoById'
),
array
(
$storeId
),
\Our\ApiConst
::
sevenDaySecond
,
array
(
$storeId
)
);
$storeInfo
=
$this
->
getStoreInfoCache
(
$storeId
);
if
(
!
$storeInfo
||
$storeInfo
[
'open_flag'
]
==
0
||
$storeInfo
[
'store_state'
]
!=
1
){
if
(
!
$storeInfo
||
$storeInfo
[
'open_flag'
]
==
0
||
$storeInfo
[
'store_state'
]
!=
1
){
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
storeNotExistOrClose
);
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
storeNotExistOrClose
);
}
}
...
@@ -282,6 +282,11 @@ class StoreModel extends \DAO\AbstractModel
...
@@ -282,6 +282,11 @@ class StoreModel extends \DAO\AbstractModel
return
$storeInfo
;
return
$storeInfo
;
}
}
public
function
getStoreInfoCache
(
$storeId
)
{
$storeInfo
=
\Our\RedisHelper
::
cachedFunction
(
\Redis\Db6\StoreRedisModel
::
getInstance
(),
array
(
&
$this
,
'getInfoById'
),
array
(
$storeId
),
\Our\ApiConst
::
sevenDaySecond
,
array
(
$storeId
));
return
$storeInfo
;
}
/**
/**
* 店铺分享图片
* 店铺分享图片
*
*
...
...
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