|
|
@@ -16,11 +16,21 @@ use biz\goods\services\GoodsService;
|
|
|
|
|
|
class GoodsController extends BaseController
|
|
|
{
|
|
|
-
|
|
|
+
|
|
|
//商品列表 shish 2019.12.7
|
|
|
public function actionList()
|
|
|
{
|
|
|
- $where = ['merchantId' => $this->merchantId];
|
|
|
+ $get = Yii::$app->request->get();
|
|
|
+ $status = isset($get['status']) ? $get['status'] : -1;
|
|
|
+ $goodsName = isset($get['goodsName']) && !empty($get['goodsName']) ? $get['goodsName'] : '';
|
|
|
+ $where = [];
|
|
|
+ if ($status != -1) {
|
|
|
+ $where['status'] = $status;
|
|
|
+ }
|
|
|
+ if (!empty($goodsName)) {
|
|
|
+ $where['goodsName'] = ['like', $goodsName];
|
|
|
+ }
|
|
|
+ $where['merchantId'] = $this->merchantId;
|
|
|
$data = GoodsService::getGoodsList($where);
|
|
|
$asset = $this->merchantAsset;
|
|
|
$data['MerchantAsset'] = $asset;
|
|
|
@@ -57,7 +67,7 @@ class GoodsController extends BaseController
|
|
|
GoodsService::updateGoods($id, $data);
|
|
|
util::ok();
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
//商品排序
|
|
|
public function actionSort()
|
|
|
{
|