Commit d420842b by 杨树贤

修改签到到统一的添加流水方法

parent b87da549
...@@ -30,7 +30,7 @@ class CheckInController extends Controller ...@@ -30,7 +30,7 @@ class CheckInController extends Controller
'user_id' => $request->user_id, 'user_id' => $request->user_id,
'add_time' => time(), '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) { if (!$canCheckIn) {
return $this->Export(ErrorCode(1, 1), '今天已签到,无法再进行签到'); return $this->Export(ErrorCode(1, 1), '今天已签到,无法再进行签到');
} else { } else {
......
...@@ -47,9 +47,9 @@ class CheckIn extends Model ...@@ -47,9 +47,9 @@ class CheckIn extends Model
return false; return false;
} }
//使用异步任务去添加流水 //使用异步任务去添加流水
$integralBill = new IntegralBill();
$data['integral_id'] = Integral::INTEGRAL_TYPE_CHECK_IN; $data['integral_id'] = Integral::INTEGRAL_TYPE_CHECK_IN;
$task = new IntegralBillTask($data); $result = $integralBill->createIntegralBill($data);
$result = Task::deliver($task);
if (!$result) { if (!$result) {
return false; return false;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment