Commit 1498ff33 authored by hongguangwu's avatar hongguangwu

薪资相关权限-优化

parent ab89c716
...@@ -63,7 +63,7 @@ public class Common { ...@@ -63,7 +63,7 @@ public class Common {
} }
public static boolean isNotNull(Object obj) { 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) { public static boolean isNotEmpty(List obj) {
...@@ -71,7 +71,7 @@ public class Common { ...@@ -71,7 +71,7 @@ public class Common {
} }
public static boolean isNotNull(String obj) { 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 true;
} }
return false; return false;
......
...@@ -78,7 +78,7 @@ public class MenuUtil { ...@@ -78,7 +78,7 @@ public class MenuUtil {
} }
if (Common.isNotNull(obj)) { if (Common.isNotNull(obj)) {
SimpleValueWrapper objs = (SimpleValueWrapper) obj; SimpleValueWrapper objs = (SimpleValueWrapper) obj;
if (Common.isEmpty(objs)) { if (Common.isNotNull(objs)) {
String sql = String.valueOf(objs.get()); String sql = String.valueOf(objs.get());
if (sql.contains("#create_by")) { if (sql.contains("#create_by")) {
sql = sql.replace("#create_by", user.getId()); sql = sql.replace("#create_by", user.getId());
...@@ -121,10 +121,12 @@ public class MenuUtil { ...@@ -121,10 +121,12 @@ public class MenuUtil {
sql = sql.replace("#deptId", userIds); sql = sql.replace("#deptId", userIds);
//sql = sql.replace(" or dept.dept_id = #deptId ", "") //sql = sql.replace(" or dept.dept_id = #deptId ", "")
} }
if (Common.isNotNull(sql)) {
entity.setAuthSql(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