mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-08 01:28:24 +08:00
fix: the result of saveBatch(barberUserShiftList) method is incorrect in Oracle env.
This commit is contained in:
parent
cb2cebdff6
commit
65fad93e50
@ -79,8 +79,12 @@ public class SqlUtil {
|
|||||||
* @param result 数据库操作返回影响条数
|
* @param result 数据库操作返回影响条数
|
||||||
* @return {@code true} 操作成功,{@code false} 操作失败。
|
* @return {@code true} 操作成功,{@code false} 操作失败。
|
||||||
*/
|
*/
|
||||||
public static boolean toBool(Number result) {
|
public static boolean toBool(int result) {
|
||||||
return result != null && result.intValue() > 0;
|
return result > 0 || result == -2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean toBool(long result) {
|
||||||
|
return result > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -93,7 +97,7 @@ public class SqlUtil {
|
|||||||
*/
|
*/
|
||||||
public static boolean toBool(int[] results) {
|
public static boolean toBool(int[] results) {
|
||||||
for (int result : results) {
|
for (int result : results) {
|
||||||
if (result > 0) {
|
if (toBool(result)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user