提交者
Gitee
!989 update ruoyi-common/src/main/java/com/ruoyi/common/core/text/Convert.java.
Merge pull request !989 from 程子/N/A
正在显示
1 个修改的文件
包含
3 行增加
和
1 行删除
| @@ -541,7 +541,7 @@ public class Convert | @@ -541,7 +541,7 @@ public class Convert | ||
| 541 | 541 | ||
| 542 | /** | 542 | /** |
| 543 | * 转换为boolean<br> | 543 | * 转换为boolean<br> |
| 544 | - * String支持的值为:true、false、yes、ok、no,1,0 如果给定的值为空,或者转换失败,返回默认值<br> | 544 | + * String支持的值为:true、false、yes、ok、no、1、0、是、否, 如果给定的值为空,或者转换失败,返回默认值<br> |
| 545 | * 转换失败不会报错 | 545 | * 转换失败不会报错 |
| 546 | * | 546 | * |
| 547 | * @param value 被转换的值 | 547 | * @param value 被转换的值 |
| @@ -570,10 +570,12 @@ public class Convert | @@ -570,10 +570,12 @@ public class Convert | ||
| 570 | case "yes": | 570 | case "yes": |
| 571 | case "ok": | 571 | case "ok": |
| 572 | case "1": | 572 | case "1": |
| 573 | + case "是": | ||
| 573 | return true; | 574 | return true; |
| 574 | case "false": | 575 | case "false": |
| 575 | case "no": | 576 | case "no": |
| 576 | case "0": | 577 | case "0": |
| 578 | + case "否": | ||
| 577 | return false; | 579 | return false; |
| 578 | default: | 580 | default: |
| 579 | return defaultValue; | 581 | return defaultValue; |
-
请 注册 或 登录 后发表评论