From 74f8cd07a39795656573d4e4bb2fe85a6dadbb8c Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期六, 02 九月 2023 15:15:44 +0800
Subject: [PATCH] 从云端请求工艺参数,加入deviceId字段用于消息过滤

---
 service/task.go        |    4 +++-
 model/common/common.go |    2 ++
 2 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/model/common/common.go b/model/common/common.go
index eafbbd4..9331347 100644
--- a/model/common/common.go
+++ b/model/common/common.go
@@ -74,6 +74,7 @@
 		Product   string `json:"password"`                             // 浜у搧
 		Procedure string `json:"procedure"`                            // 宸ュ簭
 		Device    string `json:"device"`                               // 璁惧
+		DeviceId  string `json:"deviceId" gorm:"-"`                    //鐢ㄤ簬杩囨护鑾峰彇nsq娑堟伅
 	}
 	ResponseProcessParams struct {
 		Number    string                 `json:"number"`    //宸ヨ壓妯″瀷缂栧彿
@@ -84,5 +85,6 @@
 		Device    string                 `json:"device"`    //璁惧
 		Params    string                 `json:"params"`
 		ParamsMap map[string]interface{} `json:"paramsMap"`
+		DeviceId  string                 `json:"deviceId" gorm:"-"` //鐢ㄤ簬杩囨护鑾峰彇nsq娑堟伅
 	}
 )
diff --git a/service/task.go b/service/task.go
index 43d6819..357de7b 100644
--- a/service/task.go
+++ b/service/task.go
@@ -120,7 +120,9 @@
 			OrderId:   procedure.OrderID,
 			Product:   order.ProductName,
 			Procedure: procedure.ProceduresInfo.ProcedureName,
-			Device:    procedure.ProceduresInfo.DeviceName}, &result, time.Second*3)
+			Device:    procedure.ProceduresInfo.DeviceName,
+			DeviceId:  conf.Conf.System.DeviceId,
+		}, &result, time.Second*3)
 		if err != nil {
 			logx.Errorf("TaskStart GetProcessModel error:%v", err.Error())
 			return

--
Gitblit v1.8.0