|
|
@@ -187,9 +187,15 @@ class CustomController extends BaseController
|
|
|
{
|
|
|
$black = Yii::$app->request->get('black', 2);
|
|
|
$customId = Yii::$app->request->get('customId', 0);
|
|
|
- $custom = CustomClass::getById($customId);
|
|
|
+ $custom = CustomClass::getById($customId, true);
|
|
|
CustomClass::valid($custom, $this->shopId);
|
|
|
- CustomClass::black($custom, $black);
|
|
|
+ $custom->black = $black;
|
|
|
+ $ghsId = $custom->ghsId ?? 0;
|
|
|
+ $ghs = GhsClass::getById($ghsId, true);
|
|
|
+ if (empty($ghs)) {
|
|
|
+ util::fail('出错了');
|
|
|
+ }
|
|
|
+ $ghs->black = $black;
|
|
|
util::complete();
|
|
|
}
|
|
|
|