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
c0d6e2ff
Commit
c0d6e2ff
authored
Mar 13, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
425eea8f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
ConvertCouponService.php
application/api/service/ConvertCouponService.php
+9
-0
No files found.
application/api/service/ConvertCouponService.php
View file @
c0d6e2ff
...
@@ -78,6 +78,8 @@ class ConvertCouponService
...
@@ -78,6 +78,8 @@ class ConvertCouponService
// 存在未过期 券数等于1直接核销
// 存在未过期 券数等于1直接核销
$coupon_list_count
=
count
(
$coupon_list
);
$coupon_list_count
=
count
(
$coupon_list
);
if
(
$coupon_list_count
==
0
){
if
(
$coupon_list_count
==
0
){
big_log
(
'false 行号 81'
);
return
false
;
return
false
;
}
elseif
(
$coupon_list_count
>
1
){
}
elseif
(
$coupon_list_count
>
1
){
// 券数大于1 选取金额最大的核销
// 券数大于1 选取金额最大的核销
...
@@ -97,6 +99,7 @@ class ConvertCouponService
...
@@ -97,6 +99,7 @@ class ConvertCouponService
$invite_user
=
$this
->
getUserInviter
(
$user_id
);
$invite_user
=
$this
->
getUserInviter
(
$user_id
);
if
(
!
$invite_user
){
if
(
!
$invite_user
){
big_log
(
'查询当前客户的是否有邀请人 挂了'
);
big_log
(
'查询当前客户的是否有邀请人 挂了'
);
big_log
(
'false 行号 102'
);
return
false
;
return
false
;
}
}
...
@@ -105,6 +108,7 @@ class ConvertCouponService
...
@@ -105,6 +108,7 @@ class ConvertCouponService
$invite_user_coupon_list
=
$this
->
getCoupon
(
$user_id
,
$invite_user
);
$invite_user_coupon_list
=
$this
->
getCoupon
(
$user_id
,
$invite_user
);
if
(
!
$invite_user_coupon_list
){
if
(
!
$invite_user_coupon_list
){
big_log
(
'取出 2邀请成交 券 挂了'
);
big_log
(
'取出 2邀请成交 券 挂了'
);
big_log
(
'false 行号 111'
);
return
false
;
return
false
;
}
}
...
@@ -116,8 +120,13 @@ class ConvertCouponService
...
@@ -116,8 +120,13 @@ class ConvertCouponService
// 存在未过期
// 存在未过期
$invite_user_coupon_list_count
=
count
(
$invite_user_coupon_list
);
$invite_user_coupon_list_count
=
count
(
$invite_user_coupon_list
);
if
(
$invite_user_coupon_list_count
==
0
){
if
(
$invite_user_coupon_list_count
==
0
){
big_log
(
'inviteruser 无2邀请成交券'
.
json_encode
(
''
));
big_log
(
'false 行号 124'
);
return
false
;
return
false
;
}
elseif
(
$invite_user_coupon_list_count
==
1
){
}
elseif
(
$invite_user_coupon_list_count
==
1
){
big_log
(
'inviteruser 修改券状态为已使用'
.
json_encode
(
$invite_user_coupon_list_count
[
0
][
'id'
]));
// 修改券状态为已使用
// 修改券状态为已使用
$this
->
m_coupon
->
updateUseStatus
(
$invite_user_coupon_list_count
[
0
][
'id'
],
1
,
$report_id
,
$bargain_id
,
$order_id
,
date
(
"Y-m-d H:i:s"
,
time
()));
$this
->
m_coupon
->
updateUseStatus
(
$invite_user_coupon_list_count
[
0
][
'id'
],
1
,
$report_id
,
$bargain_id
,
$order_id
,
date
(
"Y-m-d H:i:s"
,
time
()));
// 将活动奖励金额写入账户余额 $coupon_list[0]['money']
// 将活动奖励金额写入账户余额 $coupon_list[0]['money']
...
...
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