fix version 1
This commit is contained in:
@@ -18,12 +18,16 @@ func Transactions(ctx context.Context, in *pb.TransactionsRequest) (reply *pb.Tr
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if in.Page <= 1 {
|
||||
if in.Page <= 0 {
|
||||
in.Page = 1
|
||||
}
|
||||
if in.PageSize <= 1 {
|
||||
if in.PageSize <= 0 {
|
||||
in.PageSize = 20
|
||||
}
|
||||
// 单页上限,避免一次拉取整表流水
|
||||
if in.PageSize > 100 {
|
||||
in.PageSize = 100
|
||||
}
|
||||
list, total, err := models.FindWalletRecords(auth.Identity, in.Start, in.End, in.TransType, in.TradeType, in.Page, in.PageSize)
|
||||
if err != nil {
|
||||
printer.Error(err.Error())
|
||||
|
||||
Reference in New Issue
Block a user