|
|
@@ -59,13 +59,23 @@ class ShopAdminController extends BaseController
|
|
|
$ghsList = GhsClass::getAllByCondition(['ownSjId' => $sjId], null, '*', null, true);
|
|
|
if (!empty($ghsList)) {
|
|
|
foreach ($ghsList as $ghs) {
|
|
|
+ $customId = $ghs->customId;
|
|
|
$ghs->delete();
|
|
|
+ $current = CustomClass::getById($customId);
|
|
|
+ if (!empty($current)) {
|
|
|
+ $current->delete();
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
$customList = CustomClass::getAllByCondition(['ownSjId' => $sjId], null, '*', null, true);
|
|
|
if (!empty($customList)) {
|
|
|
foreach ($customList as $custom) {
|
|
|
+ $ghsId = $custom->ghsId;
|
|
|
$custom->delete();
|
|
|
+ $current = GhsClass::getById($ghsId);
|
|
|
+ if (!empty($current)) {
|
|
|
+ $current->delete();
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
$transaction->commit();
|