admin_operate_record.go 420 B

123456789101112131415
  1. package models
  2. import "eta_gn/eta_task/global"
  3. // ClearAdminOperateRecord 清理用户操作日志
  4. func ClearAdminOperateRecord(date string) (err error) {
  5. //o := orm.NewOrmUsingDB("eta")
  6. //sql := `DELETE FROM admin_operate_record WHERE create_time <= ?`
  7. //_, err = o.Raw(sql, date).Exec()
  8. sql := `DELETE FROM admin_operate_record WHERE create_time <= ?`
  9. err = global.DmSQL["eta"].Raw(sql, date).Error
  10. return
  11. }