调整xorm层级
This commit is contained in:
@@ -3,7 +3,7 @@ package service
|
||||
import (
|
||||
"cutego/modules/core/api/v1/request"
|
||||
"cutego/modules/core/dao"
|
||||
"cutego/modules/core/entity"
|
||||
"cutego/modules/core/dataobject"
|
||||
)
|
||||
|
||||
type CronJobService struct {
|
||||
@@ -11,27 +11,27 @@ type CronJobService struct {
|
||||
}
|
||||
|
||||
// FindPage 分页查询数据
|
||||
func (s CronJobService) FindPage(query request.CronJobQuery) ([]entity.SysCronJob, int64) {
|
||||
func (s CronJobService) FindPage(query request.CronJobQuery) ([]dataobject.SysCronJob, int64) {
|
||||
return s.cronJobDao.SelectPage(query)
|
||||
}
|
||||
|
||||
// Save 添加数据
|
||||
func (s CronJobService) Save(config entity.SysCronJob) int64 {
|
||||
func (s CronJobService) Save(config dataobject.SysCronJob) int64 {
|
||||
return s.cronJobDao.Insert(config)
|
||||
}
|
||||
|
||||
// GetInfo 查询数据
|
||||
func (s CronJobService) GetInfo(id int64) *entity.SysCronJob {
|
||||
func (s CronJobService) GetInfo(id int64) *dataobject.SysCronJob {
|
||||
return s.cronJobDao.SelectById(id)
|
||||
}
|
||||
|
||||
// GetInfoByAlias 查询数据
|
||||
func (s CronJobService) GetInfoByAlias(funcAlias string) *entity.SysCronJob {
|
||||
func (s CronJobService) GetInfoByAlias(funcAlias string) *dataobject.SysCronJob {
|
||||
return s.cronJobDao.SelectByFuncAlias(funcAlias)
|
||||
}
|
||||
|
||||
// Edit 修改数据
|
||||
func (s CronJobService) Edit(config entity.SysCronJob) int64 {
|
||||
func (s CronJobService) Edit(config dataobject.SysCronJob) int64 {
|
||||
return s.cronJobDao.Update(config)
|
||||
}
|
||||
|
||||
@@ -41,6 +41,6 @@ func (s CronJobService) Remove(list []int64) bool {
|
||||
}
|
||||
|
||||
// FindAll 查找所有
|
||||
func (s CronJobService) FindAll() ([]entity.SysCronJob, int) {
|
||||
func (s CronJobService) FindAll() ([]dataobject.SysCronJob, int) {
|
||||
return s.cronJobDao.SelectAll()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user