From 0334f9125141ea2f9d64023c4bf961eb992741a1 Mon Sep 17 00:00:00 2001 From: wucongxing8150 <815046773@qq.com> Date: Fri, 6 Dec 2024 09:13:14 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E5=87=BA=E9=97=AE=E9=A2=98=EF=BC=8C?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BA=86=E6=89=93=E5=8D=B02?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/service/export.go | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/api/service/export.go b/api/service/export.go index d7b3351..38b79aa 100644 --- a/api/service/export.go +++ b/api/service/export.go @@ -1,7 +1,6 @@ package service import ( - "encoding/json" "fmt" "github.com/shopspring/decimal" "hospital-admin-api/api/dao" @@ -1657,14 +1656,7 @@ func (r *ExportService) OrderProduct(d []*model.OrderProduct) (string, error) { dataSlice = append(dataSlice, data) } - // 转为 JSON - jsonData, err := json.Marshal(dataSlice) - if err != nil { - fmt.Println("Error converting to JSON:", err) - return "", err - } - - utils.LogJsonInfo("打印数据:", jsonData) + utils.LogJsonInfo("打印数据:", dataSlice) file, err := utils.Export(header, dataSlice) if err != nil {