公共退款
This commit is contained in:
@@ -17,26 +17,40 @@ class OpenRefund
|
||||
$page = 0;
|
||||
$where = [];
|
||||
$where2 = '';
|
||||
if (isset($_GET['PageIndex'])) {
|
||||
$page = ($_GET['PageIndex'] - 1) * 50;
|
||||
if (isset($_GET['page'])) {
|
||||
$page = ($_GET['page'] - 1) * 50;
|
||||
}
|
||||
if (isset($_GET['Btime'])){
|
||||
if (!empty($_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'])){
|
||||
if (!empty($_GET['ProductIds'])){
|
||||
$where['ProductId'] = $_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,OrderState', 'CreateTime desc', "$page,50", $where2);
|
||||
$data = [
|
||||
'list' => $list,
|
||||
'count' => $product_order_model->getOpenCount($where,$where2)
|
||||
// $data = [
|
||||
// 'list' => $list,
|
||||
// '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;
|
||||
$where = [];
|
||||
$where2 = '';
|
||||
if (isset($_GET['PageIndex'])) {
|
||||
$page = ($_GET['PageIndex'] - 1) * 50;
|
||||
}
|
||||
if (isset($_GET['Btime'])){
|
||||
if (!empty($_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'])){
|
||||
if (!empty($_GET['ProductIds'])){
|
||||
$where['ProductId'] = ['IN',$_GET['ProductIds']];
|
||||
}
|
||||
$product_order_model = new PoductOrderModel;
|
||||
|
||||
@@ -55,6 +55,7 @@ return [
|
||||
'http://register.wyk',
|
||||
'http://popularize.juip.com',
|
||||
'http://agent.juip.com',
|
||||
'http://refund.juip.com',
|
||||
],
|
||||
//支付宝
|
||||
'alipay' => [
|
||||
|
||||
Reference in New Issue
Block a user