mirror of
https://github.com/flipped-aurora/gin-vue-admin.git
synced 2026-09-21 12:32:25 +00:00
字典优化,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:
committed by
GitHub
co-authored by
yancunju
parent
9da394f711
commit
e0280a56ce
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user