|
|
@@ -5,6 +5,7 @@ namespace biz\goods\services;
|
|
|
use biz\admin\services\AdminService;
|
|
|
use biz\base\services\BaseService;
|
|
|
|
|
|
+use biz\goods\classes\GoodsCategoryClass;
|
|
|
use biz\goods\classes\GoodsClass;
|
|
|
use common\components\util;
|
|
|
use Yii;
|
|
|
@@ -43,8 +44,8 @@ class GoodsService extends BaseService
|
|
|
if ($goods['merchantId'] != $admin['merchantId']) {
|
|
|
util::fail('您没有权限删除');
|
|
|
}
|
|
|
- GoodsClass::deleteById($id);
|
|
|
- GoodsCategoryService::deleteByCondition(['gId' => $id]);
|
|
|
+ GoodsClass::updateById($id, ['delStatus' => 1]);
|
|
|
+ GoodsCategoryClass::updateByCondition(['gId' => $id], ['delStatus' => 1]);
|
|
|
}
|
|
|
|
|
|
//添加商品 shish 2019.12.7
|
|
|
@@ -58,7 +59,7 @@ class GoodsService extends BaseService
|
|
|
{
|
|
|
return GoodsClass::updateGoods($id, $data);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
//验证对此商品的操作权限 shish 2019.12.7
|
|
|
public static function valid($info, $merchantId)
|
|
|
{
|
|
|
@@ -66,7 +67,7 @@ class GoodsService extends BaseService
|
|
|
util::fail('您没有权限操作');
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
//上下架 shish 2019.12.8
|
|
|
public static function changeStatus($id, $status)
|
|
|
{
|