Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
新注册的用户请输入邮箱并保存,随后登录邮箱激活账号。后续可直接使用邮箱登录!
Open sidebar
chainweaver
ida
registration-service
Commits
079333de
Commit
079333de
authored
8 months ago
by
kunkkawu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update event log
parent
8e8b65f9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
internal/event/certificate_event.go
internal/event/certificate_event.go
+3
-3
No files found.
internal/event/certificate_event.go
View file @
079333de
...
...
@@ -73,7 +73,7 @@ func (h *CertificateEventHandler) handleEvent(e *common.ContractEventInfo) {
enterprise
:=
&
model
.
Enterprise
{}
if
err
:=
tx
.
Where
(
"enterprise_address = ? and chain_info_id = ?"
,
certification
.
RequestAddress
,
h
.
chainInfoId
)
.
First
(
enterprise
)
.
Error
;
err
!=
nil
{
h
.
logger
.
Errorf
(
"[event] query certification enterprise error: %v"
,
e
)
h
.
logger
.
Errorf
(
"[event] query certification enterprise error: %v"
,
e
rr
)
tx
.
Rollback
()
return
}
...
...
@@ -82,7 +82,7 @@ func (h *CertificateEventHandler) handleEvent(e *common.ContractEventInfo) {
assetCertification
:=
&
model
.
AssetCertification
{}
if
err
:=
tx
.
Where
(
"asset_id = ? and enterprise_id = ? and status = ? and chain_info_id = ?"
,
asset
.
Id
,
enterprise
.
Id
,
model
.
CertificationStatusVerify
,
h
.
chainInfoId
)
.
First
(
assetCertification
)
.
Error
;
err
!=
nil
{
h
.
logger
.
Errorf
(
"[event] asset certification status error: %v"
,
e
)
h
.
logger
.
Errorf
(
"[event] asset certification status error: %v"
,
e
rr
)
tx
.
Rollback
()
return
}
...
...
@@ -95,7 +95,7 @@ func (h *CertificateEventHandler) handleEvent(e *common.ContractEventInfo) {
assetCertification
.
Status
=
model
.
CertificationStatusFinish
if
err
:=
tx
.
Where
(
"id = ?"
,
assetCertification
.
Id
)
.
UpdateColumns
(
assetCertification
)
.
Error
;
err
!=
nil
{
h
.
logger
.
Errorf
(
"[event] update asset certification error: %v"
,
e
)
h
.
logger
.
Errorf
(
"[event] update asset certification error: %v"
,
e
rr
)
tx
.
Rollback
()
return
}
...
...
This diff is collapsed.
Click to expand it.
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