master
cody 4 months ago
parent 72ccf05e8c
commit 77df79dfe8

@ -528,6 +528,13 @@ class CourseController extends CommonController
if (date('Y-m-d') != $courseContent->date) {
return $this->fail([ResponseCode::ERROR_BUSINESS, '不在签到时间']);
}
// 不能重复签到
$courseContentCheck = CourseContentCheck::where('course_content_id', $all['course_content_id'])
->where('user_id', $this->getUserId())
->first();
if ($courseContentCheck) {
return $this->fail([ResponseCode::ERROR_BUSINESS, '不能重复签到']);
}
CourseContentCheck::create([
'course_content_id' => $all['course_content_id'],
'user_id' => $this->getUserId(),

Loading…
Cancel
Save