```
feat(decorate): 优化首页商品列表逻辑并移除缓存机制 - 移除商品列表缓存机制,提高数据实时性 - 重构首页商品ID处理逻辑,支持合并装修ID与全店商品ID - 新增allShelfGoodsIds方法获取所有可售商品ID - 添加mergeGoodsIdStrings方法合并多个商品ID字符串 - 优化buildHomeGoodsContextFromContent方法统一处理内容解析 - 增强首页商品上下文构建,支持多种数据源合并 ```
这个提交包含在:
@@ -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();
|
||||
|
||||
在新工单中引用
屏蔽一个用户