|
|
|
@ -7,6 +7,7 @@ package sakila
|
|
|
|
|
import (
|
|
|
|
|
"github.com/jmoiron/sqlx"
|
|
|
|
|
"github.com/rocboss/paopao-ce/internal/core"
|
|
|
|
|
"github.com/rocboss/paopao-ce/internal/core/cs"
|
|
|
|
|
"github.com/rocboss/paopao-ce/internal/dao/jinzhu/dbr"
|
|
|
|
|
"github.com/rocboss/paopao-ce/pkg/debug"
|
|
|
|
|
"gorm.io/gorm"
|
|
|
|
@ -54,6 +55,16 @@ func (s *tweetHelpServant) RevampPosts(posts []*core.PostFormated) ([]*core.Post
|
|
|
|
|
return nil, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (s *tweetHelpServant) RevampTweets(tweets cs.TweetList) (cs.TweetList, error) {
|
|
|
|
|
// TODO
|
|
|
|
|
return nil, debug.ErrNotImplemented
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (s *tweetHelpServant) MergeTweets(tweets cs.TweetInfo) (cs.TweetList, error) {
|
|
|
|
|
// TODO
|
|
|
|
|
return nil, debug.ErrNotImplemented
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (s *tweetHelpServant) getPostContentsByIDs(ids []int64) ([]*dbr.PostContent, error) {
|
|
|
|
|
// TODO
|
|
|
|
|
debug.NotImplemented()
|
|
|
|
@ -84,10 +95,9 @@ func (s *tweetManageServant) CreatePostContent(content *core.PostContent) (*core
|
|
|
|
|
return nil, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (s *tweetManageServant) CreateAttachment(attachment *core.Attachment) (*core.Attachment, error) {
|
|
|
|
|
func (s *tweetManageServant) CreateAttachment(obj *cs.Attachment) (int64, error) {
|
|
|
|
|
// TODO
|
|
|
|
|
debug.NotImplemented()
|
|
|
|
|
return nil, nil
|
|
|
|
|
return 0, debug.ErrNotImplemented
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (s *tweetManageServant) CreatePost(post *core.Post) (*core.Post, error) {
|
|
|
|
@ -144,6 +154,51 @@ func (s *tweetManageServant) DeletePostStar(p *core.PostStar) error {
|
|
|
|
|
return nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (s *tweetManageServant) CreateTweet(userId int64, req *cs.NewTweetReq) (*cs.TweetItem, error) {
|
|
|
|
|
// TODO
|
|
|
|
|
return nil, debug.ErrNotImplemented
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (s *tweetManageServant) DeleteTweet(userId int64, tweetId int64) ([]string, error) {
|
|
|
|
|
// TODO
|
|
|
|
|
return nil, debug.ErrNotImplemented
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (s *tweetManageServant) LockTweet(userId int64, tweetId int64) error {
|
|
|
|
|
// TODO
|
|
|
|
|
return debug.ErrNotImplemented
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (s *tweetManageServant) StickTweet(userId int64, tweetId int64) error {
|
|
|
|
|
// TODO
|
|
|
|
|
return debug.ErrNotImplemented
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (s *tweetManageServant) VisibleTweet(userId int64, visibility cs.TweetVisibleType) error {
|
|
|
|
|
// TODO
|
|
|
|
|
return debug.ErrNotImplemented
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (s *tweetManageServant) CreateReaction(userId int64, tweetId int64) error {
|
|
|
|
|
// TODO
|
|
|
|
|
return debug.ErrNotImplemented
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (s *tweetManageServant) DeleteReaction(userId int64, reactionId int64) error {
|
|
|
|
|
// TODO
|
|
|
|
|
return debug.ErrNotImplemented
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (s *tweetManageServant) CreateFavorite(userId int64, tweetId int64) error {
|
|
|
|
|
// TODO
|
|
|
|
|
return debug.ErrNotImplemented
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (s *tweetManageServant) DeleteFavorite(userId int64, favoriteId int64) error {
|
|
|
|
|
// TODO
|
|
|
|
|
return debug.ErrNotImplemented
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (s *tweetServant) GetPostByID(id int64) (*core.Post, error) {
|
|
|
|
|
// TODO
|
|
|
|
|
debug.NotImplemented()
|
|
|
|
@ -228,6 +283,46 @@ func (s *tweetServant) GetPostContentByID(id int64) (*core.PostContent, error) {
|
|
|
|
|
return nil, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (s *tweetServant) TweetInfoById(id int64) (*cs.TweetInfo, error) {
|
|
|
|
|
// TODO
|
|
|
|
|
return nil, debug.ErrNotImplemented
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (s *tweetServant) TweetItemById(id int64) (*cs.TweetItem, error) {
|
|
|
|
|
// TODO
|
|
|
|
|
return nil, debug.ErrNotImplemented
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (s *tweetServant) UserTweets(visitorId, userId int64) (cs.TweetList, error) {
|
|
|
|
|
// TODO
|
|
|
|
|
return nil, debug.ErrNotImplemented
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (s *tweetServant) ReactionByTweetId(userId int64, tweetId int64) (*cs.ReactionItem, error) {
|
|
|
|
|
// TODO
|
|
|
|
|
return nil, debug.ErrNotImplemented
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (s *tweetServant) UserReactions(userId int64, offset int, limit int) (cs.ReactionList, error) {
|
|
|
|
|
// TODO
|
|
|
|
|
return nil, debug.ErrNotImplemented
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (s *tweetServant) FavoriteByTweetId(userId int64, tweetId int64) (*cs.FavoriteItem, error) {
|
|
|
|
|
// TODO
|
|
|
|
|
return nil, debug.ErrNotImplemented
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (s *tweetServant) UserFavorites(userId int64, offset int, limit int) (cs.FavoriteList, error) {
|
|
|
|
|
// TODO
|
|
|
|
|
return nil, debug.ErrNotImplemented
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (s *tweetServant) AttachmentByTweetId(userId int64, tweetId int64) (*cs.AttachmentBill, error) {
|
|
|
|
|
// TODO
|
|
|
|
|
return nil, debug.ErrNotImplemented
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func newTweetService(db *sqlx.DB) core.TweetService {
|
|
|
|
|
return &tweetServant{
|
|
|
|
|
sqlxServant: newSqlxServant(db),
|
|
|
|
|