mirror of
https://gitee.com/dromara/mayfly-go
synced 2026-01-06 06:35:47 +08:00
feat: 新增机器计划任务、数据物理删除调整为逻辑删除、支持记录登录ip归属地等
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
package persistence
|
||||
|
||||
import (
|
||||
"mayfly-go/internal/machine/domain/entity"
|
||||
"mayfly-go/internal/machine/domain/repository"
|
||||
"mayfly-go/pkg/gormx"
|
||||
"mayfly-go/pkg/model"
|
||||
)
|
||||
|
||||
type machineCropJobExecRepoImpl struct{}
|
||||
|
||||
func newMachineCronJobExecRepo() repository.MachineCronJobExec {
|
||||
return new(machineCropJobExecRepoImpl)
|
||||
}
|
||||
|
||||
// 分页获取机器信息列表
|
||||
func (m *machineCropJobExecRepoImpl) GetPageList(condition *entity.MachineCronJobExec, pageParam *model.PageParam, toEntity any, orderBy ...string) *model.PageResult[any] {
|
||||
qd := gormx.NewQuery(condition).WithCondModel(condition).WithOrderBy(orderBy...)
|
||||
return gormx.PageQuery(qd, pageParam, toEntity)
|
||||
}
|
||||
|
||||
func (m *machineCropJobExecRepoImpl) Insert(entity *entity.MachineCronJobExec) {
|
||||
gormx.Insert(entity)
|
||||
}
|
||||
|
||||
func (m *machineCropJobExecRepoImpl) Delete(mcje *entity.MachineCronJobExec) {
|
||||
gormx.DeleteByCondition(mcje)
|
||||
}
|
||||
Reference in New Issue
Block a user