---
# System prepended metadata

title: 2021-09-01 房產首頁改版上線

---

# 2021-09-01 房產首頁改版上線

> Shawn, Evan, Steven, Theo, Govia

---

## To Do List

- [x] 詢盤按鈕無反應
- [x] WP 房源詳情頁，打接口後面為「/」時，會跑到 web-house 404
- [x] 確認詢盤問題
- [ ] 已成交房源及下市房源從首頁推薦列表中移除
- [ ] 取消舊版首頁靜態化

## 待討論

- 城市選擇的 Sublocality 問題，對應不上推薦
- BC 省房源問題
- QB 省 Location 問題
- Location 首頁、MLS、新房 JSON 對應問題

---

## Checking List

- [x] 開始前，確認 WP 房源相關推薦都已推薦
- 確認網路聯通、防火牆
  - [x] house <-> svc-house-ca.51.ca
  - [x] web-house <-> svc.phone.51.ca
- 設置 house 的 host
  - [x] svc-house-ca.51.ca
- 設置 web-house 的 host
  - [X] svc.phone.51.ca
- 設置 Config/Env
  - [x] web-house
    ```env
    QUEUE_CONNECTION=sync
    
    RPC_PHONE_HOST="http://svc.phone.51.ca"
    
    # API51HOME 相关服务
    API51HOME_BASE_URI="https://api.51home.ca"
    ```
  - [x] house
    ```env
    RPC_HOUSE_PROMOTION_FEED_HOST="http://svc-house-ca.51.ca:35151"
    ```
  - [x] 51agents - /wp-content/plugins/51realtors/r51-config-sample.php
    ```php
    // web-house url
    'web_house_base_url'               => 'https://house.51.ca/',
    ```
- Database: data51home
  - [x] 新增 Table: house_promotion_consults
  - [x] Update Table Scheme
  ```sql      
  ALTER TABLE `notification_book_appointments` CHANGE `source` `source` ENUM('wechat','applet','wordpress','superapp','creaweb','web','homefeeds') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '来源';

  # 首页推荐增加省份城市ID字段
  ALTER TABLE `wp_blog_recomms` ADD `province_id` INT(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '绑定省ID' AFTER `post_id`, ADD `city_id` INT(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '绑定城市ID' AFTER `province_id`;
  ```
- 部署
  - [x] API.51HOME.CA
  - [x] WEB-HOUSE
  - [x] HOUSE.51.CA
  - [x] 51AGENTS.COM
- 反向代理路由
  - [x] house.51.ca/
  - [x] house.51.ca/search/redirect
  - [x] house.51.ca/{province}/{city}
  - [x] house.51.ca/ajax/home/feeds
- 上線完數據更新
  - [x] 新增置頂
  ```sql
  INSERT INTO `house_promotion_feed` (`id`, `house_type`, `house_id`, `realtor_id`, `promotion_type`, `province_id`, `city_id`, `comment`, `delete_flag`, `expired_at`, `created_at`, `updated_at`) VALUES (NULL, 'newhome', '15b64e79-41fb-3a45-a739-cd8147f5b64c', '420', '1', '10750', '3138', '', '0', '2021-09-23 14:14:25', '2021-08-23 15:47:40', '2021-08-23 15:47:40')
  ```
  
