|
|
@@ -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 |
|
|
|
} |
|
|
|