yin 1 ماه پیش
والد
کامیت
4c5887ce8f
1فایلهای تغییر یافته به همراه12 افزوده شده و 0 حذف شده
  1. 12 0
      stmms-web/src/main/java/cn/com/qmth/stmms/common/controller/BaseController.java

+ 12 - 0
stmms-web/src/main/java/cn/com/qmth/stmms/common/controller/BaseController.java

@@ -311,6 +311,18 @@ public class BaseController {
                 }
             }
         });
+        // TrackCountPolicy 类型转换
+        binder.registerCustomEditor(TrackCountPolicy.class, new PropertyEditorSupport() {
+
+            @Override
+            public void setAsText(String text) {
+                try {
+                    setValue(TrackCountPolicy.findByValue(Integer.valueOf(text)));
+                } catch (Exception e) {
+                    setValue(null);
+                }
+            }
+        });
         binder.registerCustomEditor(Boolean.class, new CustomBooleanEditor(true));
     }