import cycle not allowed
This commit is contained in:
@@ -3,7 +3,7 @@ package dao
|
||||
import (
|
||||
"cutego/modules/core/api/v1/request"
|
||||
"cutego/modules/core/dataobject"
|
||||
"cutego/pkg/common"
|
||||
"cutego/pkg/logging"
|
||||
"cutego/pkg/page"
|
||||
"cutego/refs"
|
||||
"github.com/druidcaesa/gotool"
|
||||
@@ -30,7 +30,7 @@ func (d LogDao) SelectPage(query request.LogQuery) ([]dataobject.SysLog, int64)
|
||||
total, _ := page.GetTotal(session.Clone())
|
||||
err := session.Limit(query.PageSize, page.StartSize(query.PageNum, query.PageSize)).Find(&configs)
|
||||
if err != nil {
|
||||
common.ErrorLog(err)
|
||||
logging.ErrorLog(err)
|
||||
return nil, 0
|
||||
}
|
||||
return configs, total
|
||||
@@ -42,7 +42,7 @@ func (d LogDao) Insert(config dataobject.SysLog) int64 {
|
||||
session.Begin()
|
||||
insert, err := session.Insert(&config)
|
||||
if err != nil {
|
||||
common.ErrorLog(err)
|
||||
logging.ErrorLog(err)
|
||||
session.Rollback()
|
||||
return 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user