shenjiachi 3 veckor sedan
förälder
incheckning
de53ac5541
1 ändrade filer med 12 tillägg och 2 borttagningar
  1. +12
    -2
      app/hdl/hdl_points_center.go

+ 12
- 2
app/hdl/hdl_points_center.go Visa fil

@@ -581,7 +581,12 @@ func GetContributionValue(c *gin.Context) {
}
var contributionValue string
if virtualAmount != nil {
contributionValue = virtualAmount.Amount
contributionValueDecimal, err := decimal.NewFromString(virtualAmount.Amount)
if err != nil {
e.OutErr(c, e.ERR_UNMARSHAL, err.Error())
return
}
contributionValue = contributionValueDecimal.StringFixed(0)
}

coinDb := implement.NewVirtualCoinDb(db.Db)
@@ -650,7 +655,12 @@ func GetContributionValueFlow(c *gin.Context) {
list := make([]md.ContributionValueFlowNode, len(flows))
for i, flow := range flows {
list[i].Title = flow.Title
list[i].Amount = flow.Amount
amountDecimal, err1 := decimal.NewFromString(flow.Amount)
if err1 != nil {
e.OutErr(c, e.ERR_UNMARSHAL, err1.Error())
return
}
list[i].Amount = amountDecimal.StringFixed(0)
list[i].Direction = utils.IntToStr(flow.Direction)
list[i].CreateAt = flow.CreateAt
}


Laddar…
Avbryt
Spara