From 17cbd5b9f612f3d29f02f2722357ea334ede2b41 Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期四, 31 七月 2025 19:17:43 +0800
Subject: [PATCH] 提交再次试验需要将检验项目的结论重置为null
---
framework/src/main/java/com/yuanchu/mom/common/AllController.java | 50 +++++++++++++++++++++++++++++++-------------------
1 files changed, 31 insertions(+), 19 deletions(-)
diff --git a/framework/src/main/java/com/yuanchu/mom/common/AllController.java b/framework/src/main/java/com/yuanchu/mom/common/AllController.java
index 5c4c7a5..89a1ecd 100644
--- a/framework/src/main/java/com/yuanchu/mom/common/AllController.java
+++ b/framework/src/main/java/com/yuanchu/mom/common/AllController.java
@@ -1,8 +1,10 @@
package com.yuanchu.mom.common;
import com.yuanchu.mom.annotation.ValueAuth;
+import com.yuanchu.mom.annotation.ValueClassify;
import com.yuanchu.mom.mapper.AuthMapper;
import io.swagger.annotations.ApiOperation;
+import org.springframework.boot.autoconfigure.freemarker.FreeMarkerAutoConfiguration;
import org.springframework.stereotype.Component;
import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.method.HandlerMethod;
@@ -11,6 +13,7 @@
import javax.annotation.PostConstruct;
import javax.annotation.Resource;
+import java.lang.reflect.Method;
import java.util.Map;
@Component
@@ -28,30 +31,39 @@
for (HandlerMethod value : methodMap.values()) {
ApiOperation annotation = value.getMethodAnnotation(ApiOperation.class);
ValueAuth valueAuth = value.getMethodAnnotation(ValueAuth.class);
- if (valueAuth==null){
- if (annotation != null) {
+ ValueClassify valueClassify = value.getMethodAnnotation(ValueClassify.class);
+ if (valueAuth == null) {
+ if (valueClassify !=null) {
+ String type = valueClassify.value();
String remark = annotation.value();
- String type = "淇敼";
- if (remark.contains("鑾峰彇")||remark.contains("鏌ヨ")){
- type = "鏌ヨ";
- } else if(remark.contains("鍒犻櫎")){
- type = "鍒犻櫎";
- } else if(remark.contains("娣诲姞")||remark.contains("鏂板")||remark.contains("璁ら")){
- type = "娣诲姞";
- } else if(remark.contains("瀵煎叆")){
- type = "瀵煎叆";
- } else if(remark.contains("瀵煎嚭")){
- type = "瀵煎嚭";
- }
- try {
- authMapper.insertPower(value.getMethod().getName(), remark, type);
- }catch (Exception e){
- System.err.println(value.getMethod());
+ authMapper.insertPower(value.getMethod().getName(),remark,type);
+ }else{
+ if (annotation != null) {
+ String remark = annotation.value();
+ String type = "淇敼";
+ if (remark.contains("鑾峰彇") || remark.contains("鏌ヨ")) {
+ type = "鏌ヨ";
+ } else if (remark.contains("鍒犻櫎")) {
+ type = "鍒犻櫎";
+ } else if (remark.contains("娣诲姞") || remark.contains("鏂板") || remark.contains("璁ら")) {
+ type = "娣诲姞";
+ } else if (remark.contains("瀵煎叆")) {
+ type = "瀵煎叆";
+ } else if (remark.contains("瀵煎嚭")) {
+ type = "瀵煎嚭";
+ }
+ try {
+ authMapper.insertPower(value.getMethod().getName(), remark, type);
+ } catch (Exception e) {
+ System.err.println(value.getMethod());
+ e.printStackTrace();
+ }
}
}
+ }
}
+ System.out.println("********************鏉冮檺鑿滃崟瀹屾垚********************");
}
- }
@PostConstruct
public void pingStart() {
--
Gitblit v1.9.3