修改首页总金额计算
This commit is contained in:
parent
ac74c0d59f
commit
9c7c53f93c
@ -13,6 +13,7 @@ import (
|
|||||||
"hepa-calc-admin-api/extend/aliyun"
|
"hepa-calc-admin-api/extend/aliyun"
|
||||||
"hepa-calc-admin-api/global"
|
"hepa-calc-admin-api/global"
|
||||||
"hepa-calc-admin-api/utils"
|
"hepa-calc-admin-api/utils"
|
||||||
|
"math"
|
||||||
"sort"
|
"sort"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
@ -180,6 +181,7 @@ func (b *Public) GetIndex(c *gin.Context) {
|
|||||||
memberAmountTotal = 0
|
memberAmountTotal = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
memberAmountTotal = 24
|
||||||
// 获取会员购买总金额
|
// 获取会员购买总金额
|
||||||
maps = make(map[string]interface{})
|
maps = make(map[string]interface{})
|
||||||
maps["order_status"] = 2
|
maps["order_status"] = 2
|
||||||
@ -191,6 +193,7 @@ func (b *Public) GetIndex(c *gin.Context) {
|
|||||||
singleAmountTotal = 0
|
singleAmountTotal = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
singleAmountTotal = 13.02
|
||||||
g := dto.IndexDto{
|
g := dto.IndexDto{
|
||||||
QuestionCount: questionCount,
|
QuestionCount: questionCount,
|
||||||
UserCount: userCount,
|
UserCount: userCount,
|
||||||
@ -200,7 +203,7 @@ func (b *Public) GetIndex(c *gin.Context) {
|
|||||||
MemberBuyCount: memberBuyCount,
|
MemberBuyCount: memberBuyCount,
|
||||||
MemberAmountTotal: memberAmountTotal,
|
MemberAmountTotal: memberAmountTotal,
|
||||||
SingleAmountTotal: singleAmountTotal,
|
SingleAmountTotal: singleAmountTotal,
|
||||||
AmountTotal: memberAmountTotal + singleAmountTotal,
|
AmountTotal: math.Round((memberAmountTotal+singleAmountTotal)*100) / 100,
|
||||||
}
|
}
|
||||||
|
|
||||||
responses.OkWithData(g, c)
|
responses.OkWithData(g, c)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user