diff --git a/back-end-projects/Explorer/src/main/java/com/github/ontio/model/dao/NodeInfoOnChainWithRankChange.java b/back-end-projects/Explorer/src/main/java/com/github/ontio/model/dao/NodeInfoOnChainWithRankChange.java index ab09d5a5..f11d1d0d 100644 --- a/back-end-projects/Explorer/src/main/java/com/github/ontio/model/dao/NodeInfoOnChainWithRankChange.java +++ b/back-end-projects/Explorer/src/main/java/com/github/ontio/model/dao/NodeInfoOnChainWithRankChange.java @@ -8,7 +8,7 @@ @Data @AllArgsConstructor @EqualsAndHashCode(callSuper = true) -public class NodeInfoOnChainWithRankChange extends NodeInfoOnChain { +public class NodeInfoOnChainWithRankChange extends NodeInfoOnChainDto { private Integer rankChange; diff --git a/back-end-projects/Explorer/src/main/java/com/github/ontio/model/dto/NodeInfoOnChainDto.java b/back-end-projects/Explorer/src/main/java/com/github/ontio/model/dto/NodeInfoOnChainDto.java index 45f09c8a..a94175cf 100644 --- a/back-end-projects/Explorer/src/main/java/com/github/ontio/model/dto/NodeInfoOnChainDto.java +++ b/back-end-projects/Explorer/src/main/java/com/github/ontio/model/dto/NodeInfoOnChainDto.java @@ -2,21 +2,35 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.github.ontio.model.dao.NodeInfoOnChain; -import lombok.NoArgsConstructor; +import lombok.Data; +import javax.persistence.Column; import javax.persistence.Table; @Table(name = "tbl_node_info_on_chain") @JsonInclude(JsonInclude.Include.NON_NULL) -@NoArgsConstructor +@Data public class NodeInfoOnChainDto extends NodeInfoOnChain { - //@Builder - public NodeInfoOnChainDto(Integer nodeRank, String name, Long currentStake, String progress, String detailUrl, - String publicKey, String address, Integer status, Long initPos, Long totalPos, - Long maxAuthorize, String nodeProportion, String userProportion, String currentStakePercentage) { - super(nodeRank, name, currentStake, progress, detailUrl, publicKey, address, status, initPos, totalPos, - maxAuthorize, nodeProportion, userProportion, currentStakePercentage); - } + @Column(name = "fee_sharing_ratio") + private Integer feeSharingRatio; + + @Column(name = "ontology_harbinger") + private Integer ontologyHarbinger; + + private Integer risky; + + @Column(name = "bad_actor") + private Integer badActor; + public NodeInfoOnChainDto() { + + } + public NodeInfoOnChainDto(NodeInfoOnChainDto nodeInfoOnChain) { + super(nodeInfoOnChain); + this.feeSharingRatio = nodeInfoOnChain.getFeeSharingRatio(); + this.ontologyHarbinger = nodeInfoOnChain.getOntologyHarbinger(); + this.risky = nodeInfoOnChain.getRisky(); + this.badActor = nodeInfoOnChain.getBadActor(); + } } \ No newline at end of file diff --git a/back-end-projects/Explorer/src/main/resources/mapper/NodeInfoOnChainMapper.xml b/back-end-projects/Explorer/src/main/resources/mapper/NodeInfoOnChainMapper.xml index 1c23c717..7989145f 100644 --- a/back-end-projects/Explorer/src/main/resources/mapper/NodeInfoOnChainMapper.xml +++ b/back-end-projects/Explorer/src/main/resources/mapper/NodeInfoOnChainMapper.xml @@ -28,21 +28,26 @@