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);