From a8c11000a0fdf2ce93bd198950d8b8160606a28e Mon Sep 17 00:00:00 2001 From: louwenzhi Date: Fri, 16 Jul 2021 16:21:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=BF=E6=8D=A2=E5=AD=97=E6=AE=B5=E9=94=99?= =?UTF-8?q?=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/PrintTask.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/db/PrintTask.go b/db/PrintTask.go index 71200b8..ee76d22 100644 --- a/db/PrintTask.go +++ b/db/PrintTask.go @@ -1,11 +1,11 @@ package db import ( - "bufio" - "github.com/360EntSecGroup-Skylar/excelize/v2" "LAPP_PRN_Service/common" conf "LAPP_PRN_Service/config" "LAPP_PRN_Service/glog" + "bufio" + "github.com/360EntSecGroup-Skylar/excelize/v2" "os" "path" "path/filepath" @@ -74,7 +74,7 @@ func (t *PrintTask) GenPrintFile(conf *conf.EnvConfig) error { linetext := scanner.Text() for _, pd := range t.PrintDetailList { // -1 替换所有; 1 替换第一个; 5 替换前5个 - linetext = strings.Replace(linetext, pd.VarName, pd.VarPos, -1) + linetext = strings.Replace(linetext, pd.VarName, pd.VarValue, -1) } results = append(results, linetext) }