diff --git a/controller/invoice.go b/controller/invoice.go index c96622d..4e88146 100644 --- a/controller/invoice.go +++ b/controller/invoice.go @@ -60,7 +60,7 @@ func listInvoices(c *fiber.Ctx) error { invoiceLog.Error("列出指定园区中的符合条件的发票记录失败,检索符合条件的发票记录出现错误。", zap.Error(err)) return result.Error(fiber.StatusInternalServerError, "检索符合条件的发票记录出现错误。") } - var invoiceResponse []*vo.InvoiceResponse + invoiceResponse := make([]*vo.InvoiceResponse, 0) copier.Copy(&invoiceResponse, &invoices) return result.Success( "已经获取到符合条件的发票列表。",