Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CnChunfeng
/
crm_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
c2beb00f
authored
Jun 04, 2020
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
查询bom_id是否存在
parent
aaed198b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
cmd/queue/bom_order/main.go
cmd/queue/bom_order/main.go
View file @
c2beb00f
...
@@ -161,6 +161,16 @@ func consume(bom BomOrder) {
...
@@ -161,6 +161,16 @@ func consume(bom BomOrder) {
client_account
=
account
.
Email
client_account
=
account
.
Email
}
}
// 查询bom_id是否存在
var
extend_id
int
dao
.
GetLiexinBomDb
()
.
Get
(
&
extend_id
,
"select id from lie_bom_extend where bom_id = ?"
,
bom
.
BomId
)
if
extend_id
!=
0
{
// 存在
logger
.
Info
(
"bom_id already exists "
)
service
.
DingAlert
(
configs
.
Ding_crm_token
,
"bom_crm队列任务,bom_id已存在"
,
""
)
return
}
// 添加到lie_bom_extend表
// 添加到lie_bom_extend表
curr_time
:=
time
.
Now
()
.
Unix
()
curr_time
:=
time
.
Now
()
.
Unix
()
_
,
err
=
dao
.
GetLiexinBomDb
()
.
Exec
(
"insert into lie_bom_extend (kefu_id, kefu_name, bom_id, bom_sn, user_id, user_name, create_time, update_time) values (?,?,?,?,?,?,?,?)"
,
_
,
err
=
dao
.
GetLiexinBomDb
()
.
Exec
(
"insert into lie_bom_extend (kefu_id, kefu_name, bom_id, bom_sn, user_id, user_name, create_time, update_time) values (?,?,?,?,?,?,?,?)"
,
...
...
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