Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
lzzzzl
/
liexin_scm_service
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
9e2cee8d
authored
May 15, 2020
by
lzzzzl
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
修改存储物料品牌存储redis
parent
29418cf7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
app/Http/Model/GoodsModel.php
app/Http/Model/GoodsModel.php
View file @
9e2cee8d
...
...
@@ -88,14 +88,14 @@ class GoodsModel extends Model
// 缓存品牌->品牌Id
$this
->
brandName2BrandId
(
$brand_name
,
$brand_id
);
// 缓存品牌id->品牌信息
$this
->
brandId2BrandInfo
(
$brand_id
,
json_encode
(
$brand_params
));
//
$this->brandId2BrandInfo($brand_id,json_encode($brand_params));
}
// ERPID GOODSID REDIS
$this
->
erpId2GoodsId
(
$erp_id
,
$goods_id
);
// GOODSID GOODS REDIS
$this
->
goodsId2Goods
(
$goods_id
,
json_encode
(
$arr
));
//
$this->goodsId2Goods($goods_id,json_encode($arr));
return
true
;
});
...
...
@@ -137,7 +137,7 @@ class GoodsModel extends Model
// 缓存品牌->品牌Id
$this
->
brandName2BrandId
(
$brand_name
,
$brand_id
);
// 缓存品牌id->品牌信息
$this
->
brandId2BrandInfo
(
$brand_id
,
json_encode
(
$brand_params
));
//
$this->brandId2BrandInfo($brand_id,json_encode($brand_params));
}
else
{
// 更新DB
$this
->
where
(
'erp_goods_id'
,
'='
,
$erp_goods_id
)
->
update
(
$arr
);
...
...
@@ -160,9 +160,9 @@ class GoodsModel extends Model
/**
* 缓存品牌Id、品牌信息
*/
private
function
brandId2BrandInfo
(
$brand_id
,
$brand_info
)
{
return
$this
->
redis
->
hset
(
'scm_brand_info'
,
$brand_id
,
$brand_info
);
}
//
private function brandId2BrandInfo($brand_id,$brand_info) {
//
return $this->redis->hset('scm_brand_info',$brand_id,$brand_info);
//
}
/**
* ERPID、GOODSID缓存
...
...
@@ -175,9 +175,9 @@ class GoodsModel extends Model
/**
* GOODSID、GOODS 缓存
*/
private
function
goodsId2Goods
(
$goods_id
,
$goods
)
{
return
$this
->
redis
->
hset
(
'scm_goods_goods_id'
,
$goods_id
,
$goods
);
}
//
private function goodsId2Goods($goods_id,$goods) {
//
return $this->redis->hset('scm_goods_goods_id',$goods_id,$goods);
//
}
/**
* 更新物料状态
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment