提交 5978bac5 作者: 925993793@qq.com

事件分类删除bug修改

上级 d51a1c17
...@@ -65,5 +65,5 @@ public interface SubjectTypeMapper extends BaseMapper<SubjectType> { ...@@ -65,5 +65,5 @@ public interface SubjectTypeMapper extends BaseMapper<SubjectType> {
* @author lkg * @author lkg
* @date 2024/4/29 * @date 2024/4/29
*/ */
void updateTreeNodeStatus(@Param("id") String id, @Param("hasChild") Integer hasChild); void updateTreeNodeStatus(@Param("id") String id, @Param("hasChild") String hasChild);
} }
...@@ -66,7 +66,7 @@ public class SubjectTypeServiceImpl extends ServiceImpl<SubjectTypeMapper, Subje ...@@ -66,7 +66,7 @@ public class SubjectTypeServiceImpl extends ServiceImpl<SubjectTypeMapper, Subje
subjectType.setPid("0"); subjectType.setPid("0");
} }
if (!"0".equals(subjectType.getPid())) { if (!"0".equals(subjectType.getPid())) {
baseMapper.updateTreeNodeStatus(subjectType.getPid(), 0); baseMapper.updateTreeNodeStatus(subjectType.getPid(), "0");
} }
} }
baseMapper.updateById(subjectType); baseMapper.updateById(subjectType);
...@@ -82,7 +82,7 @@ public class SubjectTypeServiceImpl extends ServiceImpl<SubjectTypeMapper, Subje ...@@ -82,7 +82,7 @@ public class SubjectTypeServiceImpl extends ServiceImpl<SubjectTypeMapper, Subje
queryWrapper.eq(SubjectType::getPid,pid); queryWrapper.eq(SubjectType::getPid,pid);
Integer count = baseMapper.selectCount(queryWrapper); Integer count = baseMapper.selectCount(queryWrapper);
if (count == 0) { if (count == 0) {
baseMapper.updateTreeNodeStatus(pid,0); baseMapper.updateTreeNodeStatus(pid,"0");
} }
} }
...@@ -125,7 +125,7 @@ public class SubjectTypeServiceImpl extends ServiceImpl<SubjectTypeMapper, Subje ...@@ -125,7 +125,7 @@ public class SubjectTypeServiceImpl extends ServiceImpl<SubjectTypeMapper, Subje
if (!"0".equals(pid)) { if (!"0".equals(pid)) {
Integer count = baseMapper.selectCount(new QueryWrapper<SubjectType>().eq("pid", pid)); Integer count = baseMapper.selectCount(new QueryWrapper<SubjectType>().eq("pid", pid));
if (count == null || count <= 1) { if (count == null || count <= 1) {
baseMapper.updateTreeNodeStatus(pid, 0); baseMapper.updateTreeNodeStatus(pid, "0");
} }
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论