优化switch case条件

master
RuoYi 3 years ago
parent a7e16d582d
commit 4a0619cadb
  1. 9
      ruoyi-common/src/main/java/com/ruoyi/common/core/text/Convert.java

@ -562,17 +562,12 @@ public class Convert
switch (valueStr) switch (valueStr)
{ {
case "true": case "true":
return true;
case "false":
return false;
case "yes": case "yes":
return true;
case "ok": case "ok":
return true;
case "no":
return false;
case "1": case "1":
return true; return true;
case "false":
case "no":
case "0": case "0":
return false; return false;
default: default:

Loading…
Cancel
Save