From ca7d4ca1b26fd6a1886e5bb276230d1489e21dd6 Mon Sep 17 00:00:00 2001
From: zhaozhengjie <237651143@qq.com>
Date: 星期三, 28 九月 2022 14:25:16 +0800
Subject: [PATCH] Merge branch 'huacheng_test' of http://gitlab.nhys.cdnhxx.com/root/zhihuishequ into huacheng_test

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComSanShuoEventApi.java |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComSanShuoEventApi.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComSanShuoEventApi.java
index bb4be05..4101977 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComSanShuoEventApi.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComSanShuoEventApi.java
@@ -8,10 +8,12 @@
 import com.panzhihua.common.model.dtos.community.sanshuo.ComSanshuoEventDTO;
 import com.panzhihua.common.model.dtos.community.sanshuo.IndexDateDTO;
 import com.panzhihua.common.model.vos.R;
+import com.panzhihua.service_community.entity.ComEvent;
 import com.panzhihua.service_community.entity.ComMediateType;
 import com.panzhihua.service_community.entity.ComSanshuoEvent;
 import com.panzhihua.service_community.service.ComSanShuoEventService;
 import com.panzhihua.service_community.service.CommediateTypeService;
+import com.panzhihua.service_community.service.IComEventService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.web.bind.annotation.*;
@@ -32,6 +34,9 @@
 
     @Resource
     private CommediateTypeService commediateTypeService;
+
+    @Resource
+    private IComEventService comEventService;
 
     @GetMapping ("/list")
     public R list(@RequestParam(value = "keyWord",required = false)String keyWord,
@@ -79,7 +84,14 @@
         comMediateType.setDeleteFlag(true);
         comMediateType.setEnabled(false);
         comMediateType.setModifyUser(this.getLoginUserInfo().getUserId());
+        //该分类是否有未调解完成事件
+        List<ComEvent> list = comEventService.list(new QueryWrapper<ComEvent>().lambda().eq(ComEvent::getEventCategory, id).in(ComEvent::getEventProcessStatus, (1), (2), (5)));
+        if (list.size() != 0){
+            return R.fail("有未处理完成事件,无法删除");
+        }
         return R.ok(commediateTypeService.updateById(comMediateType));
     }
 
+
+
 }

--
Gitblit v1.7.1