feat: 植物识别百科ai助手迁移

This commit is contained in:
Blizzard
2026-05-24 01:41:22 +08:00
parent ae6d03d351
commit 076ed1509b
29 changed files with 1121 additions and 372 deletions
@@ -31,12 +31,16 @@ func NewCreatePostLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Create
func (l *CreatePostLogic) CreatePost(req *types.CreatePostReq) error {
userId := fmt.Sprintf("%v", l.ctx.Value("userId"))
imgIds := req.ImgIds
if len(imgIds) == 0 && len(req.OssIds) > 0 {
imgIds = req.OssIds
}
_, err := l.svcCtx.PlantRpc.CreatePost(l.ctx, &plant.CreatePostReq{
UserId: userId,
Title: req.Title,
Content: req.Content,
Location: req.Location,
ImgIds: req.ImgIds,
ImgIds: imgIds,
TopicId: req.TopicId,
})
return err