From f26ee7ab795bb21be7d31dc2cca1e7a206ef4b8b Mon Sep 17 00:00:00 2001
From: liujiandao <274878379@qq.com>
Date: 星期五, 22 十二月 2023 14:09:00 +0800
Subject: [PATCH] 系统设置修改

---
 model/system_set.go |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/model/system_set.go b/model/system_set.go
index a64dd01..40a20da 100644
--- a/model/system_set.go
+++ b/model/system_set.go
@@ -8,10 +8,10 @@
 
 type (
 	SystemSet struct {
-		Id         int    `json:"id" gorm:"column:id;primaryKey;autoIncrement;not null"`
-		Name       string `json:"name" gorm:"type:varchar(255);comment:鍚嶇О"`
-		Value      string `json:"value" gorm:"type:varchar(255);comment:鍊�"`
-		SystemType string `json:"systemType" gorm:"type:varchar(255);comment:绯荤粺绫诲瀷"`
+		Id       int    `json:"id" gorm:"column:id;primaryKey;autoIncrement;not null"`
+		Name     string `json:"name" gorm:"type:varchar(255);comment:鍚嶇О"`
+		Value    string `json:"value" gorm:"type:varchar(255);comment:鍊�"`
+		ModeType string `json:"modeType" gorm:"type:varchar(255);comment:妯″潡绫诲瀷"`
 	}
 	SystemSetSearch struct {
 		SystemSet
@@ -40,6 +40,10 @@
 	slf.Name = name
 	return slf
 }
+func (slf *SystemSetSearch) SetModeType(modeType string) *SystemSetSearch {
+	slf.ModeType = modeType
+	return slf
+}
 
 func (slf *SystemSetSearch) build() *gorm.DB {
 	var db = slf.Orm.Table(slf.TableName())
@@ -50,6 +54,9 @@
 	if slf.Name != "" {
 		db = db.Where("name = ?", slf.Name)
 	}
+	if slf.ModeType != "" {
+		db = db.Where("mode_type = ?", slf.ModeType)
+	}
 
 	return db
 }

--
Gitblit v1.8.0