修改会员价格问题

This commit is contained in:
2024-09-02 16:22:28 +08:00
parent 6899cab5b0
commit 4162fb528c
4 changed files with 17 additions and 7 deletions
+6 -1
View File
@@ -97,7 +97,12 @@ func (b *OrderMember) AddOrderMember(c *gin.Context) {
userCouponId = &id
}
if req.OrderPrice < 0 {
if req.OrderPrice == nil {
responses.FailWithMessage("订单金额错误", c)
return
}
if *req.OrderPrice < 0 {
responses.FailWithMessage("价格错误", c)
return
}
+5
View File
@@ -97,6 +97,11 @@ func (b *OrderSingle) AddOrderSingle(c *gin.Context) {
userCouponId = &id
}
if req.OrderPrice == nil {
responses.FailWithMessage("订单金额错误", c)
return
}
if *req.OrderPrice < 0 {
responses.FailWithMessage("价格错误", c)
return