Commit 464a1d0f authored by hongguangwu's avatar hongguangwu

薪资相关权限-优化

parent af112b7d
......@@ -59,7 +59,7 @@ public class Common {
* @author: fxj
*/
public static boolean isEmpty(Object obj) {
return null == obj || "".equals(obj);
return null == obj || "".equals(obj) || "null".equals(obj);
}
public static boolean isNotNull(Object obj) {
......
......@@ -78,7 +78,7 @@ public class MenuUtil {
}
if (Common.isNotNull(obj)) {
SimpleValueWrapper objs = (SimpleValueWrapper) obj;
if (objs != null) {
if (Common.isEmpty(objs)) {
String sql = String.valueOf(objs.get());
if (sql.contains("#create_by")) {
sql = sql.replace("#create_by", user.getId());
......
......@@ -37,7 +37,7 @@ public class TConfigSalaryServiceImpl extends ServiceImpl<TConfigSalaryMapper, T
public R<IPage<TConfigSalary>> getTConfigSalaryPage(Page<TConfigSalary> page, TConfigSalary tConfigSalary){
YifuUser user = SecurityUtils.getUser();
TSettleDomainListVo vo = null;
if (Common.isNotNull(user)) {
if (Common.isNotNull(user) && CommonConstants.ONE_STRING.equals(user.getSystemFlag())) {
R<TSettleDomainListVo> domainListVoR = archivesDaprUtil.getSettleDomainIdsByUserId(user.getId());
if (Common.isEmpty(domainListVoR)) {
return R.failed("调用结算服务失败");
......
......@@ -418,11 +418,29 @@ public class SysDataAuthServiceImpl extends ServiceImpl<SysDataAuthMapper, SysDa
* @return: void
**/
public void deleteSubInfoByMainId(String mainId) {
SysDataAuth a = this.getById(mainId);
if (a != null) {
Cache cache = cacheManager.getCache(CacheConstants.DATA_AUTH_DETAILS + a.getLinkType());
if (cache != null) {
List<SysDataAuthMenuRel> authMenuList = authMenuRelService.getByMainId(mainId);
List<SysDiySqlMenuRel> diySqlMenuList = diySqlMenuRelService.getByMainId(mainId);
if (authMenuList != null && !authMenuList.isEmpty()) {
for (SysDataAuthMenuRel sd : authMenuList) {
cache.put(a.getLinkId() + CommonConstants.DOWN_LINE_STRING + sd.getMenuId(), null);
}
}
if (diySqlMenuList != null && !diySqlMenuList.isEmpty()) {
for (SysDiySqlMenuRel dsd : diySqlMenuList) {
cache.put(a.getLinkId() + CommonConstants.DOWN_LINE_STRING + dsd.getMenuId(), null);
}
}
authDeptRelService.deleteAuthDeptRelByAuthId(mainId);
authMenuRelService.deleteAuthMenuRelByAuthId(mainId);
diySqlService.deleteDiySqlByAuthId(mainId);
diySqlMenuRelService.deleteSqlMenuRelByAuthId(mainId);
}
}
}
/**
* 删除
......
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