From 5f1dc77585414a4b630b4b9637af29aed1ea14cc Mon Sep 17 00:00:00 2001
From: lidongdong <1459917685@qq.com>
Date: 星期一, 17 十月 2022 17:49:15 +0800
Subject: [PATCH] 修改登录角色获取权限 bug
---
flower_city/src/main/java/com/dg/core/controller/TransactionEventController.java | 31 ++++++++++++++++++++++++++++++-
1 files changed, 30 insertions(+), 1 deletions(-)
diff --git a/flower_city/src/main/java/com/dg/core/controller/TransactionEventController.java b/flower_city/src/main/java/com/dg/core/controller/TransactionEventController.java
index 66b8fda..7b14947 100644
--- a/flower_city/src/main/java/com/dg/core/controller/TransactionEventController.java
+++ b/flower_city/src/main/java/com/dg/core/controller/TransactionEventController.java
@@ -15,6 +15,7 @@
import com.dg.core.util.TableDataInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.Assert;
import org.springframework.web.bind.annotation.*;
@@ -94,6 +95,22 @@
@Authorization
public ResultData insertConfig(@RequestBody TransactionEvent entity)
{
+ if(StringUtils.isEmpty(entity.getDepartmentId()))
+ {
+ return ResultData.error("部门id不能为空");
+ }
+
+ if(StringUtils.isEmpty(entity.getMatterName()))
+ {
+ return ResultData.error("事件名称不能为空");
+ }
+
+ String id=iTransactionEventService.selectDataIfExist(entity.getDepartmentId(),entity.getMatterName());
+ if(!StringUtils.isEmpty(id))
+ {
+ return ResultData.error("事件名称已存在");
+ }
+
return toAjax(iTransactionEventService.insertConfig(entity));
}
@@ -107,6 +124,18 @@
@Authorization
public ResultData updateConfig(@RequestBody TransactionEvent entity)
{
+ if(StringUtils.isEmpty(entity.getDepartmentId()))
+ {
+ return ResultData.error("部门id不能为空");
+ }
+
+ if(StringUtils.isEmpty(entity.getMatterName()))
+ {
+ return ResultData.error("事件名称不能为空");
+ }
+
+
+
return toAjax(iTransactionEventService.updateConfig(entity));
}
@@ -132,7 +161,6 @@
*/
@ApiOperation(value = "导办事务搜索",response = QueryResults.class)
@GetMapping("/queryKeyWordList")
- @Authorization
public QueryResults queryMatterNameList(@RequestParam(value = "pageNum",required = false) Integer pageNum,
@RequestParam(value = "pageSize",required = false) Integer pageSize,
@RequestParam(value = "recommendSize",required = false) Integer recommendSize,
@@ -210,4 +238,5 @@
}
+
}
--
Gitblit v1.7.1