修复错误

This commit is contained in:
mkm 2023-11-09 11:37:57 +08:00
parent 685f914077
commit ffb9e9051c
2 changed files with 11 additions and 7 deletions

View File

@ -1808,7 +1808,7 @@ class StoreOrderRepository extends BaseRepository
unset($order['takeOrderList'], $order->interest);
}
return compact( 'count','list', 'where');
return compact( 'count','list');
}
public function getOrderStatusV2($order) {

View File

@ -73,17 +73,17 @@ class StoreOrderBehalf extends BaseController
$mer_id = Db::name('store_service')->where('uid', $uid)->where('is_del', 0)->value('mer_id');
if ($mer_id) {
if($status=='all'){
$where[]=['status','>=',0];
$where['status']=['>=',0];
}else{
$where[]=['status','=',$status];
$where['status']=['=',$status];
}
$column = Db::name('store_order_behalf')->where('mer_id', $mer_id)->where($where)->page($page)->limit($limit)->column('order_id');
if ($column) {
$where['order_id'] = $column;
if($status==0){
$where[]=['status','=',2];
$where['status']=2;
}elseif($status==1){
$where[]=['status','=',3];
$where['status']=3;
}
return app('json')->success($this->repository->getList($where, 1, 100));
}
@ -138,8 +138,12 @@ class StoreOrderBehalf extends BaseController
$uid = $this->request->userInfo()['uid'];
$mer_id = Db::name('store_service')->where('uid', $uid)->where('is_del', 0)->value('mer_id');
if ($mer_id) {
$noPostage = Db::name('store_order_behalf')->where('mer_id', $mer_id)->where('status',0)->count();
$noDeliver = Db::name('store_order_behalf')->where('mer_id', $mer_id)->where('status',1)->count();
$noPostage = Db::name('store_order_behalf')->where('mer_id', $mer_id)->where('status',0)
->join('store_order', 'store_order.status = 0')
->count();
$noDeliver = Db::name('store_order_behalf')->where('mer_id', $mer_id)->where('status',1)
->join('store_order', 'store_order.status = 1')
->count();
}
return app('json')->success(compact('noDeliver', 'noPostage',));