diff --git a/app/Controller/Api/V1/Group/GiftController.php b/app/Controller/Api/V1/Group/GiftController.php index aba2eaa6829a6a24ada4bb57c2d075a25cf710f7..04b3db71e2bacecef26037b338345652df93148a 100644 --- a/app/Controller/Api/V1/Group/GiftController.php +++ b/app/Controller/Api/V1/Group/GiftController.php @@ -175,8 +175,7 @@ class GiftController extends CController $model = Players::where('players.id', '=', $j['player_id']) ->leftjoin('signups as o', 'o.id', '=', 'players.sign_id') ->select('o.mine_id') - ->first() - ->toArray(); + ->first(); $follow_status = 1; // 关注状态 @@ -191,7 +190,7 @@ class GiftController extends CController if ($follow_status == 2) { $to_follow_user = DB::table('user_follow') ->where('to_user_id', $user_id) - ->where('user_id', $model['mine_id']) + ->where('user_id', data_get($model, 'mine_id','')) ->first(); if (!empty($to_follow_user)) { $follow_status = 3; @@ -214,8 +213,7 @@ class GiftController extends CController $model = Players::where('players.id', '=', $j['player_id']) ->leftjoin('signups as o', 'o.id', '=', 'players.sign_id') ->select('o.mine_id') - ->first() - ->toArray(); + ->first(); $follow_status = 1; // 关注状态 @@ -230,7 +228,7 @@ class GiftController extends CController if ($follow_status == 2) { $to_follow_user = DB::table('user_follow') ->where('to_user_id', $user_id) - ->where('user_id', $model['mine_id']) + ->where('user_id', data_get($model, 'mine_id','')) ->first(); if (!empty($to_follow_user)) { $follow_status = 3;