浏览代码

update

tmp
shenjiachi 3 周前
父节点
当前提交
de53ac5541
共有 1 个文件被更改,包括 12 次插入2 次删除
  1. +12
    -2
      app/hdl/hdl_points_center.go

+ 12
- 2
app/hdl/hdl_points_center.go 查看文件

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


正在加载...
取消
保存