diff --git a/backend/modules/goods/logic/goods/GoodsManager.php b/backend/modules/goods/logic/goods/GoodsManager.php index d36f933..0577e73 100755 --- a/backend/modules/goods/logic/goods/GoodsManager.php +++ b/backend/modules/goods/logic/goods/GoodsManager.php @@ -2,6 +2,7 @@ namespace backend\modules\goods\logic\goods; use backend\modules\file\models\ars\File; +use Throwable; use Yii; use yii\db\Exception; use backend\modules\goods\models\ars\GoodsAttr; @@ -9,7 +10,7 @@ use backend\modules\goods\models\ars\Attribute; use backend\modules\goods\models\ars\GoodsSku; use backend\modules\goods\models\ars\Goods; use backend\modules\goods\models\ars\FilterAttr; -use yii\web\HttpException; +use yii\db\StaleObjectException; use backend\modules\file\logic\file\FileManager; use yii\web\ServerErrorHttpException; @@ -261,6 +262,7 @@ class GoodsManager /** * @param $id + * @param int $type * @return mixed * 已创建sku信息 */ @@ -420,8 +422,8 @@ class GoodsManager * @param $data * @param $goodsId * @return bool - * @throws \Throwable - * @throws \yii\db\StaleObjectException + * @throws Throwable + * @throws StaleObjectException * 删除sku */ public static function deleteSku($type, $data, $goodsId) @@ -444,13 +446,14 @@ class GoodsManager foreach ($sku as $value) { $value->delete(); } + + return true; } /** * @param $data * @return bool - * @throws Exception - * @throws HttpException + * @throws \Exception * 创建修改商品筛选属性操作 */ private static function addFilterAttributeOperating($data) @@ -484,11 +487,12 @@ class GoodsManager } } } + return true; } /** * @param $goodsFilterAttr - * @throws HttpException + * @throws \Exception * 删除商品筛选属性 */ private static function delFilterAttribute($goodsFilterAttr) @@ -553,9 +557,4 @@ class GoodsManager } return false; //否则返回false,表示后台分类可以修改 } - - public static function categoryBtreeList() - { - - } } \ No newline at end of file