From f0650a3cfc0da9941fdfddfcf89110d5985ae87b Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期四, 07 十二月 2023 15:12:37 +0800
Subject: [PATCH] 同步完工序状态后不再删除,增加同步状态

---
 nsq/msg_handler.go |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/nsq/msg_handler.go b/nsq/msg_handler.go
index 423011f..0a1fc03 100644
--- a/nsq/msg_handler.go
+++ b/nsq/msg_handler.go
@@ -450,7 +450,8 @@
 	if err == gorm.ErrRecordNotFound {
 		err = model.NewDashboardSearch(nil).SetVersion(dashboard.Version).Create(&dashboard)
 	} else {
-		err = model.NewDashboardSearch(nil).SetId(old.ID).Updates(&dashboard)
+		dashboard.ID = old.ID
+		err = model.NewDashboardSearch(nil).Save(&dashboard)
 	}
 	if err != nil {
 		logx.Infof("process pull data  err :%s", err)

--
Gitblit v1.8.0