Commit dea92011 authored by zhz's avatar zhz

goods

parent 610319fa
......@@ -948,7 +948,7 @@ class GoodsCommonServiceModel extends \Business\AbstractModel
// }
$log = \Our\Log::getInstance();
// $log->write(print_r($data, true));
$weekSales = $goodsCommonRedis->smembers('weekSales:'.$storeId);
$weekSales = $goodsCommonRedis->tableSmembers('weekSales:'.$storeId);
$log->write(json_encode($weekSales));
if($weekSales) {
$arr = array_merge(array_diff($weekSales, $existIds));
......@@ -970,7 +970,7 @@ class GoodsCommonServiceModel extends \Business\AbstractModel
//$arr = $goodsCommonRedis->tableSRandMember('recommendGoods:'.$storeId,4-count($commonIds));
//$commonIds = array_merge($arr,$commonIds);
$weekSaleGoods = $goodsCommonRedis->smembers('weekSaleGoods:'.$storeId);
$weekSaleGoods = $goodsCommonRedis->tableSmembers('weekSaleGoods:'.$storeId);
$log->write(json_encode($weekSaleGoods));
if($weekSaleGoods) {
$arr = array_merge(array_diff($weekSaleGoods, $existIds));
......@@ -988,7 +988,7 @@ class GoodsCommonServiceModel extends \Business\AbstractModel
}
}
}
$recommendGoods = $goodsCommonRedis->smembers('recommendGoods:'.$storeId);
$recommendGoods = $goodsCommonRedis->tableSmembers('recommendGoods:'.$storeId);
$log->write(json_encode($recommendGoods));
if($recommendGoods) {
$arr = array_merge(array_diff($recommendGoods, $existIds));
......
......@@ -86,8 +86,7 @@ class AbstractModel extends \Redis\AbstractModel {
return $this->sIsMember($this->calcKey($h),$value);
}
public function tableSmembers($key) {
$res=$this->smembers($this->calcKey($key));
return $res;
return $this->smembers($this->calcKey($key));
}
public function tableKeyExists($h){
return $this->exists($this->calcKey($h));
......
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