您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

PaymentObserver.php 483B

123456789101112131415161718
  1. <?php
  2. namespace common\logic\User\UserProducer\Event;
  3. use common\logic\User\UserProducer\Module\UserProducerModule;
  4. use justcoded\yii2\eventlistener\observers\ActiveRecordObserver;
  5. use yii\db\AfterSaveEvent;
  6. class PaymentObserver extends ActiveRecordObserver
  7. {
  8. public function inserted(AfterSaveEvent $event)
  9. {
  10. $payment = $event->sender;
  11. $userProducerModule = UserProducerModule::getInstance();
  12. $userProducerModule->updateCredit($payment);
  13. }
  14. }