【类 型】:test

【主	题】:获取 订单列表接口 的demo
【描	述】:
	[原因]:方便前端调试
	[过程]:
	[影响]:
【结	束】

# 类型 包含:
# feat:新功能(feature)
# fix:修补bug
# docs:文档(documentation)
# style: 格式(不影响代码运行的变动)
# refactor:重构(即不是新增功能,也不是修改bug的代码变动)
# test:增加测试
# chore:构建过程或辅助工具的变动
This commit is contained in:
tk 2024-07-01 20:48:26 +08:00
parent e830e70353
commit 9ac04ab1c2

View File

@ -748,22 +748,7 @@ class AdminController extends PublicController
}
$orderDb = D('order');
$where = [];
if ($this->tokenShop_id != C('powerId')) {
$where['o.shop_id'] = $this->tokenShop_id;
}
$orderList = $orderDb
->alias('o') // 别名为 o
->join('lr_receive_site rs ON o.receive_site_id = rs.id') // 关联 lr_receive_site 表
->field('o.*, rs.bind_route, rs.runing') // 选择字段,包括 bind_route 和 runing
->where($where)
->select();
if ($orderList) {
$orderList = $orderDb->select();
echo json_encode(array('status' => 1, 'msg' => '访问成功', 'orderList' => $orderList));
} else {
echo json_encode(array('status' => 0, 'msg' => '暂无订单数据'));
}
}
}