fix
This commit is contained in:
@@ -31,7 +31,7 @@ func NewGetLastProductDesignLogic(ctx context.Context, svcCtx *svc.ServiceContex
|
||||
|
||||
func (l *GetLastProductDesignLogic) GetLastProductDesign(req *types.Request, userinfo *auth.UserInfo) (resp *basic.Response) {
|
||||
if !userinfo.IsUser() {
|
||||
return resp.SetStatusAddMessage(basic.CodeUnAuth, "please login")
|
||||
return resp.SetStatusAddMessage(basic.CodeUnAuth, "please sign in")
|
||||
}
|
||||
//获取用户信息
|
||||
user, err := l.svcCtx.AllModels.FsUser.FindUserById(l.ctx, userinfo.UserId)
|
||||
|
||||
@@ -31,7 +31,7 @@ func NewGetProductDesignLogic(ctx context.Context, svcCtx *svc.ServiceContext) *
|
||||
|
||||
func (l *GetProductDesignLogic) GetProductDesign(req *types.GetProductDesignReq, userinfo *auth.UserInfo) (resp *basic.Response) {
|
||||
if userinfo.GetIdType() != auth.IDTYPE_User {
|
||||
return resp.SetStatusWithMessage(basic.CodeUnAuth, "please login first")
|
||||
return resp.SetStatusWithMessage(basic.CodeUnAuth, "please sign in first")
|
||||
}
|
||||
if req.Sn == "" {
|
||||
return resp.SetStatusWithMessage(basic.CodeRequestParamsErr, "param sn is required")
|
||||
|
||||
@@ -35,7 +35,7 @@ func NewGetSizeByProductLogic(ctx context.Context, svcCtx *svc.ServiceContext) *
|
||||
// 获取分类下的产品以及尺寸
|
||||
func (l *GetSizeByProductLogic) GetSizeByProduct(req *types.Request, userinfo *auth.UserInfo) (resp *basic.Response) {
|
||||
if userinfo.GetIdType() != auth.IDTYPE_User {
|
||||
return resp.SetStatusWithMessage(basic.CodeUnAuth, "please login first")
|
||||
return resp.SetStatusWithMessage(basic.CodeUnAuth, "please sign in first")
|
||||
}
|
||||
//获取所有网站目录
|
||||
tagsModel := gmodel.NewFsTagsModel(l.svcCtx.MysqlConn)
|
||||
|
||||
@@ -30,7 +30,7 @@ func NewGetSuccessRecommandLogic(ctx context.Context, svcCtx *svc.ServiceContext
|
||||
// 获取推荐的产品列表
|
||||
func (l *GetSuccessRecommandLogic) GetSuccessRecommand(req *types.GetSuccessRecommandReq, userInfo *auth.UserInfo) (resp *basic.Response) {
|
||||
if userInfo.GetIdType() != auth.IDTYPE_User {
|
||||
return resp.SetStatusWithMessage(basic.CodeUnAuth, "please login first")
|
||||
return resp.SetStatusWithMessage(basic.CodeUnAuth, "please sign in first")
|
||||
}
|
||||
//获取用户信息
|
||||
userModel := gmodel.NewFsUserModel(l.svcCtx.MysqlConn)
|
||||
|
||||
@@ -47,7 +47,7 @@ func NewSaveDesignLogic(ctx context.Context, svcCtx *svc.ServiceContext) *SaveDe
|
||||
|
||||
func (l *SaveDesignLogic) SaveDesign(req *types.SaveDesignReq, userinfo *auth.UserInfo) (resp *basic.Response) {
|
||||
if userinfo.GetIdType() != auth.IDTYPE_User {
|
||||
return resp.SetStatusWithMessage(basic.CodeUnAuth, "please login first")
|
||||
return resp.SetStatusWithMessage(basic.CodeUnAuth, "please sign in first")
|
||||
}
|
||||
//查询是否是加密的(不太合理)
|
||||
encryptWebsetting, err := l.svcCtx.AllModels.FsWebSet.FindValueByKey(l.ctx, "is_encrypt")
|
||||
|
||||
Reference in New Issue
Block a user