chuan 3 months ago
parent
commit
0694005b8f
  1. 11
      app/admin/controller/Index.php
  2. 11
      app/admin/service/UserService.php
  3. 5
      app/home/controller/Pay.php
  4. 2
      app/home/route/app.php
  5. 12
      app/home/service/PayService.php

11
app/admin/controller/Index.php

@ -209,7 +209,9 @@ class Index extends AdminBaseController
// 等待处理提款订单数量
$pendingWithdraw = UserWithdrawalModel::where('status', 4)->where($whereInUser)->count();
// 等待实名审核数量
$pendingUserVerify = UserVerifyLogModel::where('status', 1)->where($whereInUser)->count();
$awaitingRealName = UserVerifyLogModel::where('status', 1)->where($whereInUser)->count(); // 待审核实名认证用户数
$approvedRealName = UserVerifyLogModel::where('status', 2)->where($whereInUser)->count(); // 审核通过实名认证用户数
$failedRealName = UserVerifyLogModel::where('status', 3)->where($whereInUser)->count(); // 审核失败实名认证用户数
$data = [
'todayRegisterNum' => $todayRegisterNum, // 今日注册用户
@ -230,9 +232,12 @@ class Index extends AdminBaseController
'todayWithdrawAmount' => $todayWithdrawAmount, // 今日提款金额
'totalWithdrawAmount' => $totalWithdrawAmount, // 总提款金额
'no_deal_recharge' => $pendingRecharge, // 等待处理充值订单数量
'no_deal_recharge' => $pendingRecharge, // 等待处理充值订单数量
'no_deal_withdraw' => $pendingWithdraw, // 等待处理提款订单数量
'no_deal_real' => $pendingUserVerify, // 等待实名审核数量
'awaiting_real_name' => $awaitingRealName, // 等待实名审核用户数
'approved_real_name' => $approvedRealName, // 实名审核通过用户数
'failed_real_name' => $failedRealName, // 实名审核失败用户数
];
return json(['code' => '0', 'message' => 'SUCCESS', 'data' => $data]);

11
app/admin/service/UserService.php

@ -990,15 +990,12 @@ class UserService extends AdminBaseService
$log = UserVerifyLogModel::where('id', $id)->find();
if (empty($log)) {
return $this->toData('100400', 'ID param error', []);
return $this->toData('100400', '实名认证信息为空');
}
$agentAuth = env('AGENT_AUTH.AGENT_AUTH_VERIFY'); // 0代理不可审核 1代理可审核
if (empty($agentAuth)){
$isAgent = AdminModel::checkUserIsAgent($adminId);
if ($isAgent) {
return $this->toData('10040', '代理无权限操作');
}
$isAgent = AdminModel::checkUserIsAgent($adminId);
if ($isAgent) {
return $this->toData('500', '不是代理无权限操作');
}
$isReal = 0;

5
app/home/controller/Pay.php

@ -21,10 +21,9 @@ use think\Request;
*/
class Pay extends HomeBaseController
{
public function payChannel(Request $request): Json
public function payChannel(): Json
{
$data['is_online'] = $request->post('is_online', 1);
$result = (new PayService())->getPaymentList($data);
$result = (new PayService())->getPaymentList($this->request->post());
return json($result);
}

2
app/home/route/app.php

@ -203,7 +203,7 @@ Route::group('/',function (){
Route::post('payment_list', 'Pay/payChannel'); //获取充值渠道
Route::post('user_recharge', 'Pay/rechargeApply')->middleware(\app\home\middleware\RepeatOperateMiddleware::class); // 用户申请充值
Route::post('user_recharge', 'Pay/rechargeApply')->middleware(\app\home\middleware\RepeatOperateMiddleware::class); // 用户提交充值订单
Route::post('user_assets', 'Wallet/getAllAssets'); // 获取用户所有资产列表数据
Route::post('user_balance', 'Wallet/getUserBalance'); // 获取用户所有资产列表数据

12
app/home/service/PayService.php

@ -18,13 +18,21 @@ class PayService extends BaseHomeService
{
public function getPaymentList(array $data)
{
if (empty($data['channel_type'])) {
return $this->toData(400, lang('parameter_error'));
}
if (!isset($data['is_online'])) {
$data['is_online'] = 1;
}
$list = PaymentListModel::where([
'status' => 1,
'is_recharge' => 1,
'channel_type' => $data['channel_type'],
'is_online' => $data['is_online']
])->order('id', 'desc')->select()->toArray();
return $this->toData(0, 'Request successful.', $list);
return $this->toData(0, 'successful', $list);
}
/**
@ -237,7 +245,7 @@ class PayService extends BaseHomeService
}
} else {
return $this->toData(100140, 'The system is busy. Please try again later.10', []);
return $this->toData(500, lang('system_busy'));
}
}

Loading…
Cancel
Save