diff --git a/.idea/CoolRequestCommonStatePersistent.xml b/.idea/CoolRequestCommonStatePersistent.xml index 3977fa2..0c78ed0 100644 --- a/.idea/CoolRequestCommonStatePersistent.xml +++ b/.idea/CoolRequestCommonStatePersistent.xml @@ -1,6 +1,6 @@ - \ No newline at end of file diff --git a/.idea/dataSources.xml b/.idea/dataSources.xml index 51539bf..0a00e03 100644 --- a/.idea/dataSources.xml +++ b/.idea/dataSources.xml @@ -81,5 +81,25 @@ jdbc:mysql://10.0.0.10/aioj_dev $ProjectFileDir$ + + mysql.8 + true + com.mysql.cj.jdbc.Driver + jdbc:mysql://10.0.0.10:3306 + + + + + + $ProjectFileDir$ + + + mysql.8 + true + true + com.mysql.cj.jdbc.Driver + jdbc:mysql://10.0.0.10/aioj_dev + $ProjectFileDir$ + \ No newline at end of file diff --git a/.idea/db-forest-config.xml b/.idea/db-forest-config.xml index b949d63..a5a136e 100644 --- a/.idea/db-forest-config.xml +++ b/.idea/db-forest-config.xml @@ -1,6 +1,6 @@ - \ No newline at end of file diff --git a/.idea/easyCodeTableSettingEncode.xml b/.idea/easyCodeTableSettingEncode.xml new file mode 100644 index 0000000..9cff99a --- /dev/null +++ b/.idea/easyCodeTableSettingEncode.xml @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file diff --git a/.idea/mybatisx/templates.xml b/.idea/mybatisx/templates.xml index 404329d..884182e 100644 --- a/.idea/mybatisx/templates.xml +++ b/.idea/mybatisx/templates.xml @@ -68,8 +68,8 @@ diff --git a/aioj-backend-question-service/src/main/java/cn/meowrain/aioj/backend/question/controller/QuestionSubmitController.java b/aioj-backend-question-service/src/main/java/cn/meowrain/aioj/backend/question/controller/QuestionSubmitController.java index abaf9d6..8e84bb3 100644 --- a/aioj-backend-question-service/src/main/java/cn/meowrain/aioj/backend/question/controller/QuestionSubmitController.java +++ b/aioj-backend-question-service/src/main/java/cn/meowrain/aioj/backend/question/controller/QuestionSubmitController.java @@ -1,5 +1,6 @@ package cn.meowrain.aioj.backend.question.controller; +import cn.meowrain.aioj.backend.framework.core.errorcode.ErrorCode; import cn.meowrain.aioj.backend.framework.core.web.Result; import cn.meowrain.aioj.backend.framework.core.web.Results; import cn.meowrain.aioj.backend.question.dao.entity.QuestionSubmit; @@ -42,9 +43,12 @@ public class QuestionSubmitController { return Results.success(submitId); } - public String handleException(BlockException ex) { + public Result handleException(QuestionSubmitRequestDTO request, BlockException ex) { System.out.println("被限流了: " + ex.getClass().getCanonicalName()); - return "系统繁忙,请稍后再试!(这是自定义的限流提示)"; + + // 假设你的 Results 工具类支持返回错误信息 + // 这里的 code (比如 429) 和 message 根据你的 Result 结构来定 + return Results.failure(ErrorCode.API_REQUEST_ERROR.code(),"系统繁忙,请稍后再试!(这是自定义的限流提示)"); } /**