package models import "github.com/beego/beego/v2/client/orm" // ClearAdminOperateRecord 清理用户操作日志 func ClearAdminOperateRecord(date string) (err error) { o := orm.NewOrmUsingDB("eta") sql := `DELETE FROM admin_operate_record WHERE create_time <= ?` _, err = o.Raw(sql, date).Exec() return }