2024-10-25 10:17:27 +00:00
|
|
|
package orderservicelogic
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
|
|
|
"app-cloudep-trade-service/gen_result/pb/trade"
|
|
|
|
"app-cloudep-trade-service/internal/svc"
|
|
|
|
|
|
|
|
"github.com/zeromicro/go-zero/core/logx"
|
|
|
|
)
|
|
|
|
|
|
|
|
type OrderStatusTimeoutLogic struct {
|
|
|
|
ctx context.Context
|
|
|
|
svcCtx *svc.ServiceContext
|
|
|
|
logx.Logger
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewOrderStatusTimeoutLogic(ctx context.Context, svcCtx *svc.ServiceContext) *OrderStatusTimeoutLogic {
|
|
|
|
return &OrderStatusTimeoutLogic{
|
|
|
|
ctx: ctx,
|
|
|
|
svcCtx: svcCtx,
|
|
|
|
Logger: logx.WithContext(ctx),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// OrderStatusTimeout 訂單超時任務/cron/order-status/timeout
|
2024-10-27 16:07:24 +00:00
|
|
|
func (l *OrderStatusTimeoutLogic) OrderStatusTimeout(_ *trade.OrderStatusTimeoutReq) (*trade.OKResp, error) {
|
2024-10-27 16:01:55 +00:00
|
|
|
err := l.svcCtx.OrderUseCase.OrderStatusTimeout(l.ctx)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
2024-10-25 10:17:27 +00:00
|
|
|
|
|
|
|
return &trade.OKResp{}, nil
|
|
|
|
}
|