Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
search_server
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
24c5797f
authored
Jul 06, 2020
by
huangchengyi
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
1.0
parent
ca9fa80e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletions
service/common_ly_service.go
service/common_ly_service.go
View file @
24c5797f
...
@@ -39,12 +39,19 @@ var brand_name_all string = config.Get("redis_all.BRAND_NAME_ALL").String() /
...
@@ -39,12 +39,19 @@ var brand_name_all string = config.Get("redis_all.BRAND_NAME_ALL").String() /
*/
*/
func
getSkuByGoodsSn
(
goods_list
map
[
string
]
*
model
.
LyClearGoodsList
,
supplier_info
*
model
.
SUPPLIER_REDIS_INFO_
)
map
[
string
]
interface
{}{
func
getSkuByGoodsSn
(
goods_list
map
[
string
]
*
model
.
LyClearGoodsList
,
supplier_info
*
model
.
SUPPLIER_REDIS_INFO_
)
map
[
string
]
interface
{}{
originGoods
:=
make
(
map
[
string
]
interface
{},
0
)
originGoods
:=
make
(
map
[
string
]
interface
{},
0
)
searredis
:=
gredis
.
Conn
(
"search_read"
)
defer
searredis
.
Close
()
for
goods_sn
,
info
:=
range
goods_list
{
for
goods_sn
,
info
:=
range
goods_list
{
sn_sku
:=
php2go
.
Md5
(
strings
.
ToLower
(
goods_sn
))
sn_sku
:=
php2go
.
Md5
(
strings
.
ToLower
(
goods_sn
))
sku_id
,
_
:=
gredis
.
hget
(
sku_uique_judge
,
sn_sku
)
//查询唯一值,反查sku_id
searredis
.
Do
(
"set"
,
"hcttest"
,
"dddd"
)
sku_id
,
_
:=
gredis
.
get
(
sku_uique_judge
,
sn_sku
)
//查询唯一值,反查sku_id
var
sku_flag
bool
=
false
;
//是否新增或者更新db+redis,为true则新增
var
sku_flag
bool
=
false
;
//是否新增或者更新db+redis,为true则新增
if
sku_id
==
""
{
//为空,先创建sku
if
sku_id
==
""
{
//为空,先创建sku
...
...
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