mirror of
				https://github.com/continew-org/continew-admin.git
				synced 2025-11-04 10:57:10 +08:00 
			
		
		
		
	style: 优化部分代码格式
This commit is contained in:
		@@ -19,7 +19,6 @@ package top.charles7c.cnadmin.monitor.service.impl;
 | 
				
			|||||||
import java.math.BigDecimal;
 | 
					import java.math.BigDecimal;
 | 
				
			||||||
import java.util.List;
 | 
					import java.util.List;
 | 
				
			||||||
import java.util.Map;
 | 
					import java.util.Map;
 | 
				
			||||||
import java.util.stream.Collectors;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
import lombok.RequiredArgsConstructor;
 | 
					import lombok.RequiredArgsConstructor;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -91,8 +90,7 @@ public class DashboardServiceImpl implements DashboardService {
 | 
				
			|||||||
        List<Map<String, Object>> locationIpStatistics = logService.listDashboardGeoDistribution();
 | 
					        List<Map<String, Object>> locationIpStatistics = logService.listDashboardGeoDistribution();
 | 
				
			||||||
        DashboardGeoDistributionResp geoDistribution = new DashboardGeoDistributionResp();
 | 
					        DashboardGeoDistributionResp geoDistribution = new DashboardGeoDistributionResp();
 | 
				
			||||||
        geoDistribution.setLocationIpStatistics(locationIpStatistics);
 | 
					        geoDistribution.setLocationIpStatistics(locationIpStatistics);
 | 
				
			||||||
        geoDistribution.setLocations(
 | 
					        geoDistribution.setLocations(locationIpStatistics.stream().map(m -> Convert.toStr(m.get("name"))).toList());
 | 
				
			||||||
            locationIpStatistics.stream().map(m -> Convert.toStr(m.get("name"))).collect(Collectors.toList()));
 | 
					 | 
				
			||||||
        return geoDistribution;
 | 
					        return geoDistribution;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -139,10 +139,9 @@ public class LogServiceImpl implements LogService {
 | 
				
			|||||||
    public SystemLogDetailResp get(Long id) {
 | 
					    public SystemLogDetailResp get(Long id) {
 | 
				
			||||||
        LogDO logDO = logMapper.selectById(id);
 | 
					        LogDO logDO = logMapper.selectById(id);
 | 
				
			||||||
        CheckUtils.throwIfNotExists(logDO, "LogDO", "ID", id);
 | 
					        CheckUtils.throwIfNotExists(logDO, "LogDO", "ID", id);
 | 
				
			||||||
 | 
					        SystemLogDetailResp detail = BeanUtil.copyProperties(logDO, SystemLogDetailResp.class);
 | 
				
			||||||
        SystemLogDetailResp detailVO = BeanUtil.copyProperties(logDO, SystemLogDetailResp.class);
 | 
					        this.fill(detail);
 | 
				
			||||||
        this.fill(detailVO);
 | 
					        return detail;
 | 
				
			||||||
        return detailVO;
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Override
 | 
					    @Override
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -82,7 +82,7 @@ public class DeptServiceImpl extends BaseServiceImpl<DeptMapper, DeptDO, DeptRes
 | 
				
			|||||||
        String oldName = oldDept.getName();
 | 
					        String oldName = oldDept.getName();
 | 
				
			||||||
        DisEnableStatusEnum newStatus = req.getStatus();
 | 
					        DisEnableStatusEnum newStatus = req.getStatus();
 | 
				
			||||||
        Long oldParentId = oldDept.getParentId();
 | 
					        Long oldParentId = oldDept.getParentId();
 | 
				
			||||||
        if (oldDept.getIsSystem()) {
 | 
					        if (Boolean.TRUE.equals(oldDept.getIsSystem())) {
 | 
				
			||||||
            CheckUtils.throwIfEqual(DisEnableStatusEnum.DISABLE, newStatus, "[{}] 是系统内置部门,不允许禁用", oldName);
 | 
					            CheckUtils.throwIfEqual(DisEnableStatusEnum.DISABLE, newStatus, "[{}] 是系统内置部门,不允许禁用", oldName);
 | 
				
			||||||
            CheckUtils.throwIfNotEqual(req.getParentId(), oldParentId, "[{}] 是系统内置部门,不允许变更上级部门", oldName);
 | 
					            CheckUtils.throwIfNotEqual(req.getParentId(), oldParentId, "[{}] 是系统内置部门,不允许变更上级部门", oldName);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -92,7 +92,7 @@ public class RoleServiceImpl extends BaseServiceImpl<RoleMapper, RoleDO, RoleRes
 | 
				
			|||||||
        RoleDO oldRole = super.getById(id);
 | 
					        RoleDO oldRole = super.getById(id);
 | 
				
			||||||
        DataScopeEnum oldDataScope = oldRole.getDataScope();
 | 
					        DataScopeEnum oldDataScope = oldRole.getDataScope();
 | 
				
			||||||
        String oldCode = oldRole.getCode();
 | 
					        String oldCode = oldRole.getCode();
 | 
				
			||||||
        if (oldRole.getIsSystem()) {
 | 
					        if (Boolean.TRUE.equals(oldRole.getIsSystem())) {
 | 
				
			||||||
            CheckUtils.throwIfEqual(DisEnableStatusEnum.DISABLE, req.getStatus(), "[{}] 是系统内置角色,不允许禁用",
 | 
					            CheckUtils.throwIfEqual(DisEnableStatusEnum.DISABLE, req.getStatus(), "[{}] 是系统内置角色,不允许禁用",
 | 
				
			||||||
                oldRole.getName());
 | 
					                oldRole.getName());
 | 
				
			||||||
            CheckUtils.throwIfNotEqual(req.getCode(), oldCode, "[{}] 是系统内置角色,不允许修改角色编码", oldRole.getName());
 | 
					            CheckUtils.throwIfNotEqual(req.getCode(), oldCode, "[{}] 是系统内置角色,不允许修改角色编码", oldRole.getName());
 | 
				
			||||||
@@ -152,7 +152,7 @@ public class RoleServiceImpl extends BaseServiceImpl<RoleMapper, RoleDO, RoleRes
 | 
				
			|||||||
        if (CollUtil.isEmpty(list)) {
 | 
					        if (CollUtil.isEmpty(list)) {
 | 
				
			||||||
            return new ArrayList<>(0);
 | 
					            return new ArrayList<>(0);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        return list.stream().map(r -> new LabelValueResp<>(r.getName(), r.getId())).collect(Collectors.toList());
 | 
					        return list.stream().map(r -> new LabelValueResp<>(r.getName(), r.getId())).toList();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Override
 | 
					    @Override
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user