Browse Source

update

tmp
shenjiachi 3 weeks ago
parent
commit
de53ac5541
1 changed files with 12 additions and 2 deletions
  1. +12
    -2
      app/hdl/hdl_points_center.go

+ 12
- 2
app/hdl/hdl_points_center.go View File

@@ -581,7 +581,12 @@ func GetContributionValue(c *gin.Context) {
} }
var contributionValue string var contributionValue string
if virtualAmount != nil { 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) coinDb := implement.NewVirtualCoinDb(db.Db)
@@ -650,7 +655,12 @@ func GetContributionValueFlow(c *gin.Context) {
list := make([]md.ContributionValueFlowNode, len(flows)) list := make([]md.ContributionValueFlowNode, len(flows))
for i, flow := range flows { for i, flow := range flows {
list[i].Title = flow.Title 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].Direction = utils.IntToStr(flow.Direction)
list[i].CreateAt = flow.CreateAt list[i].CreateAt = flow.CreateAt
} }


Loading…
Cancel
Save