|
|
@@ -2,6 +2,7 @@ package com.usoftchina.bi.server.service.dashboard;
|
|
|
|
|
|
import com.usoftchina.bi.core.base.RepCode;
|
|
|
import com.usoftchina.bi.core.base.RepEntity;
|
|
|
+import com.usoftchina.bi.core.exception.MyException;
|
|
|
import com.usoftchina.bi.core.utils.GetTokenDataUtil;
|
|
|
import com.usoftchina.bi.server.dao.dashboard.DashBoardMenuMapper;
|
|
|
import com.usoftchina.bi.server.model.vo.configVo.DashBoardMenuInfo;
|
|
|
@@ -51,6 +52,11 @@ public class DashBoardMenuService {
|
|
|
|
|
|
public void deleteById(Long id){
|
|
|
Assert.state(id > 0, "参数错误");
|
|
|
+ // 判断是否存在报表,存在不允许删除目录
|
|
|
+ int count = dashBoardMenuMapper.countDashboardByMenuId(id);
|
|
|
+ if (count > 0) {
|
|
|
+ throw new MyException(RepCode.MENU_USED_DASHBOARD);
|
|
|
+ }
|
|
|
dashBoardMenuMapper.deleteByPrimaryKey(id);
|
|
|
}
|
|
|
|