NotifyAnnounceService.php 465 B

123456789101112131415161718192021222324
  1. <?php
  2. namespace services\common;
  3. use common\enums\StatusEnum;
  4. use common\models\common\NotifyAnnounce;
  5. /**
  6. * Class NotifyAnnounceService
  7. * @package services\common
  8. */
  9. class NotifyAnnounceService
  10. {
  11. /**
  12. * @return array|\yii\db\ActiveRecord|null
  13. */
  14. public function findById($id)
  15. {
  16. return NotifyAnnounce::find()
  17. ->where(['id' => $id])
  18. ->andWhere(['status' => StatusEnum::ENABLED])
  19. ->one();
  20. }
  21. }
粤ICP备19079148号