@@ -0,0 +1,1027 @@
+package com.dianping.cat.config.app;%0A%0Aimport java.util.Map;%0A%0Aimport org.unidal.dal.jdbc.QueryEngine;%0Aimport org.unidal.dal.jdbc.mapping.TableProvider;%0A%0Aimport com.dianping.cat.app.AppCommandData;%0A%0Apublic class WebApiTableProvider implements TableProvider %7B%0A%0A%09private String m_logicalTableName = %22web-api-data%22;%0A%0A%09private String m_physicalTableName = %22web_api_data%22;%0A%0A%09private String m_dataSourceName = %22app%22;%0A%0A%09@Override%0A%09public String getDataSourceName(Map%3CString, Object%3E hints) %7B%0A%09%09return m_dataSourceName;%0A%09%7D%0A%0A%09@Override%0A%09public String getLogicalTableName() %7B%0A%09%09return m_logicalTableName;%0A%09%7D%0A%0A%09@Override%0A%09public String getPhysicalTableName(Map%3CString, Object%3E hints) %7B%0A%09%09AppCommandData command = (AppCommandData) hints.get(QueryEngine.HINT_DATA_OBJECT);%0A%0A%09%09return m_physicalTableName + %22_%22 + command.getCommandId();%0A%09%7D%0A%0A%09public void setDataSourceName(String dataSourceName) %7B%0A%09%09m_dataSourceName = dataSourceName;%0A%09%7D%0A%0A%09public void setLogicalTableName(String logicalTableName) %7B%0A%09%09m_logicalTableName = logicalTableName;%0A%09%7D%0A%0A%7D

add table provider