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));
     }