|
|
@ -10,6 +10,7 @@ use app\model\PaymentCodeLogModel; |
|
|
|
use app\model\PaymentListModel; |
|
|
|
use app\model\RechargeApplyModel; |
|
|
|
use app\model\UserModel; |
|
|
|
use think\facade\Log; |
|
|
|
|
|
|
|
class RechargeService extends AdminBaseService |
|
|
|
{ |
|
|
@ -73,6 +74,20 @@ class RechargeService extends AdminBaseService |
|
|
|
$rows[$key]['user_no'] = $userNoArr[$item['user_id']] ?? '-'; // 用户号 |
|
|
|
$rows[$key]['order_id'] = $item['order_no']; |
|
|
|
$rows[$key]['recharge_channel'] = PaymentListModel::where('id', $item['recharge_channel'])->value('channel'); |
|
|
|
|
|
|
|
$paymentCodeLog = PaymentCodeLogModel::where('recharge_apply_id', $item['id'])->find(); |
|
|
|
if (!empty($paymentCodeLog)) { |
|
|
|
$paymentCodeLog = $paymentCodeLog->toArray(); |
|
|
|
$paymentConfig = PaymentCodeConfigModel::where('id', $paymentCodeLog['payment_code_config_id'])->find(); |
|
|
|
if (!empty($paymentConfig)) { |
|
|
|
$paymentConfig = $paymentConfig->toArray(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
$rows[$key]['payment_code_log'] = $paymentCodeLog; |
|
|
|
$rows[$key]['payment_code_config'] = $paymentConfig ?? []; |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
return $this->toData('0', 'SUCCESS', ['total' => $total, 'list' => $rows, 'sum' => $sum . 'USD', 'extend' => $statusList]); |
|
|
@ -137,13 +152,17 @@ class RechargeService extends AdminBaseService |
|
|
|
} |
|
|
|
$info = RechargeApplyModel::getOrderInfo($where); |
|
|
|
if ($info) { |
|
|
|
if ($info['is_online'] == 1){ |
|
|
|
return $this->toData('10040', '在线充值 不可操作'); |
|
|
|
} |
|
|
|
// if ($info['is_online'] == 1){ |
|
|
|
// return $this->toData('10040', '在线充值 不可操作'); |
|
|
|
// } |
|
|
|
|
|
|
|
if ($info['is_check'] == 0) { |
|
|
|
if ($param['check_status'] == 1) { |
|
|
|
$result = $this->updateUserAsset($info['user_id'], $info['account_type'], 1, $info['market_amount'], 0, $info['order_no']); |
|
|
|
if ($param['real_amount'] > 0 ){ |
|
|
|
$result = $this->updateUserAsset($info['user_id'], $info['account_type'], 1, $param['real_amount'], 0, $info['order_no']); |
|
|
|
} else { |
|
|
|
$result = $this->updateUserAsset($info['user_id'], $info['account_type'], 1, $info['market_amount'], 0, $info['order_no']); |
|
|
|
} |
|
|
|
if ($result['status'] == 200) { |
|
|
|
RechargeApplyModel::where('id', $info['id'])->update([ |
|
|
|
'real_amount' => $param['real_amount'] ?? 0, // 实际到账金额,审核时候运营人员手动输入的 |
|
|
@ -152,7 +171,7 @@ class RechargeService extends AdminBaseService |
|
|
|
'deal_time' => date('Y-m-d H:i:s') |
|
|
|
]); |
|
|
|
} else { |
|
|
|
return $this->toData('1015', '系统异常 请稍后重试'); |
|
|
|
return $this->toData('1015', '系统异常 请稍后重试', $result); |
|
|
|
} |
|
|
|
} else { |
|
|
|
RechargeApplyModel::where('id', $info['id'])->update([ |
|
|
|