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
7629387f
Commit
7629387f
authored
Sep 07, 2018
by
liuyuzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优惠券
parent
c16ef535
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
3 deletions
+1
-3
CouponService.php
application/models/Business/Coupon/CouponService.php
+1
-2
MemberCoupon.php
application/models/DAO/Coupon/MemberCoupon.php
+0
-1
No files found.
application/models/Business/Coupon/CouponService.php
View file @
7629387f
...
...
@@ -245,9 +245,8 @@ class CouponServiceModel extends \Business\AbstractModel{
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
couponNoUsedTicketNum
);
}
$memberCouponDao
=
\DAO\Coupon\MemberCouponModel
::
getInstance
(
$dbName
);
\Our\Log
::
getInstance
()
->
write
(
json_encode
(
$coupon
));
if
(
$coupon
[
'is_overlay'
]){
//允许领用多张的优惠券是否存在已经领取的未使用有效优惠券
$whereSql
=
' coupon_state ='
.
\Our\ApiConst
::
couponUnused
.
' and member_id ='
.
$memberId
.
' and out_time > '
.
time
();
$whereSql
=
' coupon_state ='
.
\Our\ApiConst
::
couponUnused
.
' and member_id ='
.
$memberId
.
' and
coupon_id='
.
$coupon
[
'id'
]
.
' and
out_time > '
.
time
();
//$memberCoupons = \Our\RedisHelper::cachedFunction(\Redis\Db13\MemberCouponRedisModel::getInstance(), array(&$memberCouponDao, 'getList'),array($whereSql),\Our\ApiConst::oneHour,array($where['couponId']));
$memberCoupons
=
$memberCouponDao
->
getList
(
$whereSql
);
}
else
{
//不允许领用多张的优惠券
...
...
application/models/DAO/Coupon/MemberCoupon.php
View file @
7629387f
...
...
@@ -30,7 +30,6 @@ class MemberCouponModel extends \DAO\AbstractModel{
public
function
getList
(
$where
,
$field
=
\Our\NameConst
::
allField
){
$this
->
setDb
(
$this
->
dbName
);
$result
=
$this
->
db
->
select
(
$field
)
->
from
(
$this
->
_tableName
)
->
where
(
$where
)
->
fetchAll
();
\Our\Log
::
getInstance
()
->
write
(
$this
->
db
->
getLastSql
());
return
$result
;
}
...
...
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