|
@@ -60,10 +60,10 @@ public class FaceOuterServiceProvider extends ControllerSupport implements Enter
|
|
|
@ApiOperation(value = "保存学生照片(图片URL)")
|
|
|
@PostMapping("addPhotoByUrl")
|
|
|
public void addPhotoByUrl(
|
|
|
- @RequestParam @ApiParam(value = "顶级机构ID", example = "1", 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) {
|
|
|
+ @RequestParam @ApiParam(value = "顶级机构ID", example = "123", required = true) Long rootOrgId,
|
|
|
+ @RequestParam @ApiParam(value = "学生证件号", required = true) String identityNumber,
|
|
|
+ @RequestParam @ApiParam(value = "操作者", required = true) String operator,
|
|
|
+ @RequestParam @ApiParam(value = "学生照片URL", example = "http://xxx.xxx/xxx.jpg", required = true) String photoUrl) {
|
|
|
|
|
|
if (!getEnterpriseRootOrgId().equals(rootOrgId)) {
|
|
|
throw new StatusException("1000001", "rootOrgId is wrong");
|
|
@@ -72,7 +72,7 @@ public class FaceOuterServiceProvider extends ControllerSupport implements Enter
|
|
|
if (photoUrl.startsWith("http")) {
|
|
|
int lastIndexOf = photoUrl.lastIndexOf(".");
|
|
|
if (0 > lastIndexOf) {
|
|
|
- throw new StatusException("100002", "photoPath is not end with photo file suffix.");
|
|
|
+ throw new StatusException("100002", "参数photoUrl的值需要包含图片后缀名,如../xxx.jpg");
|
|
|
}
|
|
|
|
|
|
String fileSuffix = photoUrl.substring(lastIndexOf);
|
|
@@ -91,16 +91,15 @@ public class FaceOuterServiceProvider extends ControllerSupport implements Enter
|
|
|
|
|
|
faceService.processFace(rootOrgId, identityNumber, fileSuffix, temp, operator);
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "保存学生照片(图片文件)")
|
|
|
@PostMapping("addPhoto")
|
|
|
public void addPhoto(
|
|
|
- @RequestParam @ApiParam(value = "顶级机构ID", example = "1", required = true) Long rootOrgId,
|
|
|
- @RequestParam @ApiParam(value = "身份证", required = true) String identityNumber,
|
|
|
+ @RequestParam @ApiParam(value = "顶级机构ID", example = "123", required = true) Long rootOrgId,
|
|
|
+ @RequestParam @ApiParam(value = "学生证件号", required = true) String identityNumber,
|
|
|
@RequestParam @ApiParam(value = "操作者", required = true) String operator,
|
|
|
- @RequestParam @ApiParam(value = "学生照片文件(文件名称=身份证号码+文件后缀) 如:xxxxxxxxxx.jpg", required = true) CommonsMultipartFile file) {
|
|
|
+ @RequestParam @ApiParam(value = "学生照片文件(文件名称=证件号+图片后缀)", required = true) CommonsMultipartFile file) {
|
|
|
|
|
|
if (!getEnterpriseRootOrgId().equals(rootOrgId)) {
|
|
|
throw new StatusException("1000001", "rootOrgId is wrong");
|
|
@@ -131,9 +130,9 @@ public class FaceOuterServiceProvider extends ControllerSupport implements Enter
|
|
|
@ApiOperation(value = "保存学生照片(批量图片文件)")
|
|
|
@PostMapping("importPhotos")
|
|
|
public List<Map<String, String>> importPhotos(
|
|
|
- @RequestParam @ApiParam(value = "顶级机构ID", example = "1", required = true) Long rootOrgId,
|
|
|
+ @RequestParam @ApiParam(value = "顶级机构ID", example = "123", required = true) Long rootOrgId,
|
|
|
@RequestParam @ApiParam(value = "操作者", required = true) String operator,
|
|
|
- @RequestParam @ApiParam(value = "学生照片文件(身份证号码+文件后缀)压缩包(ZIP文件,压缩包内不含目录)", required = true) CommonsMultipartFile file) {
|
|
|
+ @RequestParam @ApiParam(value = "学生照片压缩包zip文件,注意压缩包内不要建文件夹(文件名称=证件号+图片后缀)", required = true) CommonsMultipartFile file) {
|
|
|
|
|
|
if (!getEnterpriseRootOrgId().equals(rootOrgId)) {
|
|
|
throw new StatusException("1000001", "rootOrgId is wrong");
|