瀏覽代碼

update 完善提现记录

Alvin 8 月之前
父節點
當前提交
ecf5d2bff5

+ 2 - 2
game/game_cluster/nodes/webadmin/entity/user_withdrawal.go

@@ -24,9 +24,9 @@ type UserWithdrawalReq struct {
 	EndTime    int64  `json:"end_time"`                     // 结束时间
 	Page       int    `json:"page"`                         // 页码
 	Size       int    `json:"size"`                         // 每页数量
-	Withdrawal string `json:"withdrawal" bson:"withdrawal"` // 提现 1:提现成功 2:提现中 3:提现失败 4:拒绝提现
+	Withdrawal int    `json:"withdrawal" bson:"withdrawal"` // 提现 1:提现成功 2:提现中 3:提现失败 4:拒绝提现
+	Status     int    `json:"status" bson:"status"`         // 0:未审核 1:审核通过 2:审核失败
 	Address    string `json:"address" bson:"address"`       // 地址
-	Status     string `json:"status" bson:"status"`         // 0:未审核 1:审核通过 2:审核失败
 }
 
 type UserWithdrawalStatus struct {

+ 3 - 9
game/game_cluster/nodes/webadmin/service/synthesis.go

@@ -5,9 +5,7 @@ import (
 	"errors"
 	"log"
 	"math"
-	"os"
 	"sort"
-	"strconv"
 	"time"
 
 	"github.com/mhaya/game/game_cluster/internal/constant"
@@ -148,19 +146,15 @@ func (s *Synthesis) FindWithdrawal(req *entity.UserWithdrawalReq) ([]*entity.Use
 		}
 	}
 
-	if req.Withdrawal != "" {
-		withdrawal, err := strconv.Atoi(req.Withdrawal)
-		if err != nil {
-			return nil, 0, os.ErrInvalid
-		}
-		filter["withdrawal"] = withdrawal
+	if req.Withdrawal >= 0 {
+		filter["withdrawal"] = req.Withdrawal
 	}
 
 	if req.Address != "" {
 		filter["address"] = req.Address
 	}
 
-	if req.Status != "" {
+	if req.Status >= 0 {
 		filter["status"] = req.Status
 	}