正在显示
37 个修改的文件
包含
589 行增加
和
452 行删除
| @@ -41,12 +41,16 @@ type ( | @@ -41,12 +41,16 @@ type ( | ||
| 41 | WhoReview []int64 `json:"whoReview,optional"` //谁可评论 | 41 | WhoReview []int64 `json:"whoReview,optional"` //谁可评论 |
| 42 | Location Location `json:"location,optional"` //定位坐标 | 42 | Location Location `json:"location,optional"` //定位坐标 |
| 43 | MatchUrl map[string]string `json:"matchUrl"` // 匹配文章内容中的url文本 | 43 | MatchUrl map[string]string `json:"matchUrl"` // 匹配文章内容中的url文本 |
| 44 | - | 44 | + Attachments []FileInfo `json:"attachments,optional"` // 附件 |
| 45 | Paragraphs []Paragraph `json:"paragraphs,optional"` // 段落 | 45 | Paragraphs []Paragraph `json:"paragraphs,optional"` // 段落 |
| 46 | } | 46 | } |
| 47 | MiniArticleCreateResponse { | 47 | MiniArticleCreateResponse { |
| 48 | Id int64 `json:"id"` | 48 | Id int64 `json:"id"` |
| 49 | } | 49 | } |
| 50 | + FileInfo struct { | ||
| 51 | + Name string `json:"name"` | ||
| 52 | + Url string `json:"url"` | ||
| 53 | + } | ||
| 50 | ) | 54 | ) |
| 51 | 55 | ||
| 52 | //小程序端查看文章的详情 | 56 | //小程序端查看文章的详情 |
| @@ -77,7 +81,8 @@ type ( | @@ -77,7 +81,8 @@ type ( | ||
| 77 | MeFollowFlag int `json:"meFollowFlag"` // 当前人员对作者的关注标识 (0 没有关注 1有关注) | 81 | MeFollowFlag int `json:"meFollowFlag"` // 当前人员对作者的关注标识 (0 没有关注 1有关注) |
| 78 | Tags []string `json:"tags"` // 文章的标签 | 82 | Tags []string `json:"tags"` // 文章的标签 |
| 79 | MatchUrl map[string]string `json:"matchUrl"` // 匹配文章内容中的url文本 | 83 | MatchUrl map[string]string `json:"matchUrl"` // 匹配文章内容中的url文本 |
| 80 | - Cover string `json:"cover"` //封面 | 84 | + Cover string `json:"cover"` //封面 |
| 85 | + Attachments []FileInfo `json:"attachments,optional"` // 附件 | ||
| 81 | } | 86 | } |
| 82 | ArticleSection { | 87 | ArticleSection { |
| 83 | Id int64 `json:"id"` //段落id | 88 | Id int64 `json:"id"` //段落id |
| @@ -118,6 +123,7 @@ type ( | @@ -118,6 +123,7 @@ type ( | ||
| 118 | IsDel int `json:"isDel"` //是否删除 1-删除 0-否 | 123 | IsDel int `json:"isDel"` //是否删除 1-删除 0-否 |
| 119 | DeletedType int `json:"deletedType"` //类型 1-运营删除 2-用户删除 | 124 | DeletedType int `json:"deletedType"` //类型 1-运营删除 2-用户删除 |
| 120 | Cover string `json:"cover"` //封面 | 125 | Cover string `json:"cover"` //封面 |
| 126 | + Attachments []FileInfo `json:"attachments,optional"` // 附件 | ||
| 121 | } | 127 | } |
| 122 | 128 | ||
| 123 | SystemArticleSearchMeRequest { | 129 | SystemArticleSearchMeRequest { |
| @@ -219,6 +225,7 @@ type ( | @@ -219,6 +225,7 @@ type ( | ||
| 219 | Action string `json:"action"` | 225 | Action string `json:"action"` |
| 220 | Show int `json:"show"` | 226 | Show int `json:"show"` |
| 221 | Cover string `json:"cover"` //封面 | 227 | Cover string `json:"cover"` //封面 |
| 228 | + Attachments []FileInfo `json:"attachments,optional"` // 附件 | ||
| 222 | } | 229 | } |
| 223 | ) | 230 | ) |
| 224 | 231 | ||
| @@ -239,6 +246,7 @@ type ( | @@ -239,6 +246,7 @@ type ( | ||
| 239 | Action string `json:"action"` | 246 | Action string `json:"action"` |
| 240 | Show int `json:"show"` | 247 | Show int `json:"show"` |
| 241 | Cover string `json:"cover"` //封面 | 248 | Cover string `json:"cover"` //封面 |
| 249 | + Attachments []FileInfo `json:"attachments,optional"` // 附件 | ||
| 242 | } | 250 | } |
| 243 | ) | 251 | ) |
| 244 | 252 | ||
| @@ -272,6 +280,7 @@ type ( | @@ -272,6 +280,7 @@ type ( | ||
| 272 | MatchUrl map[string]string `json:"matchUrl"` // 匹配文章内容中的url文本 | 280 | MatchUrl map[string]string `json:"matchUrl"` // 匹配文章内容中的url文本 |
| 273 | 281 | ||
| 274 | Paragraphs []Paragraph `json:"paragraphs,optional"` // 段落 | 282 | Paragraphs []Paragraph `json:"paragraphs,optional"` // 段落 |
| 283 | + Attachments []FileInfo `json:"attachments,optional"` // 附件 | ||
| 275 | } | 284 | } |
| 276 | 285 | ||
| 277 | MiniArticleDraftCreateResponse { | 286 | MiniArticleDraftCreateResponse { |
| @@ -293,7 +302,7 @@ type ( | @@ -293,7 +302,7 @@ type ( | ||
| 293 | WhoReview []int64 `json:"whoReview"` // 评论人 | 302 | WhoReview []int64 `json:"whoReview"` // 评论人 |
| 294 | Location Location `json:"location"` // 坐标 | 303 | Location Location `json:"location"` // 坐标 |
| 295 | MatchUrl map[string]string `json:"matchUrl"` // 匹配文章内容中的url文本 | 304 | MatchUrl map[string]string `json:"matchUrl"` // 匹配文章内容中的url文本 |
| 296 | - | 305 | + Attachments []FileInfo `json:"attachments,optional"` // 附件 |
| 297 | Paragraphs []Paragraph `json:"paragraphs,optional"` // 段落 | 306 | Paragraphs []Paragraph `json:"paragraphs,optional"` // 段落 |
| 298 | } | 307 | } |
| 299 | 308 | ||
| @@ -325,6 +334,7 @@ type ( | @@ -325,6 +334,7 @@ type ( | ||
| 325 | MatchUrl map[string]string `json:"matchUrl"` //匹配内容中的url文本 | 334 | MatchUrl map[string]string `json:"matchUrl"` //匹配内容中的url文本 |
| 326 | Paragraphs []Paragraph `json:"paragraphs,optional"` // 段落 | 335 | Paragraphs []Paragraph `json:"paragraphs,optional"` // 段落 |
| 327 | Cover string `json:"cover"` //封面 | 336 | Cover string `json:"cover"` //封面 |
| 337 | + Attachments []FileInfo `json:"attachments,optional"` // 附件 | ||
| 328 | } | 338 | } |
| 329 | ) | 339 | ) |
| 330 | 340 | ||
| @@ -348,6 +358,7 @@ type ( | @@ -348,6 +358,7 @@ type ( | ||
| 348 | MatchUrl map[string]string `json:"matchUrl"` // | 358 | MatchUrl map[string]string `json:"matchUrl"` // |
| 349 | Paragraphs []Paragraph `json:"paragraphs,optional"` // 段落 | 359 | Paragraphs []Paragraph `json:"paragraphs,optional"` // 段落 |
| 350 | Cover string `json:"cover"` //封面 | 360 | Cover string `json:"cover"` //封面 |
| 361 | + Attachments []FileInfo `json:"attachments,optional"` // 附件 | ||
| 351 | } | 362 | } |
| 352 | ) | 363 | ) |
| 353 | 364 | ||
| @@ -454,6 +465,7 @@ type ( | @@ -454,6 +465,7 @@ type ( | ||
| 454 | Tags []ArticleTagItem `json:"tags"` //标签 | 465 | Tags []ArticleTagItem `json:"tags"` //标签 |
| 455 | TargetUser int `json:"targetUser"` //分发方式 [0分发给所有人、1分发给指定的人] | 466 | TargetUser int `json:"targetUser"` //分发方式 [0分发给所有人、1分发给指定的人] |
| 456 | Cover string `json:"cover"` //封面 | 467 | Cover string `json:"cover"` //封面 |
| 468 | + Attachments []FileInfo `json:"attachments,optional"` // 附件 | ||
| 457 | } | 469 | } |
| 458 | ) | 470 | ) |
| 459 | 471 | ||
| @@ -491,6 +503,7 @@ type ( | @@ -491,6 +503,7 @@ type ( | ||
| 491 | TargetUser int `json:"targetUser"` //分发方式 [0分发给所有人、1分发给指定的人] | 503 | TargetUser int `json:"targetUser"` //分发方式 [0分发给所有人、1分发给指定的人] |
| 492 | Operator Operator `json:"operator"` //运营操作人 | 504 | Operator Operator `json:"operator"` //运营操作人 |
| 493 | Source int `json:"source"` //来源[1用户发布、2运营发布] | 505 | Source int `json:"source"` //来源[1用户发布、2运营发布] |
| 506 | + Attachments []FileInfo `json:"attachments,optional"` // 附件 | ||
| 494 | } | 507 | } |
| 495 | ) | 508 | ) |
| 496 | // 管理后台编辑文章 | 509 | // 管理后台编辑文章 |
| @@ -509,6 +522,7 @@ type ( | @@ -509,6 +522,7 @@ type ( | ||
| 509 | TargetUser int `json:"targetUser"` // 分发方式 [0分发给所有人、1分发给指定的人] | 522 | TargetUser int `json:"targetUser"` // 分发方式 [0分发给所有人、1分发给指定的人] |
| 510 | Tags []int64 `json:"tags"` // 标签 | 523 | Tags []int64 `json:"tags"` // 标签 |
| 511 | AccessToken string `header:"x-mmm-accesstoken"` // 授权token | 524 | AccessToken string `header:"x-mmm-accesstoken"` // 授权token |
| 525 | + Attachments []FileInfo `json:"attachments,optional"` // 附件 | ||
| 512 | } | 526 | } |
| 513 | SystemArticleUpdateResponse { | 527 | SystemArticleUpdateResponse { |
| 514 | Id int64 `json:"id"` //id | 528 | Id int64 `json:"id"` //id |
| @@ -538,7 +552,7 @@ type ( | @@ -538,7 +552,7 @@ type ( | ||
| 538 | MatchUrl map[string]string `json:"matchUrl,optional"` // 匹配文章内容中的url文本 | 552 | MatchUrl map[string]string `json:"matchUrl,optional"` // 匹配文章内容中的url文本 |
| 539 | ArticleDraftId int64 `json:"articleDraftId"` // 草稿ID | 553 | ArticleDraftId int64 `json:"articleDraftId"` // 草稿ID |
| 540 | AccessToken string `header:"x-mmm-accesstoken"` // 授权token | 554 | AccessToken string `header:"x-mmm-accesstoken"` // 授权token |
| 541 | - | 555 | + Attachments []FileInfo `json:"attachments,optional"` // 附件 |
| 542 | Paragraphs []Paragraph `json:"paragraphs,optional"` // 段落 | 556 | Paragraphs []Paragraph `json:"paragraphs,optional"` // 段落 |
| 543 | } | 557 | } |
| 544 | SystemArticleCreateResponse { | 558 | SystemArticleCreateResponse { |
| @@ -610,6 +624,7 @@ type ( | @@ -610,6 +624,7 @@ type ( | ||
| 610 | TargetUser int `json:"targetUser"` // 分发方式 [0分发给所有人、1分发给指定的人] | 624 | TargetUser int `json:"targetUser"` // 分发方式 [0分发给所有人、1分发给指定的人] |
| 611 | Tags []int64 `json:"tags"` // 标签 | 625 | Tags []int64 `json:"tags"` // 标签 |
| 612 | Cover string `json:"cover"` //封面 | 626 | Cover string `json:"cover"` //封面 |
| 627 | + Attachments []FileInfo `json:"attachments,optional"` // 附件 | ||
| 613 | } | 628 | } |
| 614 | ) | 629 | ) |
| 615 | // 管理后台文章恢复 | 630 | // 管理后台文章恢复 |
| @@ -676,6 +691,7 @@ type ( | @@ -676,6 +691,7 @@ type ( | ||
| 676 | CreatedAt int64 `json:"createdAt"` | 691 | CreatedAt int64 `json:"createdAt"` |
| 677 | MeReadFlag int `json:"meReadFlag"` //已读标识 [0:未读] [1:已读] | 692 | MeReadFlag int `json:"meReadFlag"` //已读标识 [0:未读] [1:已读] |
| 678 | Cover string `json:"cover"` //封面 | 693 | Cover string `json:"cover"` //封面 |
| 694 | + Attachments []FileInfo `json:"attachments,optional"` // 附件 | ||
| 679 | } | 695 | } |
| 680 | ) | 696 | ) |
| 681 | 697 | ||
| @@ -694,6 +710,7 @@ type ( | @@ -694,6 +710,7 @@ type ( | ||
| 694 | Tags []int64 `json:"tags"` // 标签 | 710 | Tags []int64 `json:"tags"` // 标签 |
| 695 | AccessToken string `header:"x-mmm-accesstoken"` // 授权token | 711 | AccessToken string `header:"x-mmm-accesstoken"` // 授权token |
| 696 | Paragraphs []Paragraph `json:"paragraphs,optional"` // 段落 | 712 | Paragraphs []Paragraph `json:"paragraphs,optional"` // 段落 |
| 713 | + Attachments []FileInfo `json:"attachments,optional"` // 附件 | ||
| 697 | } | 714 | } |
| 698 | SystemArticleDraftCreateResponse { | 715 | SystemArticleDraftCreateResponse { |
| 699 | Id int64 `json:"id"` //ID | 716 | Id int64 `json:"id"` //ID |
| @@ -726,6 +743,7 @@ type ( | @@ -726,6 +743,7 @@ type ( | ||
| 726 | Tags []int64 `json:"tags"` // 标签 | 743 | Tags []int64 `json:"tags"` // 标签 |
| 727 | AccessToken string `header:"x-mmm-accesstoken"` // 授权token | 744 | AccessToken string `header:"x-mmm-accesstoken"` // 授权token |
| 728 | Paragraphs []Paragraph `json:"paragraphs,optional"` // 段落 | 745 | Paragraphs []Paragraph `json:"paragraphs,optional"` // 段落 |
| 746 | + Attachments []FileInfo `json:"attachments,optional"` // 附件 | ||
| 729 | } | 747 | } |
| 730 | SystemArticleDraftUpdateResponse { | 748 | SystemArticleDraftUpdateResponse { |
| 731 | Id int64 `json:"id"` //ID | 749 | Id int64 `json:"id"` //ID |
| @@ -766,6 +784,7 @@ type ( | @@ -766,6 +784,7 @@ type ( | ||
| 766 | Author string `json:"author"` //发布人 | 784 | Author string `json:"author"` //发布人 |
| 767 | UpdatedAt int64 `json:"updatedAt"` //编辑时间 | 785 | UpdatedAt int64 `json:"updatedAt"` //编辑时间 |
| 768 | Cover string `json:"cover"` //封面 | 786 | Cover string `json:"cover"` //封面 |
| 787 | + Attachments []FileInfo `json:"attachments,optional"` // 附件 | ||
| 769 | } | 788 | } |
| 770 | ) | 789 | ) |
| 771 | 790 | ||
| @@ -811,6 +830,7 @@ type ( | @@ -811,6 +830,7 @@ type ( | ||
| 811 | Tags []int64 `json:"tags"` // 标签 | 830 | Tags []int64 `json:"tags"` // 标签 |
| 812 | Paragraphs []Paragraph `json:"paragraphs,optional"` // 段落 | 831 | Paragraphs []Paragraph `json:"paragraphs,optional"` // 段落 |
| 813 | Cover string `json:"cover"` //封面 | 832 | Cover string `json:"cover"` //封面 |
| 833 | + Attachments []FileInfo `json:"attachments,optional"` // 附件 | ||
| 814 | } | 834 | } |
| 815 | ) | 835 | ) |
| 816 | 836 |
| @@ -237,6 +237,7 @@ type( | @@ -237,6 +237,7 @@ type( | ||
| 237 | Images []string `json:"images"` // 图片列表 | 237 | Images []string `json:"images"` // 图片列表 |
| 238 | Author UserItem `json:"author"` // 作者 | 238 | Author UserItem `json:"author"` // 作者 |
| 239 | Cover string `json:"cover"` //封面 | 239 | Cover string `json:"cover"` //封面 |
| 240 | + Attachments []FileInfo `json:"attachments,optional"` // 附件 | ||
| 240 | } | 241 | } |
| 241 | MiniUserFollowedSearchRequest{ | 242 | MiniUserFollowedSearchRequest{ |
| 242 | Page int `json:"page,optional"` | 243 | Page int `json:"page,optional"` |
| @@ -77,6 +77,7 @@ func (l *MiniArticleBackupSearchLogic) MiniArticleBackupSearch(req *types.MiniAr | @@ -77,6 +77,7 @@ func (l *MiniArticleBackupSearchLogic) MiniArticleBackupSearch(req *types.MiniAr | ||
| 77 | Action: backupList[i].Action, | 77 | Action: backupList[i].Action, |
| 78 | Show: int(backupList[i].Show), | 78 | Show: int(backupList[i].Show), |
| 79 | Cover: backupList[i].GetCover(), | 79 | Cover: backupList[i].GetCover(), |
| 80 | + Attachments: NewTypesAttachments(backupList[i].Attachments), | ||
| 80 | } | 81 | } |
| 81 | //根据修改的内容替换展示内容 | 82 | //根据修改的内容替换展示内容 |
| 82 | changeFiled := []string{} | 83 | changeFiled := []string{} |
| @@ -56,6 +56,7 @@ func NewArticle(article *domain.Article) types.ArticleSearchMe { | @@ -56,6 +56,7 @@ func NewArticle(article *domain.Article) types.ArticleSearchMe { | ||
| 56 | Id: article.Id, | 56 | Id: article.Id, |
| 57 | Title: article.Title, | 57 | Title: article.Title, |
| 58 | Images: article.GetImages(), | 58 | Images: article.GetImages(), |
| 59 | + Attachments: NewTypesAttachments(article.Attachments), | ||
| 59 | CreatedAt: article.CreatedAt, | 60 | CreatedAt: article.CreatedAt, |
| 60 | CountLove: article.CountLove, | 61 | CountLove: article.CountLove, |
| 61 | CountComment: article.CountComment, | 62 | CountComment: article.CountComment, |
| @@ -35,19 +35,20 @@ func (l *MiniCreateArticleDraftLogic) MiniCreateArticleDraft(req *types.MiniArti | @@ -35,19 +35,20 @@ func (l *MiniCreateArticleDraftLogic) MiniCreateArticleDraft(req *types.MiniArti | ||
| 35 | } | 35 | } |
| 36 | 36 | ||
| 37 | newDraft := domain.ArticleDraft{ | 37 | newDraft := domain.ArticleDraft{ |
| 38 | - Id: 0, | ||
| 39 | - CompanyId: req.CompanyId, | ||
| 40 | - CreatedAt: 0, | ||
| 41 | - UpdatedAt: 0, | ||
| 42 | - DeletedAt: 0, | ||
| 43 | - Version: 0, | ||
| 44 | - Template: req.Template, | ||
| 45 | - Content: req.Section, | ||
| 46 | - AuthorId: req.AuthorId, | ||
| 47 | - Title: req.Title, | ||
| 48 | - Images: []domain.Image{}, | ||
| 49 | - WhoRead: req.WhoRead, | ||
| 50 | - WhoReview: req.WhoReview, | 38 | + Id: 0, |
| 39 | + CompanyId: req.CompanyId, | ||
| 40 | + CreatedAt: 0, | ||
| 41 | + UpdatedAt: 0, | ||
| 42 | + DeletedAt: 0, | ||
| 43 | + Version: 0, | ||
| 44 | + Template: req.Template, | ||
| 45 | + Content: req.Section, | ||
| 46 | + AuthorId: req.AuthorId, | ||
| 47 | + Title: req.Title, | ||
| 48 | + Images: []domain.Image{}, | ||
| 49 | + Attachments: NewDomainAttachments(req.Attachments), | ||
| 50 | + WhoRead: req.WhoRead, | ||
| 51 | + WhoReview: req.WhoReview, | ||
| 51 | Location: domain.Location{ | 52 | Location: domain.Location{ |
| 52 | Longitude: req.Location.Longitude, | 53 | Longitude: req.Location.Longitude, |
| 53 | Latitude: req.Location.Latitude, | 54 | Latitude: req.Location.Latitude, |
| @@ -344,14 +344,15 @@ func (l *MiniCreateArticleLogic) MiniCreateArticleBak(req *types.MiniArticleCrea | @@ -344,14 +344,15 @@ func (l *MiniCreateArticleLogic) MiniCreateArticleBak(req *types.MiniArticleCrea | ||
| 344 | } | 344 | } |
| 345 | 345 | ||
| 346 | newArticle := &domain.Article{ | 346 | newArticle := &domain.Article{ |
| 347 | - Id: 0, | ||
| 348 | - CompanyId: author.CompanyId, | ||
| 349 | - AuthorId: author.Id, | ||
| 350 | - Author: articleAuthor, | ||
| 351 | - Title: req.Title, | ||
| 352 | - Images: images, | ||
| 353 | - WhoRead: whoRead, | ||
| 354 | - WhoReview: whoReview, | 347 | + Id: 0, |
| 348 | + CompanyId: author.CompanyId, | ||
| 349 | + AuthorId: author.Id, | ||
| 350 | + Author: articleAuthor, | ||
| 351 | + Title: req.Title, | ||
| 352 | + Images: images, | ||
| 353 | + Attachments: NewDomainAttachments(req.Attachments), | ||
| 354 | + WhoRead: whoRead, | ||
| 355 | + WhoReview: whoReview, | ||
| 355 | Location: domain.Location{ | 356 | Location: domain.Location{ |
| 356 | Longitude: req.Location.Longitude, | 357 | Longitude: req.Location.Longitude, |
| 357 | Latitude: req.Location.Latitude, | 358 | Latitude: req.Location.Latitude, |
| @@ -439,3 +440,25 @@ func (l *MiniCreateArticleLogic) validateTextLimit(req *types.MiniArticleCreateR | @@ -439,3 +440,25 @@ func (l *MiniCreateArticleLogic) validateTextLimit(req *types.MiniArticleCreateR | ||
| 439 | } | 440 | } |
| 440 | return nil | 441 | return nil |
| 441 | } | 442 | } |
| 443 | + | ||
| 444 | +func NewDomainAttachments(from []types.FileInfo) []domain.FileInfo { | ||
| 445 | + var to = make([]domain.FileInfo, 0) | ||
| 446 | + lo.ForEach(from, func(item types.FileInfo, index int) { | ||
| 447 | + to = append(to, domain.FileInfo{ | ||
| 448 | + Name: item.Name, | ||
| 449 | + Url: item.Url, | ||
| 450 | + }) | ||
| 451 | + }) | ||
| 452 | + return to | ||
| 453 | +} | ||
| 454 | + | ||
| 455 | +func NewTypesAttachments(from []domain.FileInfo) []types.FileInfo { | ||
| 456 | + var to = make([]types.FileInfo, 0) | ||
| 457 | + lo.ForEach(from, func(item domain.FileInfo, index int) { | ||
| 458 | + to = append(to, types.FileInfo{ | ||
| 459 | + Name: item.Name, | ||
| 460 | + Url: item.Url, | ||
| 461 | + }) | ||
| 462 | + }) | ||
| 463 | + return to | ||
| 464 | +} |
| @@ -53,12 +53,13 @@ func (l *MiniGetArticleBackupLogic) MiniGetArticleBackup(req *types.MiniGetArtic | @@ -53,12 +53,13 @@ func (l *MiniGetArticleBackupLogic) MiniGetArticleBackup(req *types.MiniGetArtic | ||
| 53 | } | 53 | } |
| 54 | 54 | ||
| 55 | resp = &types.MiniGetArticleBackupResponse{ | 55 | resp = &types.MiniGetArticleBackupResponse{ |
| 56 | - Id: backupInfo.Id, | ||
| 57 | - Title: backupInfo.Title, | ||
| 58 | - Content: content.String(), | ||
| 59 | - Images: images, | ||
| 60 | - Videos: videos, | ||
| 61 | - CreatedAt: backupInfo.CreatedAt, | 56 | + Id: backupInfo.Id, |
| 57 | + Title: backupInfo.Title, | ||
| 58 | + Content: content.String(), | ||
| 59 | + Images: images, | ||
| 60 | + Attachments: NewTypesAttachments(backupInfo.Attachments), | ||
| 61 | + Videos: videos, | ||
| 62 | + CreatedAt: backupInfo.CreatedAt, | ||
| 62 | Location: types.Location{ | 63 | Location: types.Location{ |
| 63 | Longitude: backupInfo.Location.Longitude, | 64 | Longitude: backupInfo.Location.Longitude, |
| 64 | Latitude: backupInfo.Location.Latitude, | 65 | Latitude: backupInfo.Location.Latitude, |
| @@ -59,10 +59,11 @@ func (l *MiniGetArticleDraftMeLogic) MiniGetArticleDraftMe(req *types.MiniArticl | @@ -59,10 +59,11 @@ func (l *MiniGetArticleDraftMeLogic) MiniGetArticleDraftMe(req *types.MiniArticl | ||
| 59 | Id: draftInfo.Id, | 59 | Id: draftInfo.Id, |
| 60 | Template: draftInfo.Template, | 60 | Template: draftInfo.Template, |
| 61 | //Section: draftInfo.Content, | 61 | //Section: draftInfo.Content, |
| 62 | - Title: draftInfo.Title, | ||
| 63 | - Images: []string{}, | ||
| 64 | - WhoRead: draftInfo.WhoRead, | ||
| 65 | - WhoReview: draftInfo.WhoReview, | 62 | + Title: draftInfo.Title, |
| 63 | + Images: []string{}, | ||
| 64 | + Attachments: NewTypesAttachments(draftInfo.Attachments), | ||
| 65 | + WhoRead: draftInfo.WhoRead, | ||
| 66 | + WhoReview: draftInfo.WhoReview, | ||
| 66 | Location: types.Location{ | 67 | Location: types.Location{ |
| 67 | Longitude: draftInfo.Location.Longitude, | 68 | Longitude: draftInfo.Location.Longitude, |
| 68 | Latitude: draftInfo.Location.Latitude, | 69 | Latitude: draftInfo.Location.Latitude, |
| @@ -127,11 +127,12 @@ func (l *MiniGetArticleLogic) MiniGetArticle(req *types.MiniArticleGetRequest) ( | @@ -127,11 +127,12 @@ func (l *MiniGetArticleLogic) MiniGetArticle(req *types.MiniArticleGetRequest) ( | ||
| 127 | Position: "", | 127 | Position: "", |
| 128 | Company: companyInfo.Name, | 128 | Company: companyInfo.Name, |
| 129 | }, | 129 | }, |
| 130 | - CreatedAt: articleInfo.CreatedAt, | ||
| 131 | - Section: articleSection, | ||
| 132 | - Images: []string{}, | ||
| 133 | - WhoRead: articleInfo.WhoRead, | ||
| 134 | - WhoReview: articleInfo.WhoReview, | 130 | + CreatedAt: articleInfo.CreatedAt, |
| 131 | + Section: articleSection, | ||
| 132 | + Images: []string{}, | ||
| 133 | + Attachments: NewTypesAttachments(articleInfo.Attachments), | ||
| 134 | + WhoRead: articleInfo.WhoRead, | ||
| 135 | + WhoReview: articleInfo.WhoReview, | ||
| 135 | Location: types.Location{ | 136 | Location: types.Location{ |
| 136 | Longitude: articleInfo.Location.Longitude, | 137 | Longitude: articleInfo.Location.Longitude, |
| 137 | Latitude: articleInfo.Location.Latitude, | 138 | Latitude: articleInfo.Location.Latitude, |
| @@ -70,12 +70,13 @@ func (l *MiniSearchArticleDraftMeLogic) MiniSearchArticleDraftMe(req *types.Mini | @@ -70,12 +70,13 @@ func (l *MiniSearchArticleDraftMeLogic) MiniSearchArticleDraftMe(req *types.Mini | ||
| 70 | Id: draftList[i].Id, | 70 | Id: draftList[i].Id, |
| 71 | Template: draftList[i].Template, | 71 | Template: draftList[i].Template, |
| 72 | //Section: draftList[i].Content, | 72 | //Section: draftList[i].Content, |
| 73 | - Title: draftList[i].Title, | ||
| 74 | - Images: draftList[i].GetImages(), | ||
| 75 | - CreatedAt: draftList[i].CreatedAt, | ||
| 76 | - MatchUrl: draftList[i].MatchUrl, | ||
| 77 | - Paragraphs: paragraphs, | ||
| 78 | - Cover: draftList[i].GetCover(), | 73 | + Title: draftList[i].Title, |
| 74 | + Images: draftList[i].GetImages(), | ||
| 75 | + CreatedAt: draftList[i].CreatedAt, | ||
| 76 | + MatchUrl: draftList[i].MatchUrl, | ||
| 77 | + Paragraphs: paragraphs, | ||
| 78 | + Cover: draftList[i].GetCover(), | ||
| 79 | + Attachments: NewTypesAttachments(draftList[i].Attachments), | ||
| 79 | } | 80 | } |
| 80 | } | 81 | } |
| 81 | return resp, nil | 82 | return resp, nil |
| @@ -68,15 +68,16 @@ func (l *MiniSearchArticlePageLogic) MiniSearchArticlePage(req *types.MiniSearch | @@ -68,15 +68,16 @@ func (l *MiniSearchArticlePageLogic) MiniSearchArticlePage(req *types.MiniSearch | ||
| 68 | for i, val := range articleList { | 68 | for i, val := range articleList { |
| 69 | author := l.getAuthor(conn, val.AuthorId) | 69 | author := l.getAuthor(conn, val.AuthorId) |
| 70 | item := types.MiniSearchArticleItem{ | 70 | item := types.MiniSearchArticleItem{ |
| 71 | - ArticleId: val.Id, | ||
| 72 | - Title: val.Title, | ||
| 73 | - AuthorId: val.AuthorId, | ||
| 74 | - Author: author.Name, | ||
| 75 | - Avatar: author.Avatar, | ||
| 76 | - Images: val.GetImages(), | ||
| 77 | - CreatedAt: val.CreatedAt, | ||
| 78 | - MeReadFlag: 0, | ||
| 79 | - Cover: val.GetCover(), | 71 | + ArticleId: val.Id, |
| 72 | + Title: val.Title, | ||
| 73 | + AuthorId: val.AuthorId, | ||
| 74 | + Author: author.Name, | ||
| 75 | + Avatar: author.Avatar, | ||
| 76 | + Images: val.GetImages(), | ||
| 77 | + Attachments: NewTypesAttachments(val.Attachments), | ||
| 78 | + CreatedAt: val.CreatedAt, | ||
| 79 | + MeReadFlag: 0, | ||
| 80 | + Cover: val.GetCover(), | ||
| 80 | } | 81 | } |
| 81 | 82 | ||
| 82 | if _, ok := readFlag[val.Id]; ok { | 83 | if _, ok := readFlag[val.Id]; ok { |
| @@ -58,6 +58,7 @@ func (l *MiniUpdateArticleDraftLogic) MiniUpdateArticleDraft(req *types.MiniArti | @@ -58,6 +58,7 @@ func (l *MiniUpdateArticleDraftLogic) MiniUpdateArticleDraft(req *types.MiniArti | ||
| 58 | Url: val, | 58 | Url: val, |
| 59 | }) | 59 | }) |
| 60 | } | 60 | } |
| 61 | + draftInfo.Attachments = NewDomainAttachments(req.Attachments) | ||
| 61 | draftInfo.MatchUrl = make(map[string]string) | 62 | draftInfo.MatchUrl = make(map[string]string) |
| 62 | for k, v := range req.MatchUrl { | 63 | for k, v := range req.MatchUrl { |
| 63 | draftInfo.MatchUrl[k] = v | 64 | draftInfo.MatchUrl[k] = v |
| @@ -42,6 +42,7 @@ func (l *SystemArticleGetHistoryLogic) SystemArticleGetHistory(req *types.System | @@ -42,6 +42,7 @@ func (l *SystemArticleGetHistoryLogic) SystemArticleGetHistory(req *types.System | ||
| 42 | CreatedAt: backup.CreatedAt, | 42 | CreatedAt: backup.CreatedAt, |
| 43 | Section: make([]types.ArticleSection, 0), | 43 | Section: make([]types.ArticleSection, 0), |
| 44 | Images: make([]string, 0), | 44 | Images: make([]string, 0), |
| 45 | + Attachments: NewTypesAttachments(backup.Attachments), | ||
| 45 | WhoRead: backup.WhoRead, | 46 | WhoRead: backup.WhoRead, |
| 46 | WhoReadInfo: make([]types.UserShowName, 0), | 47 | WhoReadInfo: make([]types.UserShowName, 0), |
| 47 | WhoReview: backup.WhoReview, | 48 | WhoReview: backup.WhoReview, |
| @@ -59,17 +59,18 @@ func (l *SystemCreateArticleDraftLogic) SystemCreateArticleDraft(req *types.Syst | @@ -59,17 +59,18 @@ func (l *SystemCreateArticleDraftLogic) SystemCreateArticleDraft(req *types.Syst | ||
| 59 | return nil, xerr.NewErrMsgErr("获取当前用户信息失败", err) | 59 | return nil, xerr.NewErrMsgErr("获取当前用户信息失败", err) |
| 60 | } | 60 | } |
| 61 | articleDraft := &domain.ArticleDraftOperation{ | 61 | articleDraft := &domain.ArticleDraftOperation{ |
| 62 | - CompanyId: companyInfo.Id, | ||
| 63 | - AuthorId: req.AuthorId, | ||
| 64 | - Title: req.Title, | ||
| 65 | - Content: req.Content, | ||
| 66 | - Images: images, | ||
| 67 | - Videos: videos, | ||
| 68 | - TargetUser: domain.ArticleTarget(req.TargetUser), | ||
| 69 | - WhoRead: req.WhoRead, | ||
| 70 | - WhoReview: req.WhoReview, | ||
| 71 | - MatchUrl: req.MatchUrl, | ||
| 72 | - Source: domain.ArticleSourceOperator, | 62 | + CompanyId: companyInfo.Id, |
| 63 | + AuthorId: req.AuthorId, | ||
| 64 | + Title: req.Title, | ||
| 65 | + Content: req.Content, | ||
| 66 | + Images: images, | ||
| 67 | + Attachments: NewDomainAttachments(req.Attachments), | ||
| 68 | + Videos: videos, | ||
| 69 | + TargetUser: domain.ArticleTarget(req.TargetUser), | ||
| 70 | + WhoRead: req.WhoRead, | ||
| 71 | + WhoReview: req.WhoReview, | ||
| 72 | + MatchUrl: req.MatchUrl, | ||
| 73 | + Source: domain.ArticleSourceOperator, | ||
| 73 | Operator: domain.Operator{ | 74 | Operator: domain.Operator{ |
| 74 | Id: userToken.UserId, | 75 | Id: userToken.UserId, |
| 75 | Name: userMe.User.NickName, | 76 | Name: userMe.User.NickName, |
| @@ -79,20 +79,21 @@ func (l *SystemCreateArticleLogic) SystemCreateArticle(req *types.SystemArticleC | @@ -79,20 +79,21 @@ func (l *SystemCreateArticleLogic) SystemCreateArticle(req *types.SystemArticleC | ||
| 79 | return nil, xerr.NewErrMsgErr("获取当前用户信息失败", err) | 79 | return nil, xerr.NewErrMsgErr("获取当前用户信息失败", err) |
| 80 | } | 80 | } |
| 81 | article := &domain.Article{ | 81 | article := &domain.Article{ |
| 82 | - CompanyId: companyInfo.Id, | ||
| 83 | - AuthorId: req.AuthorId, | ||
| 84 | - Author: articleAuthor, | ||
| 85 | - Title: req.Title, | ||
| 86 | - Images: images, | ||
| 87 | - Videos: videos, | ||
| 88 | - WhoRead: make([]int64, 0), | ||
| 89 | - WhoReview: make([]int64, 0), | ||
| 90 | - Location: domain.Location{}, | ||
| 91 | - TargetUser: domain.ArticleTarget(req.TargetUser), | ||
| 92 | - Show: domain.ArticleShowEnable, | ||
| 93 | - Tags: make([]int64, 0), | ||
| 94 | - MatchUrl: make(map[string]string), | ||
| 95 | - Source: domain.ArticleSourceOperator, | 82 | + CompanyId: companyInfo.Id, |
| 83 | + AuthorId: req.AuthorId, | ||
| 84 | + Author: articleAuthor, | ||
| 85 | + Title: req.Title, | ||
| 86 | + Images: images, | ||
| 87 | + Attachments: NewDomainAttachments(req.Attachments), | ||
| 88 | + Videos: videos, | ||
| 89 | + WhoRead: make([]int64, 0), | ||
| 90 | + WhoReview: make([]int64, 0), | ||
| 91 | + Location: domain.Location{}, | ||
| 92 | + TargetUser: domain.ArticleTarget(req.TargetUser), | ||
| 93 | + Show: domain.ArticleShowEnable, | ||
| 94 | + Tags: make([]int64, 0), | ||
| 95 | + MatchUrl: make(map[string]string), | ||
| 96 | + Source: domain.ArticleSourceOperator, | ||
| 96 | Operator: domain.Operator{ | 97 | Operator: domain.Operator{ |
| 97 | Id: userToken.UserId, | 98 | Id: userToken.UserId, |
| 98 | Name: userMe.User.NickName, | 99 | Name: userMe.User.NickName, |
| @@ -73,6 +73,7 @@ func (l *SystemGetArticleDraftLogic) SystemGetArticleDraft(req *types.SystemArti | @@ -73,6 +73,7 @@ func (l *SystemGetArticleDraftLogic) SystemGetArticleDraft(req *types.SystemArti | ||
| 73 | Content: articleDraft.Content, | 73 | Content: articleDraft.Content, |
| 74 | AuthorId: articleDraft.AuthorId, | 74 | AuthorId: articleDraft.AuthorId, |
| 75 | Images: images, | 75 | Images: images, |
| 76 | + Attachments: NewTypesAttachments(articleDraft.Attachments), | ||
| 76 | Videos: videos, | 77 | Videos: videos, |
| 77 | TargetUser: int(articleDraft.TargetUser), | 78 | TargetUser: int(articleDraft.TargetUser), |
| 78 | WhoRead: articleDraft.WhoRead, | 79 | WhoRead: articleDraft.WhoRead, |
| @@ -52,6 +52,7 @@ func (l *SystemGetArticleLogic) SystemGetArticle(req *types.SystemArticleGetRequ | @@ -52,6 +52,7 @@ func (l *SystemGetArticleLogic) SystemGetArticle(req *types.SystemArticleGetRequ | ||
| 52 | CreatedAt: article.CreatedAt, | 52 | CreatedAt: article.CreatedAt, |
| 53 | Section: make([]types.ArticleSection, 0), | 53 | Section: make([]types.ArticleSection, 0), |
| 54 | Images: images, | 54 | Images: images, |
| 55 | + Attachments: NewTypesAttachments(article.Attachments), | ||
| 55 | WhoRead: article.WhoRead, | 56 | WhoRead: article.WhoRead, |
| 56 | WhoReadInfo: make([]types.UserShowName, 0), | 57 | WhoReadInfo: make([]types.UserShowName, 0), |
| 57 | WhoReview: article.WhoReview, | 58 | WhoReview: article.WhoReview, |
| @@ -65,14 +65,15 @@ func (l *SystemSearchArticleDraftLogic) SystemSearchArticleDraft(req *types.Syst | @@ -65,14 +65,15 @@ func (l *SystemSearchArticleDraftLogic) SystemSearchArticleDraft(req *types.Syst | ||
| 65 | } | 65 | } |
| 66 | } | 66 | } |
| 67 | resp.List = append(resp.List, types.SystemArticleDraftSearch{ | 67 | resp.List = append(resp.List, types.SystemArticleDraftSearch{ |
| 68 | - Id: item.Id, | ||
| 69 | - Title: item.Title, | ||
| 70 | - Images: item.GetImages(), | ||
| 71 | - Operator: item.Operator.Name, | ||
| 72 | - AuthorId: item.AuthorId, | ||
| 73 | - Author: author, | ||
| 74 | - UpdatedAt: item.UpdatedAt, | ||
| 75 | - Cover: item.GetCover(), | 68 | + Id: item.Id, |
| 69 | + Title: item.Title, | ||
| 70 | + Images: item.GetImages(), | ||
| 71 | + Operator: item.Operator.Name, | ||
| 72 | + AuthorId: item.AuthorId, | ||
| 73 | + Author: author, | ||
| 74 | + UpdatedAt: item.UpdatedAt, | ||
| 75 | + Cover: item.GetCover(), | ||
| 76 | + Attachments: NewTypesAttachments(item.Attachments), | ||
| 76 | }) | 77 | }) |
| 77 | }) | 78 | }) |
| 78 | return | 79 | return |
| @@ -88,7 +88,8 @@ func (l *SystemSearchArticleLogic) SystemSearchArticle(req *types.SystemArticleS | @@ -88,7 +88,8 @@ func (l *SystemSearchArticleLogic) SystemSearchArticle(req *types.SystemArticleS | ||
| 88 | Id: item.Operator.Id, | 88 | Id: item.Operator.Id, |
| 89 | Name: item.Operator.Name, | 89 | Name: item.Operator.Name, |
| 90 | }, | 90 | }, |
| 91 | - Cover: item.GetCover(), | 91 | + Cover: item.GetCover(), |
| 92 | + Attachments: NewTypesAttachments(item.Attachments), | ||
| 92 | }) | 93 | }) |
| 93 | }) | 94 | }) |
| 94 | return | 95 | return |
| @@ -51,6 +51,7 @@ func (l *SystemUpdateArticleDraftLogic) SystemUpdateArticleDraft(req *types.Syst | @@ -51,6 +51,7 @@ func (l *SystemUpdateArticleDraftLogic) SystemUpdateArticleDraft(req *types.Syst | ||
| 51 | return nil, xerr.NewErrMsg(err.Error()) | 51 | return nil, xerr.NewErrMsg(err.Error()) |
| 52 | } | 52 | } |
| 53 | articleDraft.Images = images | 53 | articleDraft.Images = images |
| 54 | + articleDraft.Attachments = NewDomainAttachments(req.Attachments) | ||
| 54 | //视频 | 55 | //视频 |
| 55 | videos, err := getVideos(req.Videos) | 56 | videos, err := getVideos(req.Videos) |
| 56 | if err != nil { | 57 | if err != nil { |
| @@ -112,6 +112,7 @@ func (l *SystemUpdateArticleLogic) SystemUpdateArticle(req *types.SystemArticleU | @@ -112,6 +112,7 @@ func (l *SystemUpdateArticleLogic) SystemUpdateArticle(req *types.SystemArticleU | ||
| 112 | article.Title = req.Title | 112 | article.Title = req.Title |
| 113 | article.Version = article.Version + 1 | 113 | article.Version = article.Version + 1 |
| 114 | article.Images = images | 114 | article.Images = images |
| 115 | + article.Attachments = NewDomainAttachments(req.Attachments) | ||
| 115 | article.Videos = videos | 116 | article.Videos = videos |
| 116 | article.WhoRead = whoRead | 117 | article.WhoRead = whoRead |
| 117 | article.WhoReview = whoReview | 118 | article.WhoReview = whoReview |
| @@ -57,14 +57,15 @@ func (l *MiniUserNewsLogic) MiniUserNews(req *types.MiniUserNewsRequest) (resp * | @@ -57,14 +57,15 @@ func (l *MiniUserNewsLogic) MiniUserNews(req *types.MiniUserNewsRequest) (resp * | ||
| 57 | }) | 57 | }) |
| 58 | lo.ForEach(articles, func(item *domain.Article, index int) { | 58 | lo.ForEach(articles, func(item *domain.Article, index int) { |
| 59 | newsItem := types.UserNewsItem{ | 59 | newsItem := types.UserNewsItem{ |
| 60 | - NewsId: item.Id, | ||
| 61 | - Type: "article", | ||
| 62 | - Title: item.Title, | ||
| 63 | - Summary: item.Summary, | ||
| 64 | - Time: item.CreatedAt, | ||
| 65 | - Images: item.GetImages(), | ||
| 66 | - ReadFlag: false, | ||
| 67 | - Cover: item.GetCover(), | 60 | + NewsId: item.Id, |
| 61 | + Type: "article", | ||
| 62 | + Title: item.Title, | ||
| 63 | + Summary: item.Summary, | ||
| 64 | + Time: item.CreatedAt, | ||
| 65 | + Images: item.GetImages(), | ||
| 66 | + Attachments: types.NewTypesAttachments(item.Attachments), | ||
| 67 | + ReadFlag: false, | ||
| 68 | + Cover: item.GetCover(), | ||
| 68 | } | 69 | } |
| 69 | if author, _ := domain.LazyLoad(userMap, l.ctx, conn, item.AuthorId, l.svcCtx.UserRepository.FindOne); author != nil { | 70 | if author, _ := domain.LazyLoad(userMap, l.ctx, conn, item.AuthorId, l.svcCtx.UserRepository.FindOne); author != nil { |
| 70 | newsItem.Author = types.UserItem{ | 71 | newsItem.Author = types.UserItem{ |
cmd/discuss/api/internal/types/other.go
0 → 100644
| 1 | +package types | ||
| 2 | + | ||
| 3 | +import ( | ||
| 4 | + "github.com/samber/lo" | ||
| 5 | + "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/cmd/discuss/interanl/pkg/domain" | ||
| 6 | +) | ||
| 7 | + | ||
| 8 | +func NewDomainAttachments(from []FileInfo) []domain.FileInfo { | ||
| 9 | + var to = make([]domain.FileInfo, 0) | ||
| 10 | + lo.ForEach(from, func(item FileInfo, index int) { | ||
| 11 | + to = append(to, domain.FileInfo{ | ||
| 12 | + Name: item.Name, | ||
| 13 | + Url: item.Url, | ||
| 14 | + }) | ||
| 15 | + }) | ||
| 16 | + return to | ||
| 17 | +} | ||
| 18 | + | ||
| 19 | +func NewTypesAttachments(from []domain.FileInfo) []FileInfo { | ||
| 20 | + var to = make([]FileInfo, 0) | ||
| 21 | + lo.ForEach(from, func(item domain.FileInfo, index int) { | ||
| 22 | + to = append(to, FileInfo{ | ||
| 23 | + Name: item.Name, | ||
| 24 | + Url: item.Url, | ||
| 25 | + }) | ||
| 26 | + }) | ||
| 27 | + return to | ||
| 28 | +} |
| @@ -599,15 +599,16 @@ type MiniUserNewsResposne struct { | @@ -599,15 +599,16 @@ type MiniUserNewsResposne struct { | ||
| 599 | } | 599 | } |
| 600 | 600 | ||
| 601 | type UserNewsItem struct { | 601 | type UserNewsItem struct { |
| 602 | - NewsId int64 `json:"newsId"` // 快讯ID | ||
| 603 | - Type string `json:"type"` // 快讯类型 文章:Article 讨论:Discuss ... | ||
| 604 | - Title string `json:"title"` // 标题 | ||
| 605 | - Summary string `json:"summary"` // 快讯概要 | ||
| 606 | - Time int64 `json:"time"` // 时间 | ||
| 607 | - ReadFlag bool `json:"readFlag"` // 已读标识 true:已读 false:未读 | ||
| 608 | - Images []string `json:"images"` // 图片列表 | ||
| 609 | - Author UserItem `json:"author"` // 作者 | ||
| 610 | - Cover string `json:"cover"` //封面 | 602 | + NewsId int64 `json:"newsId"` // 快讯ID |
| 603 | + Type string `json:"type"` // 快讯类型 文章:Article 讨论:Discuss ... | ||
| 604 | + Title string `json:"title"` // 标题 | ||
| 605 | + Summary string `json:"summary"` // 快讯概要 | ||
| 606 | + Time int64 `json:"time"` // 时间 | ||
| 607 | + ReadFlag bool `json:"readFlag"` // 已读标识 true:已读 false:未读 | ||
| 608 | + Images []string `json:"images"` // 图片列表 | ||
| 609 | + Author UserItem `json:"author"` // 作者 | ||
| 610 | + Cover string `json:"cover"` //封面 | ||
| 611 | + Attachments []FileInfo `json:"attachments,optional"` // 附件 | ||
| 611 | } | 612 | } |
| 612 | 613 | ||
| 613 | type MiniUserFollowedSearchRequest struct { | 614 | type MiniUserFollowedSearchRequest struct { |
| @@ -959,21 +960,27 @@ type Operator struct { | @@ -959,21 +960,27 @@ type Operator struct { | ||
| 959 | } | 960 | } |
| 960 | 961 | ||
| 961 | type MiniArticleCreateRequest struct { | 962 | type MiniArticleCreateRequest struct { |
| 962 | - Title string `json:"title"` //标题 | ||
| 963 | - Section []string `json:"section,optional"` //文章的文本内容 | ||
| 964 | - AuthorId int64 `json:"authorId,optional"` //发布人id | ||
| 965 | - Images []string `json:"images,optional"` //图片 | ||
| 966 | - WhoRead []int64 `json:"whoRead,optional"` //谁可查看 | ||
| 967 | - WhoReview []int64 `json:"whoReview,optional"` //谁可评论 | ||
| 968 | - Location Location `json:"location,optional"` //定位坐标 | ||
| 969 | - MatchUrl map[string]string `json:"matchUrl"` // 匹配文章内容中的url文本 | ||
| 970 | - Paragraphs []Paragraph `json:"paragraphs,optional"` // 段落 | 963 | + Title string `json:"title"` //标题 |
| 964 | + Section []string `json:"section,optional"` //文章的文本内容 | ||
| 965 | + AuthorId int64 `json:"authorId,optional"` //发布人id | ||
| 966 | + Images []string `json:"images,optional"` //图片 | ||
| 967 | + WhoRead []int64 `json:"whoRead,optional"` //谁可查看 | ||
| 968 | + WhoReview []int64 `json:"whoReview,optional"` //谁可评论 | ||
| 969 | + Location Location `json:"location,optional"` //定位坐标 | ||
| 970 | + MatchUrl map[string]string `json:"matchUrl"` // 匹配文章内容中的url文本 | ||
| 971 | + Attachments []FileInfo `json:"attachments,optional"` // 附件 | ||
| 972 | + Paragraphs []Paragraph `json:"paragraphs,optional"` // 段落 | ||
| 971 | } | 973 | } |
| 972 | 974 | ||
| 973 | type MiniArticleCreateResponse struct { | 975 | type MiniArticleCreateResponse struct { |
| 974 | Id int64 `json:"id"` | 976 | Id int64 `json:"id"` |
| 975 | } | 977 | } |
| 976 | 978 | ||
| 979 | +type FileInfo struct { | ||
| 980 | + Name string `json:"name"` | ||
| 981 | + Url string `json:"url"` | ||
| 982 | +} | ||
| 983 | + | ||
| 977 | type MiniArticleGetRequest struct { | 984 | type MiniArticleGetRequest struct { |
| 978 | Id int64 `path:"id"` //id | 985 | Id int64 `path:"id"` //id |
| 979 | CompanyId int64 `path:",optional"` //当前公司 | 986 | CompanyId int64 `path:",optional"` //当前公司 |
| @@ -981,27 +988,28 @@ type MiniArticleGetRequest struct { | @@ -981,27 +988,28 @@ type MiniArticleGetRequest struct { | ||
| 981 | } | 988 | } |
| 982 | 989 | ||
| 983 | type MiniArticleGetResponse struct { | 990 | type MiniArticleGetResponse struct { |
| 984 | - Id int64 `json:"id"` //id | ||
| 985 | - Title string `json:"title"` //标题 | ||
| 986 | - AuthorId int64 `json:"authorId"` //发布人id | ||
| 987 | - Author ArticleAuthor `json:"author"` //发布人 | ||
| 988 | - CreatedAt int64 `json:"createdAt"` //文章的发布时间 | ||
| 989 | - Section []ArticleSection `json:"section"` //文章的文本内容 | ||
| 990 | - Images []string `json:"images"` //图片 | ||
| 991 | - Videos []Video `json:"videos"` //视频 | ||
| 992 | - WhoRead []int64 `json:"whoRead"` //谁可查看 | ||
| 993 | - WhoReview []int64 `json:"whoReview"` //谁可评论 | ||
| 994 | - Location Location `json:"location"` //定位坐标 | ||
| 995 | - CountLove int `json:"countLove"` // 点赞数量 | ||
| 996 | - CountComment int `json:"countComment"` // 评论数量 | ||
| 997 | - CountRead int `json:"countRead"` // 浏览数量 | ||
| 998 | - Show int `json:"show"` // 评论的展示状态(1显示、2不显示) | ||
| 999 | - Edit int `json:"edit"` // 文章是否存在变更记录 (0 不存在 1存在) | ||
| 1000 | - MeLoveFlag int `json:"meLoveFlag"` // 当前人员对文章的点赞标识 (0 没有点赞 1有点赞) | ||
| 1001 | - MeFollowFlag int `json:"meFollowFlag"` // 当前人员对作者的关注标识 (0 没有关注 1有关注) | ||
| 1002 | - Tags []string `json:"tags"` // 文章的标签 | ||
| 1003 | - MatchUrl map[string]string `json:"matchUrl"` // 匹配文章内容中的url文本 | ||
| 1004 | - Cover string `json:"cover"` //封面 | 991 | + Id int64 `json:"id"` //id |
| 992 | + Title string `json:"title"` //标题 | ||
| 993 | + AuthorId int64 `json:"authorId"` //发布人id | ||
| 994 | + Author ArticleAuthor `json:"author"` //发布人 | ||
| 995 | + CreatedAt int64 `json:"createdAt"` //文章的发布时间 | ||
| 996 | + Section []ArticleSection `json:"section"` //文章的文本内容 | ||
| 997 | + Images []string `json:"images"` //图片 | ||
| 998 | + Videos []Video `json:"videos"` //视频 | ||
| 999 | + WhoRead []int64 `json:"whoRead"` //谁可查看 | ||
| 1000 | + WhoReview []int64 `json:"whoReview"` //谁可评论 | ||
| 1001 | + Location Location `json:"location"` //定位坐标 | ||
| 1002 | + CountLove int `json:"countLove"` // 点赞数量 | ||
| 1003 | + CountComment int `json:"countComment"` // 评论数量 | ||
| 1004 | + CountRead int `json:"countRead"` // 浏览数量 | ||
| 1005 | + Show int `json:"show"` // 评论的展示状态(1显示、2不显示) | ||
| 1006 | + Edit int `json:"edit"` // 文章是否存在变更记录 (0 不存在 1存在) | ||
| 1007 | + MeLoveFlag int `json:"meLoveFlag"` // 当前人员对文章的点赞标识 (0 没有点赞 1有点赞) | ||
| 1008 | + MeFollowFlag int `json:"meFollowFlag"` // 当前人员对作者的关注标识 (0 没有关注 1有关注) | ||
| 1009 | + Tags []string `json:"tags"` // 文章的标签 | ||
| 1010 | + MatchUrl map[string]string `json:"matchUrl"` // 匹配文章内容中的url文本 | ||
| 1011 | + Cover string `json:"cover"` //封面 | ||
| 1012 | + Attachments []FileInfo `json:"attachments,optional"` // 附件 | ||
| 1005 | } | 1013 | } |
| 1006 | 1014 | ||
| 1007 | type ArticleSection struct { | 1015 | type ArticleSection struct { |
| @@ -1027,19 +1035,20 @@ type MiniArticleSearchMeResponse struct { | @@ -1027,19 +1035,20 @@ type MiniArticleSearchMeResponse struct { | ||
| 1027 | } | 1035 | } |
| 1028 | 1036 | ||
| 1029 | type ArticleSearchMe struct { | 1037 | type ArticleSearchMe struct { |
| 1030 | - Id int64 `json:"id"` //id | ||
| 1031 | - Title string `json:"title"` //标题 | ||
| 1032 | - Images []string `json:"images"` //图片 | ||
| 1033 | - CreatedAt int64 `json:"createdAt"` //文章的创建日期 | ||
| 1034 | - CountLove int `json:"countLove"` //点赞数量 | ||
| 1035 | - CountComment int `json:"countComment"` //评论数量 | ||
| 1036 | - CountRead int `json:"countRead"` //浏览数量 | ||
| 1037 | - Show int `json:"show"` //是否隐藏 [0显示、1不显示] | ||
| 1038 | - TargetUser int `json:"targetUser"` //分发方式 [0分发给所有人、1分发给指定的人] | ||
| 1039 | - WhoRead []int64 `json:"whoRead"` //谁可查看 | ||
| 1040 | - IsDel int `json:"isDel"` //是否删除 1-删除 0-否 | ||
| 1041 | - DeletedType int `json:"deletedType"` //类型 1-运营删除 2-用户删除 | ||
| 1042 | - Cover string `json:"cover"` //封面 | 1038 | + Id int64 `json:"id"` //id |
| 1039 | + Title string `json:"title"` //标题 | ||
| 1040 | + Images []string `json:"images"` //图片 | ||
| 1041 | + CreatedAt int64 `json:"createdAt"` //文章的创建日期 | ||
| 1042 | + CountLove int `json:"countLove"` //点赞数量 | ||
| 1043 | + CountComment int `json:"countComment"` //评论数量 | ||
| 1044 | + CountRead int `json:"countRead"` //浏览数量 | ||
| 1045 | + Show int `json:"show"` //是否隐藏 [0显示、1不显示] | ||
| 1046 | + TargetUser int `json:"targetUser"` //分发方式 [0分发给所有人、1分发给指定的人] | ||
| 1047 | + WhoRead []int64 `json:"whoRead"` //谁可查看 | ||
| 1048 | + IsDel int `json:"isDel"` //是否删除 1-删除 0-否 | ||
| 1049 | + DeletedType int `json:"deletedType"` //类型 1-运营删除 2-用户删除 | ||
| 1050 | + Cover string `json:"cover"` //封面 | ||
| 1051 | + Attachments []FileInfo `json:"attachments,optional"` // 附件 | ||
| 1043 | } | 1052 | } |
| 1044 | 1053 | ||
| 1045 | type SystemArticleSearchMeRequest struct { | 1054 | type SystemArticleSearchMeRequest struct { |
| @@ -1122,17 +1131,18 @@ type MiniArticleBackupSearchResponse struct { | @@ -1122,17 +1131,18 @@ type MiniArticleBackupSearchResponse struct { | ||
| 1122 | } | 1131 | } |
| 1123 | 1132 | ||
| 1124 | type MiniArticleBackupItem struct { | 1133 | type MiniArticleBackupItem struct { |
| 1125 | - Id int64 `json:"id"` | ||
| 1126 | - Title string `json:"title"` | ||
| 1127 | - Content string `json:"content"` | ||
| 1128 | - Images []string `json:"images"` | ||
| 1129 | - Videos []Video `json:"videos"` | ||
| 1130 | - ChangeField []string `json:"changeField"` | ||
| 1131 | - CreatedAt int64 `json:"createdAt"` | ||
| 1132 | - Location Location `json:"location"` | ||
| 1133 | - Action string `json:"action"` | ||
| 1134 | - Show int `json:"show"` | ||
| 1135 | - Cover string `json:"cover"` //封面 | 1134 | + Id int64 `json:"id"` |
| 1135 | + Title string `json:"title"` | ||
| 1136 | + Content string `json:"content"` | ||
| 1137 | + Images []string `json:"images"` | ||
| 1138 | + Videos []Video `json:"videos"` | ||
| 1139 | + ChangeField []string `json:"changeField"` | ||
| 1140 | + CreatedAt int64 `json:"createdAt"` | ||
| 1141 | + Location Location `json:"location"` | ||
| 1142 | + Action string `json:"action"` | ||
| 1143 | + Show int `json:"show"` | ||
| 1144 | + Cover string `json:"cover"` //封面 | ||
| 1145 | + Attachments []FileInfo `json:"attachments,optional"` // 附件 | ||
| 1136 | } | 1146 | } |
| 1137 | 1147 | ||
| 1138 | type MiniGetArticleBackupRequest struct { | 1148 | type MiniGetArticleBackupRequest struct { |
| @@ -1141,17 +1151,18 @@ type MiniGetArticleBackupRequest struct { | @@ -1141,17 +1151,18 @@ type MiniGetArticleBackupRequest struct { | ||
| 1141 | } | 1151 | } |
| 1142 | 1152 | ||
| 1143 | type MiniGetArticleBackupResponse struct { | 1153 | type MiniGetArticleBackupResponse struct { |
| 1144 | - Id int64 `json:"id"` | ||
| 1145 | - Title string `json:"title"` | ||
| 1146 | - Content string `json:"content"` | ||
| 1147 | - Images []string `json:"images"` | ||
| 1148 | - Videos []Video `json:"videos"` | ||
| 1149 | - ChangeField []string `json:"changeField"` | ||
| 1150 | - CreatedAt int64 `json:"createdAt"` | ||
| 1151 | - Location Location `json:"location"` | ||
| 1152 | - Action string `json:"action"` | ||
| 1153 | - Show int `json:"show"` | ||
| 1154 | - Cover string `json:"cover"` //封面 | 1154 | + Id int64 `json:"id"` |
| 1155 | + Title string `json:"title"` | ||
| 1156 | + Content string `json:"content"` | ||
| 1157 | + Images []string `json:"images"` | ||
| 1158 | + Videos []Video `json:"videos"` | ||
| 1159 | + ChangeField []string `json:"changeField"` | ||
| 1160 | + CreatedAt int64 `json:"createdAt"` | ||
| 1161 | + Location Location `json:"location"` | ||
| 1162 | + Action string `json:"action"` | ||
| 1163 | + Show int `json:"show"` | ||
| 1164 | + Cover string `json:"cover"` //封面 | ||
| 1165 | + Attachments []FileInfo `json:"attachments,optional"` // 附件 | ||
| 1155 | } | 1166 | } |
| 1156 | 1167 | ||
| 1157 | type MiniArticleMarkUserReadRequest struct { | 1168 | type MiniArticleMarkUserReadRequest struct { |
| @@ -1165,17 +1176,18 @@ type MiniArticleMarkUserReadResponse struct { | @@ -1165,17 +1176,18 @@ type MiniArticleMarkUserReadResponse struct { | ||
| 1165 | } | 1176 | } |
| 1166 | 1177 | ||
| 1167 | type MiniArticleDraftCreateRequest struct { | 1178 | type MiniArticleDraftCreateRequest struct { |
| 1168 | - CompanyId int64 `json:",optional"` | ||
| 1169 | - AuthorId int64 `json:",optional"` // 发布人 | ||
| 1170 | - Template int `json:"template"` // 使用哪个模板进行编辑 0、无 5、演绎式 3、归纳式 10、其他业务类型模板 | ||
| 1171 | - Section []string `json:"section,optional"` // 填写的内容 | ||
| 1172 | - Title string `json:"title"` // 标题 | ||
| 1173 | - Images []string `json:"images"` // 图片 | ||
| 1174 | - WhoRead []int64 `json:"whoRead"` // 谁可以看 | ||
| 1175 | - WhoReview []int64 `json:"whoReview"` // 评论人 | ||
| 1176 | - Location Location `json:"location"` // 坐标 | ||
| 1177 | - MatchUrl map[string]string `json:"matchUrl"` // 匹配文章内容中的url文本 | ||
| 1178 | - Paragraphs []Paragraph `json:"paragraphs,optional"` // 段落 | 1179 | + CompanyId int64 `json:",optional"` |
| 1180 | + AuthorId int64 `json:",optional"` // 发布人 | ||
| 1181 | + Template int `json:"template"` // 使用哪个模板进行编辑 0、无 5、演绎式 3、归纳式 10、其他业务类型模板 | ||
| 1182 | + Section []string `json:"section,optional"` // 填写的内容 | ||
| 1183 | + Title string `json:"title"` // 标题 | ||
| 1184 | + Images []string `json:"images"` // 图片 | ||
| 1185 | + WhoRead []int64 `json:"whoRead"` // 谁可以看 | ||
| 1186 | + WhoReview []int64 `json:"whoReview"` // 评论人 | ||
| 1187 | + Location Location `json:"location"` // 坐标 | ||
| 1188 | + MatchUrl map[string]string `json:"matchUrl"` // 匹配文章内容中的url文本 | ||
| 1189 | + Paragraphs []Paragraph `json:"paragraphs,optional"` // 段落 | ||
| 1190 | + Attachments []FileInfo `json:"attachments,optional"` // 附件 | ||
| 1179 | } | 1191 | } |
| 1180 | 1192 | ||
| 1181 | type MiniArticleDraftCreateResponse struct { | 1193 | type MiniArticleDraftCreateResponse struct { |
| @@ -1183,18 +1195,19 @@ type MiniArticleDraftCreateResponse struct { | @@ -1183,18 +1195,19 @@ type MiniArticleDraftCreateResponse struct { | ||
| 1183 | } | 1195 | } |
| 1184 | 1196 | ||
| 1185 | type MiniArticleDraftUpdateRequest struct { | 1197 | type MiniArticleDraftUpdateRequest struct { |
| 1186 | - Id int64 `json:"id"` | ||
| 1187 | - CompanyId int64 `json:",optional"` | ||
| 1188 | - AuthorId int64 `json:",optional"` // 发布人 | ||
| 1189 | - Template int `json:"template"` // 使用哪个模板进行编辑 0、无 1、演绎式 2、归纳式 | ||
| 1190 | - Section []string `json:"section,optional"` // 填写的内容 | ||
| 1191 | - Title string `json:"title"` // 标题 | ||
| 1192 | - Images []string `json:"images"` // 图片 | ||
| 1193 | - WhoRead []int64 `json:"whoRead"` // 谁可以看 | ||
| 1194 | - WhoReview []int64 `json:"whoReview"` // 评论人 | ||
| 1195 | - Location Location `json:"location"` // 坐标 | ||
| 1196 | - MatchUrl map[string]string `json:"matchUrl"` // 匹配文章内容中的url文本 | ||
| 1197 | - Paragraphs []Paragraph `json:"paragraphs,optional"` // 段落 | 1198 | + Id int64 `json:"id"` |
| 1199 | + CompanyId int64 `json:",optional"` | ||
| 1200 | + AuthorId int64 `json:",optional"` // 发布人 | ||
| 1201 | + Template int `json:"template"` // 使用哪个模板进行编辑 0、无 1、演绎式 2、归纳式 | ||
| 1202 | + Section []string `json:"section,optional"` // 填写的内容 | ||
| 1203 | + Title string `json:"title"` // 标题 | ||
| 1204 | + Images []string `json:"images"` // 图片 | ||
| 1205 | + WhoRead []int64 `json:"whoRead"` // 谁可以看 | ||
| 1206 | + WhoReview []int64 `json:"whoReview"` // 评论人 | ||
| 1207 | + Location Location `json:"location"` // 坐标 | ||
| 1208 | + MatchUrl map[string]string `json:"matchUrl"` // 匹配文章内容中的url文本 | ||
| 1209 | + Attachments []FileInfo `json:"attachments,optional"` // 附件 | ||
| 1210 | + Paragraphs []Paragraph `json:"paragraphs,optional"` // 段落 | ||
| 1198 | } | 1211 | } |
| 1199 | 1212 | ||
| 1200 | type MiniArticleDraftUpdateResponse struct { | 1213 | type MiniArticleDraftUpdateResponse struct { |
| @@ -1214,15 +1227,16 @@ type MiniArticleDraftSearchMeResponse struct { | @@ -1214,15 +1227,16 @@ type MiniArticleDraftSearchMeResponse struct { | ||
| 1214 | } | 1227 | } |
| 1215 | 1228 | ||
| 1216 | type MiniArticleDraftItem struct { | 1229 | type MiniArticleDraftItem struct { |
| 1217 | - Id int64 `json:"id"` | ||
| 1218 | - Template int `json:"template"` // 使用哪个模板进行编辑 0、无 1、演绎式 2、归纳式 | ||
| 1219 | - Section []string `json:"section,optional"` // 填写的内容 | ||
| 1220 | - Title string `json:"title"` // 标题 | ||
| 1221 | - Images []string `json:"images"` // 图片 | ||
| 1222 | - CreatedAt int64 `json:"createdAt"` // | ||
| 1223 | - MatchUrl map[string]string `json:"matchUrl"` //匹配内容中的url文本 | ||
| 1224 | - Paragraphs []Paragraph `json:"paragraphs,optional"` // 段落 | ||
| 1225 | - Cover string `json:"cover"` //封面 | 1230 | + Id int64 `json:"id"` |
| 1231 | + Template int `json:"template"` // 使用哪个模板进行编辑 0、无 1、演绎式 2、归纳式 | ||
| 1232 | + Section []string `json:"section,optional"` // 填写的内容 | ||
| 1233 | + Title string `json:"title"` // 标题 | ||
| 1234 | + Images []string `json:"images"` // 图片 | ||
| 1235 | + CreatedAt int64 `json:"createdAt"` // | ||
| 1236 | + MatchUrl map[string]string `json:"matchUrl"` //匹配内容中的url文本 | ||
| 1237 | + Paragraphs []Paragraph `json:"paragraphs,optional"` // 段落 | ||
| 1238 | + Cover string `json:"cover"` //封面 | ||
| 1239 | + Attachments []FileInfo `json:"attachments,optional"` // 附件 | ||
| 1226 | } | 1240 | } |
| 1227 | 1241 | ||
| 1228 | type MiniArticleDraftGetMeRequest struct { | 1242 | type MiniArticleDraftGetMeRequest struct { |
| @@ -1232,17 +1246,18 @@ type MiniArticleDraftGetMeRequest struct { | @@ -1232,17 +1246,18 @@ type MiniArticleDraftGetMeRequest struct { | ||
| 1232 | } | 1246 | } |
| 1233 | 1247 | ||
| 1234 | type MiniArticleDraftGetMeResponse struct { | 1248 | type MiniArticleDraftGetMeResponse struct { |
| 1235 | - Id int64 `json:"id"` // | ||
| 1236 | - Template int `json:"template"` // 使用哪个模板进行编辑 0、无 1、演绎式 2、归纳式 | ||
| 1237 | - Section []string `json:"section"` // 填写的内容 | ||
| 1238 | - Title string `json:"title"` // 标题 | ||
| 1239 | - Images []string `json:"images"` // 图片 | ||
| 1240 | - WhoRead []int64 `json:"whoRead"` // 谁可以看 | ||
| 1241 | - WhoReview []int64 `json:"whoReview"` // 评论人 | ||
| 1242 | - Location Location `json:"location"` // 坐标 | ||
| 1243 | - MatchUrl map[string]string `json:"matchUrl"` // | ||
| 1244 | - Paragraphs []Paragraph `json:"paragraphs,optional"` // 段落 | ||
| 1245 | - Cover string `json:"cover"` //封面 | 1249 | + Id int64 `json:"id"` // |
| 1250 | + Template int `json:"template"` // 使用哪个模板进行编辑 0、无 1、演绎式 2、归纳式 | ||
| 1251 | + Section []string `json:"section"` // 填写的内容 | ||
| 1252 | + Title string `json:"title"` // 标题 | ||
| 1253 | + Images []string `json:"images"` // 图片 | ||
| 1254 | + WhoRead []int64 `json:"whoRead"` // 谁可以看 | ||
| 1255 | + WhoReview []int64 `json:"whoReview"` // 评论人 | ||
| 1256 | + Location Location `json:"location"` // 坐标 | ||
| 1257 | + MatchUrl map[string]string `json:"matchUrl"` // | ||
| 1258 | + Paragraphs []Paragraph `json:"paragraphs,optional"` // 段落 | ||
| 1259 | + Cover string `json:"cover"` //封面 | ||
| 1260 | + Attachments []FileInfo `json:"attachments,optional"` // 附件 | ||
| 1246 | } | 1261 | } |
| 1247 | 1262 | ||
| 1248 | type MiniArticleDraftDeleteMeRequest struct { | 1263 | type MiniArticleDraftDeleteMeRequest struct { |
| @@ -1319,26 +1334,27 @@ type UserShowName struct { | @@ -1319,26 +1334,27 @@ type UserShowName struct { | ||
| 1319 | } | 1334 | } |
| 1320 | 1335 | ||
| 1321 | type SystemArticleGetResponse struct { | 1336 | type SystemArticleGetResponse struct { |
| 1322 | - Id int64 `json:"id"` // id | ||
| 1323 | - Title string `json:"title"` // 标题 | ||
| 1324 | - AuthorId int64 `json:"authorId"` // 发布人id | ||
| 1325 | - Author ArticleAuthor `json:"author"` // 发布人 | ||
| 1326 | - CreatedAt int64 `json:"createdAt"` // 文章的发布时间 | ||
| 1327 | - Section []ArticleSection `json:"section"` // 文章的文本内容 | ||
| 1328 | - Images []string `json:"images"` // 图片 | ||
| 1329 | - Videos []Video `json:"videos"` // 视频 | ||
| 1330 | - WhoRead []int64 `json:"whoRead"` // 谁可查看 | ||
| 1331 | - WhoReadInfo []UserShowName `json:"whoReadInfo"` // 谁可查看 | ||
| 1332 | - WhoReview []int64 `json:"whoReview"` // 谁可评论 | ||
| 1333 | - WhoReviewInfo []UserShowName `json:"whoReviewInfo"` // 谁可评论 | ||
| 1334 | - Location Location `json:"location"` // 定位坐标 | ||
| 1335 | - CountLove int `json:"countLove"` // 点赞数量 | ||
| 1336 | - CountComment int `json:"countComment"` // 评论数量 | ||
| 1337 | - CountRead int `json:"countRead"` // 浏览数量 | ||
| 1338 | - Show int `json:"show"` // 评论的展示状态(0显示、1不显示) | ||
| 1339 | - Tags []ArticleTagItem `json:"tags"` //标签 | ||
| 1340 | - TargetUser int `json:"targetUser"` //分发方式 [0分发给所有人、1分发给指定的人] | ||
| 1341 | - Cover string `json:"cover"` //封面 | 1337 | + Id int64 `json:"id"` // id |
| 1338 | + Title string `json:"title"` // 标题 | ||
| 1339 | + AuthorId int64 `json:"authorId"` // 发布人id | ||
| 1340 | + Author ArticleAuthor `json:"author"` // 发布人 | ||
| 1341 | + CreatedAt int64 `json:"createdAt"` // 文章的发布时间 | ||
| 1342 | + Section []ArticleSection `json:"section"` // 文章的文本内容 | ||
| 1343 | + Images []string `json:"images"` // 图片 | ||
| 1344 | + Videos []Video `json:"videos"` // 视频 | ||
| 1345 | + WhoRead []int64 `json:"whoRead"` // 谁可查看 | ||
| 1346 | + WhoReadInfo []UserShowName `json:"whoReadInfo"` // 谁可查看 | ||
| 1347 | + WhoReview []int64 `json:"whoReview"` // 谁可评论 | ||
| 1348 | + WhoReviewInfo []UserShowName `json:"whoReviewInfo"` // 谁可评论 | ||
| 1349 | + Location Location `json:"location"` // 定位坐标 | ||
| 1350 | + CountLove int `json:"countLove"` // 点赞数量 | ||
| 1351 | + CountComment int `json:"countComment"` // 评论数量 | ||
| 1352 | + CountRead int `json:"countRead"` // 浏览数量 | ||
| 1353 | + Show int `json:"show"` // 评论的展示状态(0显示、1不显示) | ||
| 1354 | + Tags []ArticleTagItem `json:"tags"` //标签 | ||
| 1355 | + TargetUser int `json:"targetUser"` //分发方式 [0分发给所有人、1分发给指定的人] | ||
| 1356 | + Cover string `json:"cover"` //封面 | ||
| 1357 | + Attachments []FileInfo `json:"attachments,optional"` // 附件 | ||
| 1342 | } | 1358 | } |
| 1343 | 1359 | ||
| 1344 | type SystemArticleSearchRequest struct { | 1360 | type SystemArticleSearchRequest struct { |
| @@ -1359,36 +1375,38 @@ type SystemArticleSearchResponse struct { | @@ -1359,36 +1375,38 @@ type SystemArticleSearchResponse struct { | ||
| 1359 | } | 1375 | } |
| 1360 | 1376 | ||
| 1361 | type SystemArticleSearch struct { | 1377 | type SystemArticleSearch struct { |
| 1362 | - Id int64 `json:"id"` //id | ||
| 1363 | - Title string `json:"title"` //标题 | ||
| 1364 | - AuthorId int64 `json:"authorId"` //发布人ID | ||
| 1365 | - Author string `json:"author"` //发布人 | ||
| 1366 | - Cover string `json:"cover"` //封面 | ||
| 1367 | - Images []string `json:"images"` //图片 | ||
| 1368 | - CreatedAt int64 `json:"createdAt"` //文章的创建日期 | ||
| 1369 | - UpdatedAt int64 `json:"updatedAt"` //文章的编辑日期 | ||
| 1370 | - CountLove int `json:"countLove"` //点赞数量 | ||
| 1371 | - CountComment int `json:"countComment"` //评论数量 | ||
| 1372 | - Show int `json:"show"` //是否隐藏 [0显示、1不显示] | ||
| 1373 | - Tags []string `json:"tags"` //标签 | ||
| 1374 | - TargetUser int `json:"targetUser"` //分发方式 [0分发给所有人、1分发给指定的人] | ||
| 1375 | - Operator Operator `json:"operator"` //运营操作人 | ||
| 1376 | - Source int `json:"source"` //来源[1用户发布、2运营发布] | 1378 | + Id int64 `json:"id"` //id |
| 1379 | + Title string `json:"title"` //标题 | ||
| 1380 | + AuthorId int64 `json:"authorId"` //发布人ID | ||
| 1381 | + Author string `json:"author"` //发布人 | ||
| 1382 | + Cover string `json:"cover"` //封面 | ||
| 1383 | + Images []string `json:"images"` //图片 | ||
| 1384 | + CreatedAt int64 `json:"createdAt"` //文章的创建日期 | ||
| 1385 | + UpdatedAt int64 `json:"updatedAt"` //文章的编辑日期 | ||
| 1386 | + CountLove int `json:"countLove"` //点赞数量 | ||
| 1387 | + CountComment int `json:"countComment"` //评论数量 | ||
| 1388 | + Show int `json:"show"` //是否隐藏 [0显示、1不显示] | ||
| 1389 | + Tags []string `json:"tags"` //标签 | ||
| 1390 | + TargetUser int `json:"targetUser"` //分发方式 [0分发给所有人、1分发给指定的人] | ||
| 1391 | + Operator Operator `json:"operator"` //运营操作人 | ||
| 1392 | + Source int `json:"source"` //来源[1用户发布、2运营发布] | ||
| 1393 | + Attachments []FileInfo `json:"attachments,optional"` // 附件 | ||
| 1377 | } | 1394 | } |
| 1378 | 1395 | ||
| 1379 | type SystemArticleUpdateRequest struct { | 1396 | type SystemArticleUpdateRequest struct { |
| 1380 | Id int64 `json:"id"` | 1397 | Id int64 `json:"id"` |
| 1381 | CompanyId int64 `json:"companyId,optional"` | 1398 | CompanyId int64 `json:"companyId,optional"` |
| 1382 | - Template int `json:"template,optional"` // 使用哪个模板进行编辑 0、无 1、演绎式 2、归纳式 | ||
| 1383 | - Section []ArticleSection `json:"section,optional"` // 填写的内容 | ||
| 1384 | - Title string `json:"title"` // 标题 | ||
| 1385 | - Images []string `json:"images,optional"` // 图片 | ||
| 1386 | - Videos []Video `json:"video"` // 视频 | ||
| 1387 | - WhoRead []int64 `json:"whoRead"` // 谁可以看 | ||
| 1388 | - WhoReview []int64 `json:"whoReview"` // 评论人 | ||
| 1389 | - TargetUser int `json:"targetUser"` // 分发方式 [0分发给所有人、1分发给指定的人] | ||
| 1390 | - Tags []int64 `json:"tags"` // 标签 | ||
| 1391 | - AccessToken string `header:"x-mmm-accesstoken"` // 授权token | 1399 | + Template int `json:"template,optional"` // 使用哪个模板进行编辑 0、无 1、演绎式 2、归纳式 |
| 1400 | + Section []ArticleSection `json:"section,optional"` // 填写的内容 | ||
| 1401 | + Title string `json:"title"` // 标题 | ||
| 1402 | + Images []string `json:"images,optional"` // 图片 | ||
| 1403 | + Videos []Video `json:"video"` // 视频 | ||
| 1404 | + WhoRead []int64 `json:"whoRead"` // 谁可以看 | ||
| 1405 | + WhoReview []int64 `json:"whoReview"` // 评论人 | ||
| 1406 | + TargetUser int `json:"targetUser"` // 分发方式 [0分发给所有人、1分发给指定的人] | ||
| 1407 | + Tags []int64 `json:"tags"` // 标签 | ||
| 1408 | + AccessToken string `header:"x-mmm-accesstoken"` // 授权token | ||
| 1409 | + Attachments []FileInfo `json:"attachments,optional"` // 附件 | ||
| 1392 | } | 1410 | } |
| 1393 | 1411 | ||
| 1394 | type SystemArticleUpdateResponse struct { | 1412 | type SystemArticleUpdateResponse struct { |
| @@ -1406,18 +1424,19 @@ type SystemArticleUpdateResponse struct { | @@ -1406,18 +1424,19 @@ type SystemArticleUpdateResponse struct { | ||
| 1406 | } | 1424 | } |
| 1407 | 1425 | ||
| 1408 | type SystemArticleCreateRequest struct { | 1426 | type SystemArticleCreateRequest struct { |
| 1409 | - Title string `json:"title"` //标题 | ||
| 1410 | - Content string `json:"content"` //文章的文本内容 | ||
| 1411 | - AuthorId int64 `json:"authorId"` //发布人id | ||
| 1412 | - Images []string `json:"images,optional"` //图片 | ||
| 1413 | - Videos []Video `json:"video,optional"` // 视频 | ||
| 1414 | - TargetUser int `json:"targetUser"` // 分发方式 [0分发给所有人、1分发给指定的人] | ||
| 1415 | - WhoRead []int64 `json:"whoRead,optional"` //谁可查看 | ||
| 1416 | - WhoReview []int64 `json:"whoReview,optional"` //谁可评论 | ||
| 1417 | - MatchUrl map[string]string `json:"matchUrl,optional"` // 匹配文章内容中的url文本 | ||
| 1418 | - ArticleDraftId int64 `json:"articleDraftId"` // 草稿ID | ||
| 1419 | - AccessToken string `header:"x-mmm-accesstoken"` // 授权token | ||
| 1420 | - Paragraphs []Paragraph `json:"paragraphs,optional"` // 段落 | 1427 | + Title string `json:"title"` //标题 |
| 1428 | + Content string `json:"content"` //文章的文本内容 | ||
| 1429 | + AuthorId int64 `json:"authorId"` //发布人id | ||
| 1430 | + Images []string `json:"images,optional"` //图片 | ||
| 1431 | + Videos []Video `json:"video,optional"` // 视频 | ||
| 1432 | + TargetUser int `json:"targetUser"` // 分发方式 [0分发给所有人、1分发给指定的人] | ||
| 1433 | + WhoRead []int64 `json:"whoRead,optional"` //谁可查看 | ||
| 1434 | + WhoReview []int64 `json:"whoReview,optional"` //谁可评论 | ||
| 1435 | + MatchUrl map[string]string `json:"matchUrl,optional"` // 匹配文章内容中的url文本 | ||
| 1436 | + ArticleDraftId int64 `json:"articleDraftId"` // 草稿ID | ||
| 1437 | + AccessToken string `header:"x-mmm-accesstoken"` // 授权token | ||
| 1438 | + Attachments []FileInfo `json:"attachments,optional"` // 附件 | ||
| 1439 | + Paragraphs []Paragraph `json:"paragraphs,optional"` // 段落 | ||
| 1421 | } | 1440 | } |
| 1422 | 1441 | ||
| 1423 | type SystemArticleCreateResponse struct { | 1442 | type SystemArticleCreateResponse struct { |
| @@ -1478,14 +1497,15 @@ type SystemArticleGetHistoryResponse struct { | @@ -1478,14 +1497,15 @@ type SystemArticleGetHistoryResponse struct { | ||
| 1478 | Section []ArticleSection `json:"section"` // 文章的文本内容 | 1497 | Section []ArticleSection `json:"section"` // 文章的文本内容 |
| 1479 | Images []string `json:"images"` // 图片 | 1498 | Images []string `json:"images"` // 图片 |
| 1480 | Videos []Video `json:"video"` | 1499 | Videos []Video `json:"video"` |
| 1481 | - WhoRead []int64 `json:"whoRead"` // 谁可查看 | ||
| 1482 | - WhoReadInfo []UserShowName `json:"whoReadInfo"` // 谁可查看 | ||
| 1483 | - WhoReview []int64 `json:"whoReview"` // 谁可评论 | ||
| 1484 | - WhoReviewInfo []UserShowName `json:"whoReviewInfo"` // 谁可评论 | ||
| 1485 | - Location Location `json:"location"` // 定位坐标 | ||
| 1486 | - TargetUser int `json:"targetUser"` // 分发方式 [0分发给所有人、1分发给指定的人] | ||
| 1487 | - Tags []int64 `json:"tags"` // 标签 | ||
| 1488 | - Cover string `json:"cover"` //封面 | 1500 | + WhoRead []int64 `json:"whoRead"` // 谁可查看 |
| 1501 | + WhoReadInfo []UserShowName `json:"whoReadInfo"` // 谁可查看 | ||
| 1502 | + WhoReview []int64 `json:"whoReview"` // 谁可评论 | ||
| 1503 | + WhoReviewInfo []UserShowName `json:"whoReviewInfo"` // 谁可评论 | ||
| 1504 | + Location Location `json:"location"` // 定位坐标 | ||
| 1505 | + TargetUser int `json:"targetUser"` // 分发方式 [0分发给所有人、1分发给指定的人] | ||
| 1506 | + Tags []int64 `json:"tags"` // 标签 | ||
| 1507 | + Cover string `json:"cover"` //封面 | ||
| 1508 | + Attachments []FileInfo `json:"attachments,optional"` // 附件 | ||
| 1489 | } | 1509 | } |
| 1490 | 1510 | ||
| 1491 | type SystemArticleRestoreRequest struct { | 1511 | type SystemArticleRestoreRequest struct { |
| @@ -1537,30 +1557,32 @@ type MiniSearchArticleResponse struct { | @@ -1537,30 +1557,32 @@ type MiniSearchArticleResponse struct { | ||
| 1537 | } | 1557 | } |
| 1538 | 1558 | ||
| 1539 | type MiniSearchArticleItem struct { | 1559 | type MiniSearchArticleItem struct { |
| 1540 | - ArticleId int64 `json:"articleId"` | ||
| 1541 | - Title string `json:"title"` | ||
| 1542 | - AuthorId int64 `json:"authorId"` | ||
| 1543 | - Author string `json:"author"` // 发布人 | ||
| 1544 | - Avatar string `json:"avatar"` // 发布人的头像 | ||
| 1545 | - Images []string `json:"images"` | ||
| 1546 | - CreatedAt int64 `json:"createdAt"` | ||
| 1547 | - MeReadFlag int `json:"meReadFlag"` //已读标识 [0:未读] [1:已读] | ||
| 1548 | - Cover string `json:"cover"` //封面 | 1560 | + ArticleId int64 `json:"articleId"` |
| 1561 | + Title string `json:"title"` | ||
| 1562 | + AuthorId int64 `json:"authorId"` | ||
| 1563 | + Author string `json:"author"` // 发布人 | ||
| 1564 | + Avatar string `json:"avatar"` // 发布人的头像 | ||
| 1565 | + Images []string `json:"images"` | ||
| 1566 | + CreatedAt int64 `json:"createdAt"` | ||
| 1567 | + MeReadFlag int `json:"meReadFlag"` //已读标识 [0:未读] [1:已读] | ||
| 1568 | + Cover string `json:"cover"` //封面 | ||
| 1569 | + Attachments []FileInfo `json:"attachments,optional"` // 附件 | ||
| 1549 | } | 1570 | } |
| 1550 | 1571 | ||
| 1551 | type SystemArticleDraftCreateRequest struct { | 1572 | type SystemArticleDraftCreateRequest struct { |
| 1552 | - Title string `json:"title"` //标题 | ||
| 1553 | - Content string `json:"content"` //文章的文本内容 | ||
| 1554 | - AuthorId int64 `json:"authorId"` //发布人id | ||
| 1555 | - Images []string `json:"images,optional"` //图片 | ||
| 1556 | - Videos []Video `json:"video,optional"` // 视频 | ||
| 1557 | - TargetUser int `json:"targetUser"` // 分发方式 [0分发给所有人、1分发给指定的人] | ||
| 1558 | - WhoRead []int64 `json:"whoRead,optional"` //谁可查看 | ||
| 1559 | - WhoReview []int64 `json:"whoReview,optional"` //谁可评论 | ||
| 1560 | - MatchUrl map[string]string `json:"matchUrl,optional"` // 匹配文章内容中的url文本 | ||
| 1561 | - Tags []int64 `json:"tags"` // 标签 | ||
| 1562 | - AccessToken string `header:"x-mmm-accesstoken"` // 授权token | ||
| 1563 | - Paragraphs []Paragraph `json:"paragraphs,optional"` // 段落 | 1573 | + Title string `json:"title"` //标题 |
| 1574 | + Content string `json:"content"` //文章的文本内容 | ||
| 1575 | + AuthorId int64 `json:"authorId"` //发布人id | ||
| 1576 | + Images []string `json:"images,optional"` //图片 | ||
| 1577 | + Videos []Video `json:"video,optional"` // 视频 | ||
| 1578 | + TargetUser int `json:"targetUser"` // 分发方式 [0分发给所有人、1分发给指定的人] | ||
| 1579 | + WhoRead []int64 `json:"whoRead,optional"` //谁可查看 | ||
| 1580 | + WhoReview []int64 `json:"whoReview,optional"` //谁可评论 | ||
| 1581 | + MatchUrl map[string]string `json:"matchUrl,optional"` // 匹配文章内容中的url文本 | ||
| 1582 | + Tags []int64 `json:"tags"` // 标签 | ||
| 1583 | + AccessToken string `header:"x-mmm-accesstoken"` // 授权token | ||
| 1584 | + Paragraphs []Paragraph `json:"paragraphs,optional"` // 段落 | ||
| 1585 | + Attachments []FileInfo `json:"attachments,optional"` // 附件 | ||
| 1564 | } | 1586 | } |
| 1565 | 1587 | ||
| 1566 | type SystemArticleDraftCreateResponse struct { | 1588 | type SystemArticleDraftCreateResponse struct { |
| @@ -1578,19 +1600,20 @@ type SystemArticleDraftCreateResponse struct { | @@ -1578,19 +1600,20 @@ type SystemArticleDraftCreateResponse struct { | ||
| 1578 | } | 1600 | } |
| 1579 | 1601 | ||
| 1580 | type SystemArticleDraftUpdateRequest struct { | 1602 | type SystemArticleDraftUpdateRequest struct { |
| 1581 | - Id int64 `json:"id"` // ID | ||
| 1582 | - Title string `json:"title"` //标题 | ||
| 1583 | - Content string `json:"content"` //文章的文本内容 | ||
| 1584 | - AuthorId int64 `json:"authorId"` //发布人id | ||
| 1585 | - Images []string `json:"images,optional"` //图片 | ||
| 1586 | - Videos []Video `json:"video,optional"` // 视频 | ||
| 1587 | - TargetUser int `json:"targetUser"` // 分发方式 [0分发给所有人、1分发给指定的人] | ||
| 1588 | - WhoRead []int64 `json:"whoRead,optional"` //谁可查看 | ||
| 1589 | - WhoReview []int64 `json:"whoReview,optional"` //谁可评论 | ||
| 1590 | - MatchUrl map[string]string `json:"matchUrl,optional"` // 匹配文章内容中的url文本 | ||
| 1591 | - Tags []int64 `json:"tags"` // 标签 | ||
| 1592 | - AccessToken string `header:"x-mmm-accesstoken"` // 授权token | ||
| 1593 | - Paragraphs []Paragraph `json:"paragraphs,optional"` // 段落 | 1603 | + Id int64 `json:"id"` // ID |
| 1604 | + Title string `json:"title"` //标题 | ||
| 1605 | + Content string `json:"content"` //文章的文本内容 | ||
| 1606 | + AuthorId int64 `json:"authorId"` //发布人id | ||
| 1607 | + Images []string `json:"images,optional"` //图片 | ||
| 1608 | + Videos []Video `json:"video,optional"` // 视频 | ||
| 1609 | + TargetUser int `json:"targetUser"` // 分发方式 [0分发给所有人、1分发给指定的人] | ||
| 1610 | + WhoRead []int64 `json:"whoRead,optional"` //谁可查看 | ||
| 1611 | + WhoReview []int64 `json:"whoReview,optional"` //谁可评论 | ||
| 1612 | + MatchUrl map[string]string `json:"matchUrl,optional"` // 匹配文章内容中的url文本 | ||
| 1613 | + Tags []int64 `json:"tags"` // 标签 | ||
| 1614 | + AccessToken string `header:"x-mmm-accesstoken"` // 授权token | ||
| 1615 | + Paragraphs []Paragraph `json:"paragraphs,optional"` // 段落 | ||
| 1616 | + Attachments []FileInfo `json:"attachments,optional"` // 附件 | ||
| 1594 | } | 1617 | } |
| 1595 | 1618 | ||
| 1596 | type SystemArticleDraftUpdateResponse struct { | 1619 | type SystemArticleDraftUpdateResponse struct { |
| @@ -1623,14 +1646,15 @@ type SystemArticleDraftSearchResponse struct { | @@ -1623,14 +1646,15 @@ type SystemArticleDraftSearchResponse struct { | ||
| 1623 | } | 1646 | } |
| 1624 | 1647 | ||
| 1625 | type SystemArticleDraftSearch struct { | 1648 | type SystemArticleDraftSearch struct { |
| 1626 | - Id int64 `json:"id"` //ID | ||
| 1627 | - Title string `json:"title"` //标题 | ||
| 1628 | - Images []string `json:"images"` //图片 | ||
| 1629 | - Operator string `json:"operator"` //操作人 | ||
| 1630 | - AuthorId int64 `json:"authorId"` //发布人id | ||
| 1631 | - Author string `json:"author"` //发布人 | ||
| 1632 | - UpdatedAt int64 `json:"updatedAt"` //编辑时间 | ||
| 1633 | - Cover string `json:"cover"` //封面 | 1649 | + Id int64 `json:"id"` //ID |
| 1650 | + Title string `json:"title"` //标题 | ||
| 1651 | + Images []string `json:"images"` //图片 | ||
| 1652 | + Operator string `json:"operator"` //操作人 | ||
| 1653 | + AuthorId int64 `json:"authorId"` //发布人id | ||
| 1654 | + Author string `json:"author"` //发布人 | ||
| 1655 | + UpdatedAt int64 `json:"updatedAt"` //编辑时间 | ||
| 1656 | + Cover string `json:"cover"` //封面 | ||
| 1657 | + Attachments []FileInfo `json:"attachments,optional"` // 附件 | ||
| 1634 | } | 1658 | } |
| 1635 | 1659 | ||
| 1636 | type SystemArticleDraftDeleteRequest struct { | 1660 | type SystemArticleDraftDeleteRequest struct { |
| @@ -1657,21 +1681,22 @@ type SystemArticleDraftGetRequest struct { | @@ -1657,21 +1681,22 @@ type SystemArticleDraftGetRequest struct { | ||
| 1657 | } | 1681 | } |
| 1658 | 1682 | ||
| 1659 | type SystemArticleDraftGetResponse struct { | 1683 | type SystemArticleDraftGetResponse struct { |
| 1660 | - Id int64 `json:"id"` //ID | ||
| 1661 | - Title string `json:"title"` //标题 | ||
| 1662 | - Content string `json:"content"` //文章的文本内容 | ||
| 1663 | - AuthorId int64 `json:"authorId"` //发布人id | ||
| 1664 | - Images []string `json:"images,optional"` //图片 | ||
| 1665 | - Videos []Video `json:"video,optional"` // 视频 | ||
| 1666 | - TargetUser int `json:"targetUser"` // 分发方式 [0分发给所有人、1分发给指定的人] | ||
| 1667 | - WhoRead []int64 `json:"whoRead,optional"` //谁可查看 | ||
| 1668 | - WhoReadInfo []UserShowName `json:"whoReadInfo"` // 谁可查看 | ||
| 1669 | - WhoReview []int64 `json:"whoReview,optional"` //谁可评论 | ||
| 1670 | - WhoReviewInfo []UserShowName `json:"whoReviewInfo"` // 谁可评论 | ||
| 1671 | - MatchUrl map[string]string `json:"matchUrl,optional"` // 匹配文章内容中的url文本 | ||
| 1672 | - Tags []int64 `json:"tags"` // 标签 | ||
| 1673 | - Paragraphs []Paragraph `json:"paragraphs,optional"` // 段落 | ||
| 1674 | - Cover string `json:"cover"` //封面 | 1684 | + Id int64 `json:"id"` //ID |
| 1685 | + Title string `json:"title"` //标题 | ||
| 1686 | + Content string `json:"content"` //文章的文本内容 | ||
| 1687 | + AuthorId int64 `json:"authorId"` //发布人id | ||
| 1688 | + Images []string `json:"images,optional"` //图片 | ||
| 1689 | + Videos []Video `json:"video,optional"` // 视频 | ||
| 1690 | + TargetUser int `json:"targetUser"` // 分发方式 [0分发给所有人、1分发给指定的人] | ||
| 1691 | + WhoRead []int64 `json:"whoRead,optional"` //谁可查看 | ||
| 1692 | + WhoReadInfo []UserShowName `json:"whoReadInfo"` // 谁可查看 | ||
| 1693 | + WhoReview []int64 `json:"whoReview,optional"` //谁可评论 | ||
| 1694 | + WhoReviewInfo []UserShowName `json:"whoReviewInfo"` // 谁可评论 | ||
| 1695 | + MatchUrl map[string]string `json:"matchUrl,optional"` // 匹配文章内容中的url文本 | ||
| 1696 | + Tags []int64 `json:"tags"` // 标签 | ||
| 1697 | + Paragraphs []Paragraph `json:"paragraphs,optional"` // 段落 | ||
| 1698 | + Cover string `json:"cover"` //封面 | ||
| 1699 | + Attachments []FileInfo `json:"attachments,optional"` // 附件 | ||
| 1675 | } | 1700 | } |
| 1676 | 1701 | ||
| 1677 | type SystemArticleSearchDeletedRequest struct { | 1702 | type SystemArticleSearchDeletedRequest struct { |
| @@ -36,6 +36,7 @@ type Article struct { | @@ -36,6 +36,7 @@ type Article struct { | ||
| 36 | Operator domain.Operator `gorm:"type:jsonb;serializer:json"` // 运营操作人 | 36 | Operator domain.Operator `gorm:"type:jsonb;serializer:json"` // 运营操作人 |
| 37 | DeletedType int `json:"deletedType"` // 删除类型 1-运营删除 2-用户删除 | 37 | DeletedType int `json:"deletedType"` // 删除类型 1-运营删除 2-用户删除 |
| 38 | Cover string | 38 | Cover string |
| 39 | + Attachments []domain.FileInfo `gorm:"type:jsonb;serializer:json"` | ||
| 39 | } | 40 | } |
| 40 | 41 | ||
| 41 | func (m *Article) TableName() string { | 42 | func (m *Article) TableName() string { |
| @@ -32,6 +32,7 @@ type ArticleBackup struct { | @@ -32,6 +32,7 @@ type ArticleBackup struct { | ||
| 32 | TargetUser int // 分发方式 0 分发给所有人 1 分发给指定的人 | 32 | TargetUser int // 分发方式 0 分发给所有人 1 分发给指定的人 |
| 33 | MatchUrl map[string]string `gorm:"type:jsonb;serializer:json"` // 匹配文章内容中的url文本 | 33 | MatchUrl map[string]string `gorm:"type:jsonb;serializer:json"` // 匹配文章内容中的url文本 |
| 34 | Show int | 34 | Show int |
| 35 | + Attachments []domain.FileInfo `gorm:"type:jsonb;serializer:json"` | ||
| 35 | } | 36 | } |
| 36 | 37 | ||
| 37 | func (m *ArticleBackup) TableName() string { | 38 | func (m *ArticleBackup) TableName() string { |
| @@ -10,24 +10,24 @@ import ( | @@ -10,24 +10,24 @@ import ( | ||
| 10 | ) | 10 | ) |
| 11 | 11 | ||
| 12 | type ArticleDraft struct { | 12 | type ArticleDraft struct { |
| 13 | - Id int64 `gorm:"primaryKey"` // 唯一标识 | ||
| 14 | - CompanyId int64 | ||
| 15 | - CreatedAt int64 | ||
| 16 | - UpdatedAt int64 | ||
| 17 | - IsDel soft_delete.DeletedAt `gorm:"softDelete:flag,DeletedAtField:DeletedAt"` | ||
| 18 | - DeletedAt int64 | ||
| 19 | - Version int | ||
| 20 | - Template int // 填写内容时用的样板0、无 1、演绎式 2、归纳式 | ||
| 21 | - Content []string `gorm:"type:jsonb;serializer:json"` // 文章内容 | ||
| 22 | - AuthorId int64 // 发布人 | ||
| 23 | - Title string // 文章标题 | ||
| 24 | - Images []domain.Image `gorm:"type:jsonb;serializer:json"` // 图片 | ||
| 25 | - WhoRead []int64 `gorm:"type:jsonb;serializer:json"` // 谁可以看 | ||
| 26 | - WhoReview []int64 `gorm:"type:jsonb;serializer:json"` // 评论人 | ||
| 27 | - Location domain.Location `gorm:"type:jsonb;serializer:json"` // 坐标 | ||
| 28 | - MatchUrl map[string]string `gorm:"type:jsonb;serializer:json"` // 匹配文章内容中的url文本 | ||
| 29 | - | ||
| 30 | - Section []*domain.ArticleSection `gorm:"type:jsonb;serializer:json"` | 13 | + Id int64 `gorm:"primaryKey"` // 唯一标识 |
| 14 | + CompanyId int64 | ||
| 15 | + CreatedAt int64 | ||
| 16 | + UpdatedAt int64 | ||
| 17 | + IsDel soft_delete.DeletedAt `gorm:"softDelete:flag,DeletedAtField:DeletedAt"` | ||
| 18 | + DeletedAt int64 | ||
| 19 | + Version int | ||
| 20 | + Template int // 填写内容时用的样板0、无 1、演绎式 2、归纳式 | ||
| 21 | + Content []string `gorm:"type:jsonb;serializer:json"` // 文章内容 | ||
| 22 | + AuthorId int64 // 发布人 | ||
| 23 | + Title string // 文章标题 | ||
| 24 | + Images []domain.Image `gorm:"type:jsonb;serializer:json"` // 图片 | ||
| 25 | + WhoRead []int64 `gorm:"type:jsonb;serializer:json"` // 谁可以看 | ||
| 26 | + WhoReview []int64 `gorm:"type:jsonb;serializer:json"` // 评论人 | ||
| 27 | + Location domain.Location `gorm:"type:jsonb;serializer:json"` // 坐标 | ||
| 28 | + MatchUrl map[string]string `gorm:"type:jsonb;serializer:json"` // 匹配文章内容中的url文本 | ||
| 29 | + Attachments []domain.FileInfo `gorm:"type:jsonb;serializer:json"` | ||
| 30 | + Section []*domain.ArticleSection `gorm:"type:jsonb;serializer:json"` | ||
| 31 | } | 31 | } |
| 32 | 32 | ||
| 33 | func (m *ArticleDraft) TableName() string { | 33 | func (m *ArticleDraft) TableName() string { |
| @@ -10,27 +10,27 @@ import ( | @@ -10,27 +10,27 @@ import ( | ||
| 10 | 10 | ||
| 11 | // ArticleDraftOperation 运营草稿 | 11 | // ArticleDraftOperation 运营草稿 |
| 12 | type ArticleDraftOperation struct { | 12 | type ArticleDraftOperation struct { |
| 13 | - Id int64 `gorm:"primaryKey"` // 唯一标识 | ||
| 14 | - CompanyId int64 `gorm:"comment:公司ID"` // 公司ID | ||
| 15 | - AuthorId int64 `gorm:"comment:发布人ID"` // 发布人 | ||
| 16 | - Title string `gorm:"comment:标题"` // 文章标题 | ||
| 17 | - Content string `json:"content"` // 文章内容 | ||
| 18 | - Images []domain.Image `gorm:"type:jsonb;serializer:json"` // 图片 | ||
| 19 | - Videos []domain.Video `gorm:"type:jsonb;serializer:json"` // 视频 | ||
| 20 | - TargetUser domain.ArticleTarget `gorm:"comment:分发方式 0所有人 1指定人"` // 分发方式 0 分发给所有人 1 分发给指定的人 | ||
| 21 | - WhoRead []int64 `gorm:"type:jsonb;serializer:json"` // 谁可以看 | ||
| 22 | - WhoReview []int64 `gorm:"type:jsonb;serializer:json"` // 评论人 | ||
| 23 | - Tags []int64 `gorm:"type:jsonb;serializer:json"` //定性标签 | ||
| 24 | - MatchUrl map[string]string `gorm:"type:jsonb;serializer:json"` // 匹配文章内容中的url文本 | ||
| 25 | - Source int `gorm:"default:1"` // 来源 1-用户发布 2-运营发布 | ||
| 26 | - Operator domain.Operator `gorm:"type:jsonb;serializer:json"` // 运营操作人 | ||
| 27 | - Version int `gorm:"comment:版本号"` // 版本号 | ||
| 28 | - CreatedAt int64 `gorm:"comment:创建时间"` // 创建时间 | ||
| 29 | - UpdatedAt int64 `gorm:"comment:编辑时间"` // 编辑时间 | ||
| 30 | - IsDel soft_delete.DeletedAt `gorm:"softDelete:flag,DeletedAtField:DeletedAt"` // 删除标记 | ||
| 31 | - DeletedAt int64 `gorm:"comment:删除时间"` // 删除时间 | ||
| 32 | - | ||
| 33 | - Section []*domain.ArticleSection `gorm:"type:jsonb;serializer:json"` // 分段内容 | 13 | + Id int64 `gorm:"primaryKey"` // 唯一标识 |
| 14 | + CompanyId int64 `gorm:"comment:公司ID"` // 公司ID | ||
| 15 | + AuthorId int64 `gorm:"comment:发布人ID"` // 发布人 | ||
| 16 | + Title string `gorm:"comment:标题"` // 文章标题 | ||
| 17 | + Content string `json:"content"` // 文章内容 | ||
| 18 | + Images []domain.Image `gorm:"type:jsonb;serializer:json"` // 图片 | ||
| 19 | + Videos []domain.Video `gorm:"type:jsonb;serializer:json"` // 视频 | ||
| 20 | + TargetUser domain.ArticleTarget `gorm:"comment:分发方式 0所有人 1指定人"` // 分发方式 0 分发给所有人 1 分发给指定的人 | ||
| 21 | + WhoRead []int64 `gorm:"type:jsonb;serializer:json"` // 谁可以看 | ||
| 22 | + WhoReview []int64 `gorm:"type:jsonb;serializer:json"` // 评论人 | ||
| 23 | + Tags []int64 `gorm:"type:jsonb;serializer:json"` //定性标签 | ||
| 24 | + MatchUrl map[string]string `gorm:"type:jsonb;serializer:json"` // 匹配文章内容中的url文本 | ||
| 25 | + Source int `gorm:"default:1"` // 来源 1-用户发布 2-运营发布 | ||
| 26 | + Operator domain.Operator `gorm:"type:jsonb;serializer:json"` // 运营操作人 | ||
| 27 | + Version int `gorm:"comment:版本号"` // 版本号 | ||
| 28 | + CreatedAt int64 `gorm:"comment:创建时间"` // 创建时间 | ||
| 29 | + UpdatedAt int64 `gorm:"comment:编辑时间"` // 编辑时间 | ||
| 30 | + IsDel soft_delete.DeletedAt `gorm:"softDelete:flag,DeletedAtField:DeletedAt"` // 删除标记 | ||
| 31 | + DeletedAt int64 `gorm:"comment:删除时间"` // 删除时间 | ||
| 32 | + Attachments []domain.FileInfo `gorm:"type:jsonb;serializer:json"` | ||
| 33 | + Section []*domain.ArticleSection `gorm:"type:jsonb;serializer:json"` // 分段内容 | ||
| 34 | } | 34 | } |
| 35 | 35 | ||
| 36 | func (m *ArticleDraftOperation) TableName() string { | 36 | func (m *ArticleDraftOperation) TableName() string { |
| @@ -178,6 +178,7 @@ func (repository *ArticleBackupRepository) ModelToDomainModel(from *models.Artic | @@ -178,6 +178,7 @@ func (repository *ArticleBackupRepository) ModelToDomainModel(from *models.Artic | ||
| 178 | ChangeField: from.ChangeField, | 178 | ChangeField: from.ChangeField, |
| 179 | Videos: from.Videos, | 179 | Videos: from.Videos, |
| 180 | Show: domain.ArticleShow(from.Show), | 180 | Show: domain.ArticleShow(from.Show), |
| 181 | + Attachments: from.Attachments, | ||
| 181 | } | 182 | } |
| 182 | // err := copier.Copy(to, from) | 183 | // err := copier.Copy(to, from) |
| 183 | return to, nil | 184 | return to, nil |
| @@ -207,6 +208,7 @@ func (repository *ArticleBackupRepository) DomainModelToModel(from *domain.Artic | @@ -207,6 +208,7 @@ func (repository *ArticleBackupRepository) DomainModelToModel(from *domain.Artic | ||
| 207 | Videos: from.Videos, | 208 | Videos: from.Videos, |
| 208 | ChangeField: from.ChangeField, | 209 | ChangeField: from.ChangeField, |
| 209 | Show: int(from.Show), | 210 | Show: int(from.Show), |
| 211 | + Attachments: from.Attachments, | ||
| 210 | } | 212 | } |
| 211 | // err := copier.Copy(to, from) | 213 | // err := copier.Copy(to, from) |
| 212 | return to, nil | 214 | return to, nil |
| @@ -146,22 +146,23 @@ func (repository *ArticleDraftRepository) Find(ctx context.Context, conn transac | @@ -146,22 +146,23 @@ func (repository *ArticleDraftRepository) Find(ctx context.Context, conn transac | ||
| 146 | 146 | ||
| 147 | func (repository *ArticleDraftRepository) ModelToDomainModel(from *models.ArticleDraft) (*domain.ArticleDraft, error) { | 147 | func (repository *ArticleDraftRepository) ModelToDomainModel(from *models.ArticleDraft) (*domain.ArticleDraft, error) { |
| 148 | to := &domain.ArticleDraft{ | 148 | to := &domain.ArticleDraft{ |
| 149 | - Id: from.Id, | ||
| 150 | - CompanyId: from.CompanyId, | ||
| 151 | - CreatedAt: from.CreatedAt, | ||
| 152 | - UpdatedAt: from.UpdatedAt, | ||
| 153 | - DeletedAt: from.DeletedAt, | ||
| 154 | - Version: from.Version, | ||
| 155 | - Template: from.Template, | ||
| 156 | - Content: from.Content, | ||
| 157 | - AuthorId: from.AuthorId, | ||
| 158 | - Title: from.Title, | ||
| 159 | - Images: from.Images, | ||
| 160 | - WhoRead: from.WhoRead, | ||
| 161 | - WhoReview: from.WhoReview, | ||
| 162 | - Location: from.Location, | ||
| 163 | - MatchUrl: from.MatchUrl, | ||
| 164 | - Section: from.Section, | 149 | + Id: from.Id, |
| 150 | + CompanyId: from.CompanyId, | ||
| 151 | + CreatedAt: from.CreatedAt, | ||
| 152 | + UpdatedAt: from.UpdatedAt, | ||
| 153 | + DeletedAt: from.DeletedAt, | ||
| 154 | + Version: from.Version, | ||
| 155 | + Template: from.Template, | ||
| 156 | + Content: from.Content, | ||
| 157 | + AuthorId: from.AuthorId, | ||
| 158 | + Title: from.Title, | ||
| 159 | + Images: from.Images, | ||
| 160 | + WhoRead: from.WhoRead, | ||
| 161 | + WhoReview: from.WhoReview, | ||
| 162 | + Location: from.Location, | ||
| 163 | + MatchUrl: from.MatchUrl, | ||
| 164 | + Section: from.Section, | ||
| 165 | + Attachments: from.Attachments, | ||
| 165 | } | 166 | } |
| 166 | // err := copier.Copy(to, from) | 167 | // err := copier.Copy(to, from) |
| 167 | return to, nil | 168 | return to, nil |
| @@ -169,22 +170,23 @@ func (repository *ArticleDraftRepository) ModelToDomainModel(from *models.Articl | @@ -169,22 +170,23 @@ func (repository *ArticleDraftRepository) ModelToDomainModel(from *models.Articl | ||
| 169 | 170 | ||
| 170 | func (repository *ArticleDraftRepository) DomainModelToModel(from *domain.ArticleDraft) (*models.ArticleDraft, error) { | 171 | func (repository *ArticleDraftRepository) DomainModelToModel(from *domain.ArticleDraft) (*models.ArticleDraft, error) { |
| 171 | to := &models.ArticleDraft{ | 172 | to := &models.ArticleDraft{ |
| 172 | - Id: from.Id, | ||
| 173 | - CompanyId: from.CompanyId, | ||
| 174 | - CreatedAt: from.CreatedAt, | ||
| 175 | - UpdatedAt: from.UpdatedAt, | ||
| 176 | - DeletedAt: from.DeletedAt, | ||
| 177 | - Version: from.Version, | ||
| 178 | - Template: from.Template, | ||
| 179 | - Content: from.Content, | ||
| 180 | - AuthorId: from.AuthorId, | ||
| 181 | - Title: from.Title, | ||
| 182 | - Images: from.Images, | ||
| 183 | - WhoRead: from.WhoRead, | ||
| 184 | - WhoReview: from.WhoReview, | ||
| 185 | - Location: from.Location, | ||
| 186 | - MatchUrl: from.MatchUrl, | ||
| 187 | - Section: from.Section, | 173 | + Id: from.Id, |
| 174 | + CompanyId: from.CompanyId, | ||
| 175 | + CreatedAt: from.CreatedAt, | ||
| 176 | + UpdatedAt: from.UpdatedAt, | ||
| 177 | + DeletedAt: from.DeletedAt, | ||
| 178 | + Version: from.Version, | ||
| 179 | + Template: from.Template, | ||
| 180 | + Content: from.Content, | ||
| 181 | + AuthorId: from.AuthorId, | ||
| 182 | + Title: from.Title, | ||
| 183 | + Images: from.Images, | ||
| 184 | + WhoRead: from.WhoRead, | ||
| 185 | + WhoReview: from.WhoReview, | ||
| 186 | + Location: from.Location, | ||
| 187 | + MatchUrl: from.MatchUrl, | ||
| 188 | + Section: from.Section, | ||
| 189 | + Attachments: from.Attachments, | ||
| 188 | } | 190 | } |
| 189 | // err := copier.Copy(to, from) | 191 | // err := copier.Copy(to, from) |
| 190 | return to, nil | 192 | return to, nil |
| @@ -452,6 +452,7 @@ func (repository *ArticleRepository) ModelToDomainModel(from *models.Article) (* | @@ -452,6 +452,7 @@ func (repository *ArticleRepository) ModelToDomainModel(from *models.Article) (* | ||
| 452 | DeletedType: from.DeletedType, | 452 | DeletedType: from.DeletedType, |
| 453 | IsDel: int(from.IsDel), | 453 | IsDel: int(from.IsDel), |
| 454 | Cover: from.Cover, | 454 | Cover: from.Cover, |
| 455 | + Attachments: from.Attachments, | ||
| 455 | } | 456 | } |
| 456 | return to, nil | 457 | return to, nil |
| 457 | } | 458 | } |
| @@ -485,6 +486,7 @@ func (repository *ArticleRepository) DomainModelToModel(from *domain.Article) (* | @@ -485,6 +486,7 @@ func (repository *ArticleRepository) DomainModelToModel(from *domain.Article) (* | ||
| 485 | Operator: from.Operator, | 486 | Operator: from.Operator, |
| 486 | DeletedType: from.DeletedType, | 487 | DeletedType: from.DeletedType, |
| 487 | Cover: from.Cover, | 488 | Cover: from.Cover, |
| 489 | + Attachments: from.Attachments, | ||
| 488 | } | 490 | } |
| 489 | // err := copier.Copy(to, from) | 491 | // err := copier.Copy(to, from) |
| 490 | return to, nil | 492 | return to, nil |
| @@ -36,9 +36,15 @@ type Article struct { | @@ -36,9 +36,15 @@ type Article struct { | ||
| 36 | Operator Operator `gorm:"type:jsonb;serializer:json"` // 运营操作人 | 36 | Operator Operator `gorm:"type:jsonb;serializer:json"` // 运营操作人 |
| 37 | DeletedType int `json:"deletedType"` // 删除类型 1-运营删除 2-用户删除 | 37 | DeletedType int `json:"deletedType"` // 删除类型 1-运营删除 2-用户删除 |
| 38 | Cover string `json:"cover"` // 封面 | 38 | Cover string `json:"cover"` // 封面 |
| 39 | + Attachments []FileInfo `json:"attachments"` // 附件 | ||
| 39 | // ...more | 40 | // ...more |
| 40 | } | 41 | } |
| 41 | 42 | ||
| 43 | +type FileInfo struct { | ||
| 44 | + Name string `json:"name"` | ||
| 45 | + Url string `json:"url"` | ||
| 46 | +} | ||
| 47 | + | ||
| 42 | type ArticleRepository interface { | 48 | type ArticleRepository interface { |
| 43 | Insert(ctx context.Context, conn transaction.Conn, dm *Article) (*Article, error) | 49 | Insert(ctx context.Context, conn transaction.Conn, dm *Article) (*Article, error) |
| 44 | Update(ctx context.Context, conn transaction.Conn, dm *Article) (*Article, error) | 50 | Update(ctx context.Context, conn transaction.Conn, dm *Article) (*Article, error) |
| @@ -24,13 +24,14 @@ type ArticleBackup struct { | @@ -24,13 +24,14 @@ type ArticleBackup struct { | ||
| 24 | Action string `json:"action"` // 操作 | 24 | Action string `json:"action"` // 操作 |
| 25 | // 新的备份内容相对与旧的文章信息哪些内容发生了变更,可选值[WhoRead] 修改了分发对象, [WhoReview] 修改了评论范围,[Section] 修改了内容 | 25 | // 新的备份内容相对与旧的文章信息哪些内容发生了变更,可选值[WhoRead] 修改了分发对象, [WhoReview] 修改了评论范围,[Section] 修改了内容 |
| 26 | ChangeField []string `json:"changeField"` | 26 | ChangeField []string `json:"changeField"` |
| 27 | - TargetUser ArticleTarget `json:"targetUser"` // 分发方式 0 分发给所有人 1 分发给指定的人 | ||
| 28 | - Location Location `json:"location"` // 定位坐标 | ||
| 29 | - WhoRead []int64 `json:"whoRead"` // 谁可以看 | ||
| 30 | - WhoReview []int64 `json:"whoReview"` // 评论人 | ||
| 31 | - Tags []int64 `json:"tags"` // 标签 | ||
| 32 | - MatchUrl map[string]string `json:"matchUrl"` // 匹配文章内容中的url文本 | ||
| 33 | - Show ArticleShow `json:"show"` // 评论的展示状态(1显示,2不显示、) | 27 | + TargetUser ArticleTarget `json:"targetUser"` // 分发方式 0 分发给所有人 1 分发给指定的人 |
| 28 | + Location Location `json:"location"` // 定位坐标 | ||
| 29 | + WhoRead []int64 `json:"whoRead"` // 谁可以看 | ||
| 30 | + WhoReview []int64 `json:"whoReview"` // 评论人 | ||
| 31 | + Tags []int64 `json:"tags"` // 标签 | ||
| 32 | + MatchUrl map[string]string `json:"matchUrl"` // 匹配文章内容中的url文本 | ||
| 33 | + Show ArticleShow `json:"show"` // 评论的展示状态(1显示,2不显示、) | ||
| 34 | + Attachments []FileInfo `json:"attachments"` // 附件 | ||
| 34 | } | 35 | } |
| 35 | 36 | ||
| 36 | type ArticleBackupRepository interface { | 37 | type ArticleBackupRepository interface { |
| @@ -9,23 +9,23 @@ import ( | @@ -9,23 +9,23 @@ import ( | ||
| 9 | // 填写文章时保存的草稿 | 9 | // 填写文章时保存的草稿 |
| 10 | 10 | ||
| 11 | type ArticleDraft struct { | 11 | type ArticleDraft struct { |
| 12 | - Id int64 `json:"id"` | ||
| 13 | - CompanyId int64 `json:"companyId"` | ||
| 14 | - CreatedAt int64 `json:"createdAt,omitempty"` | ||
| 15 | - UpdatedAt int64 `json:"updatedAt,omitempty"` | ||
| 16 | - DeletedAt int64 `json:"deletedAt,omitempty"` | ||
| 17 | - Version int `json:"version,omitempty"` | ||
| 18 | - Template int `json:"template"` // 填写内容时用的样板0、无 1、演绎式 2、归纳式 | ||
| 19 | - Content []string `json:"content"` // 文章内容 | ||
| 20 | - AuthorId int64 `json:"authorId"` // 发布人 | ||
| 21 | - Title string `json:"title"` // 文章标题 | ||
| 22 | - Images []Image `json:"images"` // 图片 | ||
| 23 | - WhoRead []int64 `json:"whoRead"` // 谁可以看 | ||
| 24 | - WhoReview []int64 `json:"whoReview"` // 评论人 | ||
| 25 | - Location Location `json:"location"` // 坐标 | ||
| 26 | - MatchUrl map[string]string `json:"matchUrl"` // 匹配文章内容中的url文本 | ||
| 27 | - | ||
| 28 | - Section []*ArticleSection `json:"section"` // 分段内容 | 12 | + Id int64 `json:"id"` |
| 13 | + CompanyId int64 `json:"companyId"` | ||
| 14 | + CreatedAt int64 `json:"createdAt,omitempty"` | ||
| 15 | + UpdatedAt int64 `json:"updatedAt,omitempty"` | ||
| 16 | + DeletedAt int64 `json:"deletedAt,omitempty"` | ||
| 17 | + Version int `json:"version,omitempty"` | ||
| 18 | + Template int `json:"template"` // 填写内容时用的样板0、无 1、演绎式 2、归纳式 | ||
| 19 | + Content []string `json:"content"` // 文章内容 | ||
| 20 | + AuthorId int64 `json:"authorId"` // 发布人 | ||
| 21 | + Title string `json:"title"` // 文章标题 | ||
| 22 | + Images []Image `json:"images"` // 图片 | ||
| 23 | + WhoRead []int64 `json:"whoRead"` // 谁可以看 | ||
| 24 | + WhoReview []int64 `json:"whoReview"` // 评论人 | ||
| 25 | + Location Location `json:"location"` // 坐标 | ||
| 26 | + MatchUrl map[string]string `json:"matchUrl"` // 匹配文章内容中的url文本 | ||
| 27 | + Section []*ArticleSection `json:"section"` // 分段内容 | ||
| 28 | + Attachments []FileInfo `json:"attachments"` // 附件 | ||
| 29 | } | 29 | } |
| 30 | type ArticleDraftRepository interface { | 30 | type ArticleDraftRepository interface { |
| 31 | Insert(ctx context.Context, conn transaction.Conn, dm *ArticleDraft) (*ArticleDraft, error) | 31 | Insert(ctx context.Context, conn transaction.Conn, dm *ArticleDraft) (*ArticleDraft, error) |
| @@ -8,26 +8,27 @@ import ( | @@ -8,26 +8,27 @@ import ( | ||
| 8 | 8 | ||
| 9 | // ArticleDraftOperation 运营草稿 | 9 | // ArticleDraftOperation 运营草稿 |
| 10 | type ArticleDraftOperation struct { | 10 | type ArticleDraftOperation struct { |
| 11 | - Id int64 `json:"id"` // 唯一标识 | ||
| 12 | - CompanyId int64 `json:"companyId,string"` // 公司ID | ||
| 13 | - AuthorId int64 `json:"authorId"` // 发布人 | ||
| 14 | - Title string `json:"title"` // 文章标题 | ||
| 15 | - Content string `json:"content"` // 文章内容 | ||
| 16 | - Images []Image `json:"images"` // 图片 | ||
| 17 | - Videos []Video `json:"videos"` // 视频 | ||
| 18 | - TargetUser ArticleTarget `json:"targetUser"` // 分发方式 0 分发给所有人 1 分发给指定的人 | ||
| 19 | - WhoRead []int64 `json:"whoRead"` // 谁可以看 | ||
| 20 | - WhoReview []int64 `json:"whoReview"` // 评论人 | ||
| 21 | - Tags []int64 `json:"tags"` //定性标签 | ||
| 22 | - MatchUrl map[string]string `json:"matchUrl"` // 匹配文章内容中的url文本 | ||
| 23 | - Source int `json:"source"` // 来源 1-用户发布 2-运营发布 | ||
| 24 | - Operator Operator `json:"operator"` // 运营操作人 | ||
| 25 | - Version int `json:"version,omitempty"` // 版本号 | ||
| 26 | - CreatedAt int64 `json:"createdAt,omitempty"` // 创建时间 | ||
| 27 | - UpdatedAt int64 `json:"updatedAt,omitempty"` // 编辑时间 | ||
| 28 | - IsDel soft_delete.DeletedAt `json:"isDel,omitempty"` // 删除标记 | ||
| 29 | - DeletedAt int64 `json:"deletedAt,omitempty"` // 删除时间 | ||
| 30 | - Section []*ArticleSection `json:"section"` // 分段内容 | 11 | + Id int64 `json:"id"` // 唯一标识 |
| 12 | + CompanyId int64 `json:"companyId,string"` // 公司ID | ||
| 13 | + AuthorId int64 `json:"authorId"` // 发布人 | ||
| 14 | + Title string `json:"title"` // 文章标题 | ||
| 15 | + Content string `json:"content"` // 文章内容 | ||
| 16 | + Images []Image `json:"images"` // 图片 | ||
| 17 | + Videos []Video `json:"videos"` // 视频 | ||
| 18 | + TargetUser ArticleTarget `json:"targetUser"` // 分发方式 0 分发给所有人 1 分发给指定的人 | ||
| 19 | + WhoRead []int64 `json:"whoRead"` // 谁可以看 | ||
| 20 | + WhoReview []int64 `json:"whoReview"` // 评论人 | ||
| 21 | + Tags []int64 `json:"tags"` //定性标签 | ||
| 22 | + MatchUrl map[string]string `json:"matchUrl"` // 匹配文章内容中的url文本 | ||
| 23 | + Source int `json:"source"` // 来源 1-用户发布 2-运营发布 | ||
| 24 | + Operator Operator `json:"operator"` // 运营操作人 | ||
| 25 | + Version int `json:"version,omitempty"` // 版本号 | ||
| 26 | + CreatedAt int64 `json:"createdAt,omitempty"` // 创建时间 | ||
| 27 | + UpdatedAt int64 `json:"updatedAt,omitempty"` // 编辑时间 | ||
| 28 | + IsDel soft_delete.DeletedAt `json:"isDel,omitempty"` // 删除标记 | ||
| 29 | + DeletedAt int64 `json:"deletedAt,omitempty"` // 删除时间 | ||
| 30 | + Section []*ArticleSection `json:"section"` // 分段内容 | ||
| 31 | + Attachments []FileInfo `json:"attachments"` // 附件 | ||
| 31 | } | 32 | } |
| 32 | 33 | ||
| 33 | type ArticleDraftOperationRepository interface { | 34 | type ArticleDraftOperationRepository interface { |
-
请 注册 或 登录 后发表评论