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
e3f75610
Commit
e3f75610
authored
Aug 16, 2018
by
zhz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
缓存
parent
c3a6e5fc
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
StoreService.php
application/models/Business/Store/StoreService.php
+6
-1
DeliveryFormula.php
application/models/DAO/DeliveryFormula.php
+1
-1
No files found.
application/models/Business/Store/StoreService.php
View file @
e3f75610
...
...
@@ -51,7 +51,12 @@ class StoreServiceModel extends \Business\AbstractModel{
if
((
int
)
$param
[
'isScan'
]
>
0
)
{
//扫码进入
if
(
$memberId
>
0
)
{
//
if
(
$param
[
'sid'
])
{
$sale
=
\DAO\SaleModel
::
getInstance
()
->
getOne
(
array
(
'sale_id'
=>
$param
[
'sid'
]),
'sale_act_id,member_id'
);
if
(
$sale
)
{
\DAO\SaleMemberModel
::
getInstance
()
->
insert
(
array
(
'sale_id'
=>
$sale
[
'member_id'
],
'sale_act_id'
=>
$sale
[
'member_id'
],
'member_id'
=>
$memberId
,
'storeId'
=>
$storeId
));
}
}
}
else
{
$sess
=
\Yaf\Session
::
getInstance
();
$scan_store_ids
=
$sess
->
get
(
'scan_store_ids'
);
...
...
application/models/DAO/DeliveryFormula.php
View file @
e3f75610
...
...
@@ -55,7 +55,7 @@ class DeliveryFormulaModel extends \DAO\AbstractModel {
public
function
getDeliveryFormulaForCart
(
$store
,
$distance
,
$deliveryFreeFlag
=
false
){
$deliveryFormula
=
\Our\RedisHelper
::
cachedFunction
(
\Redis\Db6\DeliveryFormulaRedisModel
::
getInstance
(),
array
(
&
$this
,
'getOne'
),
array
(
'*'
,
array
(
'store_id'
=>
$store
[
'store_id'
])));
$deliveryFormula
=
\Our\RedisHelper
::
cachedFunction
(
\Redis\Db6\DeliveryFormulaRedisModel
::
getInstance
(),
array
(
&
$this
,
'getOne'
),
array
(
'*'
,
array
(
'store_id'
=>
$store
[
'store_id'
]))
,
\Our\ApiConst
::
sevenDaySecond
,
array
(
$store
[
'store_id'
])
);
if
(
!
$deliveryFormula
){
return
false
;
}
...
...
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