fix(shopro): 修复体育游戏自动退坑和更新用户得分逻辑
- 在 Game 控制器中,为 teamAuser 查询添加 status > -1 的条件,以确保只更新有效用户的得分 - 在 OrderAutoOper 任务中,修复 GameJoin 表格的 status 字段更新逻辑,并添加 Participant 表格的状态更新
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user