Explorar el Código

库存由多到少

shish hace 5 años
padre
commit
f8ded620f8
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      app-ghs/controllers/ProductController.php

+ 2 - 2
app-ghs/controllers/ProductController.php

@@ -123,14 +123,14 @@ class ProductController extends BaseController
         $showPage = Yii::$app->request->get('showPage', 0);
         if ($showPage) {
             if ($type == 'waring') {
-                $pro = Product::find()->where("shopId={$shopId}")->andWhere('`stock`<`stockWarning`')->select('id')->orderBy('actualSold desc')->asArray()->all();
+                $pro = Product::find()->where("shopId={$shopId}")->andWhere('`stock`<`stockWarning`')->select('id')->asArray()->all();
                 $lackIds = array_column($pro, 'id');
                 if (empty($lackIds)) {
                     util::success([]);
                 }
                 $lackIds = array_filter(array_unique($lackIds));
                 $where['id'] = ['in', $lackIds];
-                $respond = ProductClass::getList("*", $where, "stock asc");
+                $respond = ProductClass::getList("*", $where, "actualSold asc");
             } else {
                 $respond = ProductClass::getList("*", $where, "inTurn desc");
             }