<?xml version="1.0" encoding="UTF-8"?>
<beans
	xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
	
	<!-- Hibernate SessionFactory -->
	<bean id="sessionFactory"
		class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
		<property name="dataSource">
			<ref bean="dataSource" />
		</property>
		<property name="mappingResources">
			<list>
				<!-- xml list -->
				<value>ebay/hibernate/DbEbayapi.hbm.xml</value>
				<value>ebay/hibernate/DbEbayapilog.hbm.xml</value>
				<value>ebay/hibernate/DbShop.hbm.xml</value>
				<value>ebay/hibernate/DbSell.hbm.xml</value>
				<value>ebay/hibernate/DbProductlog.hbm.xml</value>
				<value>ebay/hibernate/DbProduct.hbm.xml</value>
				<value>ebay/hibernate/DbOrder.hbm.xml</value>
				<value>ebay/hibernate/DbOrderlog.hbm.xml</value>
				<value>ebay/hibernate/DbMoneyrate.hbm.xml</value>
				<value>ebay/hibernate/DbAliorderinfo.hbm.xml</value>
				<value>ebay/hibernate/DbSmtneworder.hbm.xml</value>
			</list>
		</property>
		<property name="hibernateProperties">
			<props>
				<prop key="hibernate.dialect">
					org.hibernate.dialect.Oracle9Dialect
				</prop>
				<prop key="hibernate.jdbc.batch_size">30</prop>
				<prop key="hibernate.show_sql">false</prop>
			</props>
		</property>
	</bean>
	
	<!-- DAO -->
    <bean id="DbEbayapiDAO" class="ebay.hibernate.DbEbayapiDAO" parent="daoTemplate"/>
    <bean id="DbEbayapilogDAO" class="ebay.hibernate.DbEbayapilogDAO" parent="daoTemplate"/>
    <bean id="DbShopDAO" class="ebay.hibernate.DbShopDAO" parent="daoTemplate"/>
    <bean id="DbSellDAO" class="ebay.hibernate.DbSellDAO" parent="daoTemplate"/>
    <bean id="DbProductlogDAO" class="ebay.hibernate.DbProductlogDAO" parent="daoTemplate"/>
    <bean id="DbProductDAO" class="ebay.hibernate.DbProductDAO" parent="daoTemplate"/>
    <bean id="DbOrderDAO" class="ebay.hibernate.DbOrderDAO" parent="daoTemplate"/>
    <bean id="DbOrderlogDAO" class="ebay.hibernate.DbOrderlogDAO" parent="daoTemplate"/>
    <bean id="DbMoneyrateDAO" class="ebay.hibernate.DbMoneyrateDAO" parent="daoTemplate"/>
    <bean id="DbAliorderinfoDAO" class="ebay.hibernate.DbAliorderinfoDAO" parent="daoTemplate"/>
    <bean id="DbSmtneworderDAO" class="ebay.hibernate.DbSmtneworderDAO" parent="daoTemplate"/>
    <!-- EBayMgr -->
    <bean id="EbayMgr" parent="txProxyTemplate">
		<property name="target">
			<bean class="ebay.manager.EbayMgr">
				<property name="ebayapiDAO" ref="DbEbayapiDAO" />
				<property name="ebayapilogDAO" ref="DbEbayapilogDAO" />
				<property name="shopDAO" ref="DbShopDAO" />
				<property name="sellDAO" ref="DbSellDAO" />
				<property name="productlogDAO" ref="DbProductlogDAO" />
				<property name="productDAO" ref="DbProductDAO" />
				<property name="orderDAO" ref="DbOrderDAO" />
				<property name="orderlogDAO" ref="DbOrderlogDAO" />
				<property name="moneyrateDAO" ref="DbMoneyrateDAO" />
				<property name="aliorderinfoDAO" ref="DbAliorderinfoDAO" />
				<property name="smtneworderDAO" ref="DbSmtneworderDAO" />
			</bean>
		</property>
	</bean>
	<!-- 订单下载线程-->
	<bean id="DownLoad" class="ebay.DownLoad" depends-on="EbayMgr,monitor">
		<constructor-arg type="java.lang.String" value="DownLoad"/>
		<!-- 下载间隔(3小时) -->
		<constructor-arg type="java.lang.String" value="3"/>
		<!-- 下载未付款订单,0默认不下载 -->
		<constructor-arg type="java.lang.String" value="0"/>
		<!-- 下载风控订单,0默认不下载 -->
		<constructor-arg type="java.lang.String" value="0"/>
		<!-- 禁止下载时间 -->
		<constructor-arg type="java.lang.String" value="0000-0001;1200-1201"/>
		<!-- 是否使用多仓SKU匹配规则,默认不执行 -->
		<constructor-arg type="java.lang.String" value="0"/>
		<!-- 是否保留SKU中的空格,默认0 -->
		<constructor-arg type="java.lang.String" value="0"/>
	    <property name="ebayMgr" ref="EbayMgr" />
		<property name="monitorUI" ref="monitor" />
	</bean>
	<!-- 同步订单状态线程-->
	<bean id="SyncAliOrderThread" class="ebay.SyncAliOrderThread" depends-on="EbayMgr,monitor">
	    <!-- 线程名 -->
		<constructor-arg type="java.lang.String" value="SyncAliOrderThread"/>
		<!-- 1默认开启订单交运功能,0关闭 -->
		<constructor-arg type="java.lang.String" value="0"/>
	    <property name="ebayMgr" ref="EbayMgr" />
		<property name="monitorUI" ref="monitor" />
	</bean>
	<!-- 消息回复线程-->
	<bean id="SendMessageThread" class="ebay.SendMessageThread" depends-on="EbayMgr,monitor">
	    <!-- 线程名 -->
		<constructor-arg type="java.lang.String" value="SendMessageThread"/>
		<!-- 1默认开启订单交运功能,0关闭 -->
		<constructor-arg type="java.lang.String" value="1"/>
	    <property name="ebayMgr" ref="EbayMgr" />
		<property name="monitorUI" ref="monitor" />
	</bean>
	</beans>
