修复错误3

This commit is contained in:
mkm 2023-04-19 15:47:39 +08:00
parent aeac9451c5
commit f4515aa1e2
3 changed files with 4 additions and 7 deletions

View File

@ -79,9 +79,9 @@ class StoreOrderDao extends BaseDao
})
->when(isset($where['order_type']) && $where['order_type'] >= 0 && $where['order_type'] !== '', function ($query) use ($where) {
if ($where['order_type'] == 2) {
$query->where('is_virtual', 1);
$query->where('StoreOrder.is_virtual', 1);
} 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) { //发货订单
$query->where('order_type', 0);
} else {
@ -92,7 +92,7 @@ class StoreOrderDao extends BaseDao
$query->where('activity_type', $where['activity_type']);
})
->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) {
switch ($where['status']) {

View File

@ -589,7 +589,7 @@ class StoreOrderRepository extends BaseRepository
'source' => $source
];
$where3=['uid' => $uid, 'status' => [0, 1, 2]];
if ($product_type>98){
if ($product_type>=98){
$where['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);
$count = $query->count();
// 增加订单类型筛选 1 小组采购 2 普通商品
$query->hasWhere('groupOrder', ['source' => $source]);
$list = $query->with([
'orderProduct',
'presellOrder',

View File

@ -159,7 +159,6 @@ class StoreOrder extends BaseController
$where['uid'] = $this->request->uid();
// $where['paid'] = 1;
$where['source'] = $source;
return app('json')->success($this->repository->getList($where, $page, $limit, $source));
}