예제 #1
0
 protected static function get_houseModel()
 {
     if (in_array(self::$houseType, array(Model_House_JpHouseIdx::ENUM_HOUSE_TYPE_OFFICE_RENT))) {
         self::$houseModelName = 'Model_House_JpOfficeRent';
         self::$houseImgModelName = 'Model_Jinpu_OfficeRentImgV2';
         self::$houseCategory = 'office';
         self::$houseCategorySub = 'rent';
     } elseif (in_array(self::$houseType, array(Model_House_JpHouseIdx::ENUM_HOUSE_TYPE_OFFICE_SALE))) {
         self::$houseModelName = 'Model_House_JpOfficeSale';
         self::$houseImgModelName = 'Model_Jinpu_OfficeSaleImgV2';
         self::$houseCategory = 'office';
         self::$houseCategorySub = 'sale';
     } elseif (in_array(self::$houseType, array(Model_House_JpHouseIdx::ENUM_HOUSE_TYPE_SHOP_RENT))) {
         self::$houseModelName = 'Model_House_JpShopRent';
         self::$houseImgModelName = 'Model_Jinpu_ShopRentImgV2';
         self::$houseCategory = 'shop';
         self::$houseCategorySub = 'rent';
     } elseif (in_array(self::$houseType, array(Model_House_JpHouseIdx::ENUM_HOUSE_TYPE_SHOP_SALE))) {
         self::$houseModelName = 'Model_House_JpShopSale';
         self::$houseImgModelName = 'Model_Jinpu_ShopSaleImgV2';
         self::$houseCategory = 'shop';
         self::$houseCategorySub = 'sale';
     }
 }
예제 #2
0
 public static function saveRank($id, $force_master = false)
 {
     $DHouseRank = self::get_house_rank($id);
     if (!isset($DHouseRank) || $DHouseRank->source != Model_Jinpu_HouseRank::ENUM_SOURCE_SYNC) {
         $house_rank = BLL_House_JpHouseRank::houseRankV2($id, $force_master);
         if (!isset($house_rank)) {
             return false;
         }
         if (!isset($DHouseRank)) {
             $DHouseRank = new Model_Jinpu_HouseRank();
             $DHouseRank->id = $id;
         }
         $DHouseRank->final_score = $house_rank['final_score'];
         $DHouseRank->stage = $house_rank['stage'];
         $DHouseRank->random_score = $house_rank['random_score'];
         $DHouseRank->sub_stage = $house_rank['sub_stage'];
         $DHouseRank->update_time = date('Y-m-d H:i:s');
         $DHouseRank->source = Model_Jinpu_HouseRank::ENUM_SOURCE_CALC;
         $DHouseRank->save();
     }
     return true;
 }