This commit is contained in:
laodaming
2023-09-20 18:06:21 +08:00
parent 82a8dfa953
commit d4b1d78201
2 changed files with 3 additions and 18 deletions

View File

@@ -59,13 +59,7 @@ func (l *GetTemplateTagColorLogic) GetTemplateTagColor(req *types.GetTemplateTag
logx.Error(err)
return resp.SetStatusWithMessage(basic.CodeDbSqlErr, "failed to get template tag info")
}
//游客或者用户
if userinfo.IsUser() || userinfo.IsGuest() {
userMaterial, err = l.svcCtx.AllModels.FsUserMaterial.FindOneByUserAndLogoUrl(l.ctx, userinfo.UserId, userinfo.GuestId, resourceId)
} else {
//白板用户
userMaterial, err = l.svcCtx.AllModels.FsUserMaterial.FindOneById(l.ctx, 0)
}
userMaterial, err = l.svcCtx.AllModels.FsUserMaterial.FindOneByLogoResourceId(l.ctx, resourceId)
if err != nil {
if errors.Is(err, gorm.ErrRecordNotFound) {
return resp.SetStatusWithMessage(basic.CodeDbRecordNotFoundErr, "the logo is not found")