Commit d420842b by 杨树贤

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

parent b87da549
......@@ -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 {
......
......@@ -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;
}
......
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