32 lines
721 B
Go
32 lines
721 B
Go
package inventoryservicelogic
|
|
|
|
import (
|
|
"context"
|
|
|
|
"app-cloudep-trade-service/gen_result/pb/trade"
|
|
"app-cloudep-trade-service/internal/svc"
|
|
|
|
"github.com/zeromicro/go-zero/core/logx"
|
|
)
|
|
|
|
type ReserveStockLogic struct {
|
|
ctx context.Context
|
|
svcCtx *svc.ServiceContext
|
|
logx.Logger
|
|
}
|
|
|
|
func NewReserveStockLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ReserveStockLogic {
|
|
return &ReserveStockLogic{
|
|
ctx: ctx,
|
|
svcCtx: svcCtx,
|
|
Logger: logx.WithContext(ctx),
|
|
}
|
|
}
|
|
|
|
// ReserveStock 預留庫存 (用於未完成的訂單)
|
|
func (l *ReserveStockLogic) ReserveStock(in *trade.StockReservationReq) (*trade.OKResp, error) {
|
|
// todo: add your logic here and delete this line
|
|
|
|
return &trade.OKResp{}, nil
|
|
}
|