From b555874608be2e4bb40cceba60b497c04caef842 Mon Sep 17 00:00:00 2001 From: zhangqian <zhangqian@123.com> Date: 星期二, 12 九月 2023 14:17:51 +0800 Subject: [PATCH] 三菱协议更改 --- model/net_config.go | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/model/net_config.go b/model/net_config.go index 75a9fa5..70fd169 100644 --- a/model/net_config.go +++ b/model/net_config.go @@ -60,7 +60,9 @@ func (slf *NetConfigSearch) build() *gorm.DB { var db = slf.Orm.Model(&NetConfig{}) - + if slf.Id > 0 { + db = db.Where("id = ?", slf.Id) + } return db } @@ -201,7 +203,7 @@ }, { Id: 2, - NetworkCard: "", + NetworkCard: "enp2s0", IP: "", MASK: "", Gateway: "", -- Gitblit v1.8.0