|
|
@@ -91,14 +91,9 @@ class BuyAmountObserver extends Behavior
|
|
|
if (empty($mainId)) {
|
|
|
throw new \Exception('mainId is required');
|
|
|
}
|
|
|
- $model->mainId = $mainId;
|
|
|
- $model->save();
|
|
|
+ $model::updateAll(['mainId' => $mainId], ['id' => $model->getPrimaryKey()]);
|
|
|
$hdId = $model->hdId ?? 0;
|
|
|
- $hdInfo = HdClass::getById($hdId, true);
|
|
|
- if(!empty($hdInfo)){
|
|
|
- $hdInfo->mainId = $mainId;
|
|
|
- $hdInfo->save();
|
|
|
- }
|
|
|
+ HdClass::updateById($hdId, ['mainId' => $mainId]);
|
|
|
}
|
|
|
|
|
|
$memberData = CustomClass::getCustomExpenseLevel($newGrowth, $mainId); // 设置等级多处需要同步修改的,请搜索:getCustomExpenseLevel
|