From ea306e52f9463059e2547bd083134e991ff9f911 Mon Sep 17 00:00:00 2001 From: xiaoCJ <406612557@qq.com> Date: Mon, 24 Jun 2024 17:28:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AE=9E=E5=8A=A1=E8=AE=A4?= =?UTF-8?q?=E7=9F=A5=E5=BE=97=E5=88=86=E5=92=8C=E6=99=BA=E8=83=BD=E8=AF=84?= =?UTF-8?q?=E5=88=86=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fund_investment/controller/TopicController.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/sztzjy/fund_investment/controller/TopicController.java b/src/main/java/com/sztzjy/fund_investment/controller/TopicController.java index 3d7c3c4..11236c8 100644 --- a/src/main/java/com/sztzjy/fund_investment/controller/TopicController.java +++ b/src/main/java/com/sztzjy/fund_investment/controller/TopicController.java @@ -2,11 +2,9 @@ package com.sztzjy.fund_investment.controller; import cn.hutool.core.util.IdUtil; import com.sztzjy.fund_investment.annotation.AnonymousAccess; -import com.sztzjy.fund_investment.config.Constant; import com.sztzjy.fund_investment.entity.*; import com.sztzjy.fund_investment.mapper.FlowMapper; import com.sztzjy.fund_investment.mapper.PerformanceScoreMapper; -import com.sztzjy.fund_investment.mapper.TopicsMapper; import com.sztzjy.fund_investment.mapper.UserMapper; import com.sztzjy.fund_investment.service.PerformanceScoreService; import com.sztzjy.fund_investment.service.TopicService; @@ -132,7 +130,11 @@ public class TopicController { PerformanceScoreExample performanceScoreExample = new PerformanceScoreExample(); performanceScoreExample.createCriteria().andFlowIdEqualTo(flowId); List performanceScores = performanceScoreMapper.selectByExample(performanceScoreExample); - return new ResultEntity<>(performanceScores.get(0)); + if (performanceScores.isEmpty()) { + return null; + } else { + return new ResultEntity<>(performanceScores.get(0)); + } }