Commit 2a6cd6ec authored by szh's avatar szh

update import bug

parent 466eb331
......@@ -9,18 +9,6 @@ import (
"chain33-pai/service/stat_service"
)
type ReqTicketInfo struct {
Addr string `json:"addr" binding:"requried"`
Page int32 `json:"page"`
Pageszie int32 `json:"pageszie"`
Detail bool `json:"detail"`
}
type ReqMineTime struct {
Addr string `json:"addr" binding:"requried"`
StartTime int64 `json:"start_time"`
EndTime int64 `json:"end_time"`
}
func GetDevdetail(c *gin.Context) {
appG := app.Gin{C: c}
......@@ -48,7 +36,7 @@ func GetDevstatus(c *gin.Context) {
func GetTicketInfo(c *gin.Context) {
appG := app.Gin{C: c}
var req ReqTicketInfo
var req pai_service.ReqTicketInfo
c.BindJSON(&req)
if req.Detail {
if req.Page == 0 {
......@@ -69,7 +57,7 @@ func GetTicketInfo(c *gin.Context) {
func RecordMineTime(c *gin.Context) {
appG := app.Gin{C: c}
var req ReqMineTime
var req pai_service.ReqMineTime
err := c.BindJSON(&req)
if err != nil {
appG.Response(http.StatusOK, e.ERROR, nil)
......
......@@ -9,7 +9,6 @@ import (
"chain33-pai/pkg/chain33"
"chain33-pai/pkg/logging"
"github.com/33cn/chain33/types"
"chain33-pai/routers/api/v1"
"chain33-pai/models"
)
......@@ -44,6 +43,20 @@ type MinedTxInfo struct {
BlockTime int64 `json:"block_time"`
}
type ReqTicketInfo struct {
Addr string `json:"addr" binding:"requried"`
Page int32 `json:"page"`
Pageszie int32 `json:"pageszie"`
Detail bool `json:"detail"`
}
type ReqMineTime struct {
Addr string `json:"addr" binding:"requried"`
StartTime int64 `json:"start_time"`
EndTime int64 `json:"end_time"`
}
func (p *Pai) GetConfig() bool {
if pai_serial != "" {
p.Serial = pai_serial
......@@ -143,7 +156,7 @@ func getPaiConfig(command string ,arg ...string) (config map[string]string,err e
return list, nil
}
func (p *Pai) GetTicketInfo(req *v1.ReqTicketInfo) (*MinedInfo,error) {
func (p *Pai) GetTicketInfo(req *ReqTicketInfo) (*MinedInfo,error) {
var info MinedInfo
txsList := make([]*MinedTxInfo,0)
stat,err := models.GetAddr(req.Addr)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment