save())。 // 若某处直接用 updateAll()/updateByCondition() 直接改 buyAmount,不会触发该观察者。 public function behaviors() { return [ BuyAmountObserver::class, ]; } public static function tableName() { return 'xhCustom'; } }