日志查询增加userid

This commit is contained in:
苏尹岚
2020-04-14 08:54:08 +08:00
parent b3d8f68999
commit ff4fa04cfa

View File

@@ -100,8 +100,8 @@ func GetOperateEvents(db *DaoDB, name string, apiFunctions []string, operateType
sql += "a.api_function IN (" + GenQuestionMarks(len(apiList)) + ") OR"
sqlParams = append(sqlParams, apiList)
}
sql += " a.err_msg LIKE ? OR b.thing_id LIKE ? OR b.store_id LIKE ? OR c.name LIKE ?)"
sqlParams = append(sqlParams, "%"+keyword+"%", "%"+keyword+"%", "%"+keyword+"%", "%"+keyword+"%")
sql += " a.err_msg LIKE ? OR b.thing_id LIKE ? OR b.store_id LIKE ? OR c.name LIKE ? OR a.user_id LIKE ?)"
sqlParams = append(sqlParams, "%"+keyword+"%", "%"+keyword+"%", "%"+keyword+"%", "%"+keyword+"%", "%"+keyword+"%")
}
sql += `
ORDER BY a.created_at DESC