This commit is contained in:
mkm 2024-01-13 10:40:10 +08:00
parent 1285fe84d9
commit 5b74770b87
2 changed files with 3 additions and 3 deletions

View File

@ -65,13 +65,13 @@ class StoreGroupOrderRepository extends BaseRepository
public function getList(array $where, $page, $limit) public function getList(array $where, $page, $limit)
{ {
$query = StoreGroupOrder::getDB()->alias('StoreGroupOrder'); $query = StoreGroupOrder::getDB()->alias('StoreGroupOrder');
if($where['source'] == 103){ if(isset($where['source']) && $where['source'] == 103){
$wheres['activity_type']=[0,98]; $wheres['activity_type']=[0,98];
$wheres['source']=[2,103]; $wheres['source']=[2,103];
}else{ }else{
$wheres['activity_type']=0; $wheres['activity_type']=0;
} }
if (isset($where['product_type']) || $where['source']==103) { if (isset($where['product_type']) ||(isset($where['source'])&& $where['source']==103)) {
$storeOrderWhere = StoreOrder::where($wheres); $storeOrderWhere = StoreOrder::where($wheres);
$query->hasWhere('orderList', $storeOrderWhere); $query->hasWhere('orderList', $storeOrderWhere);
} }

View File

@ -179,7 +179,7 @@ class StoreOrder extends BaseController
[$page, $limit] = $this->getPage(); [$page, $limit] = $this->getPage();
$productType = $this->request->param('product_type', 0); $productType = $this->request->param('product_type', 0);
$source = $this->request->param('source', 2); $source = $this->request->param('source', 2);
$list = $groupOrderRepository->getList(['uid' => $this->request->uid(), 'paid' => 0, 'product_type' => $productType,$source], $page, $limit); $list = $groupOrderRepository->getList(['uid' => $this->request->uid(), 'paid' => 0, 'product_type' => $productType,'source'=>$source], $page, $limit);
return app('json')->success($list); return app('json')->success($list);
} }