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 exchange
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 NewCreateExchangeOrderLogic(ctx context.Context, svcCtx *svc.ServiceContext
}
func (l *CreateExchangeOrderLogic) CreateExchangeOrder(req *types.ExchangeOrderReq) error {
// todo: add your logic here and delete this line
return nil
userId := fmt.Sprintf("%v", l.ctx.Value("userId"))
_, err := l.svcCtx.PlantRpc.CreateExchangeOrder(l.ctx, &plant.CreateExchangeOrderReq{
UserId: userId,
ItemId: req.ItemId,
Quantity: int32(req.Quantity),
RecipientName: req.RecipientName,
Phone: req.Phone,
Address: req.Address,
})
return err
}