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
1dddd8f0
Commit
1dddd8f0
authored
Mar 15, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
//
..
parent
fd00fe14
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
Coupon.php
application/api/controller/Coupon.php
+3
-3
RegisterService.php
application/api/service/RegisterService.php
+1
-1
No files found.
application/api/controller/Coupon.php
View file @
1dddd8f0
...
...
@@ -32,11 +32,11 @@ class Coupon extends Basic{
public
function
getHomeCoupon
()
{
if
(
empty
(
$this
->
userId
))
{
//
return $this->response(101, '请登录');
return
$this
->
response
(
101
,
'请登录'
);
}
$data
=
[];
$where
[
'user_id'
]
=
$this
->
userId
;
$where
[
'user_id'
]
=
1
;
//
$where['user_id'] = 1;
$where
[
'first_show'
]
=
0
;
$coupon_data
=
$this
->
m_coupon
->
getCouponColumn
(
'id,activity_id'
,
$where
);
if
(
!
empty
(
$coupon_data
))
{
...
...
@@ -61,7 +61,7 @@ class Coupon extends Basic{
$data
[
$k
][
'content'
]
=
'返现红包'
;
$data
[
$k
][
'money'
]
=
(
int
)
$v
[
'money'
]
.
''
;
}
//
$this->m_coupon->updateData(['first_show'=>1], ['id'=>['in',$coupon_id]]);
$this
->
m_coupon
->
updateData
([
'first_show'
=>
1
],
[
'id'
=>
[
'in'
,
$coupon_id
]]);
}
return
$this
->
response
(
200
,
''
,
$data
);
}
...
...
application/api/service/RegisterService.php
View file @
1dddd8f0
...
...
@@ -126,7 +126,7 @@ class RegisterService
$coupon_service
=
new
CouponService
();
$service
=
new
PushClientService
();
if
(
!
empty
(
$first_login_time
))
{
$coupon_service
->
sendCoupon
((
int
)
$id
,
0
,
0
,
1
);
$coupon_service
->
sendCoupon
((
int
)
$id
,
0
,
0
);
$content
=
'恭喜您您获得500元的新人专享返现红包,成交后可兑现'
;
$service
->
record
(
0
,
0
,
1
,
$content
,
0
,
$id
);
}
...
...
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