|
|
@@ -56,7 +56,6 @@ class Product extends Api
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
/**
|
|
|
* 寄售转让列表
|
|
|
* sort: 0 默认排序 1价格从高到低 2价格从低到高
|
|
|
@@ -68,8 +67,8 @@ class Product extends Api
|
|
|
$sort = $this->request->post('sort/d', '');
|
|
|
$type_id = $this->request->post('type_id/s', '');
|
|
|
$key_val = $this->request->post('key_val/s', '');
|
|
|
- $order = 'price ASC';
|
|
|
- if($sort == 1) $order = 'price desc';
|
|
|
+ $order = 'b.weigh ASC';
|
|
|
+ if($sort == 1) $order = 'b.weigh desc';
|
|
|
$map['a.status'] = $productTransfer::Normal;
|
|
|
if(!empty($type_id)) $map['b.type_id'] = $type_id;
|
|
|
if(!empty($key_val)) $map['b.'.$this->lan.'_name'] = ['like', '%'.$key_val.'%'];
|
|
|
@@ -82,9 +81,7 @@ class Product extends Api
|
|
|
->where($map)
|
|
|
->order($order)
|
|
|
->paginate($this->pageSize);
|
|
|
-
|
|
|
$list = $this->getProductOrderList($list, $this->auth->id, true, $orderLogic);
|
|
|
- Log::info('寄售列表_'.$this->request->post('page').'='. json_encode($list, JSON_UNESCAPED_UNICODE));
|
|
|
$this->success('', $list);
|
|
|
}
|
|
|
|
|
|
@@ -101,9 +98,9 @@ class Product extends Api
|
|
|
$sort = $this->request->post('sort/d', '');
|
|
|
$type_id = $this->request->post('type_id/s', '');
|
|
|
$key_val = $this->request->post('key_val/s', '');
|
|
|
- $order = 'b.weigh desc';
|
|
|
- if($sort == 1) $order = 'price DESC';
|
|
|
- if($sort == 2) $order = 'price ASC';
|
|
|
+ $order = 'b.weigh ASC';
|
|
|
+ if($sort == 1) $order = 'b.weigh DESC';
|
|
|
+ //if($sort == 2) $order = 'price ASC';
|
|
|
$map['a.status'] = $productTransfer::Normal;
|
|
|
if(!empty($type_id)) $map['b.type_id'] = $type_id;
|
|
|
if(!empty($key_val)) $map['b.'.$this->lan.'_name'] = ['like', '%'.$key_val.'%'];
|