feat: 修改订单创建逻辑,直接使用Post对象而非PostID
Some checks failed
build quyun / Build (push) Failing after 1m23s

This commit is contained in:
2025-12-20 00:07:56 +08:00
parent 109cd3b52d
commit 06cc059998
2 changed files with 3 additions and 8 deletions

View File

@@ -320,7 +320,7 @@ func (ctl *posts) Buy(ctx fiber.Ctx, post *models.Post, user *models.User) (*wec
}
// payPrice := post.PayPrice()
order, err := services.Orders.CreateFromUserPostID(ctx, user.ID, post.ID)
order, err := services.Orders.CreateFromUserPostID(ctx, user.ID, post)
if err != nil {
return nil, errors.Wrap(err, "订单创建失败")
}