Просмотр исходного кода

Merge branch 'dev' of ssh://10.10.101.21/source/platform-b2b into debug-redRot

wangmh 8 лет назад
Родитель
Сommit
055d486a48

+ 529 - 525
pom.xml

@@ -1,530 +1,534 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-		 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<artifactId>platform-b2b</artifactId>
-	<packaging>war</packaging>
-	<name>platform-b2b Maven Webapp</name>
-	<url>http://maven.apache.org</url>
-	<parent>
-		<groupId>com.uas.platform</groupId>
-		<artifactId>platform</artifactId>
-		<version>0.0.1-SNAPSHOT</version>
-	</parent>
-	<profiles>
-		<profile>
-			<!-- 开发环境 -->
-			<id>dev</id>
-			<properties>
-				<profile>dev</profile>
-				<!-- static plugin -->
-				<static-path>static</static-path>
-			</properties>
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>platform-b2b</artifactId>
+    <packaging>war</packaging>
+    <name>platform-b2b Maven Webapp</name>
+    <url>http://maven.apache.org</url>
+    <parent>
+        <groupId>com.uas.platform</groupId>
+        <artifactId>platform</artifactId>
+        <version>0.0.1-SNAPSHOT</version>
+        <relativePath>../platform</relativePath>
+    </parent>
+    <profiles>
+        <profile>
+            <!-- 开发环境 -->
+            <id>dev</id>
+            <properties>
+                <profile>dev</profile>
+                <!-- static plugin -->
+                <static-path>static</static-path>
+            </properties>
 
-		</profile>
-		<profile>
-			<!-- 测试环境 -->
-			<id>test</id>
-			<properties>
-				<profile>test</profile>
-				<!-- static plugin -->
-				<static-path>static</static-path>
-			</properties>
-		</profile>
-		<profile>
-			<!-- 生产环境 -->
-			<id>prod</id>
-			<properties>
-				<profile>prod</profile>
-				<!-- static plugin -->
-				<static-path>http://static.ubtob.com</static-path>
-			</properties>
-			<!-- 默认 -->
-			<activation>
-				<activeByDefault>true</activeByDefault>
-			</activation>
-		</profile>
-	</profiles>
-	<dependencies>
-		<dependency>
-			<groupId>javax.servlet</groupId>
-			<artifactId>servlet-api</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>junit</groupId>
-			<artifactId>junit</artifactId>
-			<scope>test</scope>
-		</dependency>
-		<dependency>
-			<groupId>com.uas.platform</groupId>
-			<artifactId>platform-core</artifactId>
-		</dependency>
-		<!-- spring -->
-		<dependency>
-			<groupId>org.springframework</groupId>
-			<artifactId>spring-context</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.springframework</groupId>
-			<artifactId>spring-context-support</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.springframework</groupId>
-			<artifactId>spring-webmvc</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.springframework</groupId>
-			<artifactId>spring-jdbc</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.springframework</groupId>
-			<artifactId>spring-tx</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.springframework</groupId>
-			<artifactId>spring-aop</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.springframework</groupId>
-			<artifactId>spring-aspects</artifactId>
-		</dependency>
-		<!-- jpa -->
-		<dependency>
-			<groupId>org.springframework.data</groupId>
-			<artifactId>spring-data-jpa</artifactId>
-		</dependency>
-		<!-- -->
-		<dependency>
-			<groupId>commons-fileupload</groupId>
-			<artifactId>commons-fileupload</artifactId>
-			<version>1.3.1</version>
-		</dependency>
-		<!-- sendMsg -->
-		<dependency>
-			<groupId>org.apache.axis</groupId>
-			<artifactId>axis</artifactId>
-			<version>1.6.0</version>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.axis.jaxrpc</groupId>
-			<artifactId>axis-jaxrpc</artifactId>
-			<version>1.4</version>
-		</dependency>
-		<dependency>
-			<groupId>commons-discovery</groupId>
-			<artifactId>commons-discovery</artifactId>
-			<version>0.4</version>
-		</dependency>
-		<dependency>
-			<groupId>com.ibm</groupId>
-			<artifactId>wsdl4j</artifactId>
-			<version>1.4</version>
-		</dependency>
+        </profile>
+        <profile>
+            <!-- 测试环境 -->
+            <id>test</id>
+            <properties>
+                <profile>test</profile>
+                <!-- static plugin -->
+                <static-path>static</static-path>
+            </properties>
+            <activation>
+                <activeByDefault>true</activeByDefault>
+            </activation>
+        </profile>
+        <profile>
+            <!-- 生产环境 -->
+            <id>prod</id>
+            <properties>
+                <profile>prod</profile>
+                <!-- static plugin -->
+                <static-path>http://static.ubtob.com</static-path>
+            </properties>
+            <!-- 默认 -->
 
-		<!-- hibernate -->
-		<dependency>
-			<groupId>org.hibernate</groupId>
-			<artifactId>hibernate-core</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.hibernate</groupId>
-			<artifactId>hibernate-entitymanager</artifactId>
-			<exclusions>
-				<exclusion>
-					<groupId>cglib</groupId>
-					<artifactId>cglib</artifactId>
-				</exclusion>
-				<exclusion>
-					<groupId>dom4j</groupId>
-					<artifactId>dom4j</artifactId>
-				</exclusion>
-			</exclusions>
-		</dependency>
-		<dependency>
-			<groupId>commons-collections</groupId>
-			<artifactId>commons-collections</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.hibernate</groupId>
-			<artifactId>hibernate-validator</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.aspectj</groupId>
-			<artifactId>aspectjrt</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.aspectj</groupId>
-			<artifactId>aspectjweaver</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.commons</groupId>
-			<artifactId>commons-lang3</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>javax.validation</groupId>
-			<artifactId>validation-api</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>javax.transaction</groupId>
-			<artifactId>jta</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.hibernate</groupId>
-			<artifactId>hibernate-ehcache</artifactId>
-		</dependency>
-		<!-- jdbc -->
-		<dependency>
-			<groupId>com.oracle</groupId>
-			<artifactId>ojdbc6</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.springframework</groupId>
-			<artifactId>spring-orm</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>commons-pool</groupId>
-			<artifactId>commons-pool</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>com.alibaba</groupId>
-			<artifactId>druid</artifactId>
-		</dependency>
-		<!-- spring mobile -->
-		<dependency>
-			<groupId>org.springframework.mobile</groupId>
-			<artifactId>spring-mobile-device</artifactId>
-		</dependency>
-		<!--json-lib -->
-		<dependency>
-			<groupId>net.sf.json-lib</groupId>
-			<artifactId>json-lib</artifactId>
-			<classifier>jdk15</classifier>
-		</dependency>
-		<dependency>
-			<groupId>org.codehaus.jackson</groupId>
-			<artifactId>jackson-core-asl</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.codehaus.jackson</groupId>
-			<artifactId>jackson-mapper-asl</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>com.fasterxml.jackson.core</groupId>
-			<artifactId>jackson-core</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>com.fasterxml.jackson.core</groupId>
-			<artifactId>jackson-databind</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>com.fasterxml.jackson.core</groupId>
-			<artifactId>jackson-annotations</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>com.alibaba</groupId>
-			<artifactId>fastjson</artifactId>
-		</dependency>
-		<!-- velocity -->
-		<dependency>
-			<groupId>org.apache.velocity</groupId>
-			<artifactId>velocity</artifactId>
-		</dependency>
-		<!-- mail -->
-		<dependency>
-			<groupId>javax.mail</groupId>
-			<artifactId>mail</artifactId>
-		</dependency>
-		<!-- xinge -->
-		<dependency>
-			<groupId>tencent</groupId>
-			<artifactId>xinge</artifactId>
-			<version>1.1.4</version>
-		</dependency>
-		<!-- jxls -->
-		<dependency>
-			<groupId>net.sf.jxls</groupId>
-			<artifactId>jxls-core</artifactId>
-			<version>1.0.4</version>
-		</dependency>
-		<dependency>
-			<groupId>net.sf.jxls</groupId>
-			<artifactId>jxls-reader</artifactId>
-			<version>1.0.4</version>
-		</dependency>
-		<!-- redis -->
-		<dependency>
-			<groupId>redis.clients</groupId>
-			<artifactId>jedis</artifactId>
-			<version>2.7.3</version>
-		</dependency>
-		<dependency>
-			<groupId>org.springframework.data</groupId>
-			<artifactId>spring-data-redis</artifactId>
-			<version>1.6.0.RELEASE</version>
-		</dependency>
-		<!-- 邮件 -->
-		<dependency>
-			<groupId>com.uas.message</groupId>
-			<artifactId>message-mail-api</artifactId>
-		</dependency>
-		<!-- 消息-->
-		<dependency>
-			<groupId>com.uas.message</groupId>
-			<artifactId>message-sms-api</artifactId>
-		</dependency>
-	
-		<dependency>
-			<groupId>com.uas.account</groupId>
-			<artifactId>account-common</artifactId>
-			<version>0.0.1-SNAPSHOT</version>
-		</dependency>
+        </profile>
+    </profiles>
+    <dependencies>
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>servlet-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>com.uas.platform</groupId>
+            <artifactId>platform-core</artifactId>
+        </dependency>
+        <!-- spring -->
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-context</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-context-support</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-webmvc</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-jdbc</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-tx</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-aop</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-aspects</artifactId>
+        </dependency>
+        <!-- jpa -->
+        <dependency>
+            <groupId>org.springframework.data</groupId>
+            <artifactId>spring-data-jpa</artifactId>
+        </dependency>
+        <!-- -->
+        <dependency>
+            <groupId>commons-fileupload</groupId>
+            <artifactId>commons-fileupload</artifactId>
+            <version>1.3.1</version>
+        </dependency>
+        <!-- sendMsg -->
+        <dependency>
+            <groupId>org.apache.axis</groupId>
+            <artifactId>axis</artifactId>
+            <version>1.6.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.axis.jaxrpc</groupId>
+            <artifactId>axis-jaxrpc</artifactId>
+            <version>1.4</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-discovery</groupId>
+            <artifactId>commons-discovery</artifactId>
+            <version>0.4</version>
+        </dependency>
+        <dependency>
+            <groupId>com.ibm</groupId>
+            <artifactId>wsdl4j</artifactId>
+            <version>1.4</version>
+        </dependency>
 
-		<!-- dubbo -->
-		<dependency>
-			<groupId>com.alibaba</groupId>
-			<artifactId>dubbo</artifactId>
-			<exclusions>
-				<exclusion>
-					<groupId>javax.servlet</groupId>
-					<artifactId>javax.servlet-api</artifactId>
-				</exclusion>
-				<exclusion>
-					<groupId>org.apache.httpcomponents</groupId>
-					<artifactId>httpcore</artifactId>
-				</exclusion>
-			</exclusions>
-		</dependency>
-		<dependency>
-			<groupId>com.github.sgroschupf</groupId>
-			<artifactId>zkclient</artifactId>
-		</dependency>
-		<!-- hessian -->
-		<dependency>
-			<groupId>com.caucho</groupId>
-			<artifactId>hessian</artifactId>
-		</dependency>
-		<!-- search on dubbo -->
-		<dependency>
-			<groupId>com.uas.search</groupId>
-			<artifactId>search-api-b2b</artifactId>
-			<version>0.1.9-SNAPSHOT</version>
-		</dependency>
-		<!-- dfs on dubbo -->
-		<dependency>
-			<groupId>com.uas.dfs</groupId>
-			<artifactId>dfs-api</artifactId>
-		</dependency>
-	</dependencies>
-	<build>
-		<finalName>platform-b2b</finalName>
-		<!-- 受profile影响的目录 -->
-		<resources>
-			<resource>
-				<directory>${basedir}/src/main/resources</directory>
-				<filtering>true</filtering>
-				<excludes>
-					<exclude>**/*.xls</exclude>
-				</excludes>
-			</resource>
-			<!-- xls文件不能filter处理,需区分出来 -->
-			<resource>
-				<directory>${basedir}/src/main/resources</directory>
-				<filtering>false</filtering>
-				<includes>
-					<include>**/*.xls</include>
-				</includes>
-			</resource>
-		</resources>
-		<!-- 在maven生命周期validate阶段生成timestamp -->
-		<plugins>
-			<plugin>
-				<groupId>org.codehaus.mojo</groupId>
-				<artifactId>buildnumber-maven-plugin</artifactId>
-				<version>1.3</version>
-				<executions>
-					<execution>
-						<phase>validate</phase>
-						<goals>
-							<goal>create-timestamp</goal>
-						</goals>
-					</execution>
-				</executions>
-				<configuration>
-					<format>{0,date,yyyy-MM-dd HH:mm:ss}</format>
-					<items>
-						<item>timestamp</item>
-					</items>
-				</configuration>
-			</plugin>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-compiler-plugin</artifactId>
-				<configuration>
-					<source>1.7</source>
-					<target>1.7</target>
-				</configuration>
-			</plugin>
-			<plugin>
-				<groupId>com.samaxes.maven</groupId>
-				<artifactId>minify-maven-plugin</artifactId>
-				<version>1.7.4</version>
-				<!-- 静态文件压缩  -->
-				<executions>
-					<execution>
-						<id>default-minify</id>
-						<phase>prepare-package</phase>
-						<configuration>
-							<charset>UTF-8</charset>
-							<skipMerge>true</skipMerge>
-							<closureLanguage>ECMASCRIPT5</closureLanguage>
-							<closureAngularPass>true</closureAngularPass>
-							<nosuffix>true</nosuffix>
-							<webappTargetDir>${project.build.directory}/minify</webappTargetDir>
-							<cssSourceDir>resources</cssSourceDir>
-							<cssEngine>YUI</cssEngine>
-							<jsSourceDir>resources</jsSourceDir>
-							<jsEngine>CLOSURE</jsEngine>
-							<cssSourceIncludes>
-								<cssSourceInclude>css/**/*.css</cssSourceInclude>
-								<cssSourceInclude>data/**/*.json</cssSourceInclude>
-							</cssSourceIncludes>
-							<cssSourceExcludes>
-								<cssSourceExclude>css/**/*.min.css</cssSourceExclude>
-							</cssSourceExcludes>
-							<jsSourceIncludes>
-								<jsSourceInclude>js/**/*.js</jsSourceInclude>
-							</jsSourceIncludes>
-							<jsSourceExcludes>
-								<jsSourceExclude>js/**/*.min.js</jsSourceExclude>
-							</jsSourceExcludes>
-						</configuration>
-						<goals>
-							<goal>minify</goal>
-						</goals>
-					</execution>
-				</executions>
-			</plugin>
-			<plugin>
-				<artifactId>maven-resources-plugin</artifactId>
-				<executions>
-					<execution>
-						<id>copy-resources</id>
-						<phase>prepare-package</phase>
-						<goals>
-							<goal>copy-resources</goal>
-						</goals>
-						<configuration>
-							<outputDirectory>${project.build.directory}/minify</outputDirectory>
-							<overwrite>false</overwrite>
-							<resources>
-								<resource>
-									<directory>${basedir}/src/main/webapp</directory>
-								</resource>
-							</resources>
-						</configuration>
-					</execution>
-				</executions>
-			</plugin>
-			<plugin>
-				<groupId>com.uas.plugins</groupId>
-				<artifactId>static-maven-plugin</artifactId>
-				<version>0.0.2-SNAPSHOT</version>
-				<!-- 静态资源分离  -->
-				<executions>
-					<execution>
-						<id>default-static</id>
-						<phase>prepare-package</phase>
-						<configuration>
-							<pathMatcher>static</pathMatcher>
-							<staticUrl>${static-path}</staticUrl>
-							<webappDir>${project.build.directory}/minify</webappDir>
-							<sourceDir>/</sourceDir>
-							<targetDir>${project.build.directory}/statics</targetDir>
-							<staticDir>/</staticDir>
-							<sourceIncludes>
-								<sourceInclude>resources/js/**/*.js</sourceInclude>
-								<sourceInclude>resources/data/**/*.json</sourceInclude>
-								<sourceInclude>resources/tpl/**/*.html</sourceInclude>
-								<sourceInclude>WEB-INF/views/**/*.html</sourceInclude>
-							</sourceIncludes>
-							<!--http://static.ubtob.com/css/index.css?_v=1450321871828-->
-							<versionSuffix>
-								<suffix>?_v=${timestamp}</suffix>
-								<exclude>*/require.js,*.min.js,*.min.css</exclude>
-							</versionSuffix>
-						</configuration>
-						<goals>
-							<goal>static</goal>
-						</goals>
-					</execution>
-				</executions>
-			</plugin>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-war-plugin</artifactId>
-				<version>2.4</version>
-				<configuration>
-					<webResources>
-						<resource>
-							<directory>${project.build.directory}/statics</directory>
-						</resource>
-						<resource>
-							<directory>${project.build.directory}/minify</directory>
-						</resource>
-					</webResources>
-				</configuration>
-			</plugin>
-			<plugin>
-				<groupId>org.apache.tomcat.maven</groupId>
-				<artifactId>tomcat7-maven-plugin</artifactId>
-				<version>2.2</version>
-				<configuration>
-					<port>8090</port>
-					<path>/platform-b2b</path>
-					<uriEncoding>utf-8</uriEncoding>
-				</configuration>
-			</plugin>
-		</plugins>
-		<pluginManagement>
-			<plugins>
-				<plugin>
-					<groupId>org.eclipse.m2e</groupId>
-					<artifactId>lifecycle-mapping</artifactId>
-					<version>1.0.0</version>
-					<configuration>
-						<lifecycleMappingMetadata>
-							<pluginExecutions>
-								<pluginExecution>
-									<pluginExecutionFilter>
-										<groupId>
-											org.codehaus.mojo
-										</groupId>
-										<artifactId>
-											buildnumber-maven-plugin
-										</artifactId>
-										<versionRange>
-											[1.3,)
-										</versionRange>
-										<goals>
-											<goal>
-												create-timestamp
-											</goal>
-										</goals>
-									</pluginExecutionFilter>
-									<action>
-										<ignore></ignore>
-									</action>
-								</pluginExecution>
-							</pluginExecutions>
-						</lifecycleMappingMetadata>
-					</configuration>
-				</plugin>
-			</plugins>
-		</pluginManagement>
-	</build>
-	<properties>
-		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-		<maven.compiler.source>1.7</maven.compiler.source>
-		<maven.compiler.target>1.7</maven.compiler.target>
-		<skipTests>true</skipTests>
-	</properties>
+        <!-- hibernate -->
+        <dependency>
+            <groupId>org.hibernate</groupId>
+            <artifactId>hibernate-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.hibernate</groupId>
+            <artifactId>hibernate-entitymanager</artifactId>
+            <exclusions>
+                <exclusion>
+                    <groupId>cglib</groupId>
+                    <artifactId>cglib</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>dom4j</groupId>
+                    <artifactId>dom4j</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>commons-collections</groupId>
+            <artifactId>commons-collections</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.hibernate</groupId>
+            <artifactId>hibernate-validator</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.aspectj</groupId>
+            <artifactId>aspectjrt</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.aspectj</groupId>
+            <artifactId>aspectjweaver</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-lang3</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>javax.validation</groupId>
+            <artifactId>validation-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>javax.transaction</groupId>
+            <artifactId>jta</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.hibernate</groupId>
+            <artifactId>hibernate-ehcache</artifactId>
+        </dependency>
+        <!-- jdbc -->
+        <dependency>
+            <groupId>com.oracle</groupId>
+            <artifactId>ojdbc6</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-orm</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>commons-pool</groupId>
+            <artifactId>commons-pool</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>druid</artifactId>
+        </dependency>
+        <!-- spring mobile -->
+        <dependency>
+            <groupId>org.springframework.mobile</groupId>
+            <artifactId>spring-mobile-device</artifactId>
+        </dependency>
+        <!--json-lib -->
+        <dependency>
+            <groupId>net.sf.json-lib</groupId>
+            <artifactId>json-lib</artifactId>
+            <classifier>jdk15</classifier>
+        </dependency>
+        <dependency>
+            <groupId>org.codehaus.jackson</groupId>
+            <artifactId>jackson-core-asl</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.codehaus.jackson</groupId>
+            <artifactId>jackson-mapper-asl</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-databind</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-annotations</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>fastjson</artifactId>
+        </dependency>
+        <!-- velocity -->
+        <dependency>
+            <groupId>org.apache.velocity</groupId>
+            <artifactId>velocity</artifactId>
+        </dependency>
+        <!-- mail -->
+        <dependency>
+            <groupId>javax.mail</groupId>
+            <artifactId>mail</artifactId>
+        </dependency>
+        <!-- xinge -->
+        <dependency>
+            <groupId>tencent</groupId>
+            <artifactId>xinge</artifactId>
+            <version>1.1.4</version>
+        </dependency>
+        <!-- jxls -->
+        <dependency>
+            <groupId>net.sf.jxls</groupId>
+            <artifactId>jxls-core</artifactId>
+            <version>1.0.4</version>
+        </dependency>
+        <dependency>
+            <groupId>net.sf.jxls</groupId>
+            <artifactId>jxls-reader</artifactId>
+            <version>1.0.4</version>
+        </dependency>
+        <!-- redis -->
+        <dependency>
+            <groupId>redis.clients</groupId>
+            <artifactId>jedis</artifactId>
+            <version>2.7.3</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.data</groupId>
+            <artifactId>spring-data-redis</artifactId>
+            <version>1.6.0.RELEASE</version>
+        </dependency>
+        <!-- 邮件 -->
+        <dependency>
+            <groupId>com.uas.message</groupId>
+            <artifactId>message-mail-api</artifactId>
+        </dependency>
+        <!-- 消息-->
+        <dependency>
+            <groupId>com.uas.message</groupId>
+            <artifactId>message-sms-api</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>com.uas.account</groupId>
+            <artifactId>account-common</artifactId>
+            <version>0.0.1-SNAPSHOT</version>
+        </dependency>
+
+        <!-- dubbo -->
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo</artifactId>
+            <exclusions>
+                <exclusion>
+                    <groupId>javax.servlet</groupId>
+                    <artifactId>javax.servlet-api</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.httpcomponents</groupId>
+                    <artifactId>httpcore</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>com.github.sgroschupf</groupId>
+            <artifactId>zkclient</artifactId>
+        </dependency>
+        <!-- hessian -->
+        <dependency>
+            <groupId>com.caucho</groupId>
+            <artifactId>hessian</artifactId>
+        </dependency>
+        <!-- search on dubbo -->
+        <dependency>
+            <groupId>com.uas.search</groupId>
+            <artifactId>search-api-b2b</artifactId>
+            <version>0.1.9-SNAPSHOT</version>
+        </dependency>
+        <!-- dfs on dubbo -->
+        <dependency>
+            <groupId>com.uas.dfs</groupId>
+            <artifactId>dfs-api</artifactId>
+        </dependency>
+    </dependencies>
+    <build>
+        <finalName>platform-b2b</finalName>
+        <!-- 受profile影响的目录 -->
+        <resources>
+            <resource>
+                <directory>${basedir}/src/main/resources</directory>
+                <filtering>true</filtering>
+                <excludes>
+                    <exclude>**/*.xls</exclude>
+                </excludes>
+            </resource>
+            <!-- xls文件不能filter处理,需区分出来 -->
+            <resource>
+                <directory>${basedir}/src/main/resources</directory>
+                <filtering>false</filtering>
+                <includes>
+                    <include>**/*.xls</include>
+                </includes>
+            </resource>
+        </resources>
+        <!-- 在maven生命周期validate阶段生成timestamp -->
+        <plugins>
+            <!--<plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>buildnumber-maven-plugin</artifactId>
+                <version>1.3</version>
+                <executions>
+                    <execution>
+                        <phase>validate</phase>
+                        <goals>
+                            <goal>create-timestamp</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <configuration>
+                    <configuration>
+                        <format>{0,date,yyyy-MM-dd HH:mm:ss}</format>
+                        <items>
+                            <item>timestamp</item>
+                        </items>
+                    </configuration>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <source>1.7</source>
+                    <target>1.7</target>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>com.samaxes.maven</groupId>
+                <artifactId>minify-maven-plugin</artifactId>
+                <version>1.7.4</version>
+                &lt;!&ndash; 静态文件压缩  &ndash;&gt;
+                <executions>
+                    <execution>
+                        <id>default-minify</id>
+                        <phase>prepare-package</phase>
+                        <configuration>
+                            <charset>UTF-8</charset>
+                            <skipMerge>true</skipMerge>
+                            <closureLanguage>ECMASCRIPT5</closureLanguage>
+                            <closureAngularPass>true</closureAngularPass>
+                            <nosuffix>true</nosuffix>
+                            <webappTargetDir>${project.build.directory}/minify</webappTargetDir>
+                            <cssSourceDir>resources</cssSourceDir>
+                            <cssEngine>YUI</cssEngine>
+                            <jsSourceDir>resources</jsSourceDir>
+                            <jsEngine>CLOSURE</jsEngine>
+                            <cssSourceIncludes>
+                                <cssSourceInclude>css/**/*.css</cssSourceInclude>
+                                <cssSourceInclude>data/**/*.json</cssSourceInclude>
+                            </cssSourceIncludes>
+                            <cssSourceExcludes>
+                                <cssSourceExclude>css/**/*.min.css</cssSourceExclude>
+                            </cssSourceExcludes>
+                            <jsSourceIncludes>
+                                <jsSourceInclude>js/**/*.js</jsSourceInclude>
+                            </jsSourceIncludes>
+                            <jsSourceExcludes>
+                                <jsSourceExclude>js/**/*.min.js</jsSourceExclude>
+                            </jsSourceExcludes>
+                        </configuration>
+                        <goals>
+                            <goal>minify</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <artifactId>maven-resources-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>copy-resources</id>
+                        <phase>prepare-package</phase>
+                        <goals>
+                            <goal>copy-resources</goal>
+                        </goals>
+                        <configuration>
+                            <outputDirectory>${project.build.directory}/minify</outputDirectory>
+                            <overwrite>false</overwrite>
+                            <resources>
+                                <resource>
+                                    <directory>${basedir}/src/main/webapp</directory>
+                                </resource>
+                            </resources>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>com.uas.plugins</groupId>
+                <artifactId>static-maven-plugin</artifactId>
+                <version>0.0.2-SNAPSHOT</version>
+                &lt;!&ndash; 静态资源分离  &ndash;&gt;
+                <executions>
+                    <execution>
+                        <id>default-static</id>
+                        <phase>prepare-package</phase>
+                        <configuration>
+                            <pathMatcher>static</pathMatcher>
+                            <staticUrl>${static-path}</staticUrl>
+                            <webappDir>${project.build.directory}/minify</webappDir>
+                            <sourceDir>/</sourceDir>
+                            <targetDir>${project.build.directory}/statics</targetDir>
+                            <staticDir>/</staticDir>
+                            <sourceIncludes>
+                                <sourceInclude>resources/js/**/*.js</sourceInclude>
+                                <sourceInclude>resources/data/**/*.json</sourceInclude>
+                                <sourceInclude>resources/tpl/**/*.html</sourceInclude>
+                                <sourceInclude>WEB-INF/views/**/*.html</sourceInclude>
+                            </sourceIncludes>
+                            http://static.ubtob.com/css/index.css?_v=1450321871828
+                            <versionSuffix>
+                                <suffix>?_v=${timestamp}</suffix>
+                                <exclude>*/require.js,*.min.js,*.min.css</exclude>
+                            </versionSuffix>
+                        </configuration>
+                        <goals>
+                            <goal>static</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-war-plugin</artifactId>
+                <version>2.4</version>
+                <configuration>
+                    <webResources>
+                        <resource>
+                            <directory>${project.build.directory}/statics</directory>
+                        </resource>
+                        <resource>
+                            <directory>${project.build.directory}/minify</directory>
+                        </resource>
+                    </webResources>
+                </configuration>
+            </plugin>-->
+            <plugin>
+                <groupId>org.apache.tomcat.maven</groupId>
+                <artifactId>tomcat7-maven-plugin</artifactId>
+                <version>2.2</version>
+                <configuration>
+                    <port>8090</port>
+                    <path>/platform-b2b</path>
+                    <uriEncoding>utf-8</uriEncoding>
+                </configuration>
+            </plugin>
+        </plugins>
+        <!--<pluginManagement>
+            <plugins>
+                <plugin>
+                    <groupId>org.eclipse.m2e</groupId>
+                    <artifactId>lifecycle-mapping</artifactId>
+                    <version>1.0.0</version>
+                    <configuration>
+                        <lifecycleMappingMetadata>
+                            <pluginExecutions>
+                                <pluginExecution>
+                                    <pluginExecutionFilter>
+                                        <groupId>
+                                            org.codehaus.mojo
+                                        </groupId>
+                                        <artifactId>
+                                            buildnumber-maven-plugin
+                                        </artifactId>
+                                        <versionRange>
+                                            [1.3,)
+                                        </versionRange>
+                                        <goals>
+                                            <goal>
+                                                create-timestamp
+                                            </goal>
+                                        </goals>
+                                    </pluginExecutionFilter>
+                                    <action>
+                                        <ignore></ignore>
+                                    </action>
+                                </pluginExecution>
+                            </pluginExecutions>
+                        </lifecycleMappingMetadata>
+                    </configuration>
+                </plugin>
+            </plugins>
+        </pluginManagement>-->
+    </build>
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <maven.compiler.source>1.7</maven.compiler.source>
+        <maven.compiler.target>1.7</maven.compiler.target>
+        <skipTests>true</skipTests>
+    </properties>
 </project>

+ 15 - 20
src/main/java/com/uas/platform/b2b/controller/FileController.java

@@ -6,7 +6,8 @@ import com.uas.platform.b2b.dao.AttachDao;
 import com.uas.platform.b2b.dao.CommonDao;
 import com.uas.platform.b2b.model.Attach;
 import com.uas.platform.b2b.service.AttachService;
-import com.uas.platform.b2b.support.FileUploadHttp;
+import com.uas.platform.b2b.support.HttpUtils;
+import com.uas.platform.b2b.temporary.model.FileUrl;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.ui.ModelMap;
 import org.springframework.util.CollectionUtils;
@@ -14,7 +15,6 @@ import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RestController;
-import org.springframework.web.client.RestTemplate;
 
 import javax.servlet.http.HttpServletResponse;
 import java.io.*;
@@ -92,16 +92,16 @@ public class FileController {
      *
      * @return
      */
-//	@RequestMapping(value = "/refreshPath", method = RequestMethod.GET)
-//    public ModelMap refreshpath() throws IOException {
-//	    ModelMap map = new ModelMap();
-//	    List<Long> successIds = new ArrayList<Long>();
-//        List<Long> failedIds = new ArrayList<Long>();
-//        convertPath(successIds, failedIds);
-//        map.put("successIds", successIds);
-//        map.put("failedIds", failedIds);
-//        return map;
-//    }
+	@RequestMapping(value = "/refreshPath", method = RequestMethod.GET)
+    public ModelMap refreshpath() throws IOException {
+	    ModelMap map = new ModelMap();
+	    List<Long> successIds = new ArrayList<Long>();
+        List<Long> failedIds = new ArrayList<Long>();
+        convertPath(successIds, failedIds);
+        map.put("successIds", successIds);
+        map.put("failedIds", failedIds);
+        return map;
+    }
 
     /**
      * 递归更新所有附件信息
@@ -122,14 +122,9 @@ public class FileController {
                     String name = attach.getName().substring(attach.getName().indexOf(".") + 1, attach.getName().length());
                     try {
                         InputStream in = new FileInputStream(filePath);
-                        ByteArrayOutputStream outStream = new ByteArrayOutputStream();
-                        byte[] buffer = new byte[1024];
-                        int len = 0;
-                        while( (len=in.read(buffer)) != -1 ){
-                            outStream.write(buffer, 0, len);
-                        }
-                        in.close();
-                        path = fileClient.upload(outStream.toByteArray(), attach.getSize(), name, null);
+                        HttpUtils.Response response = HttpUtils.upload(FileUrl.FILE_UPLOAD, filePath, null);
+                        JSONObject obj = JSONObject.parseObject(response.getResponseText());
+                        path = (String) obj.get("path");
                     } catch (IOException e) {
                         failedIds.add(attach.getId());
                     } catch (Exception e) {

+ 16 - 27
src/main/java/com/uas/platform/b2b/controller/SaleNoticeController.java

@@ -1,33 +1,7 @@
 package com.uas.platform.b2b.controller;
 
-import java.io.UnsupportedEncodingException;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import javax.servlet.http.HttpServletRequest;
-
 import com.alibaba.fastjson.JSONObject;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.ResponseEntity;
-import org.springframework.stereotype.Controller;
-import org.springframework.ui.ModelMap;
-import org.springframework.util.CollectionUtils;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.ResponseBody;
-import org.springframework.web.bind.annotation.ResponseStatus;
-import org.springframework.web.servlet.ModelAndView;
-
-import com.uas.platform.b2b.model.PurchaseNotice;
-import com.uas.platform.b2b.model.SaleSend;
-import com.uas.platform.b2b.model.SaleSendAll;
-import com.uas.platform.b2b.model.SaleSendItem;
-import com.uas.platform.b2b.model.SearchFilter;
+import com.uas.platform.b2b.model.*;
 import com.uas.platform.b2b.search.SearchService;
 import com.uas.platform.b2b.service.PurchaseNoticeService;
 import com.uas.platform.b2b.service.UserService;
@@ -48,6 +22,21 @@ import com.uas.search.b2b.model.SPage;
 import com.uas.search.b2b.model.Sort;
 import com.uas.search.b2b.model.Sort.Type;
 import com.uas.search.b2b.util.SearchConstants;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.util.CollectionUtils;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.servlet.ModelAndView;
+
+import javax.servlet.http.HttpServletRequest;
+import java.io.UnsupportedEncodingException;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
 
 /**
  * 卖家对送货提醒的操作

+ 4 - 6
src/main/java/com/uas/platform/b2b/dao/PurchaseInquiryItemDao.java

@@ -1,10 +1,6 @@
 package com.uas.platform.b2b.dao;
 
-import java.util.Date;
-import java.util.List;
-
-import javax.transaction.Transactional;
-
+import com.uas.platform.b2b.model.PurchaseInquiryItem;
 import org.springframework.data.jpa.repository.JpaRepository;
 import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
 import org.springframework.data.jpa.repository.Modifying;
@@ -13,7 +9,9 @@ import org.springframework.data.jpa.repository.query.Procedure;
 import org.springframework.data.repository.query.Param;
 import org.springframework.stereotype.Repository;
 
-import com.uas.platform.b2b.model.PurchaseInquiryItem;
+import javax.transaction.Transactional;
+import java.util.Date;
+import java.util.List;
 
 @Repository
 @Transactional

+ 3 - 0
src/main/java/com/uas/platform/b2b/erp/service/PublicInquiryService.java

@@ -2,6 +2,7 @@ package com.uas.platform.b2b.erp.service;
 
 import com.uas.platform.b2b.erp.model.BatchInquiry;
 import com.uas.platform.b2b.model.PurcInquiry;
+import com.uas.platform.b2b.model.PurcInquiryItem;
 
 import java.util.List;
 
@@ -31,4 +32,6 @@ public interface PublicInquiryService {
      * @param inquiries
      */
     void updateStatus(List<BatchInquiry> inquiries);
+
+    void sendMessage(List<PurcInquiryItem> inquiryItems);
 }

+ 27 - 28
src/main/java/com/uas/platform/b2b/erp/service/impl/PublicInquiryServiceImpl.java

@@ -1,6 +1,5 @@
 package com.uas.platform.b2b.erp.service.impl;
 
-import com.alibaba.fastjson.JSON;
 import com.uas.message.mail.service.MailService;
 import com.uas.platform.b2b.core.util.ContextUtils;
 import com.uas.platform.b2b.core.util.DateFormatUtils;
@@ -11,7 +10,10 @@ import com.uas.platform.b2b.erp.model.BatchInquiry;
 import com.uas.platform.b2b.erp.service.PublicInquiryService;
 import com.uas.platform.b2b.erp.support.ErpBufferedLogger;
 import com.uas.platform.b2b.event.PurcInquirySaveReleaseEvent;
-import com.uas.platform.b2b.model.*;
+import com.uas.platform.b2b.model.Enterprise;
+import com.uas.platform.b2b.model.Product;
+import com.uas.platform.b2b.model.PurcInquiry;
+import com.uas.platform.b2b.model.PurcInquiryItem;
 import com.uas.platform.b2b.support.MessageConf;
 import com.uas.platform.b2b.support.SystemSession;
 import com.uas.platform.b2b.support.UsageBufferedLogger;
@@ -22,6 +24,8 @@ import com.uas.platform.core.model.Constant;
 import com.uas.platform.core.model.Status;
 import com.uas.platform.core.util.HttpUtil;
 import com.uas.platform.core.util.serializer.FlexJsonUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.jdbc.core.JdbcTemplate;
 import org.springframework.stereotype.Service;
@@ -132,7 +136,7 @@ public class PublicInquiryServiceImpl implements PublicInquiryService {
                     items = purcInquiryItemDao.save(items);
                     inquiryItems.addAll(items);
                 } catch (Exception e) {
-                    logger.log("公共询价保存出错", inquiry.getEnUU() + "," +inquiry.getCode() +" 保存失败", 0);
+                    logger.log("公共询价保存出错", inquiry.getEnUU() + "," +inquiry.getCode() +" 保存失败", 1);
                     e.printStackTrace();
                 }
             }
@@ -151,7 +155,8 @@ public class PublicInquiryServiceImpl implements PublicInquiryService {
      * 产生消息
      * @param inquiryItems
      */
-    private void sendMessage(final List<PurcInquiryItem> inquiryItems) {
+    @Override
+    public void sendMessage(final List<PurcInquiryItem> inquiryItems) {
         ThreadTask.getInstance().execute(new Runnable() {
             @Override
             public void run() {
@@ -180,7 +185,7 @@ public class PublicInquiryServiceImpl implements PublicInquiryService {
      * @param userIp
      * @param enUU @return
      */
-    private void sendRemind(final List<PurcInquiry> inquiries, final Long userUU, final String userName, final String userIp, final Long enUU){
+    private void sendRemind(final List<PurcInquiry> inquiries, final Long userUU, final String userName, final String userIp, final Long enUU) {
         ThreadTask.getInstance().execute(new Runnable() {
             @Override
             public void run() {
@@ -222,13 +227,10 @@ public class PublicInquiryServiceImpl implements PublicInquiryService {
                             // 不存在被分配客户的业务员则添加系统管理员
                             if (CollectionUtils.isEmpty(userEmails) && CollectionUtils.isEmpty(userTels)) {
                                 Enterprise enterprise = enterpriseDao.findOne(inquiryItem.getVendUU());
-                                if (null != enterprise) {
-                                    User admin = userDao.findOne(enterprise.getEnAdminuu());
-                                    if (null != admin) {
-                                        UserInfo adminInfo = new UserInfo(admin);
-                                        userEmails.add(adminInfo);
-                                        userTels.add(adminInfo);
-                                    }
+                                if (null != enterprise && null != enterprise.getAdmin()) {
+                                    UserInfo adminInfo = new UserInfo(enterprise.getAdmin());
+                                    userEmails.add(adminInfo);
+                                    userTels.add(adminInfo);
                                 }
                             }
                             for (UserInfo userEmail : userEmails) {
@@ -247,22 +249,19 @@ public class PublicInquiryServiceImpl implements PublicInquiryService {
                                 }
                             }
                             // 发短信
-                            for (UserInfo userTel : userTels) {
-                                if(null != userTel.getEmphone() && userTel.getEmphone().matches(TEL_REGEXP)) {//手机号判断
-                                    try {
-                                        sms.setReceiver(userTel.getEmphone());
-                                        sms.setTemplateId(messageConf.getMsgInquiryForB2B());
-                                        HttpUtil.sendPost(messageConf.getMessageUrl(), FlexJsonUtils.toJsonDeep(sms));
-//										usageLogger.log("询价发送短信", "企业UU:" + inquiry.getEnUU() + ",单号:" +inquiry.getCode() +"短信发送成功", "询价发送短信成功");
-
-                                        noticeDao.saveErpLog(userName, userIp, enUU, userUU, "发送询价单通知短信", "发送成功,询价单号" + inquiry.getCode());
-                                    } catch (Exception e) {
-                                        noticeDao.saveErpLog(userName, userIp, enUU, userUU, "发送询价单通知短信", "发送失败,询价单号" + inquiry.getCode());
-//                                        usageLogger.log("询价发送短信", "企业UU:" + inquiry.getEnUU() + ",单号:" +inquiry.getCode() +"短信发送失败", "询价发送短信出错");
-                                        e.printStackTrace();
-                                    }
-                                }
-                            }
+//                            for (UserInfo userTel : userTels) {
+//                                if(null != userTel.getEmphone() && userTel.getEmphone().matches(TEL_REGEXP)) {//手机号判断
+//                                    try {
+//                                        sms.setReceiver(userTel.getEmphone());
+//                                        sms.setTemplateId(messageConf.getMsgInquiryForB2B());
+//                                        HttpUtil.sendPost(messageConf.getMessageUrl(), FlexJsonUtils.toJsonDeep(sms));
+//                                        noticeDao.saveErpLog(userName, userIp, enUU, userUU, "发送询价单通知短信", "发送成功,询价单号" + inquiry.getCode());
+//                                    } catch (Exception e) {
+//                                        noticeDao.saveErpLog(userName, userIp, enUU, userUU, "发送询价单通知短信", "发送失败,询价单号" + inquiry.getCode());
+//                                        e.printStackTrace();
+//                                    }
+//                                }
+//                            }
                             enUUs.add(inquiryItem.getVendUU());
                         }
                     }

+ 8 - 6
src/main/java/com/uas/platform/b2b/listener/MessageListener.java

@@ -64,21 +64,23 @@ public class MessageListener implements ApplicationListener<SaveReleaseEvent<?,
                 if (null != item) {
                     //先取出企业uu
                     // 产品库存在
-                    String prodSql = "select distinct pr_enuu enuu from products p left join purc$vendors v " +
-                            "on v.ve_vendenuu = p.pr_enuu where p.pr_title = '" + item.getProduct().getTitle() + "' " +
-                            "and v.ve_myenuu = " + item.getInquiry().getEnUU();
+                    String prodSql = "select distinct pr_enuu enuu from products where (pr_title = '" + item.getProduct().getTitle() +
+                            "' or pr_code = '" + item.getProduct().getCode() + "') and pr_enuu <> " + item.getInquiry().getEnUU();
                     // 询价单已报价的
                     String inquirySql = "select distinct id_venduu enuu from purc$inquiryitems d left join purc$inquiry n " +
                             "on n.in_id = d.id_inid left join products p on p.pr_id = d.id_prid where d.id_status = 201 " +
-                            "and p.pr_title = '" + item.getProduct().getTitle() + "' and n.in_enuu = " + item.getInquiry().getEnUU();
+                            "and (p.pr_title = '" + item.getProduct().getTitle() + "' or p.pr_code = '" + item.getProduct().getCode()
+                            +"') and n.in_enuu = " + item.getInquiry().getEnUU();
                     // 下过采购订单的
                     String orderSql = "select distinct pu_venduu enuu from purc$orders pu left join purc$orderitems pd " +
                             "on pu.pu_id = pd.pd_puid left join products p on p.pr_id = pd.pd_prid " +
-                            "where p.pr_title = '" + item.getProduct().getTitle() + "' and pu.pu_enuu = " + item.getInquiry().getEnUU();
+                            "where (p.pr_title = '" + item.getProduct().getTitle() + "' or p.pr_code = '" + item.getProduct().getCode()
+                            +"') and pu.pu_enuu = " + item.getInquiry().getEnUU();
                     // 主动报价过的
                     String quotationSql = "select distinct qu_enuu enuu from sale$quotation qu left join sale$quotationitem qd" +
                             " on qu.qu_id = qd.qd_quid left join products p on qd.qd_prid = p.pr_id " +
-                            "where p.pr_title = '" + item.getProduct().getTitle() + "' and qu.qu_custuu = " + item.getInquiry().getEnUU();
+                            "where (p.pr_title = '" + item.getProduct().getTitle() + "' or p.pr_code = '" + item.getProduct().getCode()
+                            +"') and qu.qu_custuu = " + item.getInquiry().getEnUU();
                     List<UserAndEnterprise> prodEnUUs = commonDao.query(prodSql, UserAndEnterprise.class);
                     List<UserAndEnterprise> inquiryEnUUs = commonDao.query(inquirySql, UserAndEnterprise.class);
                     List<UserAndEnterprise> orderEnUUs = commonDao.query(orderSql, UserAndEnterprise.class);

+ 13 - 5
src/main/java/com/uas/platform/b2b/service/PurchaseOrderService.java

@@ -1,13 +1,12 @@
 package com.uas.platform.b2b.service;
 
-import java.util.List;
-import java.util.Map;
-
 import com.uas.platform.b2b.model.*;
-import org.springframework.data.domain.Page;
-
 import com.uas.platform.core.model.PageInfo;
 import com.uas.search.b2b.model.SPage;
+import org.springframework.data.domain.Page;
+
+import java.util.List;
+import java.util.Map;
 
 public interface PurchaseOrderService {
 
@@ -387,5 +386,14 @@ public interface PurchaseOrderService {
 
     Integer setReadByState(String category);
 
+    /**
+     * 批量回复日志记录
+     *
+     * @param idString
+     * @param username
+     * @param userip
+     * @param enuu
+     * @param useruu
+     */
     public void replyByBatch(String idString, String username, String userip, Long enuu, Long useruu);
 }

+ 20 - 21
src/main/java/com/uas/platform/b2b/service/impl/PurchaseInquiryServiceImpl.java

@@ -293,32 +293,27 @@ public class PurchaseInquiryServiceImpl implements PurchaseInquiryService {
 										mailService.send(messageConf.getTplAutoInquiryForB2B(), userEmail.getEmemail(), model);
 										System.out.println("发送邮件成功:" + JSON.toJSON(userEmail));
 										// 线程内无法访问Systemsession,会报nullPoint,采用存储过程
-//										usageLogger.log("询价发送邮件", "企业UU:" + inquiry.getEnUU() + ",单号:" +inquiry.getCode() +" 发送邮件成功", "询价发送邮件成功");
 										noticeDao.saveErpLog(userName, userIp, enUU, userUU, "发送询价单通知邮件", "发送成功,询价单号" + inquiry.getCode() + ",接收邮箱:" + userEmail.getEmemail());
 									} catch (Exception e) {
-//										usageLogger.log("询价发送邮件", "企业UU:" + inquiry.getEnUU() + ",单号:" +inquiry.getCode() +" 发送邮件失败", "询价发送邮件出错");
 										noticeDao.saveErpLog(userName, userIp, enUU, userUU, "发送询价单通知邮件", "发送失败,询价单号" + inquiry.getCode() + ",接收邮箱:" + userEmail.getEmemail());
 										e.printStackTrace();
 									}
 								}
 							}
 							// 发短信
-							for (UserInfo userTel : userTels) {
-								if(null != userTel.getEmphone() && userTel.getEmphone().matches(TEL_REGEXP)) {//手机号判断
-                                    try {
-                                        sms.setReceiver(userTel.getEmphone());
-                                        sms.setTemplateId(messageConf.getMsgAutoInquiryForB2B());
-                                        HttpUtil.sendPost(messageConf.getMessageUrl(), FlexJsonUtils.toJsonDeep(sms));
-//										usageLogger.log("询价发送短信", "企业UU:" + inquiry.getEnUU() + ",单号:" +inquiry.getCode() +"短信发送成功", "询价发送短信成功");
-
-										noticeDao.saveErpLog(userName, userIp, enUU, userUU, "发送询价单通知短信", "发送成功,询价单号" + inquiry.getCode() + ",接收手机:" + userTel.getEmphone());
-                                    } catch (Exception e) {
-										noticeDao.saveErpLog(userName, userIp, enUU, userUU, "发送询价单通知短信", "发送失败,询价单号" + inquiry.getCode() + ",接收手机:" + userTel.getEmphone());
-//                                        usageLogger.log("询价发送短信", "企业UU:" + inquiry.getEnUU() + ",单号:" +inquiry.getCode() +"短信发送失败", "询价发送短信出错");
-										e.printStackTrace();
-                                    }
-                                }
-							}
+//							for (UserInfo userTel : userTels) {
+//								if(null != userTel.getEmphone() && userTel.getEmphone().matches(TEL_REGEXP)) {//手机号判断
+//                                    try {
+//                                        sms.setReceiver(userTel.getEmphone());
+//                                        sms.setTemplateId(messageConf.getMsgAutoInquiryForB2B());
+//                                        HttpUtil.sendPost(messageConf.getMessageUrl(), FlexJsonUtils.toJsonDeep(sms));
+//										noticeDao.saveErpLog(userName, userIp, enUU, userUU, "发送询价单通知短信", "发送成功,询价单号" + inquiry.getCode() + ",接收手机:" + userTel.getEmphone());
+//                                    } catch (Exception e) {
+//										noticeDao.saveErpLog(userName, userIp, enUU, userUU, "发送询价单通知短信", "发送失败,询价单号" + inquiry.getCode() + ",接收手机:" + userTel.getEmphone());
+//										e.printStackTrace();
+//                                    }
+//                                }
+//							}
 							enUUs.add(inquiryItem.getVendUU());
 						}
 					}
@@ -329,9 +324,13 @@ public class PurchaseInquiryServiceImpl implements PurchaseInquiryService {
 
 	@Override
 	public List<PurchaseInquiryItem> findNotUploadReply() {
-        purchaseInquiryItemDao.updateStatus(SystemSession.getUser().getEnterprise().getUu(), Constant.NO);
-		return purchaseInquiryItemDao.findByEnUUAndBackStatus(SystemSession.getUser().getEnterprise().getUu(),
-				(short) Status.NOT_UPLOAD.value());
+        List<PurchaseInquiryItem> items =  purchaseInquiryItemDao.findByEnUUAndBackStatus(SystemSession.getUser().getEnterprise().getUu(),
+                (short) Status.NOT_UPLOAD.value());
+        if(!CollectionUtils.isEmpty(items)) {
+            //TODO 这个地方是后续查询要传输到ERP的询价单报价信息加传输状态过滤
+//        purchaseInquiryItemDao.updateStatus(SystemSession.getUser().getEnterprise().getUu(), Constant.NO);
+        }
+		return items;
 	}
 
 	@Override

+ 1 - 1
src/main/resources/spring/context.xml

@@ -140,7 +140,7 @@
 
 	<bean id="entityManagerFactory"
 		class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
-		<!-- <property name="persistenceUnitName" value="persistenceUnit" /> -->
+		<!--<property name="persistenceUnitName" value="persistenceUnit" />-->
 		<property name="persistenceXmlLocation" value="classpath*:META-INF/persistence.xml" />
 		<property name="packagesToScan" value="com.uas.platform" />
 		<property name="dataSource" ref="dataSource" />