Browse Source

Merge branch 'master' of e.coding.net:zdap/weixiu/weixiu_api into equity-m

liugc 1 năm trước cách đây
mục cha
commit
1732ec3b6f

+ 1 - 0
app/adminapi/lists/goods/GoodsLists.php

@@ -51,6 +51,7 @@ class GoodsLists extends BaseAdminDataLists implements ListsSearchInterface
     public function queryWhere()
     {
         $where = [];
+        $where['is_show'] = 1;//后台正常显示商品
         if (!empty($this->params['goods_category_id'])) {
             $goodsCategoryId = end($this->params['goods_category_id']);
             $goodsCategoryData = GoodsCategory::where(['status'=>1])->order(['pid' => 'asc','weigh' => 'desc', 'id' => 'desc'])

+ 2 - 2
app/adminapi/logic/coupon/CouponRulesLogic.php

@@ -72,7 +72,7 @@ class CouponRulesLogic extends BaseLogic
             if(!empty($params['goods_id'])){
                 $goodsArr = [];
                 foreach($params['goods_id'] as $v){
-                    $goodsArr[] = end($v);
+                    $goodsArr[] = $v;
                 }
                 $model->couponWithGoods()->saveAll($goodsArr);
             }
@@ -135,7 +135,7 @@ class CouponRulesLogic extends BaseLogic
                         $goodsArr[] = $v;
                         continue;
                     }
-                    $goodsArr[] = end($v);
+                    $goodsArr[] = $v;
                 }
                 $model = CouponRules::find($params['id']);
                 $model->couponWithGoods()->saveAll($goodsArr);