修复(#10): 禁止通用订单状态接口标记退款 (#12)

Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
2026-06-05 23:35:42 -07:00
committed by GitHub
parent 34cd1c524e
commit bcb8cd222c
2 changed files with 31 additions and 0 deletions
@@ -31,6 +31,10 @@ func NewUpdateOrderStatusLogic(ctx context.Context, svcCtx *svc.ServiceContext)
}
func (l *UpdateOrderStatusLogic) UpdateOrderStatus(req *types.UpdateOrderStatusRequest) error {
if req.Status == orderStatusRefunded {
return errors.Wrapf(xerr.NewErrCode(xerr.OrderStatusError), "refund status must use refund order endpoint")
}
info, err := l.svcCtx.OrderModel.FindOne(l.ctx, req.Id)
if err != nil {
l.Errorw("[UpdateOrderStatus] FindOne error", logger.Field("error", err.Error()))