淘宝退款、用户提现筛选
This commit is contained in:
@@ -4,8 +4,8 @@
|
||||
* @version:
|
||||
* @Author: kangkang
|
||||
* @Date: 2020-10-11 11:22:56
|
||||
* @LastEditors: kangkang
|
||||
* @LastEditTime: 2020-11-02 11:04:32
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @LastEditTime: 2020-12-07 17:30:59
|
||||
*/
|
||||
|
||||
namespace app\order\controller;
|
||||
@@ -139,14 +139,27 @@ class CashOutAdmin extends Controller
|
||||
//获取记录
|
||||
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();
|
||||
$data = json_decode(file_get_contents("php://input"), true)['data'];
|
||||
$where = [];
|
||||
$where_str = '';
|
||||
if (!empty($data)) {
|
||||
if (!empty($data['username'])) {
|
||||
$where['username'] = ['like', '%' . $data['username'] . '%'];
|
||||
}
|
||||
if (!empty($data['op_user'])) {
|
||||
$where['op_user'] = ['like', '%' . $data['op_user'] . '%'];
|
||||
}
|
||||
if (!empty($data['create_time']['st'])) {
|
||||
$date1 = date('Y-m-d', strtotime($data['create_time']['st']));
|
||||
$date2 = date('Y-m-d', strtotime($data['create_time']['et']));
|
||||
$where_str = " create_time>='" . $date1 . "' and create_time<='" . $date2 . "' ";
|
||||
}
|
||||
if ($data['status'] != null) {
|
||||
$where['status'] = $data['status'];
|
||||
}
|
||||
}
|
||||
$cash = new CashMoedl;
|
||||
$list = $cash->search($where, '*', 'id desc', '10000', $where_str);
|
||||
//提现状态
|
||||
$status = ['待处理', '同意', '拒绝'];
|
||||
foreach ($list as &$v) {
|
||||
@@ -175,4 +188,41 @@ class CashOutAdmin extends Controller
|
||||
\result($info,'',30000);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 导出数据
|
||||
* @param {*}
|
||||
* @return {*}
|
||||
*/
|
||||
public function export()
|
||||
{
|
||||
$data = json_decode(file_get_contents("php://input"), true)['data'];
|
||||
$where = [];
|
||||
$where_str = '';
|
||||
if (!empty($data)) {
|
||||
if (!empty($data['username'])) {
|
||||
$where['username'] = ['like', '%' . $data['username'] . '%'];
|
||||
}
|
||||
if (!empty($data['op_user'])) {
|
||||
$where['op_user'] = ['like', '%' . $data['op_user'] . '%'];
|
||||
}
|
||||
if (!empty($data['create_time']['st'])) {
|
||||
$date1 = date('Y-m-d', strtotime($data['create_time']['st']));
|
||||
$date2 = date('Y-m-d', strtotime($data['create_time']['et']));
|
||||
$where_str = " create_time>='" . $date1 . "' and create_time<='" . $date2 . "' ";
|
||||
}
|
||||
if ($data['status'] != null) {
|
||||
$where['status'] = $data['status'];
|
||||
}
|
||||
}
|
||||
$cash = new CashMoedl;
|
||||
$list = $cash->search($where, '*', 'id desc', '10000', $where_str);
|
||||
//提现状态
|
||||
$status = ['待处理', '同意', '拒绝'];
|
||||
foreach ($list as &$v) {
|
||||
$v['status'] = $status[$v['status']];
|
||||
$v['alipay_account'] = substr($v['alipay_account'], 0, 3) . '***' . substr($v['alipay_account'], -3);
|
||||
}
|
||||
\exportToCsv('test.csv',['id','用户id','用户名','真实姓名','账单号','支付宝订单号','状态','提现金额','申请理由','客户支付宝张号','处理人','处理备注','提现时间','处理时间'],$list);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user