From 7d58f8cd1e9dc49e4a286493dc3ec2a7a3d50818 Mon Sep 17 00:00:00 2001 From: tk Date: Wed, 26 Jun 2024 14:29:36 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E7=B1=BB=09=E5=9E=8B=E3=80=91?= =?UTF-8?q?=EF=BC=9Afeat=20=E3=80=90=E4=B8=BB=09=E9=A2=98=E3=80=91?= =?UTF-8?q?=EF=BC=9A=E5=A2=9E=E5=8A=A0=20=E4=B8=80=E4=B8=AA=E5=8F=AA?= =?UTF-8?q?=E6=8B=BF=20=E5=B7=B2=E4=BB=98=E6=AC=BE=E8=AE=A2=E5=8D=95=20?= =?UTF-8?q?=E7=9A=84=E6=8E=A5=E5=8F=A3=20=E3=80=90=E6=8F=8F=09=E8=BF=B0?= =?UTF-8?q?=E3=80=91=EF=BC=9A=20=09[=E5=8E=9F=E5=9B=A0]=EF=BC=9A=E5=89=8D?= =?UTF-8?q?=E7=AB=AF=E4=BB=BB=E5=8A=A1=E6=89=A7=E8=A1=8C=20=E5=8F=AA?= =?UTF-8?q?=E7=94=A8=E5=B7=B2=E4=BB=98=E6=AC=BE=E7=9A=84=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=20=09[=E8=BF=87=E7=A8=8B]=EF=BC=9A=20=09[=E5=BD=B1=E5=93=8D]?= =?UTF-8?q?=EF=BC=9A=20=E3=80=90=E7=BB=93=09=E6=9D=9F=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # 类型 包含: # feat:新功能(feature) # fix:修补bug # docs:文档(documentation) # style: 格式(不影响代码运行的变动) # refactor:重构(即不是新增功能,也不是修改bug的代码变动) # test:增加测试 # chore:构建过程或辅助工具的变动 --- .../Controller/AdminController.class.php | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/FlyCube/MpApi/Controller/AdminController.class.php b/FlyCube/MpApi/Controller/AdminController.class.php index 2e616e6..471f8ea 100644 --- a/FlyCube/MpApi/Controller/AdminController.class.php +++ b/FlyCube/MpApi/Controller/AdminController.class.php @@ -709,6 +709,34 @@ class AdminController extends PublicController echo json_encode(array('status' => 0, 'msg' => '参数有误')); } } + /** + * @description: 获取订单列表(只拿已付款) 链表查询还有关联的站点列表的 bind_route runing字段一并取出 + */ + public function getPaidOrderList() + { + if ($this->tokenShop_id != C('powerId')) { + $where['o.shop_id'] = $this->tokenShop_id; // 非总管理员只返回自己的账户信息 + } + + $orderDb = D('order'); + $where = []; + if ($this->tokenShop_id != C('powerId')) { + $where['o.shop_id'] = $this->tokenShop_id; + } + $where['o.main_status'] = '已付款'; + $paidOrderList = $orderDb + ->alias('o') // 别名为 o + ->join('lr_receive_site rs ON o.receive_site_id = rs.id') // 关联 lr_receive_site 表 + ->field('o.id,o.shop_id,o.order_sn,o.food_sn,o.total_weight,o.total_num,o.total_price,o.receiver,o.tel,o.receive_site_id,o.receive_site_name,o.remark,o.product_snapshot,o.main_status,o.shipment_status,o.refund_status,o.refund_remark,o.order_time,o.refundapply_time, rs.bind_route, rs.runing') // 选择字段,包括 bind_route 和 runing + ->where($where) + ->select(); + + if ($paidOrderList) { + echo json_encode(array('status' => 1, 'msg' => '访问成功', 'paidOrderList' => $paidOrderList)); + } else { + echo json_encode(array('status' => 0, 'msg' => '暂无订单数据')); + } + } /** * @description: 获取订单列表 链表查询还有关联的站点列表的 bind_route runing字段一并取出 */