no message

This commit is contained in:
hellcat 2025-10-13 20:07:50 +08:00
parent 953246022b
commit c5862ce1e9
2 changed files with 7 additions and 8 deletions

View File

@ -74,10 +74,10 @@ final class CouponController extends BaseController
$aPayOrderStatus = ["activated", "pending", "expired"];
$user_use_count = (new Order())->where('user_id', $user->id)->where('user_coupon', $coupon->code)->whereIn("status", $aPayOrderStatus)->count();
if ($user_use_count >= $use_limit) {
// return $response->withJson([
// 'ret' => 0,
// 'msg' => '优惠码使用次数已达上限',
// ]);
return $response->withJson([
'ret' => 0,
'msg' => '优惠码使用次数已达上限',
]);
}
}

View File

@ -27,13 +27,13 @@ final class PlanController extends BaseController
$oOrder = Order::where("user_id", $this->user->id)
->where("product_code", "!=", "code")
->where("status", "!=", "cancelled")
->orderByRaw("CASE
WHEN status = 'payment_pending' THEN 1
WHEN status = 'activated' THEN 2
WHEN status = 'pending' THEN 3
WHEN status = 'expired' THEN 4
When status = 'cancelled' THEN 5
ELSE 6
ELSE 5
END")
->orderBy('id', 'asc') // 按 id 降序排序
->paginate(20, ['*'], 'page', $iPage);
@ -55,9 +55,8 @@ final class PlanController extends BaseController
$oUserPlanRow->status = "提前续订";
} else if ($oUserPlanRow->status == "expired") {
$oUserPlanRow->status = "已过期";
} else if ($oUserPlanRow->status == "cancelled") {
$oUserPlanRow->status = "取消支付";
}
}
$sView = $this->view()