From 8e941bd782f574597f19c980982afade4dc11748 Mon Sep 17 00:00:00 2001 From: zhangqian <zhangqian@123.com> Date: 星期五, 08 十二月 2023 19:52:20 +0800 Subject: [PATCH] snowflake的id传参换成字符串 --- model/net_config.go | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/model/net_config.go b/model/net_config.go index 0223a47..ed7523e 100644 --- a/model/net_config.go +++ b/model/net_config.go @@ -9,7 +9,7 @@ type ( NetConfig struct { - gorm.Model + CommonModel NetworkCard string `gorm:"type:varchar(100);not null;default ''" json:"networkCard" binding:"required"` //缃戝崱 IP string `gorm:"type:varchar(100);not null;default ''" json:"ip" binding:"required"` //鏈満ip MASK string `gorm:"type:varchar(100);not null;default ''" json:"mask" binding:"required"` //瀛愮綉鎺╃爜 @@ -172,7 +172,7 @@ func (slf *NetConfigSearch) CreateBatch(records []*NetConfig) error { var db = slf.build() - for _, record := range records{ + for _, record := range records { db.Create(record) } return nil -- Gitblit v1.8.0