From 0c25bff55796db05850f343e9c2995743343ff92 Mon Sep 17 00:00:00 2001 From: xiaoCJ <406612557@qq.com> Date: Thu, 27 Jun 2024 10:08:37 +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 --- .../sztzjy/fund_investment/controller/TopicController.java | 2 +- .../sztzjy/fund_investment/controller/UserController.java | 7 +------ 2 files changed, 2 insertions(+), 7 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 11236c8..6909cca 100644 --- a/src/main/java/com/sztzjy/fund_investment/controller/TopicController.java +++ b/src/main/java/com/sztzjy/fund_investment/controller/TopicController.java @@ -130,7 +130,7 @@ public class TopicController { PerformanceScoreExample performanceScoreExample = new PerformanceScoreExample(); performanceScoreExample.createCriteria().andFlowIdEqualTo(flowId); List performanceScores = performanceScoreMapper.selectByExample(performanceScoreExample); - if (performanceScores.isEmpty()) { + if (performanceScores == null || performanceScores.isEmpty()) { return null; } else { return new ResultEntity<>(performanceScores.get(0)); diff --git a/src/main/java/com/sztzjy/fund_investment/controller/UserController.java b/src/main/java/com/sztzjy/fund_investment/controller/UserController.java index bddf1f5..dd2765f 100644 --- a/src/main/java/com/sztzjy/fund_investment/controller/UserController.java +++ b/src/main/java/com/sztzjy/fund_investment/controller/UserController.java @@ -10,7 +10,6 @@ import com.sztzjy.fund_investment.entity.PerformanceScore; import com.sztzjy.fund_investment.entity.PerformanceScoreExample; import com.sztzjy.fund_investment.entity.User; import com.sztzjy.fund_investment.entity.dto.EvaluationLevel; -import com.sztzjy.fund_investment.entity.dto.PerformanceScoreDto; import com.sztzjy.fund_investment.entity.dto.PerformanceTrainingScoreDto; import com.sztzjy.fund_investment.mapper.FlowMapper; import com.sztzjy.fund_investment.mapper.PerformanceScoreMapper; @@ -23,15 +22,12 @@ import com.sztzjy.fund_investment.util.ResultEntity; import com.sztzjy.fund_investment.util.RsaUtil; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; -import io.swagger.annotations.ApiParam; -import org.geolatte.geom.M; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; import org.springframework.security.core.Authentication; import org.springframework.security.core.context.SecurityContextHolder; -import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; @@ -40,7 +36,6 @@ import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; import java.lang.reflect.Field; import java.math.BigDecimal; -import java.sql.Array; import java.util.*; @Api(tags = "用户管理") @@ -192,7 +187,7 @@ public class UserController { PerformanceScoreExample example = new PerformanceScoreExample(); example.createCriteria().andFlowIdEqualTo(flow.getFlowId()); List performanceScores = performanceScoreMapper.selectByExample(example); - if (performanceScores.isEmpty()) { + if (performanceScores == null || performanceScores.isEmpty()) { return null; } performanceScoreMapper.deleteByExample(example);