feat: show product identity in ai recommendations
All checks were successful
CD Pipeline / deploy (push) Successful in 1m5s
All checks were successful
CD Pipeline / deploy (push) Successful in 1m5s
This commit is contained in:
@@ -773,11 +773,16 @@ def get_momo_bestsellers(category: str, limit: int = 5) -> Tuple[bool, str, List
|
||||
result = []
|
||||
for p in products[:limit]:
|
||||
result.append({
|
||||
'id': p.product_id,
|
||||
'product_id': p.product_id,
|
||||
'platform': 'momo',
|
||||
'name': p.name,
|
||||
'price': p.price,
|
||||
'original_price': p.original_price,
|
||||
'discount': p.discount,
|
||||
'url': p.product_url,
|
||||
'product_url': p.product_url,
|
||||
'image_url': p.image_url,
|
||||
'image': p.image_url
|
||||
})
|
||||
return True, f"成功取得 {len(result)} 個熱銷商品", result
|
||||
|
||||
@@ -563,11 +563,16 @@ def get_pchome_bestsellers(category: str, limit: int = 5) -> Tuple[bool, str, Li
|
||||
result = []
|
||||
for p in products[:limit]:
|
||||
result.append({
|
||||
'id': p.product_id,
|
||||
'product_id': p.product_id,
|
||||
'platform': 'pchome',
|
||||
'name': p.name,
|
||||
'price': p.price,
|
||||
'original_price': p.original_price,
|
||||
'discount': p.discount,
|
||||
'url': p.product_url,
|
||||
'product_url': p.product_url,
|
||||
'image_url': p.image_url,
|
||||
'image': p.image_url
|
||||
})
|
||||
return True, f"成功取得 {len(result)} 個熱銷商品", result
|
||||
|
||||
Reference in New Issue
Block a user