From 9adefc336ace3af957297b62e587e77f583074e1 Mon Sep 17 00:00:00 2001
From: huanghongfa <huanghongfa123456>
Date: 星期一, 18 十月 2021 15:42:44 +0800
Subject: [PATCH] bug修复
---
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ConvenientServiceCategoryServiceImpl.java | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ConvenientServiceCategoryServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ConvenientServiceCategoryServiceImpl.java
index c85f04f..d6adbf8 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ConvenientServiceCategoryServiceImpl.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ConvenientServiceCategoryServiceImpl.java
@@ -68,6 +68,10 @@
if (isNull(convenientServiceCategoryDO)) {
return R.fail("分类id不存在");
}
+ int count = this.baseMapper.checkCategoryIsUsing(categoryId);
+ if (count > 0) {
+ return R.fail("该分类名称已被引用,无法删除!");
+ }
convenientServiceCategoryDO.setIsDel(true);
convenientServiceCategoryDO.setUpdatedBy(operator);
int result = this.baseMapper.updateById(convenientServiceCategoryDO);
@@ -114,4 +118,9 @@
}
return R.ok(categoryVOList);
}
+
+ @Override
+ public R getSuitableServiceCategories(Long communityId) {
+ return R.ok(this.baseMapper.selectSuitableServiceCategories(communityId));
+ }
}
--
Gitblit v1.7.1