正在显示
12 个修改的文件
包含
71 行增加
和
2 行删除
| @@ -7,6 +7,15 @@ type Location { | @@ -7,6 +7,15 @@ type Location { | ||
| 7 | Descript string `json:"descript,optional"` //地点描述 | 7 | Descript string `json:"descript,optional"` //地点描述 |
| 8 | } | 8 | } |
| 9 | 9 | ||
| 10 | + | ||
| 11 | +type Video { | ||
| 12 | + Url string `json:"url"` //视频文件的地址 | ||
| 13 | + Cover string `json:"cover"` //封面 | ||
| 14 | + Width int `json:"width"` //封面图片宽 | ||
| 15 | + Height int `json:"height"` //封面图片长 | ||
| 16 | +} | ||
| 17 | + | ||
| 18 | + | ||
| 10 | // 人员的简单展示信息 | 19 | // 人员的简单展示信息 |
| 11 | type ArticleAuthor { | 20 | type ArticleAuthor { |
| 12 | Id int64 `json:"id"` // 人员id | 21 | Id int64 `json:"id"` // 人员id |
| @@ -48,6 +57,7 @@ type ( | @@ -48,6 +57,7 @@ type ( | ||
| 48 | CreatedAt int64 `json:"createdAt"` //文章的发布时间 | 57 | CreatedAt int64 `json:"createdAt"` //文章的发布时间 |
| 49 | Section []ArticleSection `json:"section"` //文章的文本内容 | 58 | Section []ArticleSection `json:"section"` //文章的文本内容 |
| 50 | Images []string `json:"images"` //图片 | 59 | Images []string `json:"images"` //图片 |
| 60 | + Videos []Video `json:"videos"` //视频 | ||
| 51 | WhoRead []int64 `json:"whoRead"` //谁可查看 | 61 | WhoRead []int64 `json:"whoRead"` //谁可查看 |
| 52 | WhoReview []int64 `json:"whoReview"` //谁可评论 | 62 | WhoReview []int64 `json:"whoReview"` //谁可评论 |
| 53 | Location Location `json:"location"` //定位坐标 | 63 | Location Location `json:"location"` //定位坐标 |
| @@ -355,6 +365,7 @@ type ( | @@ -355,6 +365,7 @@ type ( | ||
| 355 | CreatedAt int64 `json:"createdAt"` // 文章的发布时间 | 365 | CreatedAt int64 `json:"createdAt"` // 文章的发布时间 |
| 356 | Section []ArticleSection `json:"section"` // 文章的文本内容 | 366 | Section []ArticleSection `json:"section"` // 文章的文本内容 |
| 357 | Images []string `json:"images"` // 图片 | 367 | Images []string `json:"images"` // 图片 |
| 368 | + Videos []Video `json:"videos"` // 视频 | ||
| 358 | WhoRead []int64 `json:"whoRead"` // 谁可查看 | 369 | WhoRead []int64 `json:"whoRead"` // 谁可查看 |
| 359 | WhoReadInfo []UserShowName `json:"whoReadInfo"` // 谁可查看 | 370 | WhoReadInfo []UserShowName `json:"whoReadInfo"` // 谁可查看 |
| 360 | WhoReview []int64 `json:"whoReview"` // 谁可评论 | 371 | WhoReview []int64 `json:"whoReview"` // 谁可评论 |
| @@ -409,6 +420,7 @@ type ( | @@ -409,6 +420,7 @@ type ( | ||
| 409 | Section []ArticleSection `json:"section"` // 填写的内容 | 420 | Section []ArticleSection `json:"section"` // 填写的内容 |
| 410 | Title string `json:"title"` // 标题 | 421 | Title string `json:"title"` // 标题 |
| 411 | Images []string `json:"images"` // 图片 | 422 | Images []string `json:"images"` // 图片 |
| 423 | + Videos []Video `json:"video"` // 视频 | ||
| 412 | WhoRead []int64 `json:"whoRead"` // 谁可以看 | 424 | WhoRead []int64 `json:"whoRead"` // 谁可以看 |
| 413 | WhoReview []int64 `json:"whoReview"` // 评论人 | 425 | WhoReview []int64 `json:"whoReview"` // 评论人 |
| 414 | TargetUser int `json:"targetUser"` // 分发方式 [0分发给所有人、1分发给指定的人] | 426 | TargetUser int `json:"targetUser"` // 分发方式 [0分发给所有人、1分发给指定的人] |
| @@ -422,6 +434,7 @@ type ( | @@ -422,6 +434,7 @@ type ( | ||
| 422 | Images []string `json:"images"` //图片 | 434 | Images []string `json:"images"` //图片 |
| 423 | CreatedAt int64 `json:"createdAt"` //文章的创建日期 | 435 | CreatedAt int64 `json:"createdAt"` //文章的创建日期 |
| 424 | CountLove int `json:"countLove"` //点赞数量 | 436 | CountLove int `json:"countLove"` //点赞数量 |
| 437 | + Videos []Video `json:"video"` // 视频 | ||
| 425 | CountComment int `json:"countComment"` //评论数量 | 438 | CountComment int `json:"countComment"` //评论数量 |
| 426 | Show int `json:"show"` //是否隐藏 [0显示、1不显示] | 439 | Show int `json:"show"` //是否隐藏 [0显示、1不显示] |
| 427 | Tags []int64 `json:"tags"` //标签 | 440 | Tags []int64 `json:"tags"` //标签 |
| @@ -463,6 +476,7 @@ type ( | @@ -463,6 +476,7 @@ type ( | ||
| 463 | CreatedAt int64 `json:"createdAt"` // 文章的发布时间 | 476 | CreatedAt int64 `json:"createdAt"` // 文章的发布时间 |
| 464 | Section []ArticleSection `json:"section"` // 文章的文本内容 | 477 | Section []ArticleSection `json:"section"` // 文章的文本内容 |
| 465 | Images []string `json:"images"` // 图片 | 478 | Images []string `json:"images"` // 图片 |
| 479 | + Videos []Video `json:"video"` | ||
| 466 | WhoRead []int64 `json:"whoRead"` // 谁可查看 | 480 | WhoRead []int64 `json:"whoRead"` // 谁可查看 |
| 467 | WhoReadInfo []UserShowName `json:"whoReadInfo"` // 谁可查看 | 481 | WhoReadInfo []UserShowName `json:"whoReadInfo"` // 谁可查看 |
| 468 | WhoReview []int64 `json:"whoReview"` // 谁可评论 | 482 | WhoReview []int64 `json:"whoReview"` // 谁可评论 |
| @@ -152,6 +152,7 @@ func (l *MiniGetArticleLogic) MiniGetArticle(req *types.MiniArticleGetRequest) ( | @@ -152,6 +152,7 @@ func (l *MiniGetArticleLogic) MiniGetArticle(req *types.MiniArticleGetRequest) ( | ||
| 152 | MeFollowFlag: 0, | 152 | MeFollowFlag: 0, |
| 153 | Tags: tags, | 153 | Tags: tags, |
| 154 | MatchUrl: map[string]string{}, | 154 | MatchUrl: map[string]string{}, |
| 155 | + Videos: []types.Video{}, | ||
| 155 | } | 156 | } |
| 156 | if len(backupList) > 0 { | 157 | if len(backupList) > 0 { |
| 157 | resp.Edit = 1 | 158 | resp.Edit = 1 |
| @@ -171,6 +172,16 @@ func (l *MiniGetArticleLogic) MiniGetArticle(req *types.MiniArticleGetRequest) ( | @@ -171,6 +172,16 @@ func (l *MiniGetArticleLogic) MiniGetArticle(req *types.MiniArticleGetRequest) ( | ||
| 171 | for _, val := range articleInfo.Images { | 172 | for _, val := range articleInfo.Images { |
| 172 | resp.Images = append(resp.Images, val.Url) | 173 | resp.Images = append(resp.Images, val.Url) |
| 173 | } | 174 | } |
| 175 | + | ||
| 176 | + for _, val := range articleInfo.Videos { | ||
| 177 | + resp.Videos = append(resp.Videos, types.Video{ | ||
| 178 | + Url: val.Url, | ||
| 179 | + Cover: val.Cover, | ||
| 180 | + Width: val.Width, | ||
| 181 | + Height: val.Height, | ||
| 182 | + }) | ||
| 183 | + } | ||
| 184 | + | ||
| 174 | if follow != nil { | 185 | if follow != nil { |
| 175 | resp.MeFollowFlag = 1 | 186 | resp.MeFollowFlag = 1 |
| 176 | } | 187 | } |
| @@ -52,7 +52,9 @@ func (l *SystemArticleGetHistoryLogic) SystemArticleGetHistory(req *types.System | @@ -52,7 +52,9 @@ func (l *SystemArticleGetHistoryLogic) SystemArticleGetHistory(req *types.System | ||
| 52 | }, | 52 | }, |
| 53 | TargetUser: int(backup.TargetUser), | 53 | TargetUser: int(backup.TargetUser), |
| 54 | Tags: backup.Tags, | 54 | Tags: backup.Tags, |
| 55 | + Videos: make([]types.Video, 0), | ||
| 55 | } | 56 | } |
| 57 | + | ||
| 56 | //文章段落内容 | 58 | //文章段落内容 |
| 57 | lo.ForEach(backup.Section, func(item domain.ArticleSection, index int) { | 59 | lo.ForEach(backup.Section, func(item domain.ArticleSection, index int) { |
| 58 | resp.Section = append(resp.Section, types.ArticleSection{ | 60 | resp.Section = append(resp.Section, types.ArticleSection{ |
| @@ -66,6 +68,16 @@ func (l *SystemArticleGetHistoryLogic) SystemArticleGetHistory(req *types.System | @@ -66,6 +68,16 @@ func (l *SystemArticleGetHistoryLogic) SystemArticleGetHistory(req *types.System | ||
| 66 | lo.ForEach(backup.Images, func(item domain.Image, index int) { | 68 | lo.ForEach(backup.Images, func(item domain.Image, index int) { |
| 67 | resp.Images = append(resp.Images, item.Url) | 69 | resp.Images = append(resp.Images, item.Url) |
| 68 | }) | 70 | }) |
| 71 | + | ||
| 72 | + // 视频 | ||
| 73 | + for _, val := range backup.Videos { | ||
| 74 | + resp.Videos = append(resp.Videos, types.Video{ | ||
| 75 | + Url: val.Url, | ||
| 76 | + Cover: val.Cover, | ||
| 77 | + Width: val.Width, | ||
| 78 | + Height: val.Height, | ||
| 79 | + }) | ||
| 80 | + } | ||
| 69 | //用户 | 81 | //用户 |
| 70 | userIds := lo.Union(resp.WhoRead, resp.WhoReview) | 82 | userIds := lo.Union(resp.WhoRead, resp.WhoReview) |
| 71 | if len(userIds) > 0 { | 83 | if len(userIds) > 0 { |
| @@ -62,6 +62,7 @@ func (l *SystemArticleRestoreLogic) SystemArticleRestore(req *types.SystemArticl | @@ -62,6 +62,7 @@ func (l *SystemArticleRestoreLogic) SystemArticleRestore(req *types.SystemArticl | ||
| 62 | 62 | ||
| 63 | article.Version = article.Version + 1 | 63 | article.Version = article.Version + 1 |
| 64 | article.Images = backup.Images | 64 | article.Images = backup.Images |
| 65 | + article.Videos = backup.Videos | ||
| 65 | article.Title = backup.Title | 66 | article.Title = backup.Title |
| 66 | article.MatchUrl = backup.MatchUrl | 67 | article.MatchUrl = backup.MatchUrl |
| 67 | articleSections := make([]domain.ArticleSection, 0) | 68 | articleSections := make([]domain.ArticleSection, 0) |
| @@ -66,6 +66,16 @@ func (l *SystemGetArticleLogic) SystemGetArticle(req *types.SystemArticleGetRequ | @@ -66,6 +66,16 @@ func (l *SystemGetArticleLogic) SystemGetArticle(req *types.SystemArticleGetRequ | ||
| 66 | Show: int(article.Show), | 66 | Show: int(article.Show), |
| 67 | Tags: make([]types.ArticleTagItem, 0), | 67 | Tags: make([]types.ArticleTagItem, 0), |
| 68 | TargetUser: int(article.TargetUser), | 68 | TargetUser: int(article.TargetUser), |
| 69 | + Videos: make([]types.Video, 0), | ||
| 70 | + } | ||
| 71 | + | ||
| 72 | + for _, val := range article.Videos { | ||
| 73 | + resp.Videos = append(resp.Videos, types.Video{ | ||
| 74 | + Url: val.Url, | ||
| 75 | + Cover: val.Cover, | ||
| 76 | + Width: val.Width, | ||
| 77 | + Height: val.Height, | ||
| 78 | + }) | ||
| 69 | } | 79 | } |
| 70 | //标签 | 80 | //标签 |
| 71 | if len(article.Tags) > 0 { | 81 | if len(article.Tags) > 0 { |
| @@ -825,6 +825,13 @@ type Location struct { | @@ -825,6 +825,13 @@ type Location struct { | ||
| 825 | Descript string `json:"descript,optional"` //地点描述 | 825 | Descript string `json:"descript,optional"` //地点描述 |
| 826 | } | 826 | } |
| 827 | 827 | ||
| 828 | +type Video struct { | ||
| 829 | + Url string `json:"url"` //视频文件的地址 | ||
| 830 | + Cover string `json:"cover"` //封面 | ||
| 831 | + Width int `json:"width"` //封面图片宽 | ||
| 832 | + Height int `json:"height"` //封面图片长 | ||
| 833 | +} | ||
| 834 | + | ||
| 828 | type ArticleAuthor struct { | 835 | type ArticleAuthor struct { |
| 829 | Id int64 `json:"id"` // 人员id | 836 | Id int64 `json:"id"` // 人员id |
| 830 | Name string `json:"name"` // 人员的名字 | 837 | Name string `json:"name"` // 人员的名字 |
| @@ -862,6 +869,7 @@ type MiniArticleGetResponse struct { | @@ -862,6 +869,7 @@ type MiniArticleGetResponse struct { | ||
| 862 | CreatedAt int64 `json:"createdAt"` //文章的发布时间 | 869 | CreatedAt int64 `json:"createdAt"` //文章的发布时间 |
| 863 | Section []ArticleSection `json:"section"` //文章的文本内容 | 870 | Section []ArticleSection `json:"section"` //文章的文本内容 |
| 864 | Images []string `json:"images"` //图片 | 871 | Images []string `json:"images"` //图片 |
| 872 | + Videos []Video `json:"videos"` //视频 | ||
| 865 | WhoRead []int64 `json:"whoRead"` //谁可查看 | 873 | WhoRead []int64 `json:"whoRead"` //谁可查看 |
| 866 | WhoReview []int64 `json:"whoReview"` //谁可评论 | 874 | WhoReview []int64 `json:"whoReview"` //谁可评论 |
| 867 | Location Location `json:"location"` //定位坐标 | 875 | Location Location `json:"location"` //定位坐标 |
| @@ -1140,6 +1148,7 @@ type SystemArticleGetResponse struct { | @@ -1140,6 +1148,7 @@ type SystemArticleGetResponse struct { | ||
| 1140 | CreatedAt int64 `json:"createdAt"` // 文章的发布时间 | 1148 | CreatedAt int64 `json:"createdAt"` // 文章的发布时间 |
| 1141 | Section []ArticleSection `json:"section"` // 文章的文本内容 | 1149 | Section []ArticleSection `json:"section"` // 文章的文本内容 |
| 1142 | Images []string `json:"images"` // 图片 | 1150 | Images []string `json:"images"` // 图片 |
| 1151 | + Videos []Video `json:"videos"` // 视频 | ||
| 1143 | WhoRead []int64 `json:"whoRead"` // 谁可查看 | 1152 | WhoRead []int64 `json:"whoRead"` // 谁可查看 |
| 1144 | WhoReadInfo []UserShowName `json:"whoReadInfo"` // 谁可查看 | 1153 | WhoReadInfo []UserShowName `json:"whoReadInfo"` // 谁可查看 |
| 1145 | WhoReview []int64 `json:"whoReview"` // 谁可评论 | 1154 | WhoReview []int64 `json:"whoReview"` // 谁可评论 |
| @@ -1189,6 +1198,7 @@ type SystemArticleUpdateRequest struct { | @@ -1189,6 +1198,7 @@ type SystemArticleUpdateRequest struct { | ||
| 1189 | Section []ArticleSection `json:"section"` // 填写的内容 | 1198 | Section []ArticleSection `json:"section"` // 填写的内容 |
| 1190 | Title string `json:"title"` // 标题 | 1199 | Title string `json:"title"` // 标题 |
| 1191 | Images []string `json:"images"` // 图片 | 1200 | Images []string `json:"images"` // 图片 |
| 1201 | + Videos []Video `json:"video"` // 视频 | ||
| 1192 | WhoRead []int64 `json:"whoRead"` // 谁可以看 | 1202 | WhoRead []int64 `json:"whoRead"` // 谁可以看 |
| 1193 | WhoReview []int64 `json:"whoReview"` // 评论人 | 1203 | WhoReview []int64 `json:"whoReview"` // 评论人 |
| 1194 | TargetUser int `json:"targetUser"` // 分发方式 [0分发给所有人、1分发给指定的人] | 1204 | TargetUser int `json:"targetUser"` // 分发方式 [0分发给所有人、1分发给指定的人] |
| @@ -1203,6 +1213,7 @@ type SystemArticleUpdateResponse struct { | @@ -1203,6 +1213,7 @@ type SystemArticleUpdateResponse struct { | ||
| 1203 | Images []string `json:"images"` //图片 | 1213 | Images []string `json:"images"` //图片 |
| 1204 | CreatedAt int64 `json:"createdAt"` //文章的创建日期 | 1214 | CreatedAt int64 `json:"createdAt"` //文章的创建日期 |
| 1205 | CountLove int `json:"countLove"` //点赞数量 | 1215 | CountLove int `json:"countLove"` //点赞数量 |
| 1216 | + Videos []Video `json:"video"` // 视频 | ||
| 1206 | CountComment int `json:"countComment"` //评论数量 | 1217 | CountComment int `json:"countComment"` //评论数量 |
| 1207 | Show int `json:"show"` //是否隐藏 [0显示、1不显示] | 1218 | Show int `json:"show"` //是否隐藏 [0显示、1不显示] |
| 1208 | Tags []int64 `json:"tags"` //标签 | 1219 | Tags []int64 `json:"tags"` //标签 |
| @@ -1242,6 +1253,7 @@ type SystemArticleGetHistoryResponse struct { | @@ -1242,6 +1253,7 @@ type SystemArticleGetHistoryResponse struct { | ||
| 1242 | CreatedAt int64 `json:"createdAt"` // 文章的发布时间 | 1253 | CreatedAt int64 `json:"createdAt"` // 文章的发布时间 |
| 1243 | Section []ArticleSection `json:"section"` // 文章的文本内容 | 1254 | Section []ArticleSection `json:"section"` // 文章的文本内容 |
| 1244 | Images []string `json:"images"` // 图片 | 1255 | Images []string `json:"images"` // 图片 |
| 1256 | + Videos []Video `json:"video"` | ||
| 1245 | WhoRead []int64 `json:"whoRead"` // 谁可查看 | 1257 | WhoRead []int64 `json:"whoRead"` // 谁可查看 |
| 1246 | WhoReadInfo []UserShowName `json:"whoReadInfo"` // 谁可查看 | 1258 | WhoReadInfo []UserShowName `json:"whoReadInfo"` // 谁可查看 |
| 1247 | WhoReview []int64 `json:"whoReview"` // 谁可评论 | 1259 | WhoReview []int64 `json:"whoReview"` // 谁可评论 |
| @@ -22,6 +22,7 @@ type ArticleBackup struct { | @@ -22,6 +22,7 @@ type ArticleBackup struct { | ||
| 22 | Title string // 标题 | 22 | Title string // 标题 |
| 23 | Section []domain.ArticleSection `gorm:"type:jsonb;serializer:json"` // 分段内容 | 23 | Section []domain.ArticleSection `gorm:"type:jsonb;serializer:json"` // 分段内容 |
| 24 | Images []domain.Image `gorm:"type:jsonb;serializer:json"` // 图片 | 24 | Images []domain.Image `gorm:"type:jsonb;serializer:json"` // 图片 |
| 25 | + Videos []domain.Video `gorm:"type:jsonb;serializer:json"` // 视频 | ||
| 25 | Action string // 操作 | 26 | Action string // 操作 |
| 26 | WhoRead []int64 `gorm:"type:jsonb;serializer:json"` // 谁可以看 | 27 | WhoRead []int64 `gorm:"type:jsonb;serializer:json"` // 谁可以看 |
| 27 | WhoReview []int64 `gorm:"type:jsonb;serializer:json"` // 评论人 | 28 | WhoReview []int64 `gorm:"type:jsonb;serializer:json"` // 评论人 |
| @@ -175,6 +175,7 @@ func (repository *ArticleBackupRepository) ModelToDomainModel(from *models.Artic | @@ -175,6 +175,7 @@ func (repository *ArticleBackupRepository) ModelToDomainModel(from *models.Artic | ||
| 175 | WhoReview: from.WhoReview, | 175 | WhoReview: from.WhoReview, |
| 176 | Tags: from.Tags, | 176 | Tags: from.Tags, |
| 177 | MatchUrl: from.MatchUrl, | 177 | MatchUrl: from.MatchUrl, |
| 178 | + Videos: from.Videos, | ||
| 178 | } | 179 | } |
| 179 | // err := copier.Copy(to, from) | 180 | // err := copier.Copy(to, from) |
| 180 | return to, nil | 181 | return to, nil |
| @@ -201,6 +202,7 @@ func (repository *ArticleBackupRepository) DomainModelToModel(from *domain.Artic | @@ -201,6 +202,7 @@ func (repository *ArticleBackupRepository) DomainModelToModel(from *domain.Artic | ||
| 201 | Location: from.Location, | 202 | Location: from.Location, |
| 202 | TargetUser: int(from.TargetUser), | 203 | TargetUser: int(from.TargetUser), |
| 203 | MatchUrl: from.MatchUrl, | 204 | MatchUrl: from.MatchUrl, |
| 205 | + Videos: from.Videos, | ||
| 204 | } | 206 | } |
| 205 | // err := copier.Copy(to, from) | 207 | // err := copier.Copy(to, from) |
| 206 | return to, nil | 208 | return to, nil |
| @@ -49,6 +49,7 @@ func (repository *MessageSystemRepository) Update(ctx context.Context, conn tran | @@ -49,6 +49,7 @@ func (repository *MessageSystemRepository) Update(ctx context.Context, conn tran | ||
| 49 | if _, err = repository.Query(queryFunc, m.CacheKeyFunc()); err != nil { | 49 | if _, err = repository.Query(queryFunc, m.CacheKeyFunc()); err != nil { |
| 50 | return nil, err | 50 | return nil, err |
| 51 | } | 51 | } |
| 52 | + | ||
| 52 | return repository.ModelToDomainModel(m) | 53 | return repository.ModelToDomainModel(m) |
| 53 | } | 54 | } |
| 54 | 55 |
| @@ -110,7 +110,8 @@ func (m *Article) MakeBackup(operator UserSimple, section []*ArticleSection) *Ar | @@ -110,7 +110,8 @@ func (m *Article) MakeBackup(operator UserSimple, section []*ArticleSection) *Ar | ||
| 110 | ArticleId: m.Id, | 110 | ArticleId: m.Id, |
| 111 | Title: m.Title, | 111 | Title: m.Title, |
| 112 | Section: sectionBackup, | 112 | Section: sectionBackup, |
| 113 | - Images: m.Images, | 113 | + Images: make([]Image, len(m.Images)), |
| 114 | + Videos: make([]Video, len(m.Videos)), | ||
| 114 | Action: "", | 115 | Action: "", |
| 115 | TargetUser: m.TargetUser, | 116 | TargetUser: m.TargetUser, |
| 116 | WhoRead: m.WhoRead, | 117 | WhoRead: m.WhoRead, |
| @@ -118,7 +119,8 @@ func (m *Article) MakeBackup(operator UserSimple, section []*ArticleSection) *Ar | @@ -118,7 +119,8 @@ func (m *Article) MakeBackup(operator UserSimple, section []*ArticleSection) *Ar | ||
| 118 | Tags: m.Tags, | 119 | Tags: m.Tags, |
| 119 | MatchUrl: map[string]string{}, | 120 | MatchUrl: map[string]string{}, |
| 120 | } | 121 | } |
| 121 | - | 122 | + copy(b.Videos, m.Videos) |
| 123 | + copy(b.Images, m.Images) | ||
| 122 | for k, v := range m.MatchUrl { | 124 | for k, v := range m.MatchUrl { |
| 123 | b.MatchUrl[k] = v | 125 | b.MatchUrl[k] = v |
| 124 | } | 126 | } |
| @@ -19,6 +19,7 @@ type ArticleBackup struct { | @@ -19,6 +19,7 @@ type ArticleBackup struct { | ||
| 19 | Title string `json:"title"` // 标题 | 19 | Title string `json:"title"` // 标题 |
| 20 | Section []ArticleSection `json:"section"` // 分段内容 | 20 | Section []ArticleSection `json:"section"` // 分段内容 |
| 21 | Images []Image `json:"images"` // 图片 | 21 | Images []Image `json:"images"` // 图片 |
| 22 | + Videos []Video `json:"videos"` // 视频 | ||
| 22 | Action string `json:"action"` // 操作 | 23 | Action string `json:"action"` // 操作 |
| 23 | TargetUser ArticleTarget `json:"targetUser"` // 分发方式 0 分发给所有人 1 分发给指定的人 | 24 | TargetUser ArticleTarget `json:"targetUser"` // 分发方式 0 分发给所有人 1 分发给指定的人 |
| 24 | Location Location `json:"location"` // 定位坐标 | 25 | Location Location `json:"location"` // 定位坐标 |
| @@ -70,7 +70,9 @@ type ArticleCommentRepository interface { | @@ -70,7 +70,9 @@ type ArticleCommentRepository interface { | ||
| 70 | Update(ctx context.Context, conn transaction.Conn, dm *ArticleComment) (*ArticleComment, error) | 70 | Update(ctx context.Context, conn transaction.Conn, dm *ArticleComment) (*ArticleComment, error) |
| 71 | UpdateWithVersion(ctx context.Context, conn transaction.Conn, dm *ArticleComment) (*ArticleComment, error) | 71 | UpdateWithVersion(ctx context.Context, conn transaction.Conn, dm *ArticleComment) (*ArticleComment, error) |
| 72 | Delete(ctx context.Context, conn transaction.Conn, dm *ArticleComment) (*ArticleComment, error) | 72 | Delete(ctx context.Context, conn transaction.Conn, dm *ArticleComment) (*ArticleComment, error) |
| 73 | + | ||
| 73 | FindOne(ctx context.Context, conn transaction.Conn, id int64) (*ArticleComment, error) | 74 | FindOne(ctx context.Context, conn transaction.Conn, id int64) (*ArticleComment, error) |
| 75 | + | ||
| 74 | Find(ctx context.Context, conn transaction.Conn, queryOptions map[string]interface{}) (int64, []*ArticleComment, error) | 76 | Find(ctx context.Context, conn transaction.Conn, queryOptions map[string]interface{}) (int64, []*ArticleComment, error) |
| 75 | IncreaseCountUserLove(ctx context.Context, conn transaction.Conn, incr int, commentId int64) error //点赞数量变动 | 77 | IncreaseCountUserLove(ctx context.Context, conn transaction.Conn, incr int, commentId int64) error //点赞数量变动 |
| 76 | IncreaseCountReply(ctx context.Context, conn transaction.Conn, incr int, commentId int64) error // 评论回复数量变动 | 78 | IncreaseCountReply(ctx context.Context, conn transaction.Conn, incr int, commentId int64) error // 评论回复数量变动 |
-
请 注册 或 登录 后发表评论