Synchouserecord.php 725 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: xiaofeng
  5. * Date: 2018/3/4
  6. * Time: 上午9:25
  7. */
  8. namespace common\models;
  9. class Synchouserecord extends Common
  10. {
  11. // public static function primaryKey()
  12. // {
  13. //// return 'own_hid';
  14. // }
  15. public function behaviors()
  16. {
  17. return [];
  18. }
  19. public function getLerifyHouse($h_unid)
  20. {
  21. $housecord = self::find()->select(['own_hid as hid'])->where(['unid' => $h_unid])->asArray()->one();
  22. return $housecord;
  23. if (!empty($housecord)) {
  24. return \common\models\House::find()->select(['id as hid', 'city'])->where(['id' => $housecord['hid']])->asArray()->one();
  25. } else {
  26. return null;
  27. }
  28. }
  29. }