diff --git a/internal/api/mobile/goods/detail.go b/internal/api/mobile/goods/detail.go index 95ef4d0..63b71b0 100644 --- a/internal/api/mobile/goods/detail.go +++ b/internal/api/mobile/goods/detail.go @@ -393,7 +393,7 @@ func QueryGoodsDetailNew(c *gin.Context) { ShoppingTrolleyCount int64 `gorm:"column:shopping_trolley_count" json:"shoppingTrolleyCount"` } var cntStruct cnt - dbc.DB.Table((&shopping_trolley.Information{}).TableName()).Select("SUM(quantity) AS shopping_trolley_count").Where("user_id = ?", p.UserID).First(&cntStruct) + dbc.DB.Table((&shopping_trolley.Information{}).TableName()).Select("count(quantity) AS shopping_trolley_count").Where("user_id = ?", p.UserID).First(&cntStruct) summary.ShoppingTrolleyCount = cntStruct.ShoppingTrolleyCount } diff --git a/internal/api/mobile/order_preview/normal_create.go b/internal/api/mobile/order_preview/normal_create.go index 1dd0673..3516923 100755 --- a/internal/api/mobile/order_preview/normal_create.go +++ b/internal/api/mobile/order_preview/normal_create.go @@ -245,7 +245,7 @@ func CreatePreviewNormalOrder(c *gin.Context) { } }() } - back.Err(c, err.Error()) + back.Err(c, "价格变动,请刷新后重试") return } expressFee = resp2.Fee