12345678910111213141516171819202122232425262728293031323334353637 |
- <?php
- namespace app\common\api;
- use app\common\state\MainState;
- use think\facade\Db;
- use app\common\model\HousePurchase as houseModel;
- use app\common\model\HousePurchaseChildren as houseChildModel;
- use app\common\model\HousePurchaseHouseInfo as houseInfoModel;
- /**
- * Description of HouseApi
- *
- * @author sgq
- */
- class HouseApi {
- public static function getInfoById($id) {
- return houseModel::findOrEmpty($id)->toArray();
- }
- public static function getHouseInfo($idCard) {
- if (\StrUtil::isEmpOrNull($idCard)) {
- return null;
- }
- $where = [];
- $where[] = ["idCard", "=", $idCard];
- return houseInfoModel::where($where)->find();
- }
- public static function getChildren($id) {
- $where = [];
- $where[] = ["pId", "=", $id];
- return houseChildModel::where($where)->select()->toArray();
- }
- }
|