|
@@ -28,6 +28,7 @@ import cn.com.qmth.examcloud.exchange.outer.api.FaceOuterService;
|
|
import cn.com.qmth.examcloud.exchange.outer.service.FaceService;
|
|
import cn.com.qmth.examcloud.exchange.outer.service.FaceService;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
+import io.swagger.annotations.ApiParam;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 人脸服务
|
|
* 人脸服务
|
|
@@ -59,11 +60,14 @@ public class FaceOuterServiceProvider extends ControllerSupport implements FaceO
|
|
@Autowired
|
|
@Autowired
|
|
private FaceService faceService;
|
|
private FaceService faceService;
|
|
|
|
|
|
- @ApiOperation(value = "保存学生照片")
|
|
|
|
- @PostMapping("addByUrl")
|
|
|
|
|
|
+ @ApiOperation(value = "保存学生照片", httpMethod = "POST")
|
|
|
|
+ @PostMapping("addPhotoByUrl")
|
|
@Override
|
|
@Override
|
|
- public void addPhotoByUrl(@RequestParam Long rootOrgId, @RequestParam String identityNumber,
|
|
|
|
- @RequestParam String photoUrl, @RequestParam String operator) {
|
|
|
|
|
|
+ public void addPhotoByUrl(
|
|
|
|
+ @RequestParam @ApiParam(value = "顶级机构ID", required = true) Long rootOrgId,
|
|
|
|
+ @RequestParam @ApiParam(value = "身份证", required = true) String identityNumber,
|
|
|
|
+ @RequestParam @ApiParam(value = "照片地址", required = true) String photoUrl,
|
|
|
|
+ @RequestParam @ApiParam(value = "操作者", required = true) String operator) {
|
|
|
|
|
|
if (photoUrl.startsWith("http")) {
|
|
if (photoUrl.startsWith("http")) {
|
|
byte[] bs = HttpClientUtil.get(photoUrl);
|
|
byte[] bs = HttpClientUtil.get(photoUrl);
|
|
@@ -90,10 +94,11 @@ public class FaceOuterServiceProvider extends ControllerSupport implements FaceO
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
- @ApiOperation(value = "保存学生照片")
|
|
|
|
- @PostMapping("add")
|
|
|
|
|
|
+ @ApiOperation(value = "保存学生照片", httpMethod = "POST")
|
|
|
|
+ @PostMapping("addPhoto")
|
|
@Override
|
|
@Override
|
|
- public void addPhoto(@RequestParam CommonsMultipartFile file) {
|
|
|
|
|
|
+ public void addPhoto(
|
|
|
|
+ @RequestParam @ApiParam(value = "学生照片文件(文件名称=身份证号码+文件后缀) 如:xxxxxxxxxx.jpg", required = true) CommonsMultipartFile file) {
|
|
User accessUser = getAccessUser();
|
|
User accessUser = getAccessUser();
|
|
Long rootOrgId = accessUser.getRootOrgId();
|
|
Long rootOrgId = accessUser.getRootOrgId();
|
|
|
|
|
|
@@ -115,10 +120,11 @@ public class FaceOuterServiceProvider extends ControllerSupport implements FaceO
|
|
accessUser.getDisplayName());
|
|
accessUser.getDisplayName());
|
|
}
|
|
}
|
|
|
|
|
|
- @ApiOperation(value = "导入学生照片")
|
|
|
|
|
|
+ @ApiOperation(value = "导入学生照片", httpMethod = "POST")
|
|
@PostMapping("importPhotos")
|
|
@PostMapping("importPhotos")
|
|
@Override
|
|
@Override
|
|
- public List<Map<String, String>> importPhotos(@RequestParam CommonsMultipartFile file) {
|
|
|
|
|
|
+ public List<Map<String, String>> importPhotos(
|
|
|
|
+ @RequestParam @ApiParam(value = "学生照片文件(身份证号码+文件后缀)压缩包(ZIP文件,压缩包内不含目录)", required = true) CommonsMultipartFile file) {
|
|
|
|
|
|
User accessUser = getAccessUser();
|
|
User accessUser = getAccessUser();
|
|
Long rootOrgId = accessUser.getRootOrgId();
|
|
Long rootOrgId = accessUser.getRootOrgId();
|