ParamsHandle.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: xiaofeng
  5. * Date: 2018/7/30
  6. * Time: 下午3:09
  7. * 处理楼盘所有的参数对比
  8. */
  9. namespace backend\synchouse;
  10. use common\models\House;
  11. use common\models\HouseDetail;
  12. use common\models\Syncrecord;
  13. class ParamsHandle{
  14. //判断楼盘名称是否存在
  15. public function ExistsName($name)
  16. {
  17. if(!empty($name))
  18. {
  19. $h = House::find()->andWhere(['del'=>1])->andWhere(['name'=>$name])->one();
  20. if(!empty($h))
  21. {
  22. return $h;
  23. }
  24. }
  25. return false;
  26. }
  27. //判断是否有操作记录
  28. public function Existsunid($unid)
  29. {
  30. if(!empty($unid))
  31. {
  32. $un = new Syncrecord();
  33. $row = $un->FindByUnid($unid);
  34. $row = House::find()->andWhere(['del'=>1])->andWhere(['id'=>$row['hid']])->one();
  35. if(!empty($row))
  36. {
  37. return $row;
  38. }
  39. }
  40. return false;
  41. }
  42. //添加楼盘
  43. public function HouseCreate()
  44. {
  45. }
  46. //修改楼盘
  47. public function HouseEdit()
  48. {
  49. }
  50. }