Skip to content

Commit

Permalink
Update NodeInspire
Browse files Browse the repository at this point in the history
  • Loading branch information
leej1012 committed Jul 3, 2023
1 parent b3eea82 commit f87934f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,8 @@ public ResponseBean getGovernanceInfo(
@ApiOperation(value = "Get nodes inspire")
@GetMapping(value = "/inspire/all")
public ResponseBean getNodesInspire(
@RequestParam(value = "page_number") @Min(value = 1, message = "Invalid page number") Integer pageNum,
@RequestParam(value = "page_size") @Min(value = 1, message = "Invalid page size") @Max(value = 500, message =
@RequestParam(value = "page_number", defaultValue = "1") @Min(value = 1, message = "Invalid page number") Integer pageNum,
@RequestParam(value = "page_size", defaultValue = "20") @Min(value = 1, message = "Invalid page size") @Max(value = 500, message =
"Invalid page size") Integer pageSize
) {
PageResponseBean response = nodesService.getNodesInspire(pageNum, pageSize);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,9 @@ public class NodeInspire {
@Column(name = "user_foundation_bonus_incentive_rate")
private String userFoundationBonusIncentiveRate;

@Column(name = "node_apy")
private String nodeApy;

@Column(name = "user_apy")
private String userApy;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ALTER TABLE tbl_node_inspire ADD COLUMN `node_apy` varchar(100) DEFAULT NULL COMMENT '节点年化收益';
ALTER TABLE tbl_node_inspire ADD COLUMN `user_apy` varchar(100) DEFAULT NULL COMMENT '用户年化收益';
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.github.ontio.mapper.NodeInspireMapper">
<resultMap id="BaseResultMap" type="com.github.ontio.model.dao.NodeInspire">
<!--
WARNING - @mbg.generated
-->
<id column="public_key" jdbcType="VARCHAR" property="publicKey"/>
<result column="address" jdbcType="VARCHAR" property="address"/>
<result column="name" jdbcType="VARCHAR" property="name"/>
Expand All @@ -22,6 +19,8 @@
<result column="node_foundation_bonus_incentive_rate" jdbcType="VARCHAR" property="nodeFoundationBonusIncentiveRate"/>
<result column="user_foundation_bonus_incentive" jdbcType="BIGINT" property="userFoundationBonusIncentive"/>
<result column="user_foundation_bonus_incentive_rate" jdbcType="VARCHAR" property="userFoundationBonusIncentiveRate"/>
<result column="node_apy" jdbcType="VARCHAR" property="nodeApy"/>
<result column="user_apy" jdbcType="VARCHAR" property="userApy"/>
</resultMap>
<!--
self-defined SQL
Expand All @@ -44,7 +43,9 @@
node_foundation_bonus_incentive,
node_foundation_bonus_incentive_rate,
user_foundation_bonus_incentive,
user_foundation_bonus_incentive_rate
user_foundation_bonus_incentive_rate,
node_apy,
user_apy
FROM tbl_node_inspire
LIMIT #{start},#{pageSize}
</select>
Expand Down

0 comments on commit f87934f

Please sign in to comment.