提交
This commit is contained in:
parent
f764e69640
commit
b28e31e384
|
|
@ -26,7 +26,7 @@ class Config extends Base
|
|||
return $this->renderSuccess('获取成功', [
|
||||
'good_type' => $goodsTypeList,
|
||||
'app_setting' => $app_setting,
|
||||
'version' => '101'
|
||||
'version' => '103'
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -267,7 +267,7 @@ class Goods extends Base
|
|||
];
|
||||
|
||||
// 将结果缓存到Redis,设置过期时间为30秒(30秒)
|
||||
$redis->set($cache_key, json_encode($new_data), 30);
|
||||
$redis->set($cache_key, json_encode($new_data), 10);
|
||||
|
||||
return $this->renderSuccess('请求成功', $new_data);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -123,10 +123,11 @@ class Infinite extends Base
|
|||
|
||||
// 缓存未命中,从数据库获取并缓存
|
||||
if ($join_count1 === false) {
|
||||
$join_count1 = OrderList::field('id')->where('goods_id', '=', $goods_id)
|
||||
$join_count1 = OrderList::field('id')
|
||||
->where('goods_id', '=', $goods_id)
|
||||
->where('shang_id', 'between', [34, 38])
|
||||
->where('order_type', '=', $goods['type'])
|
||||
->where('source', '=', 1)
|
||||
// ->where('order_type', '=', $goods['type'])
|
||||
// ->where('source', '=', 1)
|
||||
->count();
|
||||
|
||||
// 设置缓存,5分钟过期
|
||||
|
|
@ -182,7 +183,7 @@ class Infinite extends Base
|
|||
$value['shang_color'] = $value['shang_info']['color'];
|
||||
unset($value['shang_info']);
|
||||
}
|
||||
|
||||
$type1 = 8;
|
||||
if ($goods['type'] == 2) {
|
||||
$type1 = 8;
|
||||
} elseif ($goods['type'] == 8) {
|
||||
|
|
@ -1329,12 +1330,12 @@ class Infinite extends Base
|
|||
}
|
||||
|
||||
$ling_goods_list1 = GoodsList::field('goods_id,shang_id,title,imgurl')
|
||||
->append(['shang_info'])
|
||||
->where(['goods_id' => $goods_id])
|
||||
->where('is_lingzhu', '=', 1)
|
||||
->where(['num' => 0])
|
||||
->order('sort desc,shang_id asc,id asc')
|
||||
->select();
|
||||
->append(['shang_info'])
|
||||
->where(['goods_id' => $goods_id])
|
||||
->where('is_lingzhu', '=', 1)
|
||||
->where(['num' => 0])
|
||||
->order('sort desc,shang_id asc,id asc')
|
||||
->select();
|
||||
foreach ($ling_goods_list1 as &$value) {
|
||||
$value['imgurl'] = imageUrl($value['imgurl']);
|
||||
$ling_goods_list[] = $value;
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ use think\console\Output;
|
|||
use think\facade\Db;
|
||||
|
||||
/**
|
||||
* 更新盒子热度值到Redis命令
|
||||
* 更新盒子热度值到Redis命令 php think UpdateGoodsHeat
|
||||
*/
|
||||
class UpdateGoodsHeat extends Command
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user