兼容零值

dev_aagame
zhora 1 week ago
parent 7ddc4afdf5
commit a60bc207b2
  1. 6
      modules/backend/handler/examine/examine.go

@ -115,7 +115,11 @@ func WithdrawList(c *gin.Context) {
payList[v.ChannelID] = call.GetWithdrawChannelName(v.ChannelID)
}
for index, v := range WithdrawOrderArr {
WithdrawOrderArr[index].WithDrawPer = (v.Inr + v.TotalWithdraw + v.TotalWithdrawing) * 100 / v.TotalRecharge
totalRecharge := v.TotalRecharge
if totalRecharge == 0 {
totalRecharge = 1
}
WithdrawOrderArr[index].WithDrawPer = (v.Inr + v.TotalWithdraw + v.TotalWithdrawing) * 100 / totalRecharge
}
a.Data = values.WithdrawListResp{List: WithdrawOrderArr, Count: count, PayList: payList}
}

Loading…
Cancel
Save