V2.5.2beta (#1101)
* fix: zap无法在运行时进行切割日志, config.docker.yaml与config.yaml同步 #1094 * feat: 为定时任务增加秒级控制 * feat: 调整代码结构,err更改为后置 * css 样式调整 Co-authored-by: SliverHorn <503551462@qq.com> Co-authored-by: songzhibin97 <718428482@qq.com>
This commit is contained in:
committed by
GitHub
co-authored by
SliverHorn
songzhibin97
parent
b25c128051
commit
83141b3564
@@ -80,7 +80,7 @@ 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) (err error, sysDictionary system.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
|
||||
return
|
||||
}
|
||||
@@ -92,7 +92,7 @@ func (dictionaryService *DictionaryService) GetSysDictionary(Type string, Id uin
|
||||
//@param: info request.SysDictionarySearch
|
||||
//@return: err error, list interface{}, total int64
|
||||
|
||||
func (dictionaryService *DictionaryService) GetSysDictionaryInfoList(info request.SysDictionarySearch) (err error, list interface{}, total int64) {
|
||||
func (dictionaryService *DictionaryService) GetSysDictionaryInfoList(info request.SysDictionarySearch) (list interface{}, total int64, err error) {
|
||||
limit := info.PageSize
|
||||
offset := info.PageSize * (info.Page - 1)
|
||||
// 创建db
|
||||
@@ -116,5 +116,5 @@ func (dictionaryService *DictionaryService) GetSysDictionaryInfoList(info reques
|
||||
return
|
||||
}
|
||||
err = db.Limit(limit).Offset(offset).Find(&sysDictionarys).Error
|
||||
return err, sysDictionarys, total
|
||||
return sysDictionarys, total, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user