|
|
@@ -134,17 +134,13 @@ class ItemClassController extends BaseController
|
|
|
$class->delete();
|
|
|
ProductClass::updateByCondition(['classId' => $id], ['classId' => $defaultClassId]);
|
|
|
|
|
|
- //在首店删除,则父级下所有直营店同步删除
|
|
|
+ //在首店删除,则父级下所有直营和加盟店同步删除
|
|
|
$masterShop = $this->shop;
|
|
|
if (isset($masterShop->default) && $masterShop->default == 1) {
|
|
|
$sjId = $masterShop->sjId ?? 0;
|
|
|
$shopList = ShopClass::getAllByCondition(['sjId' => $sjId], null, '*', null, true);
|
|
|
foreach ($shopList as $shop) {
|
|
|
$shopId = $shop->id ?? 0;
|
|
|
- if (isset($shop->join) && $shop->join == 1) {
|
|
|
- //加盟店不同步删除
|
|
|
- continue;
|
|
|
- }
|
|
|
if ($shopId == $masterShop->id) {
|
|
|
//前面已经删除过了
|
|
|
continue;
|