调整xorm层级

This commit is contained in:
2023-01-18 16:00:50 +08:00
parent 0f8c1f989b
commit a89c86023e
67 changed files with 500 additions and 460 deletions
+5 -5
View File
@@ -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 NoticeService struct {
@@ -11,12 +11,12 @@ type NoticeService struct {
}
// FindPage 查询集合数据
func (s NoticeService) FindPage(query request.NoticeQuery) (*[]entity.SysNotice, int64) {
func (s NoticeService) FindPage(query request.NoticeQuery) (*[]dataobject.SysNotice, int64) {
return s.noticeDao.SelectPage(query)
}
// Save 添加公告
func (s NoticeService) Save(notice entity.SysNotice) bool {
func (s NoticeService) Save(notice dataobject.SysNotice) bool {
return s.noticeDao.Insert(notice) > 0
}
@@ -26,11 +26,11 @@ func (s NoticeService) Remove(list []int64) bool {
}
// GetById 查询
func (s NoticeService) GetById(id int64) *entity.SysNotice {
func (s NoticeService) GetById(id int64) *dataobject.SysNotice {
return s.noticeDao.SelectById(id)
}
// Edit 修改
func (s NoticeService) Edit(notice entity.SysNotice) bool {
func (s NoticeService) Edit(notice dataobject.SysNotice) bool {
return s.noticeDao.Update(notice) > 0
}