mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-06 16:48: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} 操作失败。
|
||||
*/
|
||||
public static boolean toBool(int[] results) {
|
||||
int result = 0;
|
||||
for (int i : results) {
|
||||
result += i;
|
||||
for (int result : results) {
|
||||
if (result > 0) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user