更新
This commit is contained in:
parent
49c48f02b0
commit
1285fe84d9
@ -65,8 +65,14 @@ 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 (isset($where['product_type'])) {
|
if($where['source'] == 103){
|
||||||
$storeOrderWhere = StoreOrder::where('activity_type', $where['product_type']);
|
$wheres['activity_type']=[0,98];
|
||||||
|
$wheres['source']=[2,103];
|
||||||
|
}else{
|
||||||
|
$wheres['activity_type']=0;
|
||||||
|
}
|
||||||
|
if (isset($where['product_type']) || $where['source']==103) {
|
||||||
|
$storeOrderWhere = StoreOrder::where($wheres);
|
||||||
$query->hasWhere('orderList', $storeOrderWhere);
|
$query->hasWhere('orderList', $storeOrderWhere);
|
||||||
}
|
}
|
||||||
$query->when(isset($where['paid']) && $where['paid'] !== '', function ($query) use ($where) {
|
$query->when(isset($where['paid']) && $where['paid'] !== '', function ($query) use ($where) {
|
||||||
|
@ -178,7 +178,8 @@ 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);
|
||||||
$list = $groupOrderRepository->getList(['uid' => $this->request->uid(), 'paid' => 0, 'product_type' => $productType], $page, $limit);
|
$source = $this->request->param('source', 2);
|
||||||
|
$list = $groupOrderRepository->getList(['uid' => $this->request->uid(), 'paid' => 0, 'product_type' => $productType,$source], $page, $limit);
|
||||||
return app('json')->success($list);
|
return app('json')->success($list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user