Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tron-explore
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张建华@五瓣科技
tron-explore
Commits
9732a72c
Commit
9732a72c
authored
Nov 17, 2020
by
jianhua.zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
毫秒时间转换成秒
parent
fe3aaee6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
6 deletions
+27
-6
TransactionControllerV1.java
...n/tron/explore/controller/v1/TransactionControllerV1.java
+27
-6
No files found.
src/main/java/com/wuban/tron/explore/controller/v1/TransactionControllerV1.java
View file @
9732a72c
...
...
@@ -76,7 +76,10 @@ public class TransactionControllerV1 {
BlockInfoModel
model
=
BlockInfoModel
.
getInstance
();
if
(
blockHeader
!=
null
)
{
model
.
setNumber
(
blockHeader
.
getNumber
());
model
.
setTimestamp
(
blockHeader
.
getTimestamp
().
toString
());
if
(
blockHeader
.
getTimestamp
()
!=
null
)
{
Long
tt
=
blockHeader
.
getTimestamp
()/
1000
;
model
.
setTimestamp
(
tt
.
toString
());
}
model
.
setParentHash
(
blockHeader
.
getParentHash
());
model
.
setTrans_number
(
blockHeader
.
getTransactionVolume
());
model
.
setSize
(
blockHeader
.
getBlockBytes
());
...
...
@@ -124,7 +127,11 @@ public class TransactionControllerV1 {
}
else
{
model
.
setTo
(
trans
.
getToAddress
());
}
model
.
setTimestamp
(
trans
.
getTimestamp
().
toString
());
if
(
trans
.
getTimestamp
()
!=
null
)
{
Long
tt
=
trans
.
getTimestamp
()/
1000
;
model
.
setTimestamp
(
tt
.
toString
());
}
}
return
ResponseKit
.
success
(
model
);
}
...
...
@@ -169,7 +176,10 @@ public class TransactionControllerV1 {
pageInfo
.
getList
().
forEach
(
o
->
{
BlockInfoModel
model
=
BlockInfoModel
.
getInstance
();
model
.
setNumber
(
o
.
getNumber
());
model
.
setTimestamp
(
o
.
getTimestamp
().
toString
());
if
(
o
.
getTimestamp
()
!=
null
)
{
Long
tt
=
o
.
getTimestamp
()/
1000
;
model
.
setTimestamp
(
tt
.
toString
());
}
model
.
setParentHash
(
o
.
getParentHash
());
model
.
setHash
(
o
.
getBlockId
());
model
.
setTrans_number
(
o
.
getTransactionVolume
());
...
...
@@ -230,7 +240,11 @@ public class TransactionControllerV1 {
}
else
{
model
.
setTo
(
o
.
getToAddress
());
}
model
.
setTimestamp
(
o
.
getTimestamp
().
toString
());
if
(
o
.
getTimestamp
()
!=
null
)
{
Long
tt
=
o
.
getTimestamp
()/
1000
;
model
.
setTimestamp
(
tt
.
toString
());
}
modelList
.
add
(
model
);
numberList
.
add
(
o
.
getNumber
());
});
...
...
@@ -252,7 +266,10 @@ public class TransactionControllerV1 {
BlockInfoModel
model
=
BlockInfoModel
.
getInstance
();
if
(
blockHeader
!=
null
)
{
model
.
setNumber
(
blockHeader
.
getNumber
());
model
.
setTimestamp
(
blockHeader
.
getTimestamp
().
toString
());
if
(
blockHeader
.
getTimestamp
()
!=
null
)
{
Long
tt
=
blockHeader
.
getTimestamp
()/
1000
;
model
.
setTimestamp
(
tt
.
toString
());
}
model
.
setParentHash
(
blockHeader
.
getParentHash
());
model
.
setTrans_number
(
blockHeader
.
getTransactionVolume
());
model
.
setSize
(
blockHeader
.
getBlockBytes
());
...
...
@@ -321,7 +338,11 @@ public class TransactionControllerV1 {
}
else
{
model
.
setTo
(
trans
.
getToAddress
());
}
model
.
setTimestamp
(
trans
.
getTimestamp
().
toString
());
if
(
trans
.
getTimestamp
()
!=
null
)
{
Long
tt
=
trans
.
getTimestamp
()/
1000
;
model
.
setTimestamp
(
tt
.
toString
());
}
}
return
ResponseKit
.
success
(
model
);
...
...
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