公共退款
This commit is contained in:
@@ -17,26 +17,40 @@ class OpenRefund
|
|||||||
$page = 0;
|
$page = 0;
|
||||||
$where = [];
|
$where = [];
|
||||||
$where2 = '';
|
$where2 = '';
|
||||||
if (isset($_GET['PageIndex'])) {
|
if (isset($_GET['page'])) {
|
||||||
$page = ($_GET['PageIndex'] - 1) * 50;
|
$page = ($_GET['page'] - 1) * 50;
|
||||||
}
|
}
|
||||||
if (isset($_GET['Btime'])){
|
if (!empty($_GET['Btime'])){
|
||||||
$date1 = date('Y-m-d', strtotime($_GET['Btime']));
|
$date1 = date('Y-m-d', strtotime($_GET['Btime']));
|
||||||
$date2 = date('Y-m-d', strtotime($_GET['Etime']));
|
$date2 = date('Y-m-d', strtotime($_GET['Etime']));
|
||||||
$where2 .= " UpdateTime>='" . $date1 . "' and UpdateTime<='" . $date2 . "' ";
|
$where2 .= " UpdateTime>='" . $date1 . "' and UpdateTime<='" . $date2 . "' ";
|
||||||
}
|
}
|
||||||
if (isset($_GET['ProductIds'])){
|
if (!empty($_GET['ProductIds'])){
|
||||||
$where['ProductId'] = $_GET['ProductIds'];
|
$where['ProductId'] = $_GET['ProductIds'];
|
||||||
}
|
}
|
||||||
$product_order_model = new PoductOrderModel;
|
$product_order_model = new PoductOrderModel;
|
||||||
$product_order_enum = new ProductOrderEnum;
|
$product_order_enum = new ProductOrderEnum;
|
||||||
$where['OrderType'] = $product_order_enum::$Refund;
|
$where['OrderType'] = $product_order_enum::$Refund;
|
||||||
$list = $product_order_model->openGetList($where, 'CreateTime,ProductName,PackageName,ConnectCount*AccountCount ConnectCount,Accounts,RefundRestTime,OrderState', 'CreateTime desc', "$page,50", $where2);
|
$list = $product_order_model->openGetList($where, 'CreateTime,ProductName,PackageName,ConnectCount*AccountCount ConnectCount,Accounts,RefundRestTime,OrderState', 'CreateTime desc', "$page,50", $where2);
|
||||||
$data = [
|
// $data = [
|
||||||
'list' => $list,
|
// 'list' => $list,
|
||||||
'count' => $product_order_model->getOpenCount($where,$where2)
|
// 'count' => $product_order_model->getOpenCount($where,$where2)
|
||||||
|
// ];
|
||||||
|
$order_status = [
|
||||||
|
'30' => '未自动退款',
|
||||||
|
'40' => '已人工处理',
|
||||||
|
'50' => '已自动退款',
|
||||||
];
|
];
|
||||||
\result($data);
|
foreach($list as &$info){
|
||||||
|
$info['OrderState'] = $order_status[$info['OrderState']];
|
||||||
|
}
|
||||||
|
$retuen_info = [
|
||||||
|
'code' => 0,
|
||||||
|
'msg' => '',
|
||||||
|
'count' => $product_order_model->getOpenCount($where,$where2)['count'],
|
||||||
|
'data' => $list,
|
||||||
|
];
|
||||||
|
echo json_encode($retuen_info);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -49,15 +63,12 @@ class OpenRefund
|
|||||||
$page = 0;
|
$page = 0;
|
||||||
$where = [];
|
$where = [];
|
||||||
$where2 = '';
|
$where2 = '';
|
||||||
if (isset($_GET['PageIndex'])) {
|
if (!empty($_GET['Btime'])){
|
||||||
$page = ($_GET['PageIndex'] - 1) * 50;
|
|
||||||
}
|
|
||||||
if (isset($_GET['Btime'])){
|
|
||||||
$date1 = date('Y-m-d', strtotime($_GET['Btime']));
|
$date1 = date('Y-m-d', strtotime($_GET['Btime']));
|
||||||
$date2 = date('Y-m-d', strtotime($_GET['Etime']));
|
$date2 = date('Y-m-d', strtotime($_GET['Etime']));
|
||||||
$where2 .= " UpdateTime>='" . $date1 . "' and UpdateTime<='" . $date2 . "' ";
|
$where2 .= " UpdateTime>='" . $date1 . "' and UpdateTime<='" . $date2 . "' ";
|
||||||
}
|
}
|
||||||
if (isset($_GET['ProductIds'])){
|
if (!empty($_GET['ProductIds'])){
|
||||||
$where['ProductId'] = ['IN',$_GET['ProductIds']];
|
$where['ProductId'] = ['IN',$_GET['ProductIds']];
|
||||||
}
|
}
|
||||||
$product_order_model = new PoductOrderModel;
|
$product_order_model = new PoductOrderModel;
|
||||||
|
|||||||
@@ -55,6 +55,7 @@ return [
|
|||||||
'http://register.wyk',
|
'http://register.wyk',
|
||||||
'http://popularize.juip.com',
|
'http://popularize.juip.com',
|
||||||
'http://agent.juip.com',
|
'http://agent.juip.com',
|
||||||
|
'http://refund.juip.com',
|
||||||
],
|
],
|
||||||
//支付宝
|
//支付宝
|
||||||
'alipay' => [
|
'alipay' => [
|
||||||
|
|||||||
Reference in New Issue
Block a user