32 lines
783 B
Go
32 lines
783 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 ReleaseReservedStockLogic struct {
|
||
|
ctx context.Context
|
||
|
svcCtx *svc.ServiceContext
|
||
|
logx.Logger
|
||
|
}
|
||
|
|
||
|
func NewReleaseReservedStockLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ReleaseReservedStockLogic {
|
||
|
return &ReleaseReservedStockLogic{
|
||
|
ctx: ctx,
|
||
|
svcCtx: svcCtx,
|
||
|
Logger: logx.WithContext(ctx),
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// ReleaseReservedStock 釋放預留庫存 (取消或失效的訂單)
|
||
|
func (l *ReleaseReservedStockLogic) ReleaseReservedStock(in *trade.StockReservationReq) (*trade.OKResp, error) {
|
||
|
// todo: add your logic here and delete this line
|
||
|
|
||
|
return &trade.OKResp{}, nil
|
||
|
}
|