deason 2 týždňov pred
rodič
commit
afd469c9a1

+ 4 - 4
examcloud-exchange-api-provider/src/main/java/cn/com/qmth/examcloud/exchange/outer/api/provider/FaceOuterServiceProvider.java

@@ -71,13 +71,13 @@ public class FaceOuterServiceProvider extends ControllerSupport implements Enter
     @ApiOperation(value = "获取学生照片URL", hidden = true)
     @PostMapping("getPhotoUrl")
     public String getPhotoUrl(
-            @RequestParam @ApiParam(value = "顶级机构ID", example = "123") Long rootOrgId,
-            @RequestParam @ApiParam(value = "学生证件号") String identityNumber,
-            @RequestParam @ApiParam(value = "学号") String studentCode) {
+            @RequestParam(required = false) @ApiParam(value = "顶级机构ID", example = "123") Long rootOrgId,
+            @RequestParam(required = false) @ApiParam(value = "学生证件号") String identityNumber,
+            @RequestParam(required = false) @ApiParam(value = "学号") String studentCode) {
         if (rootOrgId == null) {
             throw new StatusException("参数rootOrgId的值不能为空!");
         }
-        if (StringUtils.isBlank(identityNumber) || StringUtils.isBlank(studentCode)) {
+        if (StringUtils.isBlank(identityNumber) && StringUtils.isBlank(studentCode)) {
             throw new StatusException("参数identityNumber和studentCode的值不能同时为空,至少传一个值!");
         }
         if (!getEnterpriseRootOrgId().equals(rootOrgId)) {