Commit 108c2c95 by wenshuaiying

解决空指针问题

1 parent 54f5bc9b
......@@ -151,18 +151,18 @@
<build>
<finalName>VVAS-Match</finalName>
<plugins>
<plugin>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-maven</artifactId>
<version>11.1.1</version>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- <plugin>-->
<!-- <groupId>org.owasp</groupId>-->
<!-- <artifactId>dependency-check-maven</artifactId>-->
<!-- <version>11.1.1</version>-->
<!-- <executions>-->
<!-- <execution>-->
<!-- <goals>-->
<!-- <goal>check</goal>-->
<!-- </goals>-->
<!-- </execution>-->
<!-- </executions>-->
<!-- </plugin>-->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
......
......@@ -13,7 +13,6 @@ import org.springframework.web.bind.annotation.RestController;
import jakarta.annotation.Resource;
import java.io.IOException;
import java.util.Arrays;
/**
* .
......@@ -46,7 +45,11 @@ public class MainController {
return poolService.queryPool(requestVo);
case MatchPerson:
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;
}
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!