package cache import ( "eta_gn/eta_api/models" "eta_gn/eta_api/utils" "fmt" "time" ) // record more information func RecordNewLogs(adminId int, request, response string, realName, operateIp, model string) bool { log := &models.OperateLogs{AdminId: adminId, SysUserRealName: realName, OperateTime: time.Now(), Request: request, Response: response, OperateIp: operateIp, Model: model} if utils.Re == nil { err := utils.Rc.LPush(utils.CACHE_KEY_LOGS, log) if err != nil { fmt.Println("RecordNewLogs LPush Err:" + err.Error()) } return true } return false }