feat: 更新订单和用户视图,增强订单信息展示,支持充值类型订单

This commit is contained in:
2025-12-31 12:19:01 +08:00
parent 95bc5bdb5d
commit c133169c7b
5 changed files with 161 additions and 105 deletions

View File

@@ -353,11 +353,14 @@ func (s *order) Status(ctx context.Context, id string) (*transaction_dto.OrderSt
func (s *order) composeOrderDTO(ctx context.Context, o *models.Order) (user_dto.Order, error) {
dto := user_dto.Order{
ID: cast.ToString(o.ID),
Status: string(o.Status),
Amount: float64(o.AmountPaid) / 100.0,
CreateTime: o.CreatedAt.Format(time.RFC3339),
TenantID: cast.ToString(o.TenantID),
ID: cast.ToString(o.ID),
Type: string(o.Type),
TypeDescription: o.Type.Description(),
Status: string(o.Status),
StatusDescription: o.Status.Description(),
Amount: float64(o.AmountPaid) / 100.0,
CreateTime: o.CreatedAt.Format(time.RFC3339),
TenantID: cast.ToString(o.TenantID),
}
// Fetch Tenant Name