From ed9b7789b84920d87f46393a6e879bd7db09d255 Mon Sep 17 00:00:00 2001
From: 75349 <753495441@qq.com>
Date: Thu, 8 Dec 2022 15:40:55 +0800
Subject: [PATCH] =?UTF-8?q?1.=E6=96=B0=E5=A2=9E=E8=A7=A3=E6=9E=90=E6=96=B9?=
=?UTF-8?q?=E6=B3=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pom.xml | 4 +
.../controller/SubmitRoleController.java | 31 ++
.../liteflow/mysql/model/role/Match.java | 17 ++
.../liteflow/mysql/model/role/Role.java | 23 ++
.../liteflow/mysql/model/role/RoleForm.java | 14 +
.../example/liteflow/mysql/util/RoleUtil.java | 77 +++++
src/test/java/MyTest.java | 267 ++++++++++++++++++
7 files changed, 433 insertions(+)
create mode 100644 src/main/java/com/example/liteflow/mysql/controller/SubmitRoleController.java
create mode 100644 src/main/java/com/example/liteflow/mysql/model/role/Match.java
create mode 100644 src/main/java/com/example/liteflow/mysql/model/role/Role.java
create mode 100644 src/main/java/com/example/liteflow/mysql/model/role/RoleForm.java
create mode 100644 src/main/java/com/example/liteflow/mysql/util/RoleUtil.java
create mode 100644 src/test/java/MyTest.java
diff --git a/pom.xml b/pom.xml
index 425cd77..ee1e783 100644
--- a/pom.xml
+++ b/pom.xml
@@ -31,6 +31,10 @@
spring-boot-starter-test
test
+
+ org.springframework.boot
+ spring-boot-starter-web
+
com.baomidou
diff --git a/src/main/java/com/example/liteflow/mysql/controller/SubmitRoleController.java b/src/main/java/com/example/liteflow/mysql/controller/SubmitRoleController.java
new file mode 100644
index 0000000..39a6875
--- /dev/null
+++ b/src/main/java/com/example/liteflow/mysql/controller/SubmitRoleController.java
@@ -0,0 +1,31 @@
+package com.example.liteflow.mysql.controller;
+
+import cn.hutool.json.JSONUtil;
+import com.example.liteflow.mysql.model.role.Role;
+import com.example.liteflow.mysql.model.role.RoleForm;
+import com.example.liteflow.mysql.util.RoleUtil;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * @author: 陈韦龙
+ * @date: 2022年12月07日 10:36
+ */
+@Slf4j
+@RestController
+@RequestMapping("/submitRole")
+public class SubmitRoleController {
+ @PostMapping
+ public void orderTicket(@RequestBody RoleForm roleForm) {
+ List roles = roleForm.getRoles();
+ List