From c74a3671610ad2dfb864b0731291dc158750f55b Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期二, 09 四月 2024 15:35:27 +0800
Subject: [PATCH] fix

---
 models/dict.go |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/models/dict.go b/models/dict.go
index 3d516f6..f9a9ff8 100644
--- a/models/dict.go
+++ b/models/dict.go
@@ -11,10 +11,10 @@
 	// Dict 璇嶅吀
 	Dict struct {
 		gorm.Model
-		DictType constvar.DictType `gorm:"index;type:tinyint(3);not null;comment:瀛楀吀绫诲瀷"`         //瀛楀吀绫诲瀷
-		Number   string            `gorm:"type:varchar(255);not null;comment:缂栧彿" json:"number"` //缂栧彿
-		Name     string            `gorm:"type:varchar(255);not null;comment:鍚嶇О" json:"name"`   //鍚嶇О
-		Remark   string            `gorm:"type:varchar(255);not null;comment:澶囨敞" json:"remark"` //澶囨敞
+		DictType *constvar.DictType `gorm:"index;type:tinyint(3);not null;comment:瀛楀吀绫诲瀷"`         //瀛楀吀绫诲瀷
+		Number   string             `gorm:"type:varchar(255);not null;comment:缂栧彿" json:"number"` //缂栧彿
+		Name     string             `gorm:"type:varchar(255);not null;comment:鍚嶇О" json:"name"`   //鍚嶇О
+		Remark   string             `gorm:"type:varchar(255);not null;comment:澶囨敞" json:"remark"` //澶囨敞
 	}
 
 	DictSearch struct {
@@ -64,7 +64,7 @@
 	return slf
 }
 
-func (slf *DictSearch) SetDictType(dt constvar.DictType) *DictSearch {
+func (slf *DictSearch) SetDictType(dt *constvar.DictType) *DictSearch {
 	slf.DictType = dt
 	return slf
 }
@@ -84,7 +84,7 @@
 		db = db.Where("number = ?", slf.Number)
 	}
 
-	if slf.DictType != 0 {
+	if slf.DictType != nil {
 		db = db.Where("dict_type = ?", slf.DictType)
 	}
 

--
Gitblit v1.8.0