失败的订单
This commit is contained in:
53
app/order/controller/Failed.php
Normal file
53
app/order/controller/Failed.php
Normal file
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
/*
|
||||
* @Descripttion:
|
||||
* @version:
|
||||
* @Author: kangkang
|
||||
* @Date: 2020-10-13 19:52:37
|
||||
* @LastEditors: kangkang
|
||||
* @LastEditTime: 2020-10-16 17:21:58
|
||||
*/
|
||||
/*
|
||||
* @Descripttion:
|
||||
* @version:
|
||||
* @Author: kangkang
|
||||
* @Date: 2020-10-13 19:52:37
|
||||
* @LastEditors: kangkang
|
||||
* @LastEditTime: 2020-10-14 20:04:16
|
||||
*/
|
||||
|
||||
namespace app\order\controller;
|
||||
|
||||
use app\order\model\ProductOrder;
|
||||
use fastphp\base\Controller;
|
||||
|
||||
class Failed extends Controller
|
||||
{
|
||||
public function getFailedList()
|
||||
{
|
||||
$page = 0;
|
||||
if (isset($_GET['PageIndex'])) {
|
||||
$page = ($_GET['PageIndex'] - 1) * 50;
|
||||
}
|
||||
if (isset($_GET['ProductId'])){
|
||||
$where['ProductId'] = $_GET['ProductId'];
|
||||
}
|
||||
if (isset($_GET['PackageId'])){
|
||||
$where['PackageId'] = $_GET['PackageId'];
|
||||
}
|
||||
if (!empty($_GET['keyWord'])){
|
||||
$where['OrderNo'] = $_GET['keyWord'];
|
||||
}
|
||||
$where['Remark'] = ['like','%失败%'];
|
||||
|
||||
$productOrder = new ProductOrder;
|
||||
$list = $productOrder->getListPage($where, '*', 'id desc', "$page,50");
|
||||
$data = [
|
||||
'Code' => 10000,
|
||||
'Data' => $list,
|
||||
'Message' => '',
|
||||
'TotalCount' => (int)$productOrder->getCount(['Remark'=>['like','%失败%']]),
|
||||
];
|
||||
echo json_encode($data);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user