feat(decorate): 优化首页商品列表逻辑并移除缓存机制

- 移除商品列表缓存机制,提高数据实时性
- 重构首页商品ID处理逻辑,支持合并装修ID与全店商品ID
- 新增allShelfGoodsIds方法获取所有可售商品ID
- 添加mergeGoodsIdStrings方法合并多个商品ID字符串
- 优化buildHomeGoodsContextFromContent方法统一处理内容解析
- 增强首页商品上下文构建,支持多种数据源合并
```
这个提交包含在:
可乐加冰
2026-10-02 15:21:38 +08:00
父节点 5b2d85af5f
当前提交 b460bc6744
共有 2 个文件被更改,包括 95 次插入 和 49 次删除

查看文件

@@ -90,17 +90,6 @@ class Goods extends Model
$goods = $goods->field('*,(sales + show_sales) as total_sales')->orderRaw($order)->order('id desc');
$cacheKey = 'goodslist-' . ($is_page ? 'page' : 'all') . '-' . md5(json_encode($params));
// 判断缓存
$goodsCache = cache($cacheKey);
if ($goodsCache) {
// 存在缓存直接 返回
$goodsCache = json_decode($goodsCache, true);
return $goodsCache ?: [];
}
if ($is_page) {
$goods = $goods->paginate($per_page ?? 10);
$goodsData = $goods->items();