youhua
This commit is contained in:
@@ -1,10 +1,17 @@
|
||||
<?php
|
||||
/*
|
||||
* @Descripttion:
|
||||
* @version:
|
||||
* @Author: kangkang
|
||||
* @Date: 2020-10-11 11:22:56
|
||||
* @LastEditors: kangkang
|
||||
* @LastEditTime: 2020-10-12 12:06:20
|
||||
*/
|
||||
|
||||
namespace app\order\controller;
|
||||
|
||||
use app\order\model\CashOut as CashMoedl;
|
||||
use fastphp\base\Controller;
|
||||
use alipay\Alipay;
|
||||
|
||||
class Admin extends Controller
|
||||
{
|
||||
@@ -36,7 +43,13 @@ class Admin extends Controller
|
||||
}
|
||||
$page = ($_GET['page'] - 1) * 50;
|
||||
$cash = new CashMoedl;
|
||||
$list = $cash->getListPage('*', 'id desc', "$page,50");
|
||||
$list = $cash->getListPage([], '*', 'id desc', "$page,50");
|
||||
//提现状态
|
||||
$status = ['待处理', '同意', '拒绝'];
|
||||
foreach ($list as &$v) {
|
||||
$v['status'] = $status[$v['status']];
|
||||
$v['alipay_account'] = substr($v['alipay_account'], 0, 3) . '***' . substr($v['alipay_account'], -3);
|
||||
}
|
||||
$data = [
|
||||
'Code' => 10000,
|
||||
'data' => $list,
|
||||
@@ -44,28 +57,56 @@ class Admin extends Controller
|
||||
echo json_encode($data);
|
||||
}
|
||||
|
||||
//处理提现申请
|
||||
/**
|
||||
* @description: 订单搜索
|
||||
* @param {type} 搜索会员账号
|
||||
* @return {type} 该会员所有的订单信息 按照id倒序
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$data = json_decode(file_get_contents("php://input"),true)['info'];
|
||||
$data = json_decode(file_get_contents("php://input"), true)['info'];
|
||||
$id = $data['id'];
|
||||
unset($data['update_time']);
|
||||
unset($data['create_time']);
|
||||
unset($data['id']);
|
||||
|
||||
|
||||
$user = $this->userinfo;
|
||||
$data['op_user'] = $user['LoginName'];
|
||||
$status = ['0', '1', '2'];
|
||||
if(!in_array($data['status'],$status)){
|
||||
if (!in_array($data['status'], $status)) {
|
||||
unset($data['status']);
|
||||
}
|
||||
$cash = new CashMoedl;
|
||||
$up_status = $cash->where(['id'=>$id])->update($data);
|
||||
$up_status = $cash->where(['id' => $id])->update($data);
|
||||
$return_info = [
|
||||
'Code' => 10000,
|
||||
];
|
||||
echo json_encode($return_info);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//获取记录
|
||||
public function search()
|
||||
{
|
||||
$username = json_decode(file_get_contents("php://input"), true)['username'];
|
||||
$cash = new CashMoedl;
|
||||
if ($username) {
|
||||
$list = $cash->getListPage(['username' => $username], '*', 'id desc', '100');
|
||||
} else {
|
||||
$list = $cash->getListPage();
|
||||
$count = $cash->getCount();
|
||||
}
|
||||
//提现状态
|
||||
$status = ['待处理', '同意', '拒绝'];
|
||||
foreach ($list as &$v) {
|
||||
$v['status'] = $status[$v['status']];
|
||||
$v['alipay_account'] = substr($v['alipay_account'], 0, 3) . '***' . substr($v['alipay_account'], -3);
|
||||
}
|
||||
$data = [
|
||||
'Code' => 10000,
|
||||
'count' => $count['count'] ?? 0,
|
||||
'data' => $list,
|
||||
];
|
||||
echo json_encode($data);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user