公开退款导出
This commit is contained in:
@@ -38,4 +38,33 @@ class OpenRefund
|
||||
];
|
||||
\result($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 导出数据
|
||||
* @param {*}
|
||||
* @return {*}
|
||||
*/
|
||||
public function export()
|
||||
{
|
||||
$page = 0;
|
||||
$where = [];
|
||||
$where2 = '';
|
||||
if (isset($_GET['PageIndex'])) {
|
||||
$page = ($_GET['PageIndex'] - 1) * 50;
|
||||
}
|
||||
if (isset($_GET['Btime'])){
|
||||
$date1 = date('Y-m-d', strtotime($_GET['Btime']));
|
||||
$date2 = date('Y-m-d', strtotime($_GET['Etime']));
|
||||
$where2 .= " UpdateTime>='" . $date1 . "' and UpdateTime<='" . $date2 . "' ";
|
||||
}
|
||||
if (isset($_GET['ProductIds'])){
|
||||
$where['ProductId'] = ['IN',$_GET['ProductIds']];
|
||||
}
|
||||
$product_order_model = new PoductOrderModel;
|
||||
$product_order_enum = new ProductOrderEnum;
|
||||
$where['OrderType'] = $product_order_enum::$Refund;
|
||||
$list = $product_order_model->openGetList($where, 'CreateTime,ProductName,PackageName,ConnectCount*AccountCount ConnectCount,Accounts,RefundRestTime', 'CreateTime desc', "10000000", $where2);
|
||||
|
||||
\exportToCsv('test.csv',['创建时间','产品','套餐','连接数','账号','剩余时间'],$list);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user