|
|
@ -8,6 +8,7 @@ import (
|
|
|
|
"github.com/jackc/pgx/v5"
|
|
|
|
"github.com/jackc/pgx/v5"
|
|
|
|
"github.com/rocboss/paopao-ce/internal/core"
|
|
|
|
"github.com/rocboss/paopao-ce/internal/core"
|
|
|
|
"github.com/rocboss/paopao-ce/internal/core/cs"
|
|
|
|
"github.com/rocboss/paopao-ce/internal/core/cs"
|
|
|
|
|
|
|
|
"github.com/rocboss/paopao-ce/internal/core/ms"
|
|
|
|
"github.com/rocboss/paopao-ce/pkg/debug"
|
|
|
|
"github.com/rocboss/paopao-ce/pkg/debug"
|
|
|
|
"gorm.io/gorm"
|
|
|
|
"gorm.io/gorm"
|
|
|
|
)
|
|
|
|
)
|
|
|
@ -31,14 +32,14 @@ type tweetHelpSrv struct {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// MergePosts post数据整合
|
|
|
|
// MergePosts post数据整合
|
|
|
|
func (s *tweetHelpSrv) MergePosts(posts []*core.Post) ([]*core.PostFormated, error) {
|
|
|
|
func (s *tweetHelpSrv) MergePosts(posts []*ms.Post) ([]*ms.PostFormated, error) {
|
|
|
|
// TODO
|
|
|
|
// TODO
|
|
|
|
debug.NotImplemented()
|
|
|
|
debug.NotImplemented()
|
|
|
|
return nil, nil
|
|
|
|
return nil, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// RevampPosts post数据整形修复
|
|
|
|
// RevampPosts post数据整形修复
|
|
|
|
func (s *tweetHelpSrv) RevampPosts(posts []*core.PostFormated) ([]*core.PostFormated, error) {
|
|
|
|
func (s *tweetHelpSrv) RevampPosts(posts []*ms.PostFormated) ([]*ms.PostFormated, error) {
|
|
|
|
// TODO
|
|
|
|
// TODO
|
|
|
|
debug.NotImplemented()
|
|
|
|
debug.NotImplemented()
|
|
|
|
return nil, nil
|
|
|
|
return nil, nil
|
|
|
@ -54,43 +55,43 @@ func (s *tweetHelpSrv) MergeTweets(tweets cs.TweetInfo) (cs.TweetList, error) {
|
|
|
|
return nil, debug.ErrNotImplemented
|
|
|
|
return nil, debug.ErrNotImplemented
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func (s *tweetHelpSrv) getPostContentsByIDs(ids []int64) ([]*core.PostContent, error) {
|
|
|
|
func (s *tweetHelpSrv) getPostContentsByIDs(ids []int64) ([]*ms.PostContent, error) {
|
|
|
|
// TODO
|
|
|
|
// TODO
|
|
|
|
debug.NotImplemented()
|
|
|
|
debug.NotImplemented()
|
|
|
|
return nil, nil
|
|
|
|
return nil, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func (s *tweetHelpSrv) getUsersByIDs(ids []int64) ([]*core.User, error) {
|
|
|
|
func (s *tweetHelpSrv) getUsersByIDs(ids []int64) ([]*ms.User, error) {
|
|
|
|
// TODO
|
|
|
|
// TODO
|
|
|
|
debug.NotImplemented()
|
|
|
|
debug.NotImplemented()
|
|
|
|
return nil, nil
|
|
|
|
return nil, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func (s *tweetManageSrv) CreatePostCollection(postID, userID int64) (*core.PostCollection, error) {
|
|
|
|
func (s *tweetManageSrv) CreatePostCollection(postID, userID int64) (*ms.PostCollection, error) {
|
|
|
|
// TODO
|
|
|
|
// TODO
|
|
|
|
debug.NotImplemented()
|
|
|
|
debug.NotImplemented()
|
|
|
|
return nil, nil
|
|
|
|
return nil, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func (s *tweetManageSrv) DeletePostCollection(p *core.PostCollection) error {
|
|
|
|
func (s *tweetManageSrv) DeletePostCollection(p *ms.PostCollection) error {
|
|
|
|
// TODO
|
|
|
|
// TODO
|
|
|
|
debug.NotImplemented()
|
|
|
|
debug.NotImplemented()
|
|
|
|
return nil
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func (s *tweetManageSrv) CreatePostContent(content *core.PostContent) (*core.PostContent, error) {
|
|
|
|
func (s *tweetManageSrv) CreatePostContent(content *ms.PostContent) (*ms.PostContent, error) {
|
|
|
|
// TODO
|
|
|
|
// TODO
|
|
|
|
debug.NotImplemented()
|
|
|
|
debug.NotImplemented()
|
|
|
|
return nil, nil
|
|
|
|
return nil, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func (s *tweetManageSrv) CreatePost(post *core.Post) (*core.Post, error) {
|
|
|
|
func (s *tweetManageSrv) CreatePost(post *ms.Post) (*ms.Post, error) {
|
|
|
|
// TODO
|
|
|
|
// TODO
|
|
|
|
debug.NotImplemented()
|
|
|
|
debug.NotImplemented()
|
|
|
|
return nil, nil
|
|
|
|
return nil, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func (s *tweetManageSrv) DeletePost(post *core.Post) ([]string, error) {
|
|
|
|
func (s *tweetManageSrv) DeletePost(post *ms.Post) ([]string, error) {
|
|
|
|
// TODO
|
|
|
|
// TODO
|
|
|
|
debug.NotImplemented()
|
|
|
|
debug.NotImplemented()
|
|
|
|
return nil, nil
|
|
|
|
return nil, nil
|
|
|
@ -102,43 +103,43 @@ func (s *tweetManageSrv) deleteCommentByPostId(db *gorm.DB, postId int64) ([]str
|
|
|
|
return nil, nil
|
|
|
|
return nil, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func (s *tweetManageSrv) LockPost(post *core.Post) error {
|
|
|
|
func (s *tweetManageSrv) LockPost(post *ms.Post) error {
|
|
|
|
// TODO
|
|
|
|
// TODO
|
|
|
|
debug.NotImplemented()
|
|
|
|
debug.NotImplemented()
|
|
|
|
return nil
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func (s *tweetManageSrv) StickPost(post *core.Post) error {
|
|
|
|
func (s *tweetManageSrv) StickPost(post *ms.Post) error {
|
|
|
|
// TODO
|
|
|
|
// TODO
|
|
|
|
debug.NotImplemented()
|
|
|
|
debug.NotImplemented()
|
|
|
|
return nil
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func (s *tweetManageSrv) VisiblePost(post *core.Post, visibility core.PostVisibleT) error {
|
|
|
|
func (s *tweetManageSrv) VisiblePost(post *ms.Post, visibility core.PostVisibleT) error {
|
|
|
|
// TODO
|
|
|
|
// TODO
|
|
|
|
debug.NotImplemented()
|
|
|
|
debug.NotImplemented()
|
|
|
|
return nil
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func (s *tweetManageSrv) UpdatePost(post *core.Post) error {
|
|
|
|
func (s *tweetManageSrv) UpdatePost(post *ms.Post) error {
|
|
|
|
// TODO
|
|
|
|
// TODO
|
|
|
|
debug.NotImplemented()
|
|
|
|
debug.NotImplemented()
|
|
|
|
return nil
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func (s *tweetManageSrv) CreatePostStar(postID, userID int64) (*core.PostStar, error) {
|
|
|
|
func (s *tweetManageSrv) CreatePostStar(postID, userID int64) (*ms.PostStar, error) {
|
|
|
|
// TODO
|
|
|
|
// TODO
|
|
|
|
debug.NotImplemented()
|
|
|
|
debug.NotImplemented()
|
|
|
|
return nil, nil
|
|
|
|
return nil, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func (s *tweetManageSrv) DeletePostStar(p *core.PostStar) error {
|
|
|
|
func (s *tweetManageSrv) DeletePostStar(p *ms.PostStar) error {
|
|
|
|
// TODO
|
|
|
|
// TODO
|
|
|
|
debug.NotImplemented()
|
|
|
|
debug.NotImplemented()
|
|
|
|
return nil
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func (s *tweetManageSrv) CreateAttachment(obj *cs.Attachment) (int64, error) {
|
|
|
|
func (s *tweetManageSrv) CreateAttachment(obj *ms.Attachment) (int64, error) {
|
|
|
|
// TODO
|
|
|
|
// TODO
|
|
|
|
return 0, debug.ErrNotImplemented
|
|
|
|
return 0, debug.ErrNotImplemented
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -188,31 +189,31 @@ func (s *tweetManageSrv) DeleteFavorite(userId int64, favoriteId int64) error {
|
|
|
|
return debug.ErrNotImplemented
|
|
|
|
return debug.ErrNotImplemented
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func (s *tweetSrv) GetPostByID(id int64) (*core.Post, error) {
|
|
|
|
func (s *tweetSrv) GetPostByID(id int64) (*ms.Post, error) {
|
|
|
|
// TODO
|
|
|
|
// TODO
|
|
|
|
debug.NotImplemented()
|
|
|
|
debug.NotImplemented()
|
|
|
|
return nil, nil
|
|
|
|
return nil, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func (s *tweetSrv) GetPosts(conditions *core.ConditionsT, limit int, offset int) ([]*core.Post, error) {
|
|
|
|
func (s *tweetSrv) GetPosts(conditions ms.ConditionsT, limit int, offset int) ([]*ms.Post, error) {
|
|
|
|
// TODO
|
|
|
|
// TODO
|
|
|
|
debug.NotImplemented()
|
|
|
|
debug.NotImplemented()
|
|
|
|
return nil, nil
|
|
|
|
return nil, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func (s *tweetSrv) GetPostCount(conditions *core.ConditionsT) (int64, error) {
|
|
|
|
func (s *tweetSrv) GetPostCount(conditions ms.ConditionsT) (int64, error) {
|
|
|
|
// TODO
|
|
|
|
// TODO
|
|
|
|
debug.NotImplemented()
|
|
|
|
debug.NotImplemented()
|
|
|
|
return 0, nil
|
|
|
|
return 0, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func (s *tweetSrv) GetUserPostStar(postID, userID int64) (*core.PostStar, error) {
|
|
|
|
func (s *tweetSrv) GetUserPostStar(postID, userID int64) (*ms.PostStar, error) {
|
|
|
|
// TODO
|
|
|
|
// TODO
|
|
|
|
debug.NotImplemented()
|
|
|
|
debug.NotImplemented()
|
|
|
|
return nil, nil
|
|
|
|
return nil, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func (s *tweetSrv) GetUserPostStars(userID int64, limit int, offset int) ([]*core.PostStar, error) {
|
|
|
|
func (s *tweetSrv) GetUserPostStars(userID int64, limit int, offset int) ([]*ms.PostStar, error) {
|
|
|
|
// TODO
|
|
|
|
// TODO
|
|
|
|
debug.NotImplemented()
|
|
|
|
debug.NotImplemented()
|
|
|
|
return nil, nil
|
|
|
|
return nil, nil
|
|
|
@ -224,13 +225,13 @@ func (s *tweetSrv) GetUserPostStarCount(userID int64) (int64, error) {
|
|
|
|
return 0, nil
|
|
|
|
return 0, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func (s *tweetSrv) GetUserPostCollection(postID, userID int64) (*core.PostCollection, error) {
|
|
|
|
func (s *tweetSrv) GetUserPostCollection(postID, userID int64) (*ms.PostCollection, error) {
|
|
|
|
// TODO
|
|
|
|
// TODO
|
|
|
|
debug.NotImplemented()
|
|
|
|
debug.NotImplemented()
|
|
|
|
return nil, nil
|
|
|
|
return nil, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func (s *tweetSrv) GetUserPostCollections(userID int64, limit int, offset int) ([]*core.PostCollection, error) {
|
|
|
|
func (s *tweetSrv) GetUserPostCollections(userID int64, limit int, offset int) ([]*ms.PostCollection, error) {
|
|
|
|
// TODO
|
|
|
|
// TODO
|
|
|
|
debug.NotImplemented()
|
|
|
|
debug.NotImplemented()
|
|
|
|
return nil, nil
|
|
|
|
return nil, nil
|
|
|
@ -242,7 +243,7 @@ func (s *tweetSrv) GetUserPostCollectionCount(userID int64) (int64, error) {
|
|
|
|
return 0, nil
|
|
|
|
return 0, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func (s *tweetSrv) GetUserWalletBills(userID int64, limit int, offset int) ([]*core.WalletStatement, error) {
|
|
|
|
func (s *tweetSrv) GetUserWalletBills(userID int64, limit int, offset int) ([]*ms.WalletStatement, error) {
|
|
|
|
// TODO
|
|
|
|
// TODO
|
|
|
|
debug.NotImplemented()
|
|
|
|
debug.NotImplemented()
|
|
|
|
return nil, nil
|
|
|
|
return nil, nil
|
|
|
@ -254,19 +255,19 @@ func (s *tweetSrv) GetUserWalletBillCount(userID int64) (int64, error) {
|
|
|
|
return 0, nil
|
|
|
|
return 0, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func (s *tweetSrv) GetPostAttatchmentBill(postID, userID int64) (*core.PostAttachmentBill, error) {
|
|
|
|
func (s *tweetSrv) GetPostAttatchmentBill(postID, userID int64) (*ms.PostAttachmentBill, error) {
|
|
|
|
// TODO
|
|
|
|
// TODO
|
|
|
|
debug.NotImplemented()
|
|
|
|
debug.NotImplemented()
|
|
|
|
return nil, nil
|
|
|
|
return nil, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func (s *tweetSrv) GetPostContentsByIDs(ids []int64) ([]*core.PostContent, error) {
|
|
|
|
func (s *tweetSrv) GetPostContentsByIDs(ids []int64) ([]*ms.PostContent, error) {
|
|
|
|
// TODO
|
|
|
|
// TODO
|
|
|
|
debug.NotImplemented()
|
|
|
|
debug.NotImplemented()
|
|
|
|
return nil, nil
|
|
|
|
return nil, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func (s *tweetSrv) GetPostContentByID(id int64) (*core.PostContent, error) {
|
|
|
|
func (s *tweetSrv) GetPostContentByID(id int64) (*ms.PostContent, error) {
|
|
|
|
// TODO
|
|
|
|
// TODO
|
|
|
|
debug.NotImplemented()
|
|
|
|
debug.NotImplemented()
|
|
|
|
return nil, nil
|
|
|
|
return nil, nil
|
|
|
|