yumeng 5 年之前
父節點
當前提交
963ca8542d
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1 2
      module-common/src/main/java/cn/com/ctop/common/module/enums/MaterialEnum.java

+ 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) {
         this.type = type;
         this.width = width;
-        this.width = width;
         this.height = height;
     }
 
     public static Integer getTypeBySize(Integer width, Integer height) {
         for (MaterialEnum material : MaterialEnum.values()) {
-            if (width == material.width && height == material.height) {
+            if (width == material.getWidth() && height == material.getHeight()) {
                 return material.type;
             }
         }