|
@@ -255,6 +255,11 @@ func (s *Synthesis) FindMDBUserLogDaily(req entity.UserLogDailyReq) (*entity.Use
|
|
|
func (s *Synthesis) FindWithdrawal(req entity.UserWithdrawalReq) (*entity.UserWithdrawalResp, *code.Result) {
|
|
|
page, pageSize := checkPageParam(req.Page, req.Size)
|
|
|
|
|
|
+ if !constant.CurrencyValid(req.Currency) {
|
|
|
+ mhayaLogger.Warnf("FindWithdrawal unknow currency:%v", req.Currency)
|
|
|
+ return nil, common.NewResult(code.ParamError)
|
|
|
+ }
|
|
|
+
|
|
|
var records []*eventmodels.UserWithdrawEventContent
|
|
|
|
|
|
where := &eventmodels.UserWithdrawEventContent{
|
|
@@ -266,7 +271,7 @@ func (s *Synthesis) FindWithdrawal(req entity.UserWithdrawalReq) (*entity.UserWi
|
|
|
ServerId: s.nodeId,
|
|
|
},
|
|
|
WithdrawId: req.ID,
|
|
|
- Currency: constant.UsdtCurrency,
|
|
|
+ Currency: constant.CurrencyTypeStr(req.Currency),
|
|
|
Address: req.Address,
|
|
|
State: req.State,
|
|
|
WithdrawalState: req.Withdrawal,
|
|
@@ -293,20 +298,19 @@ func (s *Synthesis) FindWithdrawal(req entity.UserWithdrawalReq) (*entity.UserWi
|
|
|
var results []*entity.UserWithdrawalDetail
|
|
|
for _, v := range records {
|
|
|
results = append(results, &entity.UserWithdrawalDetail{
|
|
|
- // TODO
|
|
|
- // Id: v.WithdrawId,
|
|
|
- // UserName: v.UserId,
|
|
|
- // NickName: v.UserName,
|
|
|
- // OpenId: v.TgId,
|
|
|
- // Status: v.State,
|
|
|
- // Reason: "",
|
|
|
- // Withdrawal: 0,
|
|
|
- // Amount: 0,
|
|
|
- // AfterAmount: 0,
|
|
|
- // Type: nil,
|
|
|
- // Address: "",
|
|
|
- // CreateAt: nil,
|
|
|
- // UpdateAt: nil,
|
|
|
+ Id: v.WithdrawId,
|
|
|
+ UserName: v.UserId,
|
|
|
+ NickName: v.UserName,
|
|
|
+ OpenId: v.TgId,
|
|
|
+ Status: v.State,
|
|
|
+ Reason: v.Reason,
|
|
|
+ Withdrawal: v.WithdrawalState,
|
|
|
+ Amount: int(v.Amount),
|
|
|
+ AfterAmount: int(v.AfterBalance),
|
|
|
+ Type: v.Currency,
|
|
|
+ Address: v.Address,
|
|
|
+ CreateAt: v.CreateAt,
|
|
|
+ UpdateAt: v.CreateAt,
|
|
|
})
|
|
|
}
|
|
|
|