完善上号流程

This commit is contained in:
lingling 2025-02-17 23:22:23 +08:00
parent ee9b47ce40
commit b691331fe1
1 changed files with 3 additions and 3 deletions

View File

@ -78,7 +78,7 @@ class TaskController
$user_id = $request->data['id'];
$phone = $request->post('phone');
$GetLodeLog = GetLodeLog::where('phone', $phone)->first();
if ($GetLodeLog->status == 0) {
if ($GetLodeLog->status == 0&&!empty($GetLodeLog)) {
return ApiResponseApp::success([]);
}
if ($GetLodeLog->status == 1) {
@ -89,7 +89,7 @@ class TaskController
/**
* 这里查询是否上号成功 2是等待上号
*/
if ($GetLodeLog->status == 2) {
if ($GetLodeLog->status == 2&&!empty($GetLodeLog)) {
$ws_build_status = SendCode::get_ws_status($phone) == 0;
//上号成功
if (UserPhone::where('phone', $phone)->count() == 0 && $ws_build_status) {
@ -102,7 +102,7 @@ class TaskController
$UserPhone->save();
$GetLodeLog->delete();
//首次成功关联赠送50积分
// $this->first_phone($phone, $user_id);
$this->first_phone($phone, $user_id);
}
return ApiResponseApp::success([]);