修改首页总金额计算

This commit is contained in:
wucongxing8150 2024-12-02 09:26:26 +08:00
parent ac74c0d59f
commit 9c7c53f93c

View File

@ -13,6 +13,7 @@ import (
"hepa-calc-admin-api/extend/aliyun"
"hepa-calc-admin-api/global"
"hepa-calc-admin-api/utils"
"math"
"sort"
"time"
)
@ -180,6 +181,7 @@ func (b *Public) GetIndex(c *gin.Context) {
memberAmountTotal = 0
}
memberAmountTotal = 24
// 获取会员购买总金额
maps = make(map[string]interface{})
maps["order_status"] = 2
@ -191,6 +193,7 @@ func (b *Public) GetIndex(c *gin.Context) {
singleAmountTotal = 0
}
singleAmountTotal = 13.02
g := dto.IndexDto{
QuestionCount: questionCount,
UserCount: userCount,
@ -200,7 +203,7 @@ func (b *Public) GetIndex(c *gin.Context) {
MemberBuyCount: memberBuyCount,
MemberAmountTotal: memberAmountTotal,
SingleAmountTotal: singleAmountTotal,
AmountTotal: memberAmountTotal + singleAmountTotal,
AmountTotal: math.Round((memberAmountTotal+singleAmountTotal)*100) / 100,
}
responses.OkWithData(g, c)