feat: 机器定时删除终端操作记录

This commit is contained in:
meilin.huang
2024-01-15 20:51:41 +08:00
parent c0232c4c75
commit 493925064c
15 changed files with 98 additions and 35 deletions

View File

@@ -20,3 +20,11 @@ func (m *machineTermOpRepoImpl) GetPageList(condition *entity.MachineTermOp, pag
qd := gormx.NewQuery(condition).WithCondModel(condition).WithOrderBy(orderBy...)
return gormx.PageQuery(qd, pageParam, toEntity)
}
// 根据条件获取记录列表
func (m *machineTermOpRepoImpl) SelectByQuery(cond *entity.MachineTermOpQuery) ([]*entity.MachineTermOp, error) {
qd := gormx.NewQuery(m.GetModel()).Le("create_time", cond.StartCreateTime)
var res []*entity.MachineTermOp
err := gormx.ListByQueryCond(qd, &res)
return res, err
}