fix recover

This commit is contained in:
lwl0608 2024-03-21 20:27:42 +08:00
parent f5cc4e4891
commit 53086cde6c
4 changed files with 0 additions and 22 deletions

View File

@ -529,7 +529,6 @@ func Prepare() gin.HandlerFunc {
func PrepareToC() gin.HandlerFunc { func PrepareToC() gin.HandlerFunc {
return func(ctx *gin.Context) { return func(ctx *gin.Context) {
defer logger.Recover()
// if !wsign.CheckSignature(ctx) { // if !wsign.CheckSignature(ctx) {
// ReplyErrCodeMsg(ctx, errcode.ErrCodeCheckSignatureFail) // ReplyErrCodeMsg(ctx, errcode.ErrCodeCheckSignatureFail)
// return // return

View File

@ -44,7 +44,6 @@ func GetMembershipProductList(ctx *gin.Context) {
// 充值 创建订单 // 充值 创建订单
func CreateOrder(ctx *gin.Context) { func CreateOrder(ctx *gin.Context) {
defer logger.Recover()
req := ctx.MustGet("client_req").(*vasproto.CreateOrderReq) req := ctx.MustGet("client_req").(*vasproto.CreateOrderReq)
if !req.IsValid() || len(req.PayType) <= 0 || len(req.ProductId) <= 0 { if !req.IsValid() || len(req.PayType) <= 0 || len(req.ProductId) <= 0 {
logger.Error("CreateOrder, invalid param, req: %v", util.ToJson(req)) logger.Error("CreateOrder, invalid param, req: %v", util.ToJson(req))
@ -80,7 +79,6 @@ func OpCreateOrder(ctx *gin.Context) {
// 一键解锁 // 一键解锁
func OneStepUnlock(ctx *gin.Context) { func OneStepUnlock(ctx *gin.Context) {
defer logger.Recover()
req := ctx.MustGet("client_req").(*vasproto.OneStepUnlockContactReq) req := ctx.MustGet("client_req").(*vasproto.OneStepUnlockContactReq)
if !req.IsValid() || req.Uid <= 0 || len(req.ContactProductId) <= 0 { if !req.IsValid() || req.Uid <= 0 || len(req.ContactProductId) <= 0 {
logger.Error("OneStepUnlock, invalid param, req: %v", util.ToJson(req)) logger.Error("OneStepUnlock, invalid param, req: %v", util.ToJson(req))
@ -98,7 +96,6 @@ func OneStepUnlock(ctx *gin.Context) {
// 填写地址 // 填写地址
func ConsumerFillContact(ctx *gin.Context) { func ConsumerFillContact(ctx *gin.Context) {
defer logger.Recover()
req := ctx.MustGet("client_req").(*vasproto.ConsumerFillContactReq) req := ctx.MustGet("client_req").(*vasproto.ConsumerFillContactReq)
if req.Mid <= 0 || len(req.OrderId) <= 0 { if req.Mid <= 0 || len(req.OrderId) <= 0 {
logger.Error("ConsumerFillContact, invalid param, req: %v", util.ToJson(req)) logger.Error("ConsumerFillContact, invalid param, req: %v", util.ToJson(req))
@ -116,7 +113,6 @@ func ConsumerFillContact(ctx *gin.Context) {
// 待添加微信列表 // 待添加微信列表
func GetAddWechatList(ctx *gin.Context) { func GetAddWechatList(ctx *gin.Context) {
defer logger.Recover()
req := ctx.MustGet("client_req").(*vasproto.GetAddWechatListReq) req := ctx.MustGet("client_req").(*vasproto.GetAddWechatListReq)
if !req.IsValid() { if !req.IsValid() {
logger.Error("GetAddWechatList, invalid param, req: %v", util.ToJson(req)) logger.Error("GetAddWechatList, invalid param, req: %v", util.ToJson(req))
@ -134,7 +130,6 @@ func GetAddWechatList(ctx *gin.Context) {
// 完成添加微信 // 完成添加微信
func ConfirmAddWechat(ctx *gin.Context) { func ConfirmAddWechat(ctx *gin.Context) {
defer logger.Recover()
req := ctx.MustGet("client_req").(*vasproto.ConfirmAddWechatReq) req := ctx.MustGet("client_req").(*vasproto.ConfirmAddWechatReq)
if !req.IsValid() { if !req.IsValid() {
logger.Error("ConfirmAddWechat, invalid param, req: %v", util.ToJson(req)) logger.Error("ConfirmAddWechat, invalid param, req: %v", util.ToJson(req))
@ -152,7 +147,6 @@ func ConfirmAddWechat(ctx *gin.Context) {
// 已解锁微信列表 // 已解锁微信列表
func GetUnlockWechatList(ctx *gin.Context) { func GetUnlockWechatList(ctx *gin.Context) {
defer logger.Recover()
req := ctx.MustGet("client_req").(*vasproto.GetUnlockWechatListReq) req := ctx.MustGet("client_req").(*vasproto.GetUnlockWechatListReq)
if req.Mid <= 0 { if req.Mid <= 0 {
logger.Error("GetUnlockWechatList, invalid param, req: %v", util.ToJson(req)) logger.Error("GetUnlockWechatList, invalid param, req: %v", util.ToJson(req))
@ -170,7 +164,6 @@ func GetUnlockWechatList(ctx *gin.Context) {
// 明细 // 明细
func GetCHList(ctx *gin.Context) { func GetCHList(ctx *gin.Context) {
defer logger.Recover()
req := ctx.MustGet("client_req").(*vasproto.GetCHListReq) req := ctx.MustGet("client_req").(*vasproto.GetCHListReq)
if !req.IsValid() { if !req.IsValid() {
logger.Error("GetCHList, invalid param, req: %v", util.ToJson(req)) logger.Error("GetCHList, invalid param, req: %v", util.ToJson(req))

View File

@ -10,7 +10,6 @@ import (
) )
func OpCoinOrderList(ctx *gin.Context) { func OpCoinOrderList(ctx *gin.Context) {
//defer logger.Recover()
req := ctx.MustGet("client_req").(*vasproto.OpCoinOrderListReq) req := ctx.MustGet("client_req").(*vasproto.OpCoinOrderListReq)
if req.Limit <= 0 { if req.Limit <= 0 {
req.Limit = 1000 req.Limit = 1000
@ -28,7 +27,6 @@ func OpCoinOrderList(ctx *gin.Context) {
} }
func OpOrderList(ctx *gin.Context) { func OpOrderList(ctx *gin.Context) {
//defer logger.Recover()
req := ctx.MustGet("client_req").(*vasproto.OpOrderListReq) req := ctx.MustGet("client_req").(*vasproto.OpOrderListReq)
if req.Limit <= 0 { if req.Limit <= 0 {
req.Limit = 1000 req.Limit = 1000

View File

@ -1,12 +0,0 @@
package middleware
import (
"github.com/gin-gonic/gin"
"service/library/logger"
)
func RecoverMiddleware() gin.HandlerFunc {
return func(c *gin.Context) {
defer logger.Recover()
}
}