ArchivesService.php 622 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace services\common;
  3. use common\enums\MemberTypeEnum;
  4. use common\enums\StatusEnum;
  5. use common\models\common\Archives;
  6. /**
  7. * Class ArchivesService
  8. * @package services\common
  9. */
  10. class ArchivesService
  11. {
  12. /**
  13. * 商户最后一条认证信息
  14. *
  15. * @return array|\yii\db\ActiveRecord|null
  16. */
  17. public function findByMerchantId($merchant_id)
  18. {
  19. return Archives::find()
  20. ->where(['merchant_id' => $merchant_id])
  21. ->andWhere(['member_type' => MemberTypeEnum::MERCHANT])
  22. ->andWhere(['status' => StatusEnum::ENABLED])
  23. ->one();
  24. }
  25. }
粤ICP备19079148号