Commit db48279e authored by zhz's avatar zhz

goods

parent 51a390ab
...@@ -946,7 +946,6 @@ class GoodsCommonServiceModel extends \Business\AbstractModel ...@@ -946,7 +946,6 @@ class GoodsCommonServiceModel extends \Business\AbstractModel
// if($goodsCommonRedis->tableSIsMember('weekSales:'.$storeId, $goodsCommonId)) { // if($goodsCommonRedis->tableSIsMember('weekSales:'.$storeId, $goodsCommonId)) {
// $tempArr[] = $goodsCommonId; // $tempArr[] = $goodsCommonId;
// } // }
if($goodsCommonRedis->tableSIsMember('weekSales:'.$storeId, $goodsCommonId)) {
$weekSales = $goodsCommonRedis->smembers('weekSales:'.$storeId); $weekSales = $goodsCommonRedis->smembers('weekSales:'.$storeId);
if($weekSales) { if($weekSales) {
$arr = array_merge(array_diff($weekSales, $existIds)); $arr = array_merge(array_diff($weekSales, $existIds));
...@@ -959,11 +958,6 @@ class GoodsCommonServiceModel extends \Business\AbstractModel ...@@ -959,11 +958,6 @@ class GoodsCommonServiceModel extends \Business\AbstractModel
} }
} }
} }
}else{
$arr = $goodsCommonRedis->tableSRandMember('weekSales:'.$storeId,1);
$commonIds = array_merge($commonIds,$arr);
$existIds = array_merge($existIds,$arr);
}
//本周销售过的商品取两个 //本周销售过的商品取两个
//$commonIds = array_merge($commonIds,$arr); //$commonIds = array_merge($commonIds,$arr);
...@@ -990,7 +984,7 @@ class GoodsCommonServiceModel extends \Business\AbstractModel ...@@ -990,7 +984,7 @@ class GoodsCommonServiceModel extends \Business\AbstractModel
} }
} }
} }
$recommendGoods = $goodsCommonRedis->smembers('weekSaleGoods:'.$storeId); $recommendGoods = $goodsCommonRedis->smembers('recommendGoods:'.$storeId);
if($recommendGoods) { if($recommendGoods) {
$arr = array_merge(array_diff($recommendGoods, $existIds)); $arr = array_merge(array_diff($recommendGoods, $existIds));
if($arr) { if($arr) {
......
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 to comment