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
dc5da61e
authored
May 30, 2022
by
mushishixian
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
修改简化统计
parent
c365e514
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
app/dao/supplier.go
app/service/supplier_sku_statistics.go
app/dao/supplier.go
View file @
dc5da61e
...
...
@@ -107,6 +107,16 @@ func UpdateSupplierSkuNum(supplierId, skuNum int) (err error) {
if
err
!=
nil
{
return
err
}
//去修改历史上传过SKU的标志
if
supplier
.
UploadedSku
==
-
1
&&
skuNum
>
0
{
fmt
.
Println
(
"新增历史上传SKU供应商 : "
+
supplier
.
SupplierName
)
supplier
.
UploadedSku
=
1
_
,
err
=
Dao
.
GetDb
(
"supplier"
)
.
Table
(
"lie_supplier_channel"
)
.
Where
(
"supplier_id = ?"
,
supplierId
)
.
Cols
(
"uploaded_sku"
)
.
Update
(
supplier
)
if
err
!=
nil
{
return
err
}
}
return
}
...
...
app/service/supplier_sku_statistics.go
View file @
dc5da61e
...
...
@@ -8,11 +8,11 @@ import (
func
StatisticsSupplierSkuStatus
()
(
err
error
)
{
fmt
.
Println
(
"开始统计"
)
//先找出所有需要判断的供应商
//
err = dao.StatisticsSuppliersSkuNum()
err
=
dao
.
StatisticsSuppliersSkuNum
()
// if err != nil {
// return err
// }
err
=
dao
.
StatisticsSuppliersHasUploadedSku
()
//
err = dao.StatisticsSuppliersHasUploadedSku()
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