Commit 0d3dafb4 by 杨树贤

更多的商品信息

parent 66ee30a9
...@@ -27,8 +27,8 @@ REDIS_READ_PORT=6379 ...@@ -27,8 +27,8 @@ REDIS_READ_PORT=6379
GOODS_SERVER_URL=http://lc_server_goods.cc GOODS_SERVER_URL=http://lc_server_goods.cc
NOTICE_TYPE_ID= NOTICE_TYPE_ID=37
CASE_TYPE_ID= CASE_TYPE_ID=35
CACHE_DRIVER=redis CACHE_DRIVER=file
QUEUE_DRIVER=sync QUEUE_DRIVER=sync
...@@ -59,6 +59,7 @@ class ArticleModel extends BaseModel ...@@ -59,6 +59,7 @@ class ArticleModel extends BaseModel
$query->select(['type_id', 'type_name']); $query->select(['type_id', 'type_name']);
}, },
]) ])
->where('status', 1)
->where($map); ->where($map);
$total = $query->count(); $total = $query->count();
...@@ -66,7 +67,7 @@ class ArticleModel extends BaseModel ...@@ -66,7 +67,7 @@ class ArticleModel extends BaseModel
->orderBy('art_id', 'desc') ->orderBy('art_id', 'desc')
->get()->toArray(); ->get()->toArray();
return compact('data','total'); return compact('data', 'total');
} }
public function getCase($map) public function getCase($map)
...@@ -125,6 +126,7 @@ class ArticleModel extends BaseModel ...@@ -125,6 +126,7 @@ class ArticleModel extends BaseModel
->with([ ->with([
'type', 'type',
])->where('top_type_id', $noticeTypeId) ])->where('top_type_id', $noticeTypeId)
->where('status', 1)
->orderBy('art_id', 'desc') ->orderBy('art_id', 'desc')
->page($page, $pageSize) ->page($page, $pageSize)
->get(); ->get();
......
...@@ -72,6 +72,11 @@ class CaseService extends BaseService ...@@ -72,6 +72,11 @@ class CaseService extends BaseService
$goodsInfo = $this->getGoodsInfo($item['goods_id']); $goodsInfo = $this->getGoodsInfo($item['goods_id']);
if ($goodsInfo) { if ($goodsInfo) {
$item['goods_info'] = [ $item['goods_info'] = [
'class_id1' => $goodsInfo['class_id1'],
'class_id1_name' => $goodsInfo['class_id1_name'],
'class_id2' => $goodsInfo['class_id2'],
'class_id2_name' => $goodsInfo['class_id2_name'],
'brand_logo' => $goodsInfo['brand_logo'],
'goods_id' => $goodsInfo['goods_id'], 'goods_id' => $goodsInfo['goods_id'],
'goods_name' => $goodsInfo['goods_name'], 'goods_name' => $goodsInfo['goods_name'],
'goods_image' => is_array($goodsInfo['goods_images']) ? $goodsInfo['goods_images'][0] : $goodsInfo['goods_images'], 'goods_image' => is_array($goodsInfo['goods_images']) ? $goodsInfo['goods_images'][0] : $goodsInfo['goods_images'],
......
...@@ -12,7 +12,7 @@ class NoticeService extends BaseService ...@@ -12,7 +12,7 @@ class NoticeService extends BaseService
{ {
public function getNoticeList($page, $pageSize) public function getNoticeList($page, $pageSize)
{ {
return Cache::remember("noticeListCache_$page"."_$pageSize", 5, function () use ($page, $pageSize) { return Cache::remember("noticeListCache_$page"."_$pageSize", 1, function () use ($page, $pageSize) {
$model = new ArticleModel(); $model = new ArticleModel();
//获取所有faq相关的文章,50应该差不多了 //获取所有faq相关的文章,50应该差不多了
$list = $model->getNoticeList($page, $pageSize); $list = $model->getNoticeList($page, $pageSize);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment