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
6af2135f
Commit
6af2135f
authored
Oct 12, 2018
by
liuyuzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优惠券列表数据
parent
7306131f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
CouponService.php
application/models/Business/Coupon/CouponService.php
+2
-1
No files found.
application/models/Business/Coupon/CouponService.php
View file @
6af2135f
...
...
@@ -138,7 +138,7 @@ class CouponServiceModel extends \Business\AbstractModel{
$whereSql
=
' coupon_state ='
.
\Our\ApiConst
::
couponUnused
.
' and member_id ='
.
$memberId
.
' and out_time > '
.
time
();
$memberCoupons
=
$memberCouponDao
->
getList
(
$whereSql
);
}
else
{
//不允许领用多张的优惠券
$memberCoupons
=
\Our\RedisHelper
::
cachedFunction
(
\Redis\Db13\MemberCouponRedisModel
::
getInstance
(),
array
(
&
$memberCouponDao
,
'getList'
),
array
(
array
(
'coupon_id'
=>
$where
[
'couponId'
],
'member_id'
=>
$memberId
)),
\Our\ApiConst
::
oneHour
,
array
(
$where
[
'couponId'
]));
$memberCoupons
=
\Our\RedisHelper
::
cachedFunction
(
\Redis\Db13\MemberCouponRedisModel
::
getInstance
(),
array
(
&
$memberCouponDao
,
'getList'
),
array
(
array
(
'coupon_id'
=>
$where
[
'couponId'
],
'member_id'
=>
$memberId
)),
\Our\ApiConst
::
oneHour
,
array
(
$
memberId
.
'_'
.
$
where
[
'couponId'
]));
}
if
(
$memberCoupons
&&
count
(
$memberCoupons
)
>
0
){
$result
[
'isGet'
]
=
\Our\ApiConst
::
one
;
...
...
@@ -183,6 +183,7 @@ class CouponServiceModel extends \Business\AbstractModel{
}
}
$couponDao
->
db
->
doCommit
();
//\Our\RedisHelper::delCachedFunction(\Redis\Db13\MemberCouponRedisModel::getInstance(), array(&$memberCouponDao, 'getList'),array(),array($where['couponId']));
\Our\RedisHelper
::
delCachedFunction
(
\Redis\Db13\MemberCouponRedisModel
::
getInstance
(),
array
(
&
$memberCouponDao
,
'getList'
),
array
(),
array
(
$memberId
));
\Our\RedisHelper
::
delCachedFunction
(
\Redis\Db13\CouponRedisModel
::
getInstance
(),
array
(
&
$this
,
'getStoreCouponsById'
),
array
(),
array
(
$coupon
[
'store_id'
]
.
"_"
.
$memberId
));
return
true
;
...
...
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