mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-07 00:58:24 +08:00
refactor: optimize SqlUtil.toBool()
This commit is contained in:
parent
198569e743
commit
b79ce0622f
@ -91,14 +91,11 @@ public class SqlUtil {
|
|||||||
* @return {@code true} 操作成功,{@code false} 操作失败。
|
* @return {@code true} 操作成功,{@code false} 操作失败。
|
||||||
*/
|
*/
|
||||||
public static boolean toBool(int[] results) {
|
public static boolean toBool(int[] results) {
|
||||||
int result = 0;
|
for (int result : results) {
|
||||||
for (int i : results) {
|
|
||||||
result += i;
|
|
||||||
if (result > 0) {
|
if (result > 0) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user