方案1:
1、升级步骤:
<!--id="Capture.syslog" 添加--> <property name="subThreads"> <list> <ref bean="FileStore.syslog"/> <ref bean="XMLStore.syslog"/> </list> </property> <bean id="XMLStore.syslog" class="com.metarnet.VASROAM.IPSourceInterReport.CXMLStoreMain" parent="moduleMain" init-method="setSubMoudel"> <property name="fullName" value="XMLStore.syslog"></property> <property name="noSave" value="false" /> <property name="isDelCsv" value="true" /> <property name="m_szSaveBinDir" value="${commonPath}binary" /> <property name="interfaceReport" ref="InterfaceReport" /> <property name="xmlLoaderDir" value="${commonPath}xmlFile" /> <property name="maxTimeOut" value="60000"></property> <property name="encoding" value="GBK"></property> <property name="isRenewNum" value="true"></property> <property name="storeType" value="1" /> </bean> <bean id="InterfaceReport" class="com.metarnet.VASROAM.IPSourceInterReport.GetReportConfigRule"> <property name="indexlist"> <list> <!--<ref bean="LoginInfo" /> <ref bean="CdrInfo" />--> <ref bean="NatLoginInfo" /> <ref bean="NatCdrInfo" /> </list> </property> </bean> <bean id="NatLoginInfo" class="com.metarnet.VASROAM.IPSourceInterReport.configRule.NatLoginInfoConfigRule" init-method="getInstance"> <property name="resultnum" value="40000"></property> <property name="type" value="nat_login_info"></property> <property name="account" value="MC0510000005" /> <property name="accountType" value=""></property> <property name="loginType" value="MC0510000017" /> <property name="priIpAddr" value="MC0510000009" /> <property name="pubIpAddr" value="MC0510000007" /> <property name="onLineTime" value="MC0510000006"></property> <property name="offLineTime" value="" /> <property name="lac" value=""></property> <property name="sac" value="" /> </bean> <bean id="NatCdrInfo" class="com.metarnet.VASROAM.IPSourceInterReport.configRule.NatCdrInfoConfigRule" init-method="getInstance"> <property name="resultnum" value="40000"></property> <property name="type" value="login_info"></property> <property name="account" value="MC0510000005" /> <property name="accountType" value=""></property> <property name="loginType" value="MC0510000017" /> <property name="priIp" value="MC0510000009" /> <property name="srcIp" value=""></property> <property name="srcPort" value=""></property> <property name="dstIp" value="MC0510000007" /> <property name="dstPort" value="MC0510000012" /> <property name="accessTime" value="MC0510000001" /> <property name="url" value="MC0510000013"></property> <property name="lac" value=""></property> <property name="sac" value="" /> </bean>
create table CFG_USER_XMLFIELD ( FIELD_ID INTEGER primary key, FIELD_NAME VARCHAR2(20) not null, TYPE INTEGER not null, FIELD_TYPE INTEGER not null, FORMULA VARCHAR2(1024), ISNULL INTEGER, IS_AVAILABLE INTEGER, FIELD_TYPE_NAME VARCHAR2(20), SERIAL INTEGER )
insert into cfg_user_xmlfield (FIELD_ID, FIELD_NAME, TYPE, FIELD_TYPE, FORMULA, ISNULL, IS_AVAILABLE, FIELD_TYPE_NAME, SERIAL) values (101, 'account', 1, 1, 'MC0510000005', 1, 1, 'nat_login_info', 1); insert into cfg_user_xmlfield (FIELD_ID, FIELD_NAME, TYPE, FIELD_TYPE, FORMULA, ISNULL, IS_AVAILABLE, FIELD_TYPE_NAME, SERIAL) values (102, 'accountType', 1, 2, '2', 0, 1, 'nat_login_info', 2); insert into cfg_user_xmlfield (FIELD_ID, FIELD_NAME, TYPE, FIELD_TYPE, FORMULA, ISNULL, IS_AVAILABLE, FIELD_TYPE_NAME, SERIAL) values (103, 'loginType', 1, 2, '2', 0, 1, 'nat_login_info', 3); insert into cfg_user_xmlfield (FIELD_ID, FIELD_NAME, TYPE, FIELD_TYPE, FORMULA, ISNULL, IS_AVAILABLE, FIELD_TYPE_NAME, SERIAL) values (104, 'priIpAddr', 1, 1, 'MC0510000009', 0, 1, 'nat_login_info', 4); insert into cfg_user_xmlfield (FIELD_ID, FIELD_NAME, TYPE, FIELD_TYPE, FORMULA, ISNULL, IS_AVAILABLE, FIELD_TYPE_NAME, SERIAL) values (105, 'pubIpAddr', 1, 1, 'MC0510000007', 0, 1, 'nat_login_info', 5); insert into cfg_user_xmlfield (FIELD_ID, FIELD_NAME, TYPE, FIELD_TYPE, FORMULA, ISNULL, IS_AVAILABLE, FIELD_TYPE_NAME, SERIAL) values (106, 'onLineTime', 1, 3, 'MC0510000001,yyyy-MM-dd hh:mm:ss', 0, 1, 'nat_login_info', 6); insert into cfg_user_xmlfield (FIELD_ID, FIELD_NAME, TYPE, FIELD_TYPE, FORMULA, ISNULL, IS_AVAILABLE, FIELD_TYPE_NAME, SERIAL) values (107, 'offLineTime', 1, 3, 'MC0510000002,yyyy-MM-dd hh:mm:ss', 0, 1, 'nat_login_info', 7); insert into cfg_user_xmlfield (FIELD_ID, FIELD_NAME, TYPE, FIELD_TYPE, FORMULA, ISNULL, IS_AVAILABLE, FIELD_TYPE_NAME, SERIAL) values (108, 'lac', 1, 2, '', 0, 1, 'nat_login_info', 8); insert into cfg_user_xmlfield (FIELD_ID, FIELD_NAME, TYPE, FIELD_TYPE, FORMULA, ISNULL, IS_AVAILABLE, FIELD_TYPE_NAME, SERIAL) values (109, 'sac', 1, 2, '', 0, 1, 'nat_login_info', 9); insert into cfg_user_xmlfield (FIELD_ID, FIELD_NAME, TYPE, FIELD_TYPE, FORMULA, ISNULL, IS_AVAILABLE, FIELD_TYPE_NAME, SERIAL) values (201, 'account', 2, 1, 'MC0510000005', 1, 1, 'nat_cdr_info', 1); insert into cfg_user_xmlfield (FIELD_ID, FIELD_NAME, TYPE, FIELD_TYPE, FORMULA, ISNULL, IS_AVAILABLE, FIELD_TYPE_NAME, SERIAL) values (202, 'accountType', 2, 2, '2', 0, 1, 'nat_cdr_info', 2); insert into cfg_user_xmlfield (FIELD_ID, FIELD_NAME, TYPE, FIELD_TYPE, FORMULA, ISNULL, IS_AVAILABLE, FIELD_TYPE_NAME, SERIAL) values (203, 'loginType', 2, 2, '6', 0, 1, 'nat_cdr_info', 3); insert into cfg_user_xmlfield (FIELD_ID, FIELD_NAME, TYPE, FIELD_TYPE, FORMULA, ISNULL, IS_AVAILABLE, FIELD_TYPE_NAME, SERIAL) values (204, 'priIp', 2, 1, 'MC0510000009', 0, 1, 'nat_cdr_info', 4); insert into cfg_user_xmlfield (FIELD_ID, FIELD_NAME, TYPE, FIELD_TYPE, FORMULA, ISNULL, IS_AVAILABLE, FIELD_TYPE_NAME, SERIAL) values (205, 'srcIp', 2, 1, 'MC0510000007', 0, 1, 'nat_cdr_info', 5); insert into cfg_user_xmlfield (FIELD_ID, FIELD_NAME, TYPE, FIELD_TYPE, FORMULA, ISNULL, IS_AVAILABLE, FIELD_TYPE_NAME, SERIAL) values (206, 'srcPort', 2, 1, 'MC0510000008', 0, 1, 'nat_cdr_info', 6); insert into cfg_user_xmlfield (FIELD_ID, FIELD_NAME, TYPE, FIELD_TYPE, FORMULA, ISNULL, IS_AVAILABLE, FIELD_TYPE_NAME, SERIAL) values (207, 'dstIp', 2, 1, 'MC0510000011', 0, 1, 'nat_cdr_info', 7); insert into cfg_user_xmlfield (FIELD_ID, FIELD_NAME, TYPE, FIELD_TYPE, FORMULA, ISNULL, IS_AVAILABLE, FIELD_TYPE_NAME, SERIAL) values (208, 'dstPort', 2, 1, 'MC0510000012', 0, 1, 'nat_cdr_info', 8); insert into cfg_user_xmlfield (FIELD_ID, FIELD_NAME, TYPE, FIELD_TYPE, FORMULA, ISNULL, IS_AVAILABLE, FIELD_TYPE_NAME, SERIAL) values (209, 'accessTime', 2, 3, 'MC0510000001,yyyy-MM-dd hh:mm:ss', 0, 1, 'nat_cdr_info', 9); insert into cfg_user_xmlfield (FIELD_ID, FIELD_NAME, TYPE, FIELD_TYPE, FORMULA, ISNULL, IS_AVAILABLE, FIELD_TYPE_NAME, SERIAL) values (210, 'url', 2, 1, 'MC0510000013', 0, 1, 'nat_cdr_info', 10); insert into cfg_user_xmlfield (FIELD_ID, FIELD_NAME, TYPE, FIELD_TYPE, FORMULA, ISNULL, IS_AVAILABLE, FIELD_TYPE_NAME, SERIAL) values (211, 'lac', 2, 2, '', 0, 1, 'nat_cdr_info', 11); insert into cfg_user_xmlfield (FIELD_ID, FIELD_NAME, TYPE, FIELD_TYPE, FORMULA, ISNULL, IS_AVAILABLE, FIELD_TYPE_NAME, SERIAL) values (212, 'sac', 2, 2, '', 0, 1, 'nat_cdr_info', 12);
3、修改配置文件:
<!--id="Capture.syslog" 添加--> <property name="subThreads"> <list> <ref bean="FileStore.syslog"/> <ref bean="XMLStore.syslog"/> </list> </property> <bean id="XMLStore.syslog" class="com.metarnet.VASROAM.IPSourceInterReport.CXMLStoreMain" parent="moduleMain" init-method="setSubMoudel"> <property name="fullName" value="XMLStore.syslog"></property> <property name="noSave" value="false" /> <property name="isDelCsv" value="true" /> <property name="m_szSaveBinDir" value="${commonPath}binary" /> <!--<property name="interfaceReport" ref="InterfaceReport" />--> <property name="xmlLoaderDir" value="${commonPath}xmlFile" /> <property name="maxTimeOut" value="60000"></property> <property name="encoding" value="UTF-8"></property> <property name="isRenewNum" value="true"></property> <property name="storeType" value="1" /> <property name="resultnum" value="40000"></property> </bean>
4、覆盖代码