调整
This commit is contained in:
parent
9b7c89307e
commit
c9a5ac619e
@ -162,14 +162,10 @@ func (ea *RechargeApi) RechargeQuery(c *gin.Context) {
|
|||||||
pageSize := q5.AdjustRangeValue(q5.SafeToInt32(reqJson.PageSize), 1, 20)
|
pageSize := q5.AdjustRangeValue(q5.SafeToInt32(reqJson.PageSize), 1, 20)
|
||||||
cursor := q5.SafeToInt64(reqJson.Cursor)
|
cursor := q5.SafeToInt64(reqJson.Cursor)
|
||||||
|
|
||||||
/* sql := fmt.Sprintf(`
|
|
||||||
SELECT * FROM t_recharge_order
|
|
||||||
WHERE idx > %d AND net_id = %d AND passport_address = ?`,
|
|
||||||
cursor, netId) */
|
|
||||||
sql := fmt.Sprintf(`
|
sql := fmt.Sprintf(`
|
||||||
SELECT * FROM t_recharge_order
|
SELECT * FROM t_recharge
|
||||||
WHERE idx > %d AND passport_address = ?`,
|
WHERE idx > %d AND net_id = %d AND passport = ?`,
|
||||||
cursor)
|
cursor, netId)
|
||||||
|
|
||||||
params := []string{account}
|
params := []string{account}
|
||||||
subFilters := []f5.DbQueryFilter{}
|
subFilters := []f5.DbQueryFilter{}
|
||||||
@ -186,13 +182,14 @@ func (ea *RechargeApi) RechargeQuery(c *gin.Context) {
|
|||||||
NetID int64 `json:"net_id"`
|
NetID int64 `json:"net_id"`
|
||||||
Currency string `json:"currency"`
|
Currency string `json:"currency"`
|
||||||
Amount string `json:"amount"`
|
Amount string `json:"amount"`
|
||||||
|
Diamond string `json:"diamond"`
|
||||||
Date int32 `json:"createtime"`
|
Date int32 `json:"createtime"`
|
||||||
} `json:"rows"`
|
} `json:"rows"`
|
||||||
}{}
|
}{}
|
||||||
q5.NewSlice(&rspObj.Rows, 0, 10)
|
q5.NewSlice(&rspObj.Rows, 0, 10)
|
||||||
|
|
||||||
f5.GetGoStyleDb().StreamPageQuery(
|
f5.GetGoStyleDb().StreamPageQuery(
|
||||||
constant.BCNFT_DB,
|
constant.BCEVENT_DB,
|
||||||
pageSize,
|
pageSize,
|
||||||
cursor,
|
cursor,
|
||||||
sql,
|
sql,
|
||||||
@ -206,10 +203,11 @@ func (ea *RechargeApi) RechargeQuery(c *gin.Context) {
|
|||||||
p := q5.NewSliceElement(&rspObj.Rows)
|
p := q5.NewSliceElement(&rspObj.Rows)
|
||||||
|
|
||||||
p.TxHash = ds.GetByName("txhash")
|
p.TxHash = ds.GetByName("txhash")
|
||||||
p.NetID = netId //q5.SafeToInt64(ds.GetByName("net_id"))
|
p.NetID = q5.SafeToInt64(ds.GetByName("net_id"))
|
||||||
p.OrderID = ds.GetByName("order_id")
|
p.OrderID = ds.GetByName("order_id")
|
||||||
p.Currency = ds.GetByName("currency_name")
|
p.Currency = ds.GetByName("currency")
|
||||||
p.Amount = ds.GetByName("item_num")
|
p.Amount = ds.GetByName("amount")
|
||||||
|
p.Diamond = ds.GetByName("diamond")
|
||||||
p.Date = q5.SafeToInt32(ds.GetByName("createtime"))
|
p.Date = q5.SafeToInt32(ds.GetByName("createtime"))
|
||||||
})
|
})
|
||||||
c.JSON(200, rspObj)
|
c.JSON(200, rspObj)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user