模块标准化

This commit is contained in:
2023-01-18 17:21:12 +08:00
parent c44203b176
commit 7c2bdebd0b
16 changed files with 162 additions and 162 deletions
+4 -4
View File
@@ -2,7 +2,7 @@ package dao
import (
"cutego/modules/core/api/v1/request"
"cutego/modules/core/entity"
"cutego/modules/core/dataobject"
"cutego/pkg/common"
"cutego/pkg/page"
"cutego/refs"
@@ -18,8 +18,8 @@ func (d LogDao) sql(session *xorm.Session) *xorm.Session {
}
// SelectPage 分页查询数据
func (d LogDao) SelectPage(query request.LogQuery) ([]entity.SysLog, int64) {
configs := make([]entity.SysLog, 0)
func (d LogDao) SelectPage(query request.LogQuery) ([]dataobject.SysLog, int64) {
configs := make([]dataobject.SysLog, 0)
session := d.sql(refs.SqlDB.NewSession())
if gotool.StrUtils.HasNotEmpty(query.Content) {
session.And("content like concat('%', ?, '%')", query.Content)
@@ -37,7 +37,7 @@ func (d LogDao) SelectPage(query request.LogQuery) ([]entity.SysLog, int64) {
}
// Insert 添加数据
func (d LogDao) Insert(config entity.SysLog) int64 {
func (d LogDao) Insert(config dataobject.SysLog) int64 {
session := refs.SqlDB.NewSession()
session.Begin()
insert, err := session.Insert(&config)