From a224c015be963b73b2dffef59020c5c89b8d5752 Mon Sep 17 00:00:00 2001
From: 张天森 <1292933220@qq.com>
Date: 星期一, 17 十月 2022 17:09:48 +0800
Subject: [PATCH] 三说会堂事件操作权限处理
---
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComSanShuoExpertApi.java | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComSanShuoExpertApi.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComSanShuoExpertApi.java
index 8947001..1470967 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComSanShuoExpertApi.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComSanShuoExpertApi.java
@@ -46,7 +46,7 @@
@PostMapping
public R add(@RequestBody ComSanshuoExpertDTO comSanshuoExpertDTO){
comSanshuoExpertDTO.setCreateBy(this.getLoginUserInfo().getName());
- return comSanShuoExpertService.addExpert(comSanshuoExpertDTO);
+ return comSanShuoExpertService.addOrUpdateExpert(comSanshuoExpertDTO);
}
@GetMapping("/detail")
@@ -58,7 +58,7 @@
* 小程序获取可选择专家
* */
@GetMapping("/appletsList")
- public R appList(@RequestParam ("type")Integer type,@RequestParam("id")Long id){
+ public R appList(@RequestParam (value = "type",required = false)Integer type,@RequestParam(value = "id",required = false)Long id){
return comSanShuoExpertService.selectExpertList(type, id,this.getLoginUserInfo().getCommunityId());
}
@@ -67,11 +67,9 @@
* */
@PutMapping
public R update(@RequestBody ComSanshuoExpertDTO comSanshuoExpertDTO){
- ComSanshuoExpert expert=new ComSanshuoExpert();
- BeanUtil.copyProperties(comSanshuoExpertDTO,expert);
- expert.setUpdateTime(new Date());
- return R.ok(comSanShuoExpertService.updateById(expert));
+ return R.ok(comSanShuoExpertService.addOrUpdateExpert(comSanshuoExpertDTO));
}
+
/**
* 后台获取列表
@@ -89,7 +87,6 @@
* */
@DeleteMapping("/remove")
public R remove(@RequestParam("id")Long id){
- //TODO 是否有为解决事件
List<ComEvent> list = comEventService.list(new QueryWrapper<ComEvent>().lambda().eq(ComEvent::getSpecialistId, id).in(ComEvent::getEventProcessStatus, (1), (2), (5)));
if (list.size()!=0){
return R.fail("有未调解完成事件,无法删除!");
@@ -125,6 +122,9 @@
}
+
+
+
/**
* 专家范围
* */
@@ -155,4 +155,7 @@
return R.fail();
}
+
+
+
}
--
Gitblit v1.7.1