Commit 1498ff33 authored by hongguangwu's avatar hongguangwu

薪资相关权限-优化

parent ab89c716
......@@ -63,7 +63,7 @@ public class Common {
}
public static boolean isNotNull(Object obj) {
return null != obj && !"".equals(obj);
return null != obj && !"".equals(obj) && !"null".equals(obj);
}
public static boolean isNotEmpty(List obj) {
......@@ -71,7 +71,7 @@ public class Common {
}
public static boolean isNotNull(String obj) {
if (null != obj && !"".equals(obj) && !"undefined".equals(obj)) {
if (null != obj && !"".equals(obj) && !"undefined".equals(obj) && !"null".equals(obj)) {
return true;
}
return false;
......
......@@ -78,7 +78,7 @@ public class MenuUtil {
}
if (Common.isNotNull(obj)) {
SimpleValueWrapper objs = (SimpleValueWrapper) obj;
if (Common.isEmpty(objs)) {
if (Common.isNotNull(objs)) {
String sql = String.valueOf(objs.get());
if (sql.contains("#create_by")) {
sql = sql.replace("#create_by", user.getId());
......@@ -121,7 +121,9 @@ public class MenuUtil {
sql = sql.replace("#deptId", userIds);
//sql = sql.replace(" or dept.dept_id = #deptId ", "")
}
entity.setAuthSql(sql);
if (Common.isNotNull(sql)) {
entity.setAuthSql(sql);
}
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment