From f008bf77342a93c13d1e42399dd175c9c941d3ef Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期五, 03 十一月 2023 21:05:16 +0800
Subject: [PATCH] 工艺参数地址表从文件里获取改成从数据库查询

---
 api/v1/device.go |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/api/v1/device.go b/api/v1/device.go
index 5c08540..c107808 100644
--- a/api/v1/device.go
+++ b/api/v1/device.go
@@ -29,7 +29,7 @@
 	if !ok {
 		return
 	}
-	if params.CurrentDeviceID != "" {
+	if params.CurrentDeviceID == "" {
 		ctx.Fail(ecode.ParamsErr)
 		return
 	}
@@ -45,7 +45,7 @@
 		return
 	}
 	service.SetDeviceIDToFile(params.CurrentDeviceID)
-	conf.Conf.SerfClusterStatus = params.CurrentDeviceID
+	conf.Conf.CurrentDeviceID = params.CurrentDeviceID
 	err = crontask.RestartTask(conf.Conf.SerfClusterStatus != constvar.SerfClusterStatusSlave)
 	if err != nil {
 		logx.Errorf("restart task failed:%v", err)

--
Gitblit v1.8.0