字典优化,tabs优化,自动化代码优化 (#1128)

* server/service/system/sys_dictionary.go: fix 获取字典单条数据时status失效的bug

* 增加关闭状态下折叠内容所在menu的高亮提示

* 修复字典变更无法打开的bug

* 增加详情页签区分功能

* 增加字典详情区分

* 修复字典功能

Co-authored-by: yancunju <yancunju@autouc.com>
This commit is contained in:
奇淼(piexlmax
2022-06-12 20:23:08 +08:00
committed by GitHub
co-authored by yancunju
parent 9da394f711
commit e0280a56ce
11 changed files with 84 additions and 28 deletions
+8 -2
View File
@@ -80,8 +80,14 @@ func (dictionaryService *DictionaryService) UpdateSysDictionary(sysDictionary *s
//@param: Type string, Id uint
//@return: err error, sysDictionary model.SysDictionary
func (dictionaryService *DictionaryService) GetSysDictionary(Type string, Id uint) (sysDictionary system.SysDictionary, err error) {
err = global.GVA_DB.Where("type = ? OR id = ? and status = ?", Type, Id, true).Preload("SysDictionaryDetails", "status = ?", true).First(&sysDictionary).Error
func (dictionaryService *DictionaryService) GetSysDictionary(Type string, Id uint, status *bool) (sysDictionary system.SysDictionary, err error) {
var flag = false
if status == nil {
flag = true
} else {
flag = *status
}
err = global.GVA_DB.Where("(type = ? OR id = ?) and status = ?", Type, Id, flag).Preload("SysDictionaryDetails", "status = ?", true).First(&sysDictionary).Error
return
}