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 userProfile
import (
"context"
"fmt"
"github.com/zeromicro/go-zero/core/logx"
"sundynix-micro-go/app/plant/api/internal/svc"
"sundynix-micro-go/app/plant/rpc/plant"
)
type GetUserProfileLogic struct {
@@ -25,8 +27,11 @@ func NewGetUserProfileLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Ge
}
}
func (l *GetUserProfileLogic) GetUserProfile() error {
// todo: add your logic here and delete this line
return nil
func (l *GetUserProfileLogic) GetUserProfile() (interface{}, error) {
userId := fmt.Sprintf("%v", l.ctx.Value("userId"))
result, err := l.svcCtx.PlantRpc.GetUserProfile(l.ctx, &plant.GetProfileReq{UserId: userId})
if err != nil {
return nil, err
}
return result, nil
}