feat: align ids to int64

This commit is contained in:
2026-01-08 09:57:04 +08:00
parent a1de16bc01
commit d98f41f1ac
39 changed files with 298 additions and 339 deletions

View File

@@ -33,13 +33,13 @@ func (t *Transaction) Create(
// Pay for order
//
// @Router /v1/orders/:id/pay [post]
// @Router /v1/orders/:id<int>/pay [post]
// @Summary Pay for order
// @Description Pay for order
// @Tags Transaction
// @Accept json
// @Produce json
// @Param id path string true "Order ID"
// @Param id path int64 true "Order ID"
// @Param form body dto.OrderPayForm true "Pay form"
// @Success 200 {object} dto.OrderPayResponse
// @Bind user local key(__ctx_user)
@@ -48,7 +48,7 @@ func (t *Transaction) Create(
func (t *Transaction) Pay(
ctx fiber.Ctx,
user *models.User,
id string,
id int64,
form *dto.OrderPayForm,
) (*dto.OrderPayResponse, error) {
return services.Order.Pay(ctx, user.ID, id, form)
@@ -56,21 +56,21 @@ func (t *Transaction) Pay(
// Check order payment status
//
// @Router /v1/orders/:id/status [get]
// @Router /v1/orders/:id<int>/status [get]
// @Summary Check order status
// @Description Check order payment status
// @Tags Transaction
// @Accept json
// @Produce json
// @Param id path string true "Order ID"
// @Param id path int64 true "Order ID"
// @Success 200 {object} dto.OrderStatusResponse
// @Bind id path
func (t *Transaction) Status(ctx fiber.Ctx, id string) (*dto.OrderStatusResponse, error) {
func (t *Transaction) Status(ctx fiber.Ctx, id int64) (*dto.OrderStatusResponse, error) {
return services.Order.Status(ctx, id)
}
type WebhookForm struct {
OrderID string `json:"order_id"`
OrderID int64 `json:"order_id"`
ExternalID string `json:"external_id"`
}