Commit 19bcc9c2 by Lizh

修复processing参数验证逻辑,支持字符串类型的数据

parent 87ce3646
...@@ -184,6 +184,12 @@ public class CustomProductInfoQuerySnakeDTO extends PageRequest { ...@@ -184,6 +184,12 @@ public class CustomProductInfoQuerySnakeDTO extends PageRequest {
this.processing = (Boolean) value ? 1 : 0; this.processing = (Boolean) value ? 1 : 0;
} else if (value instanceof Number) { } else if (value instanceof Number) {
this.processing = ((Number) value).intValue(); this.processing = ((Number) value).intValue();
} else if (value instanceof String s) {
try {
this.processing = Integer.parseInt(s.trim());
} catch (NumberFormatException ignored) {
this.processing = null;
}
} else { } else {
this.processing = null; this.processing = null;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment