wanghui лет назад: 8
Родитель
Сommit
a9f22000d5

+ 440 - 440
pom.xml

@@ -1,441 +1,441 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<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>
-	<groupId>com.goafanti</groupId>
-	<artifactId>aft</artifactId>
-	<name>aft</name>
-
-	<packaging>war</packaging>
-	<version>1.0.0-BUILD-SNAPSHOT</version>
-
-	<properties>
-		<java-version>1.8</java-version>
-		<org.springframework-version>4.2.5.RELEASE</org.springframework-version>
-		<org.slf4j-version>1.7.21</org.slf4j-version>
-		<shiro-version>1.3.2</shiro-version>
-		<mybatis-version>3.2.8</mybatis-version>
-		<mybatis-spring-version>1.2.2</mybatis-spring-version>
-		<org.aspectj-version>1.6.10</org.aspectj-version>
-		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-	</properties>
-	<profiles>  
-        <profile>  
-            <id>aft_local</id>  
-            <activation>  
-                <activeByDefault>true</activeByDefault>  
-            </activation>  
-            <properties>  
-                <profiles.activation>local</profiles.activation>  
-            </properties>  
-        </profile>  
-        <profile>  
-            <id>aft_dev</id>  
-            <properties>  
-                <profiles.activation>dev</profiles.activation>  
-            </properties>  
-        </profile>  
-        <profile>  
-            <id>aft_prod</id>  
-            <properties>  
-                <profiles.activation>prod</profiles.activation>  
-            </properties>  
-        </profile>  
-        <profile>  
-            <id>aft_test</id>  
-            <properties>  
-                <profiles.activation>test</profiles.activation>  
-            </properties>  
-        </profile>  
-	</profiles> 
-
-	<dependencies>
-		<!-- spring -->
-		<dependency>
-			<groupId>org.springframework</groupId>
-			<artifactId>spring-context</artifactId>
-			<version>${org.springframework-version}</version>
-			<exclusions>
-				<!-- Exclude Commons Logging in favor of SLF4j -->
-				<exclusion>
-					<groupId>commons-logging</groupId>
-					<artifactId>commons-logging</artifactId>
-				</exclusion>
-			</exclusions>
-		</dependency>
-		<dependency>
-			<groupId>org.springframework</groupId>
-			<artifactId>spring-web</artifactId>
-			<version>${org.springframework-version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.springframework</groupId>
-			<artifactId>spring-webmvc</artifactId>
-			<version>${org.springframework-version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.springframework</groupId>
-			<artifactId>spring-jdbc</artifactId>
-			<version>${org.springframework-version}</version>
-		</dependency>
-
-		<dependency>
-			<groupId>org.springframework</groupId>
-			<artifactId>spring-context-support</artifactId>
-			<version>${org.springframework-version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.springframework</groupId>
-			<artifactId>spring-websocket</artifactId>
-			<version>${org.springframework-version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.springframework</groupId>
-			<artifactId>spring-messaging</artifactId>
-			<version>${org.springframework-version}</version>
-		</dependency>
-		
-		<dependency>
-		    <groupId>org.springframework.data</groupId>
-		    <artifactId>spring-data-redis</artifactId>
-		    <version>1.8.3.RELEASE</version>
-		</dependency>
-		
-		<dependency>
-		    <groupId>org.thymeleaf</groupId>
-		    <artifactId>thymeleaf-spring4</artifactId>
-		    <version>3.0.5.RELEASE</version>
-		</dependency>
-		<dependency>
-		    <groupId>nz.net.ultraq.thymeleaf</groupId>
-		    <artifactId>thymeleaf-layout-dialect</artifactId>
-		    <version>2.2.1</version>
-		</dependency>
-		<dependency>
-            <groupId>com.github.theborakompanioni</groupId>
-            <artifactId>thymeleaf-extras-shiro</artifactId>
-            <version>2.0.0</version>
-        </dependency>
-		<!-- spring end -->
-
-		<!-- redis begin -->
-		<dependency>
-			<groupId>redis.clients</groupId>
-			<artifactId>jedis</artifactId>
-			<version>2.9.0</version>
-		</dependency>
-		<!-- redis end -->
-
-		<!-- mybatis start -->
-		<dependency>
-			<groupId>org.mybatis</groupId>
-			<artifactId>mybatis</artifactId>
-			<version>${mybatis-version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.mybatis</groupId>
-			<artifactId>mybatis-spring</artifactId>
-			<version>${mybatis-spring-version}</version>
-		</dependency>
-		<!-- mybatis end -->
-
-		<!-- JDBC connections pooling -->
-		<dependency>
-			<groupId>com.alibaba</groupId>
-			<artifactId>druid</artifactId>
-			<version>1.0.25</version>
-			<exclusions>
-				<exclusion>
-					<groupId>com.alibaba</groupId>
-					<artifactId>jconsole</artifactId>
-				</exclusion>
-				<exclusion>
-					<groupId>com.alibaba</groupId>
-					<artifactId>tools</artifactId>
-				</exclusion>
-			</exclusions>
-		</dependency>
-		<!-- JDBC connections pooling end -->
-
-		<!-- jackson start -->
-		<dependency>
-			<groupId>com.fasterxml.jackson.core</groupId>
-			<artifactId>jackson-databind</artifactId>
-			<version>2.8.2</version>
-		</dependency>
-		<!-- jackson end -->
-
-		<!-- mysql -->
-		<dependency>
-			<groupId>mysql</groupId>
-			<artifactId>mysql-connector-java</artifactId>
-			<version>5.1.40</version>
-		</dependency>
-
-		<!-- Logging -->
-		<dependency>
-			<groupId>org.slf4j</groupId>
-			<artifactId>slf4j-api</artifactId>
-			<version>${org.slf4j-version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.slf4j</groupId>
-			<artifactId>jcl-over-slf4j</artifactId>
-			<version>${org.slf4j-version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.slf4j</groupId>
-			<artifactId>slf4j-log4j12</artifactId>
-			<version>${org.slf4j-version}</version>
-		</dependency>
-		<dependency>
-			<groupId>log4j</groupId>
-			<artifactId>log4j</artifactId>
-			<version>1.2.17</version>
-			<exclusions>
-				<exclusion>
-					<groupId>javax.mail</groupId>
-					<artifactId>mail</artifactId>
-				</exclusion>
-				<exclusion>
-					<groupId>javax.jms</groupId>
-					<artifactId>jms</artifactId>
-				</exclusion>
-				<exclusion>
-					<groupId>com.sun.jdmk</groupId>
-					<artifactId>jmxtools</artifactId>
-				</exclusion>
-				<exclusion>
-					<groupId>com.sun.jmx</groupId>
-					<artifactId>jmxri</artifactId>
-				</exclusion>
-			</exclusions>
-		</dependency>
-
-		<!-- common lang -->
-		<dependency>
-			<groupId>org.apache.commons</groupId>
-			<artifactId>commons-lang3</artifactId>
-			<version>3.4</version>
-		</dependency>
-		<!-- common codec -->
-		<dependency>
-			<groupId>commons-codec</groupId>
-			<artifactId>commons-codec</artifactId>
-			<version>1.10</version>
-		</dependency>
-
-		<!-- common fileupload -->
-		<dependency>
-			<groupId>commons-fileupload</groupId>
-			<artifactId>commons-fileupload</artifactId>
-			<version>1.3.1</version>
-		</dependency>
-
-		<!-- quartz -->
-		<dependency>
-			<groupId>org.quartz-scheduler</groupId>
-			<artifactId>quartz</artifactId>
-			<version>1.8.5</version>
-		</dependency>
-		<!-- Servlet -->
-		<dependency>
-			<groupId>javax.servlet</groupId>
-			<artifactId>javax.servlet-api</artifactId>
-			<version>3.1.0</version>
-			<scope>provided</scope>
-		</dependency>
-		<!-- shiro -->
-		<dependency>
-			<groupId>org.apache.shiro</groupId>
-			<artifactId>shiro-web</artifactId>
-			<version>${shiro-version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.shiro</groupId>
-			<artifactId>shiro-quartz</artifactId>
-			<version>${shiro-version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.shiro</groupId>
-			<artifactId>shiro-spring</artifactId>
-			<version>${shiro-version}</version>
-		</dependency>
-		<!-- Test -->
-		<dependency>
-			<groupId>junit</groupId>
-			<artifactId>junit</artifactId>
-			<version>4.12</version>
-			<scope>test</scope>
-		</dependency>
-		<dependency>
-			<groupId>org.springframework</groupId>
-			<artifactId>spring-test</artifactId>
-			<version>${org.springframework-version}</version>
-			<scope>test</scope>
-		</dependency>
-		<dependency>
-			<groupId>com.alibaba</groupId>
-			<artifactId>fastjson</artifactId>
-			<version>1.2.31</version>
-		</dependency>
-
-		<!-- AspectJ -->
-		<dependency>
-			<groupId>org.aspectj</groupId>
-			<artifactId>aspectjrt</artifactId>
-			<version>${org.aspectj-version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.aspectj</groupId>
-			<artifactId>aspectjweaver</artifactId>
-			<version>${org.aspectj-version}</version>
-		</dependency>
-		<dependency>
-			<groupId>cglib</groupId>
-			<artifactId>cglib</artifactId>
-			<version>2.2.2</version>
-		</dependency>
-		<!-- JSR-303 bean validator -->
-		<!-- https://mvnrepository.com/artifact/org.hibernate/hibernate-validator -->
-		<dependency>
-			<groupId>org.hibernate</groupId>
-			<artifactId>hibernate-validator</artifactId>
-			<version>5.2.4.Final</version>
-		</dependency>
-		<dependency>
-			<groupId>javax.validation</groupId>
-			<artifactId>validation-api</artifactId>
-			<version>1.1.0.Final</version>
-		</dependency>
-		<dependency>
-			<groupId>org.jboss.logging</groupId>
-			<artifactId>jboss-logging</artifactId>
-			<version>3.2.1.Final</version>
-		</dependency>
-		<dependency>
-			<groupId>com.fasterxml</groupId>
-			<artifactId>classmate</artifactId>
-			<version>1.1.0</version>
-		</dependency>
-	    <dependency>
-		    <groupId>com.googlecode.json-simple</groupId>
-		    <artifactId>json-simple</artifactId>
-		    <version>1.1.1</version>
-		</dependency>
-		<dependency>
-		    <groupId>org.apache.poi</groupId>
-		    <artifactId>poi</artifactId>
-		    <version>3.15</version>
-		</dependency>
-        <dependency>
-            <groupId>com.aliyun</groupId>
-            <artifactId>aliyun-java-sdk-core</artifactId>
-            <version>2.4.2</version>
-        </dependency>
-        <dependency>
-            <groupId>com.aliyun</groupId>
-            <artifactId>aliyun-java-sdk-sms</artifactId>
-            <version>3.0.0-rc1</version>
-        </dependency>
-        <dependency>
-			<groupId>org.apache.httpcomponents</groupId>
-			<artifactId>httpasyncclient</artifactId>
-			<version>4.1.3</version>
-		</dependency>
-        
-	</dependencies>
-	<build>
-		<resources>
-			<resource>
-				<directory>src/resources</directory>
-				<includes>
-					<include>**/*.properties</include>
-					<include>**/*.xml</include>
-					<include>**/*.ini</include>
-				</includes>
-				<filtering>false</filtering>
-			</resource>
-			<resource>
-				<directory>src/main/java</directory>
-				<includes>
-					<include>**/*.xml</include>
-				</includes>
-				<filtering>false</filtering>
-			</resource>
-		</resources>
-		<plugins>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-compiler-plugin</artifactId>
-				<version>3.5.1</version>
-				<configuration>
-					<source>1.8</source>
-					<target>1.8</target>
-					<encoding>utf8</encoding>
-					<compilerArgument>-Xlint:all</compilerArgument>
-					<showWarnings>true</showWarnings>
-					<showDeprecation>true</showDeprecation>
-					<skip>true</skip>
-				</configuration>
-			</plugin>
-			<plugin>    
-			    <groupId>org.apache.maven.plugins</groupId>    
-			    <artifactId>maven-surefire-plugin</artifactId>    
-			    <version>2.5</version>    
-			    <configuration>    
-			        <skip>true</skip>    
-			    </configuration>    
-			</plugin> 
-			<plugin>  
-                <groupId>org.apache.maven.plugins</groupId>  
-                <artifactId>maven-war-plugin</artifactId>  
-                <version>3.1.0</version>  
-                <configuration>  
-                    <warName>${profiles.activation}</warName>  
-                    <!-- 激活spring profile -->  
-                    <webResources>  
-                        <resource>  
-                            <filtering>true</filtering>  
-                            <directory>src/main/webapp</directory>  
-                            <includes>  
-                                <include>**/**</include>  
-                            </includes>  
-                        </resource>  
-                        <resource>  
-                            <filtering>true</filtering>  
-                            <directory>src/main/resources</directory>
-                            <targetPath>WEB-INF/classes</targetPath>
-                            <includes>  
-                                <include>**/**</include>  
-                            </includes>  
-                        </resource>  
-                    </webResources>  
-                    <warSourceDirectory>src/main/webapp</warSourceDirectory>  
-                    <webXml>src/main/webapp/WEB-INF/web.xml</webXml>  
-                </configuration>  
-			</plugin>
-		</plugins>
-	</build>
-	
-	<repositories>
-		<repository>
-			<id>aliyun-repos</id>
-			<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
-			<snapshots>
-				<enabled>false</enabled>
-			</snapshots>
-		</repository>
-	</repositories>
-
-	<pluginRepositories>
-		<pluginRepository>
-			<id>aliyun-plugin</id>
-			<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
-			<snapshots>
-				<enabled>false</enabled>
-			</snapshots>
-		</pluginRepository>
-	</pluginRepositories>
+<?xml version="1.0" encoding="UTF-8"?>
+<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>
+	<groupId>com.goafanti</groupId>
+	<artifactId>aft</artifactId>
+	<name>aft</name>
+
+	<packaging>war</packaging>
+	<version>1.0.0-BUILD-SNAPSHOT</version>
+
+	<properties>
+		<java-version>1.8</java-version>
+		<org.springframework-version>4.2.5.RELEASE</org.springframework-version>
+		<org.slf4j-version>1.7.21</org.slf4j-version>
+		<shiro-version>1.3.2</shiro-version>
+		<mybatis-version>3.2.8</mybatis-version>
+		<mybatis-spring-version>1.2.2</mybatis-spring-version>
+		<org.aspectj-version>1.6.10</org.aspectj-version>
+		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+	</properties>
+	<profiles>  
+        <profile>  
+            <id>aft_local</id>  
+            <activation>  
+                <activeByDefault>true</activeByDefault>  
+            </activation>  
+            <properties>  
+                <profiles.activation>local</profiles.activation>  
+            </properties>  
+        </profile>  
+        <profile>  
+            <id>aft_dev</id>  
+            <properties>  
+                <profiles.activation>dev</profiles.activation>  
+            </properties>  
+        </profile>  
+        <profile>  
+            <id>aft_prod</id>  
+            <properties>  
+                <profiles.activation>prod</profiles.activation>  
+            </properties>  
+        </profile>  
+        <profile>  
+            <id>aft_test</id>  
+            <properties>  
+                <profiles.activation>test</profiles.activation>  
+            </properties>  
+        </profile>  
+	</profiles> 
+
+	<dependencies>
+		<!-- spring -->
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-context</artifactId>
+			<version>${org.springframework-version}</version>
+			<exclusions>
+				<!-- Exclude Commons Logging in favor of SLF4j -->
+				<exclusion>
+					<groupId>commons-logging</groupId>
+					<artifactId>commons-logging</artifactId>
+				</exclusion>
+			</exclusions>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-web</artifactId>
+			<version>${org.springframework-version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-webmvc</artifactId>
+			<version>${org.springframework-version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-jdbc</artifactId>
+			<version>${org.springframework-version}</version>
+		</dependency>
+
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-context-support</artifactId>
+			<version>${org.springframework-version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-websocket</artifactId>
+			<version>${org.springframework-version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-messaging</artifactId>
+			<version>${org.springframework-version}</version>
+		</dependency>
+		
+		<dependency>
+		    <groupId>org.springframework.data</groupId>
+		    <artifactId>spring-data-redis</artifactId>
+		    <version>1.8.3.RELEASE</version>
+		</dependency>
+		
+		<dependency>
+		    <groupId>org.thymeleaf</groupId>
+		    <artifactId>thymeleaf-spring4</artifactId>
+		    <version>3.0.5.RELEASE</version>
+		</dependency>
+		<dependency>
+		    <groupId>nz.net.ultraq.thymeleaf</groupId>
+		    <artifactId>thymeleaf-layout-dialect</artifactId>
+		    <version>2.2.1</version>
+		</dependency>
+		<dependency>
+            <groupId>com.github.theborakompanioni</groupId>
+            <artifactId>thymeleaf-extras-shiro</artifactId>
+            <version>2.0.0</version>
+        </dependency>
+		<!-- spring end -->
+
+		<!-- redis begin -->
+		<dependency>
+			<groupId>redis.clients</groupId>
+			<artifactId>jedis</artifactId>
+			<version>2.9.0</version>
+		</dependency>
+		<!-- redis end -->
+
+		<!-- mybatis start -->
+		<dependency>
+			<groupId>org.mybatis</groupId>
+			<artifactId>mybatis</artifactId>
+			<version>${mybatis-version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.mybatis</groupId>
+			<artifactId>mybatis-spring</artifactId>
+			<version>${mybatis-spring-version}</version>
+		</dependency>
+		<!-- mybatis end -->
+
+		<!-- JDBC connections pooling -->
+		<dependency>
+			<groupId>com.alibaba</groupId>
+			<artifactId>druid</artifactId>
+			<version>1.0.25</version>
+			<exclusions>
+				<exclusion>
+					<groupId>com.alibaba</groupId>
+					<artifactId>jconsole</artifactId>
+				</exclusion>
+				<exclusion>
+					<groupId>com.alibaba</groupId>
+					<artifactId>tools</artifactId>
+				</exclusion>
+			</exclusions>
+		</dependency>
+		<!-- JDBC connections pooling end -->
+
+		<!-- jackson start -->
+		<dependency>
+			<groupId>com.fasterxml.jackson.core</groupId>
+			<artifactId>jackson-databind</artifactId>
+			<version>2.8.2</version>
+		</dependency>
+		<!-- jackson end -->
+
+		<!-- mysql -->
+		<dependency>
+			<groupId>mysql</groupId>
+			<artifactId>mysql-connector-java</artifactId>
+			<version>5.1.40</version>
+		</dependency>
+
+		<!-- Logging -->
+		<dependency>
+			<groupId>org.slf4j</groupId>
+			<artifactId>slf4j-api</artifactId>
+			<version>${org.slf4j-version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.slf4j</groupId>
+			<artifactId>jcl-over-slf4j</artifactId>
+			<version>${org.slf4j-version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.slf4j</groupId>
+			<artifactId>slf4j-log4j12</artifactId>
+			<version>${org.slf4j-version}</version>
+		</dependency>
+		<dependency>
+			<groupId>log4j</groupId>
+			<artifactId>log4j</artifactId>
+			<version>1.2.17</version>
+			<exclusions>
+				<exclusion>
+					<groupId>javax.mail</groupId>
+					<artifactId>mail</artifactId>
+				</exclusion>
+				<exclusion>
+					<groupId>javax.jms</groupId>
+					<artifactId>jms</artifactId>
+				</exclusion>
+				<exclusion>
+					<groupId>com.sun.jdmk</groupId>
+					<artifactId>jmxtools</artifactId>
+				</exclusion>
+				<exclusion>
+					<groupId>com.sun.jmx</groupId>
+					<artifactId>jmxri</artifactId>
+				</exclusion>
+			</exclusions>
+		</dependency>
+
+		<!-- common lang -->
+		<dependency>
+			<groupId>org.apache.commons</groupId>
+			<artifactId>commons-lang3</artifactId>
+			<version>3.4</version>
+		</dependency>
+		<!-- common codec -->
+		<dependency>
+			<groupId>commons-codec</groupId>
+			<artifactId>commons-codec</artifactId>
+			<version>1.10</version>
+		</dependency>
+
+		<!-- common fileupload -->
+		<dependency>
+			<groupId>commons-fileupload</groupId>
+			<artifactId>commons-fileupload</artifactId>
+			<version>1.3.1</version>
+		</dependency>
+
+		<!-- quartz -->
+		<dependency>
+			<groupId>org.quartz-scheduler</groupId>
+			<artifactId>quartz</artifactId>
+			<version>1.8.5</version>
+		</dependency>
+		<!-- Servlet -->
+		<dependency>
+			<groupId>javax.servlet</groupId>
+			<artifactId>javax.servlet-api</artifactId>
+			<version>3.1.0</version>
+			<scope>provided</scope>
+		</dependency>
+		<!-- shiro -->
+		<dependency>
+			<groupId>org.apache.shiro</groupId>
+			<artifactId>shiro-web</artifactId>
+			<version>${shiro-version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.shiro</groupId>
+			<artifactId>shiro-quartz</artifactId>
+			<version>${shiro-version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.shiro</groupId>
+			<artifactId>shiro-spring</artifactId>
+			<version>${shiro-version}</version>
+		</dependency>
+		<!-- Test -->
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<version>4.12</version>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-test</artifactId>
+			<version>${org.springframework-version}</version>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>com.alibaba</groupId>
+			<artifactId>fastjson</artifactId>
+			<version>1.2.31</version>
+		</dependency>
+
+		<!-- AspectJ -->
+		<dependency>
+			<groupId>org.aspectj</groupId>
+			<artifactId>aspectjrt</artifactId>
+			<version>${org.aspectj-version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.aspectj</groupId>
+			<artifactId>aspectjweaver</artifactId>
+			<version>${org.aspectj-version}</version>
+		</dependency>
+		<dependency>
+			<groupId>cglib</groupId>
+			<artifactId>cglib</artifactId>
+			<version>2.2.2</version>
+		</dependency>
+		<!-- JSR-303 bean validator -->
+		<!-- https://mvnrepository.com/artifact/org.hibernate/hibernate-validator -->
+		<dependency>
+			<groupId>org.hibernate</groupId>
+			<artifactId>hibernate-validator</artifactId>
+			<version>5.2.4.Final</version>
+		</dependency>
+		<dependency>
+			<groupId>javax.validation</groupId>
+			<artifactId>validation-api</artifactId>
+			<version>1.1.0.Final</version>
+		</dependency>
+		<dependency>
+			<groupId>org.jboss.logging</groupId>
+			<artifactId>jboss-logging</artifactId>
+			<version>3.2.1.Final</version>
+		</dependency>
+		<dependency>
+			<groupId>com.fasterxml</groupId>
+			<artifactId>classmate</artifactId>
+			<version>1.1.0</version>
+		</dependency>
+	    <dependency>
+		    <groupId>com.googlecode.json-simple</groupId>
+		    <artifactId>json-simple</artifactId>
+		    <version>1.1.1</version>
+		</dependency>
+		<dependency>
+		    <groupId>org.apache.poi</groupId>
+		    <artifactId>poi</artifactId>
+		    <version>3.17</version>
+		</dependency>
+        <dependency>
+            <groupId>com.aliyun</groupId>
+            <artifactId>aliyun-java-sdk-core</artifactId>
+            <version>2.4.2</version>
+        </dependency>
+        <dependency>
+            <groupId>com.aliyun</groupId>
+            <artifactId>aliyun-java-sdk-sms</artifactId>
+            <version>3.0.0-rc1</version>
+        </dependency>
+        <dependency>
+			<groupId>org.apache.httpcomponents</groupId>
+			<artifactId>httpasyncclient</artifactId>
+			<version>4.1.3</version>
+		</dependency>
+        
+	</dependencies>
+	<build>
+		<resources>
+			<resource>
+				<directory>src/resources</directory>
+				<includes>
+					<include>**/*.properties</include>
+					<include>**/*.xml</include>
+					<include>**/*.ini</include>
+				</includes>
+				<filtering>false</filtering>
+			</resource>
+			<resource>
+				<directory>src/main/java</directory>
+				<includes>
+					<include>**/*.xml</include>
+				</includes>
+				<filtering>false</filtering>
+			</resource>
+		</resources>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-compiler-plugin</artifactId>
+				<version>3.5.1</version>
+				<configuration>
+					<source>1.8</source>
+					<target>1.8</target>
+					<encoding>utf8</encoding>
+					<compilerArgument>-Xlint:all</compilerArgument>
+					<showWarnings>true</showWarnings>
+					<showDeprecation>true</showDeprecation>
+					<skip>true</skip>
+				</configuration>
+			</plugin>
+			<plugin>    
+			    <groupId>org.apache.maven.plugins</groupId>    
+			    <artifactId>maven-surefire-plugin</artifactId>    
+			    <version>2.5</version>    
+			    <configuration>    
+			        <skip>true</skip>    
+			    </configuration>    
+			</plugin> 
+			<plugin>  
+                <groupId>org.apache.maven.plugins</groupId>  
+                <artifactId>maven-war-plugin</artifactId>  
+                <version>3.1.0</version>  
+                <configuration>  
+                    <warName>${profiles.activation}</warName>  
+                    <!-- 激活spring profile -->  
+                    <webResources>  
+                        <resource>  
+                            <filtering>true</filtering>  
+                            <directory>src/main/webapp</directory>  
+                            <includes>  
+                                <include>**/**</include>  
+                            </includes>  
+                        </resource>  
+                        <resource>  
+                            <filtering>true</filtering>  
+                            <directory>src/main/resources</directory>
+                            <targetPath>WEB-INF/classes</targetPath>
+                            <includes>  
+                                <include>**/**</include>  
+                            </includes>  
+                        </resource>  
+                    </webResources>  
+                    <warSourceDirectory>src/main/webapp</warSourceDirectory>  
+                    <webXml>src/main/webapp/WEB-INF/web.xml</webXml>  
+                </configuration>  
+			</plugin>
+		</plugins>
+	</build>
+	
+	<repositories>
+		<repository>
+			<id>aliyun-repos</id>
+			<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
+			<snapshots>
+				<enabled>false</enabled>
+			</snapshots>
+		</repository>
+	</repositories>
+
+	<pluginRepositories>
+		<pluginRepository>
+			<id>aliyun-plugin</id>
+			<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
+			<snapshots>
+				<enabled>false</enabled>
+			</snapshots>
+		</pluginRepository>
+	</pluginRepositories>
 </project>

+ 151 - 0
src/main/java/com/goafanti/common/utils/ExcelUtils.java

@@ -0,0 +1,151 @@
+package com.goafanti.common.utils;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+import java.util.TreeSet;
+
+import org.apache.poi.hssf.usermodel.HSSFSheet;
+import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.Row;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import com.goafanti.core.shiro.token.TokenManager;
+import com.goafanti.customer.bo.CustomerIn;
+import com.goafanti.customer.service.CustomerOrganizationService;
+
+public class ExcelUtils {
+	@Autowired
+	private CustomerOrganizationService customerOrganizationService;
+	private String filePath = "";
+	private Set repeatRows = new TreeSet<Integer>(); //数据重复的
+	private Set vacantRows = new TreeSet<Integer>();	//数据不完整的
+	public  List<CustomerIn> parseExcel(String filePath) throws IOException{
+		this.filePath = filePath;
+		InputStream excelFile = new FileInputStream(new File(filePath));
+		HSSFWorkbook wb = new HSSFWorkbook(excelFile);	
+		List<CustomerIn> result = new ArrayList<CustomerIn>();	
+		HSSFSheet sheet= wb.getSheetAt(0);
+		Iterator<Row> rowIterator = sheet.iterator();
+		Row currentRow = rowIterator.next(); //表头
+		int rowNumber = 1;		
+		while(rowIterator.hasNext()){
+			rowNumber++;
+			currentRow = rowIterator.next();
+			Iterator<Cell> cellIterator = currentRow.iterator();
+			CustomerIn cin = new CustomerIn();
+			cin.setCustomerType(checkCustomerType(cellIterator.next().getStringCellValue(), rowNumber));
+			cin.setCompanyName(checkCompanyName(cellIterator.next().getStringCellValue(), rowNumber));
+			cin.setFollowSituation(checkFollowSituation(cellIterator.next().getStringCellValue(),rowNumber));
+			cin.setCustomerStatus(checkCustomerStatus(cellIterator.next().getStringCellValue(), rowNumber));	
+			cin.setBeforeCompanyIntention(checkCompanyIntention(cellIterator.next().getStringCellValue(), rowNumber));
+			cin.setContactName(checkOther(cellIterator.next().getStringCellValue(),rowNumber));
+			cin.setContactTel(checkOther(cellIterator.next().getStringCellValue(), rowNumber));
+			result.add(cin);
+		}
+		return result;
+	}
+	
+	@SuppressWarnings("unchecked")
+	private String checkCustomerType(String customerType,int rowNumber){
+		if(StringUtils.isEmpty(customerType)) {
+			vacantRows.add(rowNumber);
+			return "";
+		}
+		if(customerType.equals("个人客户")) return "1"; 
+		if(customerType.equals("公司客户")) return "2";
+		if(customerType.equals("团体客户")) return "3";
+		vacantRows.add(rowNumber);
+		return "";
+	}
+	@SuppressWarnings("unchecked")
+	private String checkFollowSituation(String followSituation,int rowNumber){
+		if(StringUtils.isEmpty(followSituation)){
+			vacantRows.add(rowNumber);
+			return "";
+		}
+		if(followSituation.equals("已发项目介绍资料")) return "0";
+		if(followSituation.equals("已约面谈")) return "1";
+		if(followSituation.equals("已发合同计划书")) return "2";
+		if(followSituation.equals("已报价")) return "3";
+		if(followSituation.equals("已发合同")) return "4";
+		if(followSituation.equals("已签合同")) return "5";
+		if(followSituation.equals("面谈中")) return "6";
+		if(followSituation.equals("已面签")) return "7";
+		if(followSituation.equals("无进度")) return "8";
+		vacantRows.add(rowNumber);
+		return "";
+	}
+	@SuppressWarnings("unchecked")
+	private String checkCustomerStatus(String customerStatus,int rowNumber){
+		if(StringUtils.isEmpty(customerStatus)) {
+			vacantRows.add(rowNumber);
+			return "";
+		}
+		if(customerStatus.equals("新客户")) return "0";
+		if(customerStatus.equals("意向客户")) return "1";
+		if(customerStatus.equals("重点客户")) return "2";
+		if(customerStatus.equals("面谈客户")) return "3";
+		if(customerStatus.equals("签单客户")) return "4";
+		if(customerStatus.equals("拒绝客户")) return "5";
+		vacantRows.add(rowNumber);
+		return "";
+	}
+	@SuppressWarnings("unchecked")
+	private String checkCompanyName(String companyName,int rowNumber){
+		if(StringUtils.isEmpty(companyName)){
+			vacantRows.add(rowNumber);
+			return "";
+		}
+		if(customerOrganizationService.findCustomerOrganizationByName(companyName)>0){
+			repeatRows.add(rowNumber);
+			return "";
+		}
+		return companyName;
+	}
+	
+	@SuppressWarnings("unchecked")
+	private String checkCompanyIntention(String companyIntention,int rowNumber){
+		if(StringUtils.isEmpty(companyIntention)){
+			vacantRows.add(rowNumber);
+			return "";
+		}
+		if(companyIntention.equals("发明专利")) return "0";
+		if(companyIntention.equals("实用型新型专利")) return "1";
+		if(companyIntention.equals("外观专利")) return "2";
+		if(companyIntention.equals("软件著作权")) return "3";
+		if(companyIntention.equals("知识产权贯标")) return "4";
+		if(companyIntention.equals("高企认定")) return "5";
+		if(companyIntention.equals("技术成果")) return "6";
+		if(companyIntention.equals("技术需求")) return "7";
+		if(companyIntention.equals("专家咨询")) return "8";
+		if(companyIntention.equals("团单合作")) return "9";
+		if(companyIntention.equals("商标")) return "10";
+		if(companyIntention.equals("系统集成")) return "11";
+		vacantRows.add(rowNumber);
+		return "";
+	}
+	
+	@SuppressWarnings("unchecked")
+	private String checkOther(String cellValue,int rowNumber){
+		if(StringUtils.isEmpty(cellValue)){
+			vacantRows.add(rowNumber);
+			return "";
+		}else{
+			return String.valueOf(cellValue);
+		} 
+	}
+	public String getRepeatRows(){
+		return StringUtils.join(repeatRows.toArray(),",");
+	}
+	
+	public String getVacantRows(){
+		return StringUtils.join(vacantRows.toArray(),",");
+	}
+}

+ 17 - 2
src/main/java/com/goafanti/customer/controller/AdminCustomerApiController.java

@@ -61,7 +61,7 @@ public class AdminCustomerApiController extends BaseApiController {
 	 * @throws IllegalAccessException 
 	 */
 	@RequestMapping(value = "/addCustomer", method = RequestMethod.POST)
-	public Result addCustomer(CustomerIn cusIn,CustomerOrganizationInfo coi,CustomerUserInfo cui,FollowUpRecord fur) throws ParseException, IllegalAccessException, InvocationTargetException {
+	public Result addCustomer(CustomerIn cusIn,CustomerOrganizationInfo coi,CustomerUserInfo cui,FollowUpRecord fur) throws IllegalAccessException, InvocationTargetException {
 		Result res=new Result();
 		//查询客户是否已经存在
 		if(StringUtils.isEmpty(cusIn.getCompanyName())) res.getError().add(new Error("公司名字不能为空"));
@@ -94,11 +94,16 @@ public class AdminCustomerApiController extends BaseApiController {
 		coi.setCid(customerId);//客户公司表中的cid
 		//跟进信息表
 		SimpleDateFormat format = new SimpleDateFormat(AFTConstants.YYYYMMDDHHMMSS);
-		fur.setFollowDate(format.parse(cusIn.getFollowDates()));
+		try {
+			fur.setFollowDate(format.parse(cusIn.getFollowDates()));
+		} catch (ParseException e) {
+			res.getError().add(new Error("时间格式有误"));
+		}
 		fur.setId(followId);//跟进记录的ID
 		fur.setCid(customerId);//跟进记录表中的cid
 		fur.setCuid(customerUserId);//跟进记录表中的联系人id
 		fur.setAid(TokenManager.getAdminId());
+		if(res.getError().size()>0) return res;
 		customerService.addCustomer(cus,cui,coi,fur);
 		//添加日志
 		cusIn.setId(customerId);
@@ -503,4 +508,14 @@ public class AdminCustomerApiController extends BaseApiController {
 		res.setData(customerService.findCustomerHistory(customerId));
 		return res;
 	}
+	
+	/**
+	 * 保存 excel 数据
+	 * @return
+	 */
+	public Result saveUploadData(){
+		Result res = new Result();
+		
+		return res;
+	}
 }

+ 6 - 0
src/main/java/com/goafanti/customer/service/CustomerService.java

@@ -103,4 +103,10 @@ public interface CustomerService {
 	 * @return
 	 */
 	public CustomerOut findCustomerHistory(String customerId);
+	
+	/**
+	 *  保存上传的客户资料
+	 * @param excelPath
+	 */
+	public void saveUploadData(List<CustomerIn> cinList);
 }

+ 23 - 0
src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java

@@ -13,6 +13,8 @@ import org.apache.shiro.SecurityUtils;
 import org.apache.shiro.subject.Subject;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
 import com.goafanti.core.mybatis.BaseMybatisDao;
 import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.core.shiro.token.TokenManager;
@@ -385,4 +387,25 @@ public class CustomerServiceImpl extends BaseMybatisDao<CustomerMapper> implemen
 		
 		return customerMapper.findCustomerHistory(customerId);
 	}
+
+	@Override
+	@Transactional
+	public void saveUploadData(List<CustomerIn> cinList) {
+		String aid = TokenManager.getAdminId();
+		SimpleDateFormat format = new SimpleDateFormat(AFTConstants.YYYYMMDDHHMMSS);
+		Customer cus = null;
+		CustomerUserInfo cui = null;
+		CustomerOrganizationInfo coi = null;
+		String customerId = "";//客户记录ID
+		String customerUserId= "";//客户联系人ID
+		String followId= "" ;//跟进记录ID
+		for(CustomerIn in:cinList){
+			customerId = UUID.randomUUID().toString();//客户记录ID
+			customerUserId = UUID.randomUUID().toString();//客户联系人ID
+			followId = UUID.randomUUID().toString();//跟进记录ID
+			cus = new Customer();
+		}
+		
+	}
+
 }