feat: add admin order refund flow
Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user