修复性别字典初始数据为空的问题

修复字典作废无效问题 #791
变更字典初始值为undefined #792
This commit is contained in:
piexl
2021-11-08 14:36:40 +08:00
parent cd41d3b5c7
commit e12c1b7b8d
4 changed files with 6 additions and 4 deletions
+1 -1
View File
@@ -68,7 +68,7 @@ func (dictionaryService *DictionaryService) UpdateSysDictionary(sysDictionary *s
//@return: err error, sysDictionary model.SysDictionary
func (dictionaryService *DictionaryService) GetSysDictionary(Type string, Id uint) (err error, sysDictionary system.SysDictionary) {
err = global.GVA_DB.Where("type = ? OR id = ?", Type, Id).Preload("SysDictionaryDetails").First(&sysDictionary).Error
err = global.GVA_DB.Where("type = ? OR id = ? and status = ?", Type, Id, true).Preload("SysDictionaryDetails", "status = ?", true).First(&sysDictionary).Error
return
}