Commit f47484b0 by jx-art

删除时 处理业务逻辑错误BUG

parent a6c3ff92
...@@ -120,6 +120,11 @@ public class ChangeTypeServiceImpl implements ChangeTypeService { ...@@ -120,6 +120,11 @@ public class ChangeTypeServiceImpl implements ChangeTypeService {
if (changeTypes.get(0) == null || changeTypes.get(1) == null){ if (changeTypes.get(0) == null || changeTypes.get(1) == null){
throw ExceptionFactory.createParamFail(); throw ExceptionFactory.createParamFail();
} }
//查询一级下班是否还存在其他二级 如果不存在就删除一级 如果存在一级就不做伪删
List<ChangeType> changeTypeList = mapper.queryParent(changeTypes.get(0).getId());
if (changeTypeList.size() == 2){
changeTypes.remove(0);
}
for (ChangeType changeType : changeTypes){ for (ChangeType changeType : changeTypes){
Example example = new Example(ChangeType.class); Example example = new Example(ChangeType.class);
Example.Criteria criteria = example.createCriteria(); Example.Criteria criteria = example.createCriteria();
......
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