zouber / Fanshop

1 stars 0 forks source link

QueryVendorProductAPI 回傳的商品有問題 #477

Open zouber opened 10 years ago

zouber commented 10 years ago

在引入 publish time 之後,執行 queryVendorProduct 在一些情況下就會完全沒有商品資料回傳 使用者反映只要重新上架就會有東西,需要檢查一下演算法是否有誤

zouber commented 10 years ago

經查是因為目前排序的演算法是用 publish_time 來篩選商品(如果有指定 start_time or end_time 的話) 若無 publish_time 的話,系統端(models.py 裡的 convert_product_info_to_simple_structure 函式, 隸屬于 Product 類別) 就會拿它的 build_time 來替代,如此一來可能該商品的 build_time 是很久以前,也就會無法通過篩選,曾經有想過把它一律設定為"目前時間" 但如此一來仍有可能被篩掉,只是篩選掉的參數從 start_time 變成被 end_time 篩選掉

如果要確實解決,需要提供更明確的案例,例如貼一下頁面連結或是有直接的 API call 更好

shockhuang commented 10 years ago

實例:pointdesign 上架管理:http://www.fanshop.tw/product_admin/?pid=458729847483953 API url:http://www.fanshop.tw/api/QueryVendorProduct/?brand=pointdesign&catalog=all&callback=setProducts&noCacheIE=1409215685094 網頁:http://www.pointdesign.tw/all

2014-08-28 4 48 45

zouber: 上架商品應該有 兩百多個,但現在只有顯示 六十幾個, fix it