Commit 9e2cee8d by lzzzzl

修改存储物料品牌存储redis

parent 29418cf7
Showing with 9 additions and 9 deletions
...@@ -88,14 +88,14 @@ class GoodsModel extends Model ...@@ -88,14 +88,14 @@ class GoodsModel extends Model
// 缓存品牌->品牌Id // 缓存品牌->品牌Id
$this->brandName2BrandId($brand_name,$brand_id); $this->brandName2BrandId($brand_name,$brand_id);
// 缓存品牌id->品牌信息 // 缓存品牌id->品牌信息
$this->brandId2BrandInfo($brand_id,json_encode($brand_params)); // $this->brandId2BrandInfo($brand_id,json_encode($brand_params));
} }
// ERPID GOODSID REDIS // ERPID GOODSID REDIS
$this->erpId2GoodsId($erp_id,$goods_id); $this->erpId2GoodsId($erp_id,$goods_id);
// GOODSID GOODS REDIS // GOODSID GOODS REDIS
$this->goodsId2Goods($goods_id,json_encode($arr)); // $this->goodsId2Goods($goods_id,json_encode($arr));
return true; return true;
}); });
...@@ -137,7 +137,7 @@ class GoodsModel extends Model ...@@ -137,7 +137,7 @@ class GoodsModel extends Model
// 缓存品牌->品牌Id // 缓存品牌->品牌Id
$this->brandName2BrandId($brand_name,$brand_id); $this->brandName2BrandId($brand_name,$brand_id);
// 缓存品牌id->品牌信息 // 缓存品牌id->品牌信息
$this->brandId2BrandInfo($brand_id,json_encode($brand_params)); // $this->brandId2BrandInfo($brand_id,json_encode($brand_params));
} else { } else {
// 更新DB // 更新DB
$this->where('erp_goods_id', '=', $erp_goods_id)->update($arr); $this->where('erp_goods_id', '=', $erp_goods_id)->update($arr);
...@@ -160,9 +160,9 @@ class GoodsModel extends Model ...@@ -160,9 +160,9 @@ class GoodsModel extends Model
/** /**
* 缓存品牌Id、品牌信息 * 缓存品牌Id、品牌信息
*/ */
private function brandId2BrandInfo($brand_id,$brand_info) { // private function brandId2BrandInfo($brand_id,$brand_info) {
return $this->redis->hset('scm_brand_info',$brand_id,$brand_info); // return $this->redis->hset('scm_brand_info',$brand_id,$brand_info);
} // }
/** /**
* ERPID、GOODSID缓存 * ERPID、GOODSID缓存
...@@ -175,9 +175,9 @@ class GoodsModel extends Model ...@@ -175,9 +175,9 @@ class GoodsModel extends Model
/** /**
* GOODSID、GOODS 缓存 * GOODSID、GOODS 缓存
*/ */
private function goodsId2Goods($goods_id,$goods) { // private function goodsId2Goods($goods_id,$goods) {
return $this->redis->hset('scm_goods_goods_id',$goods_id,$goods); // return $this->redis->hset('scm_goods_goods_id',$goods_id,$goods);
} // }
/** /**
* 更新物料状态 * 更新物料状态
......
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