Browse Source

1:commonCount报错,库存数量太大,修改为long类型。

yujia 8 years ago
parent
commit
93b9ba0b9f

+ 89 - 89
pom.xml

@@ -491,46 +491,46 @@
 					<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>YUI</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>-->
+				<!--<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>YUI</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>
@@ -552,55 +552,55 @@
 					</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/view/**/*.html</sourceInclude>
-								<sourceInclude>WEB-INF/views/**/*.html</sourceInclude>
-							</sourceIncludes>
-							<!-- http://static.ubtoc.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>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/view/**/*.html</sourceInclude>-->
+								<!--<sourceInclude>WEB-INF/views/**/*.html</sourceInclude>-->
+							<!--</sourceIncludes>-->
+							<!--&lt;!&ndash; http://static.ubtoc.com/css/index.css?_v=1450321871828 &ndash;&gt;-->
+							<!--<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>

+ 3 - 3
src/main/java/com/uas/platform/b2c/prod/product/common/model/CommonCount.java

@@ -47,7 +47,7 @@ public class CommonCount implements Serializable{
      * 数量
      */
     @Column(name = "cc_count")
-    private Integer count;
+    private Long count;
 
     /**
      * 状态,是否激活(1:是;0:否)
@@ -87,11 +87,11 @@ public class CommonCount implements Serializable{
         this.sql = sql;
     }
 
-    public Integer getCount() {
+    public Long getCount() {
         return count;
     }
 
-    public void setCount(Integer count) {
+    public void setCount(Long count) {
         this.count = count;
     }
 

+ 1 - 1
src/main/java/com/uas/platform/b2c/prod/product/common/service/impl/CommonCountServiceImpl.java

@@ -27,7 +27,7 @@ public class CommonCountServiceImpl implements CommonCountService{
 
         for (CommonCount commonCount : commonCounts) {
             if (commonCount.getSql() != null)
-                commonCount.setCount(jdbcTemplate.queryForInt(commonCount.getSql()));
+                commonCount.setCount(jdbcTemplate.queryForLong(commonCount.getSql()));
         }
 
         return commonCounts;