fix
This commit is contained in:
@@ -11,22 +11,22 @@ import (
|
||||
"fusenapi/server/product/internal/types"
|
||||
)
|
||||
|
||||
func GetRecommandProductListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
func GetRecommendProductListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
var req types.GetRecommandProductListReq
|
||||
var req types.GetRecommendProductListReq
|
||||
userinfo, err := basic.RequestParse(w, r, svcCtx, &req)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
// 创建一个业务逻辑层实例
|
||||
l := logic.NewGetRecommandProductListLogic(r.Context(), svcCtx)
|
||||
l := logic.NewGetRecommendProductListLogic(r.Context(), svcCtx)
|
||||
|
||||
rl := reflect.ValueOf(l)
|
||||
basic.BeforeLogic(w, r, rl)
|
||||
|
||||
resp := l.GetRecommandProductList(&req, userinfo)
|
||||
resp := l.GetRecommendProductList(&req, userinfo)
|
||||
|
||||
if !basic.AfterLogic(w, r, rl, resp) {
|
||||
basic.NormalAfterLogic(w, r, resp)
|
||||
@@ -60,7 +60,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
||||
{
|
||||
Method: http.MethodGet,
|
||||
Path: "/api/product/recommand",
|
||||
Handler: GetRecommandProductListHandler(serverCtx),
|
||||
Handler: GetRecommendProductListHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
Method: http.MethodGet,
|
||||
|
||||
Reference in New Issue
Block a user