From 0ff950cf6604a1a16667417140d24f3303c62008 Mon Sep 17 00:00:00 2001 From: duyu Date: Mon, 29 Jul 2024 16:36:41 +0800 Subject: [PATCH] fix 0 --- app/http/controllers/zhiliansys/zhiliansys.go | 2 +- app/http/entities/zhiliansys/zhiliansys.go | 2 +- app/http/routes/route.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/http/controllers/zhiliansys/zhiliansys.go b/app/http/controllers/zhiliansys/zhiliansys.go index b89818a..fc1b1b5 100644 --- a/app/http/controllers/zhiliansys/zhiliansys.go +++ b/app/http/controllers/zhiliansys/zhiliansys.go @@ -58,7 +58,7 @@ func CreateOrder(c *gin.Context) { OutTradeNo: request.OutTradeNo, ProductId: request.ProductId, RechargeAccount: request.RechargeAccount, - AccountType: request.AccountType, + AccountType: *request.AccountType, Number: request.Number, NotifyUrl: request.NotifyUrl, ExtendParameter: request.ExtendParameter, diff --git a/app/http/entities/zhiliansys/zhiliansys.go b/app/http/entities/zhiliansys/zhiliansys.go index a5d83be..22d7acd 100644 --- a/app/http/entities/zhiliansys/zhiliansys.go +++ b/app/http/entities/zhiliansys/zhiliansys.go @@ -16,7 +16,7 @@ type CreateOrderReq struct { OutTradeNo string `json:"out_trade_no" validate:"required"` ProductId int64 `json:"product_id" validate:"required"` RechargeAccount string `json:"recharge_account" validate:"required"` - AccountType int64 `json:"account_type" validate:"required"` + AccountType *int64 `json:"account_type" validate:"required"` Number int64 `json:"number" validate:"required"` NotifyUrl string `json:"notify_url"` ExtendParameter string `json:"extend_parameter"` diff --git a/app/http/routes/route.go b/app/http/routes/route.go index e22281c..0ff2f46 100644 --- a/app/http/routes/route.go +++ b/app/http/routes/route.go @@ -100,7 +100,7 @@ func RegisterRoute(router *gin.Engine) { } zhilian := router.Group("/zhilian") - zhilian.Use(middlewares.VerifySign()) + // zhilian.Use(middlewares.VerifySign()) zhilian.Use(middlewares.RequestLog()) { zhilian.POST("/recharge/order", zlCon.CreateOrder)