Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
ic_server_welfare
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
d420842b
authored
Aug 26, 2019
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
修改签到到统一的添加流水方法
parent
b87da549
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
app/Http/Controllers/CheckInController.php
app/Models/CheckIn.php
app/Http/Controllers/CheckInController.php
View file @
d420842b
...
...
@@ -30,7 +30,7 @@ class CheckInController extends Controller
'user_id'
=>
$request
->
user_id
,
'add_time'
=>
time
(),
];
$canCheckIn
=
$integral
->
checkIntegralLimit
(
$data
[
'user_id'
],
CheckIn
::
INTEGRAL_TYPE_CHECK_IN
);
$canCheckIn
=
$integral
->
checkIntegralLimit
(
$data
[
'user_id'
],
Integral
::
INTEGRAL_TYPE_CHECK_IN
);
if
(
!
$canCheckIn
)
{
return
$this
->
Export
(
ErrorCode
(
1
,
1
),
'今天已签到,无法再进行签到'
);
}
else
{
...
...
app/Models/CheckIn.php
View file @
d420842b
...
...
@@ -47,9 +47,9 @@ class CheckIn extends Model
return
false
;
}
//使用异步任务去添加流水
$integralBill
=
new
IntegralBill
();
$data
[
'integral_id'
]
=
Integral
::
INTEGRAL_TYPE_CHECK_IN
;
$task
=
new
IntegralBillTask
(
$data
);
$result
=
Task
::
deliver
(
$task
);
$result
=
$integralBill
->
createIntegralBill
(
$data
);
if
(
!
$result
)
{
return
false
;
}
...
...
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