diff --git a/server/marketserver/api/v1/vip/vip.go b/server/marketserver/api/v1/vip/vip.go index 4847a427..00aac391 100644 --- a/server/marketserver/api/v1/vip/vip.go +++ b/server/marketserver/api/v1/vip/vip.go @@ -186,19 +186,31 @@ func (this *VIPApi) Details(c *gin.Context) { cfg := mt.Table.StakingVip.GetById(q5.SafeToInt64(rspObj.Info.Level)) if cfg != nil { rspObj.Info.Target = cfg.GetThisPoint() - escec_balance, ok := new(big.Int).SetString(ds.GetByName("escec_balance"), 10) + balancestr := ds.GetByName("escec_balance") + if balancestr == "" { + balancestr = "0" + } + escec_balance, ok := new(big.Int).SetString(balancestr, 10) if !ok { f5.GetSysLog().Warning("escec_balance err:%s", ds.GetByName("escec_balance")) } - escec_stacking, ok := new(big.Int).SetString(ds.GetByName("escec_stacking"), 10) + stackingstr := ds.GetByName("escec_stacking") + if stackingstr == "" { + stackingstr = "0" + } + escec_stacking, ok := new(big.Int).SetString(stackingstr, 10) if !ok { f5.GetSysLog().Warning("escec_stacking err:%s", ds.GetByName("escec_stacking")) } curExec := new(big.Int).Add(escec_balance, escec_stacking) - escec_convert, ok := new(big.Int).SetString(ds.GetByName("escec_convert"), 10) + convertstr := ds.GetByName("escec_convert") + if convertstr == "" { + convertstr = "0" + } + escec_convert, ok := new(big.Int).SetString(convertstr, 10) if !ok { f5.GetSysLog().Warning("escec_convert err:%s", ds.GetByName("escec_convert")) }