feat: 在 SignController 中增加今日签到检查,防止重复签到

This commit is contained in:
lingling 2025-03-08 02:19:43 +08:00
parent 06ea9ca773
commit ee28a0bd76
1 changed files with 3 additions and 0 deletions

View File

@ -64,6 +64,9 @@ class SignController
if(!UserPhoneLogDao::getOnlineTimeByPhoneTodayId($user_id)){
return ApiResponseApp::error([],'挂机时长没有超过6小时暂不能签到');
}
if(SignDao::search_Sign_today($user_id)==1){
return ApiResponseApp::error([],'今天已经签到');
}
SignDao::Sign($user_id);
return ApiResponseApp::success([]);
}