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
d6af8669
Commit
d6af8669
authored
Aug 16, 2018
by
wwccw0591
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updateStore
parent
ea1c924f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
ShareService.php
application/models/Business/User/ShareService.php
+5
-0
Store.php
application/models/DAO/Store.php
+13
-0
No files found.
application/models/Business/User/ShareService.php
View file @
d6af8669
...
@@ -9,6 +9,7 @@ use Error\ErrorModel;
...
@@ -9,6 +9,7 @@ use Error\ErrorModel;
use
Our\ApiConst
;
use
Our\ApiConst
;
use
Our\Common
;
use
Our\Common
;
use
Our\CommonExtension
;
use
Our\CommonExtension
;
use
Our\DbNameConst
;
use
Our\ImageConst
;
use
Our\ImageConst
;
use
Our\ImageUtil
;
use
Our\ImageUtil
;
use
Our\NameConst
;
use
Our\NameConst
;
...
@@ -34,6 +35,10 @@ class ShareServiceModel extends \Business\AbstractModel
...
@@ -34,6 +35,10 @@ class ShareServiceModel extends \Business\AbstractModel
$driverType
=
\Our\Common
::
getDriverType
();
$driverType
=
\Our\Common
::
getDriverType
();
$data
[
'driverType'
]
=
$driverType
;
$data
[
'driverType'
]
=
$driverType
;
$data
[
'qrCode'
]
=
$this
->
growQrcode
(
$data
);
$data
[
'qrCode'
]
=
$this
->
growQrcode
(
$data
);
if
(
$data
[
'type'
]
==
ApiConst
::
shareStore
){
$storeDao
=
\DAO\StoreMemberModel
::
getInstance
(
DbNameConst
::
salveDBConnectName
);
$data
[
'address'
]
=
$storeDao
->
getAddress
(
$data
[
'id'
]);
}
// $data['qrCode']=\Our\RedisHelper::cachedFunction(\Redis\Db0\MemberRedisModel::getInstance(), array(&$this, 'growQrcode'), array($data));
// $data['qrCode']=\Our\RedisHelper::cachedFunction(\Redis\Db0\MemberRedisModel::getInstance(), array(&$this, 'growQrcode'), array($data));
return
$data
;
return
$data
;
...
...
application/models/DAO/Store.php
View file @
d6af8669
...
@@ -258,7 +258,20 @@ class StoreModel extends \DAO\AbstractModel
...
@@ -258,7 +258,20 @@ class StoreModel extends \DAO\AbstractModel
$returnStores
=
\Our\RedisHelper
::
cachedFunction
(
\Redis\Db6\StoreRedisModel
::
getInstance
(),
array
(
&
$this
,
'getOnlineStores'
),
array
(
$condition
,
$field
),
\Our\ApiConst
::
oneHour
,
array
(
$cityCode
));
$returnStores
=
\Our\RedisHelper
::
cachedFunction
(
\Redis\Db6\StoreRedisModel
::
getInstance
(),
array
(
&
$this
,
'getOnlineStores'
),
array
(
$condition
,
$field
),
\Our\ApiConst
::
oneHour
,
array
(
$cityCode
));
return
$returnStores
;
return
$returnStores
;
}
}
public
function
getAddress
(
$storeId
){
$storeInfo
=
\Our\RedisHelper
::
cachedFunction
(
\Redis\Db6\StoreRedisModel
::
getInstance
(),
array
(
&
$this
,
'getInfoById'
),
array
(
$storeId
),
\Our\ApiConst
::
sevenDaySecond
,
array
(
$storeId
));
//地址
$address
=
''
;
if
(
$storeInfo
[
'area_info'
]){
$address
.=
$storeInfo
[
'area_info'
];
}
if
(
$storeInfo
[
'store_address'
]){
$address
.=
$storeInfo
[
'store_address'
];
}
return
$address
;
}
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
=
\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