【类 型】:factor
【主 题】: 【描 述】: [原因]:删除 排除已送达的条件 取回所有的已付款订单 [过程]: [影响]: 【结 束】 # 类型 包含: # feat:新功能(feature) # fix:修补bug # docs:文档(documentation) # style: 格式(不影响代码运行的变动) # refactor:重构(即不是新增功能,也不是修改bug的代码变动) # test:增加测试 # chore:构建过程或辅助工具的变动
This commit is contained in:
parent
eb03001a23
commit
bda43c44ce
@ -710,7 +710,7 @@ class AdminController extends PublicController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @description: 获取订单列表(只拿已付款 未送达) 链表查询还有关联的站点列表的 bind_route runing字段一并取出
|
* @description: 获取订单列表(只拿已付款) 链表查询还有关联的站点列表的 bind_route runing字段一并取出
|
||||||
*/
|
*/
|
||||||
public function getPaidOrderList()
|
public function getPaidOrderList()
|
||||||
{
|
{
|
||||||
@ -719,21 +719,16 @@ class AdminController extends PublicController
|
|||||||
}
|
}
|
||||||
|
|
||||||
$orderDb = D('order');
|
$orderDb = D('order');
|
||||||
$where = [];
|
|
||||||
if ($this->tokenShop_id != C('powerId')) {
|
|
||||||
$where['o.shop_id'] = $this->tokenShop_id;
|
|
||||||
}
|
|
||||||
$where['o.main_status'] = '已付款';
|
$where['o.main_status'] = '已付款';
|
||||||
$where['o.shipment_status'] = array('NEQ', '已送达');
|
|
||||||
$paidOrderList = $orderDb
|
$paidOrderList = $orderDb
|
||||||
->alias('o') // 别名为 o
|
->alias('o') // 别名为 o
|
||||||
->join('lr_receive_site rs ON o.receive_site_id = rs.id') // 关联 lr_receive_site 表
|
->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.apply_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
|
->field('o.id,o.shop_id,o.order_sn,o.food_sn,o.total_weight,o.total_num,o.total_price,o.apply_price,o.receiver,o.tel,o.by_plane_id,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)
|
->where($where)
|
||||||
->select();
|
->select();
|
||||||
|
|
||||||
if ($paidOrderList) {
|
if ($paidOrderList) {
|
||||||
echo json_encode(array('status' => 1, 'msg' => '访问成功', 'paidOrderList' => $paidOrderList));
|
echo json_encode(array('status' => 1, 'msg' => '成功获取待处理', 'paidOrderList' => $paidOrderList));
|
||||||
} else {
|
} else {
|
||||||
echo json_encode(array('status' => 0, 'msg' => '暂无订单数据'));
|
echo json_encode(array('status' => 0, 'msg' => '暂无订单数据'));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user