Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
bom_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
b2f05158
authored
Jun 02, 2020
by
mushishixian
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
修复
parent
b6898f49
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
3 deletions
internal/logic/bom_item.go
internal/logic/bom_matching.go
internal/model/model.go
internal/logic/bom_item.go
View file @
b2f05158
...
...
@@ -86,6 +86,7 @@ func UpdateBomItem(bomId, bomItemId int) (err error) {
defer
client
.
Stop
()
//直接模糊匹配
goodsMapList
,
err
:=
getUpdateGoodsData
(
bomId
,
bomItems
,
where
.
DeliveryType
,
where
.
Sort
,
client
,
true
)
//fmt.Println(goodsMapList)
if
err
!=
nil
{
return
}
...
...
internal/logic/bom_matching.go
View file @
b2f05158
...
...
@@ -34,9 +34,6 @@ func BatchSaveMatchings(bomId int, matchingList []model.BomItemMatching) (err er
tableName
:=
"lie_bom_item_matching_"
+
tableEnd
//批量更新每一条记录之前,要去批量更新item表的item_status
for
_
,
matching
:=
range
matchingList
{
//if k == 1 || k == 2 || k == 3 {
// time.Sleep(2 * time.Second)
//}
//先去数据库查询是否存在该记录,有的话修改,没有就新增
var
match
model
.
BomItemMatching
model
.
Db
.
Table
(
tableName
)
.
Where
(
"bom_item_id = ?"
,
matching
.
BomItemID
)
.
First
(
&
match
)
...
...
internal/model/model.go
View file @
b2f05158
...
...
@@ -27,6 +27,7 @@ func Setup() {
}
Db
.
SingularTable
(
true
)
//Db.LogMode(true)
Db
.
DB
()
.
SetMaxIdleConns
(
10
)
Db
.
DB
()
.
SetMaxOpenConns
(
100
)
}
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