117 lines
3.3 KiB
PHP
117 lines
3.3 KiB
PHP
<?php
|
|
|
|
namespace app\admin\controller\finance;
|
|
|
|
use app\admin\logic\finance\OrderLogic;
|
|
use app\common\basics\AdminBase;
|
|
use app\common\enum\PayEnum;
|
|
use app\common\model\Client_;
|
|
use app\common\model\order\order as OrderModel;
|
|
use app\common\server\JsonServer;
|
|
|
|
|
|
class Order extends AdminBase
|
|
{
|
|
|
|
/**
|
|
* @notes 订单列表
|
|
* @return \think\response\Json|\think\response\View
|
|
* @author suny
|
|
* @date 2021/7/13 7:07 下午
|
|
*/
|
|
public function lists()
|
|
{
|
|
if ($this->request->isAjax()) {
|
|
$get = $this->request->get();
|
|
return JsonServer::success('', OrderLogic::statistics($get));
|
|
}
|
|
$data = OrderLogic::statistics();
|
|
// 订单状态
|
|
$order_status = OrderModel::getOrderStatus(true);
|
|
$order_status = OrderLogic::getStat($order_status); //拼装数量统计
|
|
// 订单类型
|
|
$order_type = OrderModel::getOrderType(true);
|
|
// 订单来源
|
|
$order_source = Client_::getClient(true);
|
|
// 支付方式
|
|
$pay_way = PayEnum::getPayWay(true);
|
|
// 配送方式
|
|
$delivery_type = OrderModel::getDeliveryType(true);
|
|
$all = OrderLogic::getAll();
|
|
$getLocalAll = OrderLogic::getLocalAll();
|
|
return view('', [
|
|
'all' => $all,
|
|
'getLocalAll'=>$getLocalAll,
|
|
'statistics' => $data,
|
|
'order_status' => $order_status,
|
|
'order_type' => $order_type,
|
|
'order_source' => $order_source,
|
|
'pay_way' => $pay_way,
|
|
'delivery_type' => $delivery_type
|
|
]);
|
|
}
|
|
|
|
/**
|
|
* @notes 本地生活订单列表
|
|
* @return \think\response\Json|\think\response\View
|
|
* @author Yzt
|
|
* @date 2024/10/18 4:07 下午
|
|
*/
|
|
public function localLists(){
|
|
|
|
if ($this->request->isAjax()) {
|
|
$get = $this->request->get();
|
|
return JsonServer::success('', OrderLogic::localLists($get));
|
|
}
|
|
|
|
$today = [
|
|
date('Y-m-d H:i:s', strtotime(date("Y-m-d", time()))),
|
|
date('Y-m-d H:i:s', strtotime(date("Y-m-d", time())) + 86399)
|
|
];
|
|
|
|
$yesterday = [
|
|
date('Y-m-d H:i:s', strtotime(date("Y-m-d", strtotime("-1 day")))),
|
|
date('Y-m-d H:i:s', strtotime(date("Y-m-d", strtotime("-1 day"))) + 86399)
|
|
];
|
|
|
|
|
|
$days_ago7 = [
|
|
date('Y-m-d H:i:s', strtotime(date("Y-m-d", strtotime("-7 day")))),
|
|
date('Y-m-d 23:59:59', time())
|
|
];
|
|
|
|
$days_ago30 = [
|
|
date('Y-m-d 00:00:00', strtotime("-30 day")),
|
|
date('Y-m-d 23:59:59', time())
|
|
];
|
|
$all = OrderLogic::getAll();
|
|
$getLocalAll = OrderLogic::getLocalAll();
|
|
return view('', array(
|
|
'getLocalAll'=>$getLocalAll,
|
|
'all'=>$all,
|
|
'today' => $today,
|
|
'yesterday' => $yesterday,
|
|
'days_ago7' => $days_ago7,
|
|
'days_ago30' => $days_ago30,
|
|
));
|
|
|
|
}
|
|
/**
|
|
* @notes 用户用黄金余额明细
|
|
* @return \think\response\Json|\think\response\View
|
|
* @author Yzt
|
|
* @date 2024/10/27 10:07 上午
|
|
*/
|
|
public function userMoneyLists(){
|
|
|
|
if ($this->request->isAjax()) {
|
|
$get = $this->request->get();
|
|
return JsonServer::success('', OrderLogic::userMoneyLists($get));
|
|
}
|
|
|
|
return view(''
|
|
);
|
|
}
|
|
|
|
|
|
} |