1
This commit is contained in:
parent
6f9fce64d7
commit
b70c939eaa
@ -57,7 +57,8 @@ CREATE TABLE `t_mail` (
|
|||||||
`modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
|
`modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
|
||||||
UNIQUE KEY `idx` (`idx`),
|
UNIQUE KEY `idx` (`idx`),
|
||||||
UNIQUE KEY `unikey` (`unikey`),
|
UNIQUE KEY `unikey` (`unikey`),
|
||||||
PRIMARY KEY (`mail_id`)
|
UNIQUE KEY `mail_id` (`mail_id`),
|
||||||
|
PRIMARY KEY (`idx`)
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
) ENGINE=InnoDB AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
||||||
|
@ -209,10 +209,14 @@ SELECT * FROM t_sale WHERE idx > %d AND net_id = %d `,
|
|||||||
ErrCode int32 `json:"errcode"`
|
ErrCode int32 `json:"errcode"`
|
||||||
ErrMsg string `json:"errmsg"`
|
ErrMsg string `json:"errmsg"`
|
||||||
Page common.StreamPagination `json:"page"`
|
Page common.StreamPagination `json:"page"`
|
||||||
Rows []interface{} `json:"rows"`
|
Rows []struct{
|
||||||
|
Event interface{} `json:"event"`
|
||||||
|
Nft interface{} `json:"nft"`
|
||||||
|
InShopCart int32 `json:"in_shopcart"`
|
||||||
|
} `json:"rows"`
|
||||||
}{
|
}{
|
||||||
Rows : []interface{}{},
|
|
||||||
}
|
}
|
||||||
|
q5.NewSlice(&rspObj.Rows, 0, 10)
|
||||||
orderBy := ""
|
orderBy := ""
|
||||||
nfts := []*common.NftDto{}
|
nfts := []*common.NftDto{}
|
||||||
f5.GetGoStyleDb().StreamPageQuery(
|
f5.GetGoStyleDb().StreamPageQuery(
|
||||||
@ -231,12 +235,16 @@ SELECT * FROM t_sale WHERE idx > %d AND net_id = %d `,
|
|||||||
p.NetId = q5.ToInt32(ds.GetByName("net_id"))
|
p.NetId = q5.ToInt32(ds.GetByName("net_id"))
|
||||||
p.ContractAddress = ds.GetByName("contract_address")
|
p.ContractAddress = ds.GetByName("contract_address")
|
||||||
p.TokenId = ds.GetByName("token_id")
|
p.TokenId = ds.GetByName("token_id")
|
||||||
|
p.Payload = map[string]interface{}{}
|
||||||
|
q5.DecodeJson(ds.GetByName("event_data"), &p.Payload)
|
||||||
q5.AppendSlice(&nfts, p)
|
q5.AppendSlice(&nfts, p)
|
||||||
})
|
})
|
||||||
GetCacheMgr().GetNfts(nfts)
|
GetCacheMgr().GetNfts(nfts)
|
||||||
{
|
{
|
||||||
for _, val := range nfts {
|
for _, val := range nfts {
|
||||||
q5.AppendSlice(&rspObj.Rows, val.NftCache.GetJsonData())
|
p := q5.NewSliceElement(&rspObj.Rows)
|
||||||
|
p.Event = val.Payload
|
||||||
|
p.Nft = val.NftCache.GetJsonData()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
c.JSON(200, rspObj)
|
c.JSON(200, rspObj)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user