调整
This commit is contained in:
parent
f3489c2593
commit
d738c1b946
@ -46,7 +46,7 @@ func (this *RechargeApi) Buy(c *gin.Context) {
|
||||
reqJson := struct {
|
||||
NetId int32 `json:"net_id"`
|
||||
GoodsId int32 `json:"goods_id"`
|
||||
Num int32 `json:"num"`
|
||||
Num int32 `json:"num"`
|
||||
AccountAddress string `json:"account_address"`
|
||||
}{}
|
||||
if err := c.ShouldBindJSON(&reqJson); err != nil {
|
||||
@ -180,15 +180,17 @@ func (ea *RechargeApi) RechargeQuery(c *gin.Context) {
|
||||
ErrMsg string `json:"errmsg"`
|
||||
Page common.StreamPagination `json:"page"`
|
||||
Rows []struct {
|
||||
OrderID string `json:"order_id"`
|
||||
ShortOrderID string `json:"short_order_id"`
|
||||
TxHash string `json:"txhash"`
|
||||
NetID int64 `json:"net_id"`
|
||||
Currency string `json:"currency"`
|
||||
CurrencyName string `json:"currency_name"`
|
||||
Amount string `json:"amount"`
|
||||
Diamond string `json:"diamond"`
|
||||
Date int32 `json:"createtime"`
|
||||
OrderID string `gorm:"column:order_id" json:"order_id"`
|
||||
ShortOrderID string `gorm:"column:short_order_id" json:"short_order_id"`
|
||||
TxHash string `gorm:"column:txhash" json:"txhash"`
|
||||
NetID int64 `gorm:"column:net_id" json:"net_id"`
|
||||
Currency string `gorm:"column:currency_address" json:"currency"`
|
||||
CurrencyName string `gorm:"column:currency_name" json:"currency_name"`
|
||||
Amount string `gorm:"column:price" json:"amount"`
|
||||
Diamond string `gorm:"column:diamond" json:"diamond"`
|
||||
Date int32 `gorm:"column:createtime" json:"createtime"`
|
||||
Account string `gorm:"column:account_address" json:"account_address"`
|
||||
Passport string `gorm:"column:passport_address" json:"passport_address"`
|
||||
} `json:"rows"`
|
||||
}{}
|
||||
q5.NewSlice(&rspObj.Rows, 0, 10)
|
||||
@ -206,16 +208,7 @@ func (ea *RechargeApi) RechargeQuery(c *gin.Context) {
|
||||
},
|
||||
func(ds *f5.DataSet) {
|
||||
p := q5.NewSliceElement(&rspObj.Rows)
|
||||
|
||||
p.TxHash = ds.GetByName("txhash")
|
||||
p.NetID = netId
|
||||
p.OrderID = ds.GetByName("order_id")
|
||||
p.ShortOrderID = ds.GetByName("short_order_id")
|
||||
p.Currency = ds.GetByName("currency_address")
|
||||
p.CurrencyName = ds.GetByName("currency_name")
|
||||
p.Amount = ds.GetByName("price")
|
||||
p.Diamond = ds.GetByName("diamond")
|
||||
p.Date = q5.SafeToInt32(ds.GetByName("createtime"))
|
||||
f5.UnmarshalModel(ds, p)
|
||||
})
|
||||
c.JSON(200, rspObj)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user