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:
奇淼(piexlmax
2022-05-28 19:22:23 +08:00
committed by GitHub
parent b25c128051
commit 83141b3564
49 changed files with 490 additions and 456 deletions

View File

@@ -47,9 +47,9 @@ func (operationRecordService *OperationRecordService) DeleteSysOperationRecord(s
//@function: DeleteSysOperationRecord
//@description: 根据id获取单条操作记录
//@param: id uint
//@return: err error, sysOperationRecord model.SysOperationRecord
//@return: sysOperationRecord system.SysOperationRecord, err error
func (operationRecordService *OperationRecordService) GetSysOperationRecord(id uint) (err error, sysOperationRecord system.SysOperationRecord) {
func (operationRecordService *OperationRecordService) GetSysOperationRecord(id uint) (sysOperationRecord system.SysOperationRecord, err error) {
err = global.GVA_DB.Where("id = ?", id).First(&sysOperationRecord).Error
return
}
@@ -59,9 +59,9 @@ func (operationRecordService *OperationRecordService) GetSysOperationRecord(id u
//@function: GetSysOperationRecordInfoList
//@description: 分页获取操作记录列表
//@param: info systemReq.SysOperationRecordSearch
//@return: err error, list interface{}, total int64
//@return: list interface{}, total int64, err error
func (operationRecordService *OperationRecordService) GetSysOperationRecordInfoList(info systemReq.SysOperationRecordSearch) (err error, list interface{}, total int64) {
func (operationRecordService *OperationRecordService) GetSysOperationRecordInfoList(info systemReq.SysOperationRecordSearch) (list interface{}, total int64, err error) {
limit := info.PageSize
offset := info.PageSize * (info.Page - 1)
// 创建db
@@ -82,5 +82,5 @@ func (operationRecordService *OperationRecordService) GetSysOperationRecordInfoL
return
}
err = db.Order("id desc").Limit(limit).Offset(offset).Preload("User").Find(&sysOperationRecords).Error
return err, sysOperationRecords, total
return sysOperationRecords, total, err
}