feat: add order governance flags and reconciliation

This commit is contained in:
2026-01-16 13:29:59 +08:00
parent 7ead7fc11c
commit e5f40287c3
17 changed files with 1247 additions and 103 deletions

View File

@@ -267,6 +267,20 @@ func (r *Routes) Register(router fiber.Router) {
router.Get("/super/v1/orders/statistics"[len(r.Path()):], DataFunc0(
r.orders.Statistics,
))
r.log.Debugf("Registering route: Post /super/v1/orders/:id<int>/flag -> orders.Flag")
router.Post("/super/v1/orders/:id<int>/flag"[len(r.Path()):], Func3(
r.orders.Flag,
Local[*models.User]("__ctx_user"),
PathParam[int64]("id"),
Body[dto.SuperOrderFlagForm]("form"),
))
r.log.Debugf("Registering route: Post /super/v1/orders/:id<int>/reconcile -> orders.Reconcile")
router.Post("/super/v1/orders/:id<int>/reconcile"[len(r.Path()):], Func3(
r.orders.Reconcile,
Local[*models.User]("__ctx_user"),
PathParam[int64]("id"),
Body[dto.SuperOrderReconcileForm]("form"),
))
r.log.Debugf("Registering route: Post /super/v1/orders/:id<int>/refund -> orders.Refund")
router.Post("/super/v1/orders/:id<int>/refund"[len(r.Path()):], Func2(
r.orders.Refund,