fix
This commit is contained in:
@@ -33,12 +33,11 @@ func NewGetProductListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Ge
|
||||
}
|
||||
|
||||
// 获取产品列表
|
||||
func (l *GetProductListLogic) GetProductList(req *types.GetProductListReq, loginInfo auth.UserInfo) (resp *types.Response) {
|
||||
func (l *GetProductListLogic) GetProductList(req *types.GetProductListReq) (resp *types.Response) {
|
||||
resp = &types.Response{}
|
||||
//校验前台登录情况
|
||||
loginInfo := auth.GetUserInfoFormCtx(l.ctx)
|
||||
if loginInfo.UserId == 0 {
|
||||
resp.Set(constants.CODE_UNAUTH, "please sign in")
|
||||
return
|
||||
resp.Set(constants.CODE_SERVICE_ERR, "get login user info err")
|
||||
}
|
||||
//如果是demo
|
||||
if req.IsDemo == 1 {
|
||||
|
||||
@@ -28,12 +28,11 @@ func NewGetSuccessRecommandLogic(ctx context.Context, svcCtx *svc.ServiceContext
|
||||
}
|
||||
|
||||
// 获取推荐的产品列表
|
||||
func (l *GetSuccessRecommandLogic) GetSuccessRecommand(req *types.GetSuccessRecommandReq, loginInfo auth.UserInfo) (resp *types.Response) {
|
||||
func (l *GetSuccessRecommandLogic) GetSuccessRecommand(req *types.GetSuccessRecommandReq) (resp *types.Response) {
|
||||
resp = &types.Response{}
|
||||
//校验前台登录情况
|
||||
loginInfo := auth.GetUserInfoFormCtx(l.ctx)
|
||||
if loginInfo.UserId == 0 {
|
||||
resp.Set(constants.CODE_UNAUTH, "please sign in")
|
||||
return
|
||||
resp.Set(constants.CODE_SERVICE_ERR, "get login user info err")
|
||||
}
|
||||
//获取用户信息
|
||||
userModel := model.NewFsUserModel(l.svcCtx.MysqlConn)
|
||||
|
||||
Reference in New Issue
Block a user