yumeng 5 years ago
parent
commit
963ca8542d

+ 1 - 2
module-common/src/main/java/cn/com/ctop/common/module/enums/MaterialEnum.java

@@ -16,13 +16,12 @@ public enum MaterialEnum {
     private MaterialEnum(Integer type, Integer width, Integer height) {
     private MaterialEnum(Integer type, Integer width, Integer height) {
         this.type = type;
         this.type = type;
         this.width = width;
         this.width = width;
-        this.width = width;
         this.height = height;
         this.height = height;
     }
     }
 
 
     public static Integer getTypeBySize(Integer width, Integer height) {
     public static Integer getTypeBySize(Integer width, Integer height) {
         for (MaterialEnum material : MaterialEnum.values()) {
         for (MaterialEnum material : MaterialEnum.values()) {
-            if (width == material.width && height == material.height) {
+            if (width == material.getWidth() && height == material.getHeight()) {
                 return material.type;
                 return material.type;
             }
             }
         }
         }