feat: 更新订单和用户视图,增强订单信息展示,支持充值类型订单
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user