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