Commit 989e41dd authored by 梁光意's avatar 梁光意

添加判空条件

parent 26ffd784
......@@ -3,6 +3,7 @@ package com.syc.slm.slmbi.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.google.common.collect.Lists;
import com.syc.slm.common.core.constant.SlmConstants;
......@@ -165,6 +166,9 @@ public class InstrumentPanelGroupServiceImpl extends ServiceImpl<InstrumentPanel
tree.setId(entity.getId());
if (StringUtils.isNotEmpty(group.getParentId())) {
InstrumentPanelTree panelTree = treeService.getById(group.getParentId());
if (ObjectUtils.isEmpty(panelTree)){
throw new SysException(group.getParentId() + ",上级不存在");
}
if (SlmConstants.DATA_DELETED.equals(panelTree.getRecordStatus())) {
throw new SysException(panelTree.getName() + ",已不存在,请刷新页面");
}
......
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