feat: 迁移plant
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
|
||||
"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"
|
||||
)
|
||||
@@ -27,8 +28,16 @@ func NewGetExchangeItemListLogic(ctx context.Context, svcCtx *svc.ServiceContext
|
||||
}
|
||||
}
|
||||
|
||||
func (l *GetExchangeItemListLogic) GetExchangeItemList(req *types.ExchangeItemListReq) error {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return nil
|
||||
func (l *GetExchangeItemListLogic) GetExchangeItemList(req *types.ExchangeItemListReq) (interface{}, error) {
|
||||
result, err := l.svcCtx.PlantRpc.GetExchangeItemList(l.ctx, &plant.ExchangeItemListReq{
|
||||
Current: int32(req.Current),
|
||||
PageSize: int32(req.PageSize),
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return map[string]interface{}{
|
||||
"list": result.List,
|
||||
"total": result.Total,
|
||||
}, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user