Browse Source

【BI商业智能】【系统权限管理】【收藏固定操作权限】

zhaoy 6 years ago
parent
commit
cbab1f6e5f

+ 8 - 0
bi-server/src/main/java/com/usoftchina/bi/server/service/user/UserPowerService.java

@@ -1,7 +1,9 @@
 package com.usoftchina.bi.server.service.user;
 
 import com.usoftchina.bi.core.base.BaseContextHolder;
+import com.usoftchina.bi.server.dao.dashboard.DashboardFavoriteMapper;
 import com.usoftchina.bi.server.dao.dashboard.DashboardsMapper;
+import com.usoftchina.bi.server.dao.dashboard.DefaultDashboardMapper;
 import com.usoftchina.bi.server.dao.user.UserMapper;
 import com.usoftchina.bi.server.dao.user.UserPowerMapper;
 import com.usoftchina.bi.server.model.vo.configVo.BatchUserPowerInfo;
@@ -28,6 +30,10 @@ public class UserPowerService {
     private UserMapper userMapper;
     @Autowired
     private DashboardsMapper dashboardsMapper;
+    @Autowired
+    private DashboardFavoriteMapper dashboardFavoriteMapper;
+    @Autowired
+    private DefaultDashboardMapper defaultDashboardMapper;
 
     /**
      * 新增用户(组)权限
@@ -55,6 +61,8 @@ public class UserPowerService {
     public void delete(UserPowerInfo userPowerInfo){
         userPowerMapper.delete(userPowerInfo);
         String content = getLogContent(userPowerInfo, "删除");
+        dashboardFavoriteMapper.remove(userPowerInfo.getDashboardId());
+        defaultDashboardMapper.delete(userPowerInfo.getDashboardId());
         messageLogService.delete("权限管理", null, BaseContextHolder.getUserName(), content);
     }