From f72a0b9f7dd5491af503863ef43d8ee00c00c077 Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Fri, 15 Sep 2023 14:20:08 +0800 Subject: [PATCH] fix --- server/shopping-cart/internal/logic/addtocartlogic.go | 1 - server/shopping-cart/internal/logic/deletecartlogic.go | 1 - server/shopping-cart/internal/logic/getcartslogic.go | 1 - .../internal/logic/modifycartpurchasequantitylogic.go | 1 - 4 files changed, 4 deletions(-) diff --git a/server/shopping-cart/internal/logic/addtocartlogic.go b/server/shopping-cart/internal/logic/addtocartlogic.go index a82d7d7a..e792eefe 100644 --- a/server/shopping-cart/internal/logic/addtocartlogic.go +++ b/server/shopping-cart/internal/logic/addtocartlogic.go @@ -36,7 +36,6 @@ func NewAddToCartLogic(ctx context.Context, svcCtx *svc.ServiceContext) *AddToCa // } func (l *AddToCartLogic) AddToCart(req *types.AddToCartReq, userinfo *auth.UserInfo) (resp *basic.Response) { - userinfo.UserId = 39 if !userinfo.IsUser() { return resp.SetStatusWithMessage(basic.CodeUnAuth, "please sign in") } diff --git a/server/shopping-cart/internal/logic/deletecartlogic.go b/server/shopping-cart/internal/logic/deletecartlogic.go index d868d52e..4c1bc37b 100644 --- a/server/shopping-cart/internal/logic/deletecartlogic.go +++ b/server/shopping-cart/internal/logic/deletecartlogic.go @@ -31,7 +31,6 @@ func NewDeleteCartLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Delete // } func (l *DeleteCartLogic) DeleteCart(req *types.DeleteCartReq, userinfo *auth.UserInfo) (resp *basic.Response) { - userinfo.UserId = 39 if !userinfo.IsUser() { return resp.SetStatusWithMessage(basic.CodeUnAuth, "please sign in") } diff --git a/server/shopping-cart/internal/logic/getcartslogic.go b/server/shopping-cart/internal/logic/getcartslogic.go index 204836a9..436831f9 100644 --- a/server/shopping-cart/internal/logic/getcartslogic.go +++ b/server/shopping-cart/internal/logic/getcartslogic.go @@ -38,7 +38,6 @@ func NewGetCartsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetCarts // } func (l *GetCartsLogic) GetCarts(req *types.GetCartsReq, userinfo *auth.UserInfo) (resp *basic.Response) { - userinfo.UserId = 39 if req.CurrentPage <= 0 { req.CurrentPage = constants.DEFAULT_PAGE } diff --git a/server/shopping-cart/internal/logic/modifycartpurchasequantitylogic.go b/server/shopping-cart/internal/logic/modifycartpurchasequantitylogic.go index 916f85da..b78dd2e8 100644 --- a/server/shopping-cart/internal/logic/modifycartpurchasequantitylogic.go +++ b/server/shopping-cart/internal/logic/modifycartpurchasequantitylogic.go @@ -34,7 +34,6 @@ func NewModifyCartPurchaseQuantityLogic(ctx context.Context, svcCtx *svc.Service // } func (l *ModifyCartPurchaseQuantityLogic) ModifyCartPurchaseQuantity(req *types.ModifyCartPurchaseQuantityReq, userinfo *auth.UserInfo) (resp *basic.Response) { - userinfo.UserId = 39 if !userinfo.IsUser() { return resp.SetStatusWithMessage(basic.CodeUnAuth, "please sign in") }