【类 型】:fix
【主 题】:表前缀没加 【描 述】: [原因]:返回错误 表前缀没加 [过程]: [影响]: 【结 束】 # 类型 包含: # feat:新功能(feature) # fix:修补bug # docs:文档(documentation) # style: 格式(不影响代码运行的变动) # refactor:重构(即不是新增功能,也不是修改bug的代码变动) # test:增加测试 # chore:构建过程或辅助工具的变动
This commit is contained in:
parent
96b801b8e5
commit
09999c70a9
@ -715,18 +715,18 @@ class AdminController extends PublicController
|
||||
public function getOrderList()
|
||||
{
|
||||
if ($this->tokenShop_id != C('powerId')) {
|
||||
$where['shop_id'] = $this->tokenShop_id; //非总管理员 只返回自己的账户信息
|
||||
$where['o.shop_id'] = $this->tokenShop_id; // 非总管理员只返回自己的账户信息
|
||||
}
|
||||
|
||||
$orderDb = D('order');
|
||||
$where = [];
|
||||
if ($this->tokenShop_id != C('powerId')) {
|
||||
$where['shop_id'] = $this->tokenShop_id;
|
||||
$where['o.shop_id'] = $this->tokenShop_id;
|
||||
}
|
||||
|
||||
$orderList = $orderDb
|
||||
->alias('o') // 别名为 o
|
||||
->join('receive_site rs ON o.receive_site_id = rs.id') // 关联 receive_site 表
|
||||
->join('lr_receive_site rs ON o.receive_site_id = rs.id') // 关联 lr_receive_site 表
|
||||
->field('o.*, rs.bind_route') // 选择字段,包括 bind_route
|
||||
->where($where)
|
||||
->select();
|
||||
|
Loading…
Reference in New Issue
Block a user