对搜索返回的消息做中英双版本
This commit is contained in:
@@ -57,17 +57,17 @@ final class DepositSettlement
|
||||
?string $extraRemark = null
|
||||
): array {
|
||||
if ($orderId <= 0) {
|
||||
throw new RuntimeException('订单 ID 非法');
|
||||
throw new RuntimeException('Order id is invalid');
|
||||
}
|
||||
|
||||
$order = Db::name('deposit_order')->where('id', $orderId)->find();
|
||||
if (!$order) {
|
||||
throw new RuntimeException('订单不存在');
|
||||
throw new RuntimeException('Order does not exist');
|
||||
}
|
||||
|
||||
$orderNo = is_string($order['order_no']) ? $order['order_no'] : strval($order['order_no']);
|
||||
if ($orderNo === '') {
|
||||
throw new RuntimeException('订单号为空');
|
||||
throw new RuntimeException('Order number is empty');
|
||||
}
|
||||
|
||||
$statusRaw = $order['status'] ?? 0;
|
||||
@@ -97,12 +97,12 @@ final class DepositSettlement
|
||||
}
|
||||
|
||||
if ($status !== 0) {
|
||||
throw new RuntimeException('订单状态不允许结算');
|
||||
throw new RuntimeException('Order status does not allow settlement');
|
||||
}
|
||||
|
||||
$amount = self::amountString($order['amount'] ?? '0');
|
||||
if (bccomp($amount, '0', 2) <= 0) {
|
||||
throw new RuntimeException('订单金额异常');
|
||||
throw new RuntimeException('Order amount is invalid');
|
||||
}
|
||||
$bonus = self::amountString($order['bonus_amount'] ?? '0');
|
||||
if (bccomp($bonus, '0', 2) < 0) {
|
||||
@@ -112,12 +112,12 @@ final class DepositSettlement
|
||||
|
||||
$userId = is_numeric($order['user_id'] ?? null) ? intval($order['user_id']) : 0;
|
||||
if ($userId <= 0) {
|
||||
throw new RuntimeException('订单所属玩家无效');
|
||||
throw new RuntimeException('Order user is invalid');
|
||||
}
|
||||
|
||||
$user = Db::name('user')->where('id', $userId)->find();
|
||||
if (!$user) {
|
||||
throw new RuntimeException('玩家不存在');
|
||||
throw new RuntimeException('User does not exist');
|
||||
}
|
||||
|
||||
$channelId = is_numeric($order['channel_id'] ?? null) ? intval($order['channel_id']) : null;
|
||||
@@ -149,7 +149,7 @@ final class DepositSettlement
|
||||
'update_time' => $now,
|
||||
]);
|
||||
if ($affected <= 0) {
|
||||
throw new RuntimeException('订单状态已变更,请刷新后重试');
|
||||
throw new RuntimeException('Order state changed, please refresh and retry');
|
||||
}
|
||||
|
||||
Db::name('user')->where('id', $userId)->update([
|
||||
|
||||
Reference in New Issue
Block a user