Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
go_supplier_sever
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
43a9e07d
authored
Sep 24, 2021
by
mushishixian
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix
parent
39e37da3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
app/service/supplier_sku_mode.go
app/service/supplier_sku_mode.go
View file @
43a9e07d
...
...
@@ -34,7 +34,7 @@ func SaveSkuModeFromES() (err error) {
}
result
:=
resp
.
String
()
goodsIdArr
:=
gjson
.
Get
(
result
,
"data.goods_id"
)
.
Array
()
fmt
.
Println
(
"当前处理供应商为 : "
,
supplier
.
SupplierName
)
//
fmt.Println("当前处理供应商为 : ", supplier.SupplierName)
if
len
(
goodsIdArr
)
>
0
{
//取一个goods_id就好
goodsId
:=
goodsIdArr
[
0
]
.
String
()
...
...
@@ -43,9 +43,9 @@ func SaveSkuModeFromES() (err error) {
redisCon
:=
dao
.
Dao
.
GetRedisDbGroup
(
"sku"
)
result
:=
redisCon
.
HGet
(
"goods_tag"
,
goodsId
)
.
String
()
goodsLabel
:=
gjson
.
Get
(
result
,
"goods_label"
)
.
Int
()
fmt
.
Println
(
"供应商名称 : "
+
supplier
.
SupplierName
+
" goods_label为 : "
,
goodsLabel
)
//
fmt.Println("供应商名称 : "+supplier.SupplierName+" goods_label为 : ", goodsLabel)
if
int
(
goodsLabel
)
!=
0
{
fmt
.
Println
(
supplier
.
SupplierId
,
goodsLabel
)
//
fmt.Println(supplier.SupplierId, goodsLabel)
err
=
dao
.
UpdateSupplierSkuMode
(
supplier
.
SupplierId
,
int
(
goodsLabel
))
if
err
!=
nil
{
return
err
...
...
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