|
|
@@ -139,20 +139,16 @@ public class DashboardsService {
|
|
|
/*
|
|
|
删除看板
|
|
|
*/
|
|
|
- public RepEntity delDashboards(String token, List<Integer> idList) {
|
|
|
+ public RepEntity delDashboards(String token, Integer id) {
|
|
|
Map<String, String> stringMap = GetTokenDataUtil.getTokenData(token);
|
|
|
int userId = Integer.parseInt(stringMap.get("id"));
|
|
|
- Iterator isList = idList.iterator();
|
|
|
- while (isList.hasNext()) {
|
|
|
- int id = (int) isList.next();
|
|
|
- int createId = dashboardsMapper.getCreateIdById(id);
|
|
|
- if (userId != createId) {
|
|
|
- return new RepEntity(RepCode.NoAuthority);
|
|
|
- }
|
|
|
+ int createId = dashboardsMapper.getCreateIdById(id);
|
|
|
+ if (userId != createId) {
|
|
|
+ return new RepEntity(RepCode.NoAuthority);
|
|
|
}
|
|
|
- dashboardsMapper.delDashboards(idList);
|
|
|
+ dashboardsMapper.delDashboards(id);
|
|
|
//删除看板-图表关联关系
|
|
|
- idList.forEach(id -> dashboardsMapper.deleteDashboardChartRelation(id));
|
|
|
+ dashboardsMapper.deleteDashboardChartRelation(id);
|
|
|
return new RepEntity(RepCode.success);
|
|
|
}
|
|
|
|