修复支付状态问题

This commit is contained in:
2026-08-24 17:21:06 +08:00
parent 406fb8d6a6
commit 85a124b886
21 changed files with 198 additions and 308 deletions
+5 -1
View File
@@ -342,9 +342,13 @@ trait OrderRepositoryAdmin {
$params = [];
$status = sanitize_key((string) ($args['status'] ?? ''));
if ($status !== '' && $status !== 'all') {
$valid_statuses = array_keys(\AKSRT\Core\DomainModel::order_status_labels());
if ($status !== '' && $status !== 'all' && in_array($status, $valid_statuses, true)) {
$where[] = 'status = %s';
$params[] = $status;
} else {
$where[] = 'status IN (' . implode(', ', array_fill(0, count($valid_statuses), '%s')) . ')';
array_push($params, ...$valid_statuses);
}
$product_type = sanitize_key((string) ($args['product_type'] ?? ''));