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
c96c10fb
authored
Sep 24, 2021
by
mushishixian
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
修改时间
parent
e20f8523
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
app/service/supplier_sku_mode.go
app/service/supplier_sku_mode.go
View file @
c96c10fb
...
@@ -7,7 +7,6 @@ import (
...
@@ -7,7 +7,6 @@ import (
"github.com/tidwall/gjson"
"github.com/tidwall/gjson"
"go_supplier_sever/app/dao"
"go_supplier_sever/app/dao"
"go_supplier_sever/app/model"
"go_supplier_sever/app/model"
"time"
)
)
//从ES统计出sku类型,然后写到供应商的sku_mode字段
//从ES统计出sku类型,然后写到供应商的sku_mode字段
...
@@ -19,6 +18,7 @@ func SaveSkuModeFromES() (err error) {
...
@@ -19,6 +18,7 @@ func SaveSkuModeFromES() (err error) {
return
err
return
err
}
}
defer
rows
.
Close
()
defer
rows
.
Close
()
var
num
int
for
rows
.
Next
()
{
for
rows
.
Next
()
{
err
=
rows
.
Scan
(
supplier
)
err
=
rows
.
Scan
(
supplier
)
//去es查询sku数量
//去es查询sku数量
...
@@ -48,14 +48,15 @@ func SaveSkuModeFromES() (err error) {
...
@@ -48,14 +48,15 @@ func SaveSkuModeFromES() (err error) {
if
err
!=
nil
{
if
err
!=
nil
{
return
err
return
err
}
}
num
++
}
}
}
}
err
=
dao
.
UpdateSupplierSkuMode
(
supplier
.
SupplierId
,
0
)
err
=
dao
.
UpdateSupplierSkuMode
(
supplier
.
SupplierId
,
0
)
if
err
!=
nil
{
if
err
!=
nil
{
return
err
return
err
}
}
time
.
Sleep
(
100
*
time
.
Millisecond
)
//
time.Sleep(100 * time.Millisecond)
}
}
fmt
.
Println
(
"执行完成
"
)
fmt
.
Println
(
"执行完成
,有sku_mode的供应商数量为 : "
,
num
)
return
return
}
}
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