feat: add admin order refund flow

Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
2026-05-24 09:05:27 -07:00
parent fd522b6c71
commit e3f46c3614
14 changed files with 672 additions and 9 deletions
@@ -35,6 +35,28 @@ func (l *GetOrderListLogic) GetOrderList(req *types.GetOrderListRequest) (resp *
resp = &types.GetOrderListResponse{}
resp.List = make([]types.Order, 0)
tool.DeepCopy(&resp.List, list)
for i := range resp.List {
resp.List[i].StatusName = orderStatusName(resp.List[i].Status)
}
resp.Total = total
return
}
func orderStatusName(status uint8) string {
switch status {
case 1:
return "pending"
case 2:
return "paid"
case 3:
return "closed"
case 4:
return "failed"
case 5:
return "finished"
case 6:
return "refunded"
default:
return "unknown"
}
}