diff --git a/et_print/printHandler.go b/et_print/printHandler.go index 90fd1f4..2a1f128 100644 --- a/et_print/printHandler.go +++ b/et_print/printHandler.go @@ -19,10 +19,17 @@ func NewPrintHandler() *PrintHandler { stage: stages.NewStage("测试打印"), } - the.stage.AddProcess(the.print) + the.stage.AddProcess(the.printDatas) return the } +func (the *PrintHandler) printDatas(data []*common_models.ProcessData) []*common_models.ProcessData { + for _, processData := range data { + the.print(processData) + } + return data +} + func (the *PrintHandler) print(p *common_models.ProcessData) *common_models.ProcessData { log.Printf("处理设备[%s]数据", p.DeviceData.Name)