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
279aad4c
authored
Sep 24, 2021
by
mushishixian
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix
parent
ee38ee38
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
app/dao/supplier.go
app/service/supplier_sku_mode.go
app/dao/supplier.go
View file @
279aad4c
...
...
@@ -40,7 +40,7 @@ func StatisticsSuppliersSkuNum() (err error) {
return
err
}
}
fmt
.
Println
(
"执行完成,有上传sku的供应商数量为 : "
,
num
)
fmt
.
Println
(
"执行完成,有上传sku的供应商数量为 : "
,
num
)
return
}
...
...
@@ -57,7 +57,7 @@ func UpdateSupplierSkuNum(supplierId, skuNum int) (err error) {
}
supplier
.
SkuNum
=
skuNum
//还要去写映射表lie_supplier_merger_mapping
_
,
err
=
Dao
.
GetDb
(
"supplier"
)
.
Table
(
"lie_supplier_channel"
)
.
Where
(
"supplier_id = ?"
,
supplierId
)
.
Update
(
supplier
)
_
,
err
=
Dao
.
GetDb
(
"supplier"
)
.
Table
(
"lie_supplier_channel"
)
.
Where
(
"supplier_id = ?"
,
supplierId
)
.
Cols
(
"sku_num"
)
.
Update
(
supplier
)
if
err
!=
nil
{
return
err
}
...
...
@@ -77,7 +77,7 @@ func UpdateSupplierSkuMode(supplierId, skuMode int) (err error) {
}
supplier
.
SkuMode
=
skuMode
//还要去写映射表lie_supplier_merger_mapping
_
,
err
=
Dao
.
GetDb
(
"supplier"
)
.
Table
(
"lie_supplier_channel"
)
.
Where
(
"supplier_id = ?"
,
supplierId
)
.
Update
(
supplier
)
_
,
err
=
Dao
.
GetDb
(
"supplier"
)
.
Table
(
"lie_supplier_channel"
)
.
Cols
(
"sku_mode"
)
.
Where
(
"supplier_id = ?"
,
supplierId
)
.
Update
(
supplier
)
if
err
!=
nil
{
return
err
}
...
...
app/service/supplier_sku_mode.go
View file @
279aad4c
...
...
@@ -50,6 +50,10 @@ func SaveSkuModeFromES() (err error) {
}
}
}
err
=
dao
.
UpdateSupplierSkuMode
(
supplier
.
SupplierId
,
0
)
if
err
!=
nil
{
return
err
}
time
.
Sleep
(
100
*
time
.
Millisecond
)
}
fmt
.
Println
(
"执行完成"
)
...
...
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