diff --git a/addons/shopro/controller/zy/Game.php b/addons/shopro/controller/zy/Game.php index a531a5a..2d14363 100644 --- a/addons/shopro/controller/zy/Game.php +++ b/addons/shopro/controller/zy/Game.php @@ -388,7 +388,9 @@ class Game extends Base // 更新用户得分 $teamA = json_decode($match->teamA, true); - $teamAuser = Participant::where('game_id', $game['id'])->where('user_id', 'IN', array_column($teamA['user'], 'user_id'))->select(); + $teamAuser = Participant::where('game_id', $game['id']) + ->where('user_id', 'IN', array_column($teamA['user'], 'user_id')) + ->where('status', '>', -1)->select(); // dd($teamAuser); foreach ($teamAuser as $u) { $u->team = $teamA['name']; //队伍名 diff --git a/addons/shopro/job/OrderAutoOper.php b/addons/shopro/job/OrderAutoOper.php index 0e9d657..f7e05d7 100644 --- a/addons/shopro/job/OrderAutoOper.php +++ b/addons/shopro/job/OrderAutoOper.php @@ -2,6 +2,7 @@ namespace addons\shopro\job; +use think; use think\Db; use think\Log; use think\queue\Job; @@ -41,10 +42,11 @@ class OrderAutoOper extends BaseJob Db::transaction(function () use ($order, $data) { $orderOper = new OrderOper(); $order = $orderOper->close($order, null, 'system'); + // zy体育报名处理(未支付,自动退坑) $join = GameJoin::where('order_id', $data['order']['id'])->find(); if (!empty($join)) { - $join->save([' status' => -1]); + $join->save(['status' => -1]); Participant::where('game_join_id', $join['id'])->update(['status' => -1]); } return $order;