Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
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
hujun
tl_estate
Commits
d3b2e404
Commit
d3b2e404
authored
Mar 20, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
5d47f0d5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
6 deletions
+0
-6
ConvertCouponService.php
application/api/service/ConvertCouponService.php
+0
-6
No files found.
application/api/service/ConvertCouponService.php
View file @
d3b2e404
...
@@ -75,13 +75,11 @@ class ConvertCouponService
...
@@ -75,13 +75,11 @@ class ConvertCouponService
#根据$user_id 取出 当前客户的 0首次登陆 1邀请登陆 券
#根据$user_id 取出 当前客户的 0首次登陆 1邀请登陆 券
$coupon_list
=
$this
->
getCoupon
(
$user_id
,
''
);
$coupon_list
=
$this
->
getCoupon
(
$user_id
,
''
);
big_log
(
'1'
.
json_encode
(
$coupon_list
));
if
(
!
$coupon_list
){
if
(
!
$coupon_list
){
return
false
;
return
false
;
}
}
#去除已经过期的优惠券
#去除已经过期的优惠券
$coupon_list
=
$this
->
filterExpireData
(
$coupon_list
);
$coupon_list
=
$this
->
filterExpireData
(
$coupon_list
);
big_log
(
'2'
.
json_encode
(
$coupon_list
));
#存在未过期 券数等于1直接核销
#存在未过期 券数等于1直接核销
$coupon_list_count
=
count
(
$coupon_list
);
$coupon_list_count
=
count
(
$coupon_list
);
...
@@ -91,13 +89,9 @@ class ConvertCouponService
...
@@ -91,13 +89,9 @@ class ConvertCouponService
}
elseif
(
$coupon_list_count
>
1
){
}
elseif
(
$coupon_list_count
>
1
){
//券不止一张选取金额最大的核销
//券不止一张选取金额最大的核销
$max_coupon
=
$this
->
getMaxCoupon
(
$coupon_list
);
$max_coupon
=
$this
->
getMaxCoupon
(
$coupon_list
);
big_log
(
'3'
.
json_encode
(
$coupon_list
));
$coupon_list
=
[];
$coupon_list
=
[];
$coupon_list
[]
=
$max_coupon
;
$coupon_list
[]
=
$max_coupon
;
big_log
(
'4'
.
json_encode
(
$coupon_list
));
}
}
big_log
(
'5'
.
json_encode
(
$coupon_list
));
big_log
(
'6'
.
json_encode
(
$coupon_list
[
0
][
'id'
]));
#修改券状态为已使用
#修改券状态为已使用
$this
->
m_coupon
->
updateUseStatus
(
$coupon_list
[
0
][
'id'
],
1
,
$report_id
,
$bargain_id
,
$order_id
,
date
(
"Y-m-d H:i:s"
,
time
()));
$this
->
m_coupon
->
updateUseStatus
(
$coupon_list
[
0
][
'id'
],
1
,
$report_id
,
$bargain_id
,
$order_id
,
date
(
"Y-m-d H:i:s"
,
time
()));
...
...
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