diff --git a/api/controller/Question.go b/api/controller/Question.go index 781689e..887ef00 100644 --- a/api/controller/Question.go +++ b/api/controller/Question.go @@ -570,7 +570,7 @@ func (b *Question) GetQuestionPrice(c *gin.Context) { for _, question := range questions { // 总价 - price = price + math.Round(question.Price*100)/100 + price = price + math.Round(question.Price*100) // 处理折扣价格 if question.DiscountPrice != nil { @@ -594,7 +594,7 @@ func (b *Question) GetQuestionPrice(c *gin.Context) { } var g dto.QuestionPriceDto - g.Price = price + g.Price = price / 100 if discountPrice != nil { u := *discountPrice / 100 g.DiscountPrice = &u