fix
This commit is contained in:
parent
c71fa6fc12
commit
acc6f9c2b4
|
@ -25,6 +25,7 @@ func GetCanteenDetailHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
|||
Message: "unauthorized",
|
||||
})
|
||||
logx.Info("unauthorized:", err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// 从Token里获取对应的信息
|
||||
|
@ -36,6 +37,7 @@ func GetCanteenDetailHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
|||
Message: "unauthorized",
|
||||
})
|
||||
logx.Info("unauthorized:", err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
var req types.GetCanteenDetailReq
|
||||
|
@ -60,5 +62,6 @@ func GetCanteenDetailHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
|||
httpx.ErrorCtx(r.Context(), w, err)
|
||||
logx.Error(err)
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,6 +23,5 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
|||
Handler: SaveCanteenTypeProductHandler(serverCtx),
|
||||
},
|
||||
},
|
||||
rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
|
||||
)
|
||||
}
|
||||
|
|
|
@ -25,6 +25,7 @@ func SaveCanteenTypeProductHandler(svcCtx *svc.ServiceContext) http.HandlerFunc
|
|||
Message: "unauthorized",
|
||||
})
|
||||
logx.Info("unauthorized:", err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// 从Token里获取对应的信息
|
||||
|
@ -36,6 +37,7 @@ func SaveCanteenTypeProductHandler(svcCtx *svc.ServiceContext) http.HandlerFunc
|
|||
Message: "unauthorized",
|
||||
})
|
||||
logx.Info("unauthorized:", err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
var req types.SaveCanteenTypeProductReq
|
||||
|
@ -60,5 +62,6 @@ func SaveCanteenTypeProductHandler(svcCtx *svc.ServiceContext) http.HandlerFunc
|
|||
httpx.ErrorCtx(r.Context(), w, err)
|
||||
logx.Error(err)
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,6 @@ package handler
|
|||
|
||||
import (
|
||||
"errors"
|
||||
"fusenapi/server/data-transfer/internal/types"
|
||||
"net/http"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
|
@ -25,6 +24,7 @@ func GetQrCodeSetListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
|||
Message: "unauthorized",
|
||||
})
|
||||
logx.Info("unauthorized:", err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// 从Token里获取对应的信息
|
||||
|
@ -36,10 +36,11 @@ func GetQrCodeSetListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
|||
Message: "unauthorized",
|
||||
})
|
||||
logx.Info("unauthorized:", err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
l := logic.NewGetQrCodeSetListLogic(r.Context(), svcCtx)
|
||||
resp := l.GetQrCodeSetList(userinfo)
|
||||
resp := l.GetQrCodeSetList()
|
||||
// 如果响应不为nil,则使用httpx.OkJsonCtx方法返回JSON响应;
|
||||
// 否则,发送500内部服务器错误的JSON响应并记录错误消息logx.Error。
|
||||
if resp != nil {
|
||||
|
@ -49,5 +50,6 @@ func GetQrCodeSetListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
|||
httpx.ErrorCtx(r.Context(), w, err)
|
||||
logx.Error(err)
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,6 +25,7 @@ func GetStandardLogoListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
|||
Message: "unauthorized",
|
||||
})
|
||||
logx.Info("unauthorized:", err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// 从Token里获取对应的信息
|
||||
|
@ -36,6 +37,7 @@ func GetStandardLogoListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
|||
Message: "unauthorized",
|
||||
})
|
||||
logx.Info("unauthorized:", err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
l := logic.NewGetStandardLogoListLogic(r.Context(), svcCtx)
|
||||
|
@ -49,5 +51,6 @@ func GetStandardLogoListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
|||
httpx.ErrorCtx(r.Context(), w, err)
|
||||
logx.Error(err)
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,6 +33,5 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
|||
Handler: UploadLogoHandler(serverCtx),
|
||||
},
|
||||
},
|
||||
rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
|
||||
)
|
||||
}
|
||||
|
|
|
@ -25,6 +25,7 @@ func UploadLogoHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
|||
Message: "unauthorized",
|
||||
})
|
||||
logx.Info("unauthorized:", err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// 从Token里获取对应的信息
|
||||
|
@ -36,6 +37,7 @@ func UploadLogoHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
|||
Message: "unauthorized",
|
||||
})
|
||||
logx.Info("unauthorized:", err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
var req types.UploadLogoReq
|
||||
|
@ -60,5 +62,6 @@ func UploadLogoHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
|||
httpx.ErrorCtx(r.Context(), w, err)
|
||||
logx.Error(err)
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,6 +25,7 @@ func UploadQrcodeHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
|||
Message: "unauthorized",
|
||||
})
|
||||
logx.Info("unauthorized:", err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// 从Token里获取对应的信息
|
||||
|
@ -36,6 +37,7 @@ func UploadQrcodeHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
|||
Message: "unauthorized",
|
||||
})
|
||||
logx.Info("unauthorized:", err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
var req types.UploadQrcodeReq
|
||||
|
@ -60,5 +62,6 @@ func UploadQrcodeHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
|||
httpx.ErrorCtx(r.Context(), w, err)
|
||||
logx.Error(err)
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,6 +25,7 @@ func GetProductListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
|||
Message: "unauthorized",
|
||||
})
|
||||
logx.Info("unauthorized:", err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// 从Token里获取对应的信息
|
||||
|
@ -36,6 +37,7 @@ func GetProductListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
|||
Message: "unauthorized",
|
||||
})
|
||||
logx.Info("unauthorized:", err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
var req types.GetProductListReq
|
||||
|
@ -60,5 +62,6 @@ func GetProductListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
|||
httpx.ErrorCtx(r.Context(), w, err)
|
||||
logx.Error(err)
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,6 +25,7 @@ func GetSizeByProductHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
|||
Message: "unauthorized",
|
||||
})
|
||||
logx.Info("unauthorized:", err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// 从Token里获取对应的信息
|
||||
|
@ -36,6 +37,7 @@ func GetSizeByProductHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
|||
Message: "unauthorized",
|
||||
})
|
||||
logx.Info("unauthorized:", err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
l := logic.NewGetSizeByProductLogic(r.Context(), svcCtx)
|
||||
|
@ -49,5 +51,6 @@ func GetSizeByProductHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
|||
httpx.ErrorCtx(r.Context(), w, err)
|
||||
logx.Error(err)
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,6 +25,7 @@ func GetSuccessRecommandHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
|||
Message: "unauthorized",
|
||||
})
|
||||
logx.Info("unauthorized:", err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// 从Token里获取对应的信息
|
||||
|
@ -36,6 +37,7 @@ func GetSuccessRecommandHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
|||
Message: "unauthorized",
|
||||
})
|
||||
logx.Info("unauthorized:", err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
var req types.GetSuccessRecommandReq
|
||||
|
@ -60,5 +62,6 @@ func GetSuccessRecommandHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
|||
httpx.ErrorCtx(r.Context(), w, err)
|
||||
logx.Error(err)
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,6 +28,5 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
|||
Handler: GetSizeByProductHandler(serverCtx),
|
||||
},
|
||||
},
|
||||
rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
|
||||
)
|
||||
}
|
||||
|
|
|
@ -7,10 +7,6 @@ info (
|
|||
email: ""
|
||||
)
|
||||
import "basic.api"
|
||||
//验证登录
|
||||
@server(
|
||||
jwt: Auth
|
||||
)
|
||||
service canteen {
|
||||
//获取餐厅详情
|
||||
@handler GetCanteenDetailHandler
|
||||
|
|
|
@ -9,9 +9,6 @@ info (
|
|||
|
||||
import "basic.api"
|
||||
|
||||
@server(
|
||||
jwt: Auth
|
||||
)
|
||||
service data-transfer {
|
||||
//获取标准logo列表
|
||||
@handler GetStandardLogoListHandler
|
||||
|
|
|
@ -7,10 +7,6 @@ info (
|
|||
email: ""
|
||||
)
|
||||
import "basic.api"
|
||||
//验证登录
|
||||
@server(
|
||||
jwt: Auth
|
||||
)
|
||||
service product {
|
||||
//获取产品列表
|
||||
@handler GetProductListHandler
|
||||
|
|
Loading…
Reference in New Issue
Block a user