diff --git a/back-end-projects/Explorer/src/main/java/com/github/ontio/service/impl/AddressServiceImpl.java b/back-end-projects/Explorer/src/main/java/com/github/ontio/service/impl/AddressServiceImpl.java index 09a15607..0a0e8313 100644 --- a/back-end-projects/Explorer/src/main/java/com/github/ontio/service/impl/AddressServiceImpl.java +++ b/back-end-projects/Explorer/src/main/java/com/github/ontio/service/impl/AddressServiceImpl.java @@ -1627,7 +1627,7 @@ private void putStakingInfoList4Onto(String stakingInfo, NodeInfoOffChain nodeIn boolean allowStake = progress != null && !"100.00%".equals(progress); // 判断节点存在是否存在 int nodeStatus = progress == null ? 0 : 1; - String userApy = Optional.ofNullable(nodeInfoOffChain.getUserApy()).orElse(""); + String userApy = progress == null ? "" : Optional.ofNullable(nodeInfoOffChain.getUserApy()).orElse(""); JSONObject stakingInfoObj = JSONObject.parseObject(stakingInfo); Long consensusPos = stakingInfoObj.getLong("consensusPos"); Long freezePos = stakingInfoObj.getLong("freezePos"); diff --git a/back-end-projects/Explorer/src/main/resources/mapper/NodeInfoOffChainMapper.xml b/back-end-projects/Explorer/src/main/resources/mapper/NodeInfoOffChainMapper.xml index 08192f78..7780080f 100644 --- a/back-end-projects/Explorer/src/main/resources/mapper/NodeInfoOffChainMapper.xml +++ b/back-end-projects/Explorer/src/main/resources/mapper/NodeInfoOffChainMapper.xml @@ -104,6 +104,6 @@ FROM tbl_node_info_off_chain a LEFT JOIN tbl_node_info_on_chain b ON a.public_key = b.public_key LEFT JOIN tbl_node_inspire c ON a.public_key = c.public_key - ORDER BY c.user_apy IS NULL, b.progress = '100.00%', a.public_key + ORDER BY b.progress IS NULL, b.progress = '100.00%', a.public_key \ No newline at end of file