Browse Source

修复添加sku逻辑属性方法判断问题

wechat_public_accounts
linyaostalker 5 years ago
parent
commit
1c68a1a2d6
  1. 10
      vendor/antgoods/goods/src/logic/goods/GoodsManager.php

10
vendor/antgoods/goods/src/logic/goods/GoodsManager.php

@ -9,6 +9,7 @@ use antgoods\goods\models\ars\Attribute;
use antgoods\goods\models\ars\GoodsSku; use antgoods\goods\models\ars\GoodsSku;
use antgoods\goods\models\ars\Goods; use antgoods\goods\models\ars\Goods;
use antgoods\goods\models\ars\FilterAttr; use antgoods\goods\models\ars\FilterAttr;
use antgoods\goods\models\ars\Category;
class GoodsManager class GoodsManager
{ {
@ -299,7 +300,7 @@ class GoodsManager
*/ */
public static function getAttrs($id) public static function getAttrs($id)
{ {
$attrId = GoodsAttr::find()->where(['goods_id' => $id])
$attrId = GoodsAttr::find()->where(['goods_id' => $id, 'is_delete' => GoodsAttr::IS_DELETE_NO])
->andWhere(['>', 'attr_id', 0]) ->andWhere(['>', 'attr_id', 0])
->select('attr_id') ->select('attr_id')
->distinct() ->distinct()
@ -473,7 +474,7 @@ class GoodsManager
} }
/** /**
* @param $goodsAttr
* @param $goodsFilterAttr
* @throws Exception * @throws Exception
* 删除商品筛选属性 * 删除商品筛选属性
*/ */
@ -569,4 +570,9 @@ class GoodsManager
} }
return false; //否则返回false,表示后台分类可以修改 return false; //否则返回false,表示后台分类可以修改
} }
public static function categoryBtreeList()
{
}
} }
Loading…
Cancel
Save