修复错误3
This commit is contained in:
parent
aeac9451c5
commit
f4515aa1e2
@ -79,9 +79,9 @@ class StoreOrderDao extends BaseDao
|
|||||||
})
|
})
|
||||||
->when(isset($where['order_type']) && $where['order_type'] >= 0 && $where['order_type'] !== '', function ($query) use ($where) {
|
->when(isset($where['order_type']) && $where['order_type'] >= 0 && $where['order_type'] !== '', function ($query) use ($where) {
|
||||||
if ($where['order_type'] == 2) {
|
if ($where['order_type'] == 2) {
|
||||||
$query->where('is_virtual', 1);
|
$query->where('StoreOrder.is_virtual', 1);
|
||||||
} else if($where['order_type'] == 0){ //实体发货订单
|
} else if($where['order_type'] == 0){ //实体发货订单
|
||||||
$query->where('order_type', 0)->where('is_virtual',0);
|
$query->where('order_type', 0)->where('StoreOrder.is_virtual',0);
|
||||||
} else if($where['order_type'] == 3) { //发货订单
|
} else if($where['order_type'] == 3) { //发货订单
|
||||||
$query->where('order_type', 0);
|
$query->where('order_type', 0);
|
||||||
} else {
|
} else {
|
||||||
@ -92,7 +92,7 @@ class StoreOrderDao extends BaseDao
|
|||||||
$query->where('activity_type', $where['activity_type']);
|
$query->where('activity_type', $where['activity_type']);
|
||||||
})
|
})
|
||||||
->when(isset($where['product_type']) && $where['product_type'] != 0, function ($query) use ($where) {
|
->when(isset($where['product_type']) && $where['product_type'] != 0, function ($query) use ($where) {
|
||||||
$query->where('is_virtual', $where['product_type']);
|
$query->where('StoreOrder.is_virtual', $where['product_type']);
|
||||||
})
|
})
|
||||||
->when(isset($where['status']) && $where['status'] !== '', function ($query) use ($where) {
|
->when(isset($where['status']) && $where['status'] !== '', function ($query) use ($where) {
|
||||||
switch ($where['status']) {
|
switch ($where['status']) {
|
||||||
|
@ -589,7 +589,7 @@ class StoreOrderRepository extends BaseRepository
|
|||||||
'source' => $source
|
'source' => $source
|
||||||
];
|
];
|
||||||
$where3=['uid' => $uid, 'status' => [0, 1, 2]];
|
$where3=['uid' => $uid, 'status' => [0, 1, 2]];
|
||||||
if ($product_type>98){
|
if ($product_type>=98){
|
||||||
$where['is_virtual'] = $product_type;
|
$where['is_virtual'] = $product_type;
|
||||||
$where3['is_virtual'] = $product_type;
|
$where3['is_virtual'] = $product_type;
|
||||||
}
|
}
|
||||||
@ -1681,10 +1681,8 @@ class StoreOrderRepository extends BaseRepository
|
|||||||
|
|
||||||
$query = $this->dao->search($where)->where('StoreOrder.is_del', 0);
|
$query = $this->dao->search($where)->where('StoreOrder.is_del', 0);
|
||||||
$count = $query->count();
|
$count = $query->count();
|
||||||
|
|
||||||
// 增加订单类型筛选 1 小组采购 2 普通商品
|
// 增加订单类型筛选 1 小组采购 2 普通商品
|
||||||
$query->hasWhere('groupOrder', ['source' => $source]);
|
$query->hasWhere('groupOrder', ['source' => $source]);
|
||||||
|
|
||||||
$list = $query->with([
|
$list = $query->with([
|
||||||
'orderProduct',
|
'orderProduct',
|
||||||
'presellOrder',
|
'presellOrder',
|
||||||
|
@ -159,7 +159,6 @@ class StoreOrder extends BaseController
|
|||||||
$where['uid'] = $this->request->uid();
|
$where['uid'] = $this->request->uid();
|
||||||
// $where['paid'] = 1;
|
// $where['paid'] = 1;
|
||||||
$where['source'] = $source;
|
$where['source'] = $source;
|
||||||
|
|
||||||
return app('json')->success($this->repository->getList($where, $page, $limit, $source));
|
return app('json')->success($this->repository->getList($where, $page, $limit, $source));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user