feat: 迁移plant

This commit is contained in:
Blizzard
2026-05-23 13:55:05 +08:00
parent a93477ea8e
commit ae6d03d351
228 changed files with 25296 additions and 917 deletions
@@ -5,9 +5,11 @@ package post
import (
"context"
"fmt"
"sundynix-micro-go/app/plant/api/internal/svc"
"sundynix-micro-go/app/plant/api/internal/types"
"sundynix-micro-go/app/plant/rpc/plant"
"github.com/zeromicro/go-zero/core/logx"
)
@@ -28,7 +30,14 @@ func NewCreatePostLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Create
}
func (l *CreatePostLogic) CreatePost(req *types.CreatePostReq) error {
// todo: add your logic here and delete this line
return nil
userId := fmt.Sprintf("%v", l.ctx.Value("userId"))
_, err := l.svcCtx.PlantRpc.CreatePost(l.ctx, &plant.CreatePostReq{
UserId: userId,
Title: req.Title,
Content: req.Content,
Location: req.Location,
ImgIds: req.ImgIds,
TopicId: req.TopicId,
})
return err
}