Browse Source

getgoodlistbyladder接口优化,兼容前端字段

wufeng 2 years ago
parent
commit
3ad5d97bce
1 changed files with 2 additions and 2 deletions
  1. 2 2
      app/admin/controller/Good.php

+ 2 - 2
app/admin/controller/Good.php

@@ -938,13 +938,13 @@ class Good extends Base
 
         $list = Db::name('good_ladder')
             ->alias('gl')
-            ->field('gl.id,gl.skuCode,gp.spuCode,p.platform_name,gb.good_thumb_img,gb.good_name,gb.cat_id,gb.good_type,gb.is_stock,gb.brand_id,gp.plat_code,gl.min_num,gl.sale_price,gb.creater purchase,gb.creater,gb.companyNo')
+            ->field('gl.id,gl.skuCode,gp.spuCode,p.platform_name,gb.good_thumb_img,gb.good_name,gb.cat_id,gb.good_type,gb.is_stock,gb.brand_id,gp.plat_code,gl.min_num moq,gl.sale_price,gb.creater purchase,gb.creater,gb.companyNo')
             ->leftJoin('good_platform gp', 'gp.skuCode=gl.skuCode AND gp.is_del=0')
             ->leftJoin('platform p', 'p.id=gp.platform_code AND p.is_del=0')
             ->leftJoin('good_basic gb', 'gb.spuCode=gp.spuCode AND gb.is_del=0')
             ->where($where)
             ->page($param['page'], $param['size'])
-            ->order(['gl.addtime' => 'desc', 'gl.id' => 'desc'])
+            ->order(['gl.skuCode' => 'asc', 'gl.addtime' => 'desc', 'gl.id' => 'desc'])
             ->select()
             ->toArray();