feat(t242): delete unused freight orders

This commit is contained in:
QiuSW
2026-07-29 16:10:45 +08:00
parent c80a5c26ed
commit e5f403ff7d
20 changed files with 915 additions and 27 deletions
@@ -255,6 +255,23 @@ func (h *adminHandlers) freightOrderDetail(ctx *gin.Context) {
ctx.JSON(http.StatusOK, response)
}
func (h *adminHandlers) deleteFreightOrder(ctx *gin.Context) {
err := h.services.Freight.DeleteOrder(
ctx.Request.Context(),
usecase.DeleteFreightOrderCommand{
CreatorSubject: localAdminSubject,
ActorUserID: adminActorUserID(ctx),
OrderID: ctx.Param("id"),
},
)
if err != nil {
writeUsecaseError(ctx, err)
return
}
ctx.Header("Cache-Control", "no-store")
ctx.Status(http.StatusNoContent)
}
func freightSyncResponse(run domain.FreightSyncRun) gin.H {
return gin.H{
"id": run.ID,