This commit is contained in:
mkm 2024-01-13 11:04:25 +08:00
parent 5b74770b87
commit 44a06e0be0
2 changed files with 8 additions and 4 deletions

View File

@ -92,9 +92,6 @@ class StoreOrderDao extends BaseDao
->when(isset($where['activity_type']) && $where['activity_type'] != '', function ($query) use ($where) {
$query->where('activity_type', $where['activity_type']);
})
->when(isset($where['product_type']) && $where['product_type'] != '', function ($query) use ($where) {
$query->where('activity_type', $where['product_type']);
})
->when(isset($where['status']) && $where['status'] !== '', function ($query) use ($where) {
// 12表示信用购 先货后款
switch ($where['status']) {
@ -223,7 +220,13 @@ class StoreOrderDao extends BaseDao
$query->where('reconciliation_id', 0);
});
})->order('StoreOrder.create_time DESC');
if (isset($where['source']) && $where['source'] == 103) {
$wheres['activity_type'] = [0, 98];
$wheres['source'] = [2, 103];
$query->where($wheres);
} else {
$query->where('activity_type', $where['product_type']);
}
return $query;
}

View File

@ -133,6 +133,7 @@ class StoreOrder extends BaseController
[$page, $limit] = $this->getPage();
$where['status'] = $this->request->param('status');
$where['product_type'] = $this->request->param('product_type', 0);
$where['source'] = $this->request->param('source', 2);
$where['search'] = $this->request->param('store_name');
$where['uid'] = $this->request->uid();
$where['is_user'] = 1;