Commit 108c2c95 by wenshuaiying

解决空指针问题

1 parent 54f5bc9b
...@@ -151,18 +151,18 @@ ...@@ -151,18 +151,18 @@
<build> <build>
<finalName>VVAS-Match</finalName> <finalName>VVAS-Match</finalName>
<plugins> <plugins>
<plugin> <!-- <plugin>-->
<groupId>org.owasp</groupId> <!-- <groupId>org.owasp</groupId>-->
<artifactId>dependency-check-maven</artifactId> <!-- <artifactId>dependency-check-maven</artifactId>-->
<version>11.1.1</version> <!-- <version>11.1.1</version>-->
<executions> <!-- <executions>-->
<execution> <!-- <execution>-->
<goals> <!-- <goals>-->
<goal>check</goal> <!-- <goal>check</goal>-->
</goals> <!-- </goals>-->
</execution> <!-- </execution>-->
</executions> <!-- </executions>-->
</plugin> <!-- </plugin>-->
<plugin> <plugin>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId> <artifactId>spring-boot-maven-plugin</artifactId>
......
...@@ -13,7 +13,6 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -13,7 +13,6 @@ import org.springframework.web.bind.annotation.RestController;
import jakarta.annotation.Resource; import jakarta.annotation.Resource;
import java.io.IOException; import java.io.IOException;
import java.util.Arrays;
/** /**
* . * .
...@@ -46,7 +45,11 @@ public class MainController { ...@@ -46,7 +45,11 @@ public class MainController {
return poolService.queryPool(requestVo); return poolService.queryPool(requestVo);
case MatchPerson: case MatchPerson:
ResponseVo matchPerson = personService.matchPerson(requestVo); ResponseVo matchPerson = personService.matchPerson(requestVo);
if (requestVo.getPersonPoolId().contains("staff") || requestVo.getPersonPoolId().contains("person")) { if (requestVo.getPersonPoolId() != null && (requestVo.getPersonPoolId().contains("staff") || requestVo.getPersonPoolId().contains("person"))) {
return matchPerson;
}
if (requestVo.getUnionPersonPoolId() != null && !requestVo.getUnionPersonPoolId().isEmpty()
&& (requestVo.getUnionPersonPoolId().getFirst().contains("staff") || requestVo.getUnionPersonPoolId().getFirst().contains("person"))) {
return matchPerson; return matchPerson;
} }
if (matchPerson.getMatchBodies() != null && matchPerson.getMatchBodies().size() > 0) { if (matchPerson.getMatchBodies() != null && matchPerson.getMatchBodies().size() > 0) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!