Browse Source

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

yujia 8 years ago
parent
commit
b65df666a6

+ 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")
     @Column(name = "cc_count")
-    private Integer count;
+    private Long count;
 
 
     /**
     /**
      * 状态,是否激活(1:是;0:否)
      * 状态,是否激活(1:是;0:否)
@@ -87,11 +87,11 @@ public class CommonCount implements Serializable{
         this.sql = sql;
         this.sql = sql;
     }
     }
 
 
-    public Integer getCount() {
+    public Long getCount() {
         return count;
         return count;
     }
     }
 
 
-    public void setCount(Integer count) {
+    public void setCount(Long count) {
         this.count = 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) {
         for (CommonCount commonCount : commonCounts) {
             if (commonCount.getSql() != null)
             if (commonCount.getSql() != null)
-                commonCount.setCount(jdbcTemplate.queryForInt(commonCount.getSql()));
+                commonCount.setCount(jdbcTemplate.queryForLong(commonCount.getSql()));
         }
         }
 
 
         return commonCounts;
         return commonCounts;