|
@@ -156,7 +156,7 @@ public class FaceManagementController {
|
|
|
@PostMapping(value = "/add")
|
|
|
@ApiOperation(value = "新增人脸")
|
|
|
@SaCheckPermission("facemanager:add")
|
|
|
- public RT<Boolean> add(AddFaceManagementDto dto, @RequestParam("file") MultipartFile file) {
|
|
|
+ public RT<Long> add(AddFaceManagementDto dto, @RequestParam("file") MultipartFile file) {
|
|
|
|
|
|
String filename = file.getOriginalFilename();
|
|
|
String suffix = StringUtils.substringAfterLast(filename, StringPool.DOT);
|
|
@@ -177,9 +177,9 @@ public class FaceManagementController {
|
|
|
dto.setFileId(imageVo.getFolderId());
|
|
|
FaceManagement faceManagement = BeanUtil.toBean(dto, FaceManagement.class);
|
|
|
faceManagement.setRegisterBase64(map.get(suffix) + imageVo.getBase64());
|
|
|
- boolean isSuccess = faceManagementService.add(faceManagement);
|
|
|
+ faceManagementService.add(faceManagement);
|
|
|
codeRuleService.useEncode("FACECODE");
|
|
|
- return RT.ok(isSuccess);
|
|
|
+ return RT.ok(imageVo.getFolderId());
|
|
|
|
|
|
}
|
|
|
|
|
@@ -188,7 +188,7 @@ public class FaceManagementController {
|
|
|
@PostMapping(value = "/update")
|
|
|
@ApiOperation(value = "修改人脸")
|
|
|
@SaCheckPermission("facemanager:edit")
|
|
|
- public RT<Boolean> update(UpdateFaceManagementDto dto, @RequestParam(name = "file",required = false) MultipartFile file) {
|
|
|
+ public RT<Long> update(UpdateFaceManagementDto dto, @RequestParam(name = "file",required = false) MultipartFile file) {
|
|
|
String filename = file.getOriginalFilename();
|
|
|
String suffix = StringUtils.substringAfterLast(filename, StringPool.DOT);
|
|
|
String[] imgSuffix = new String[]{"png", "jpg", "jpeg"};
|
|
@@ -208,7 +208,8 @@ public class FaceManagementController {
|
|
|
dto.setFileId(imageVo.getFolderId());
|
|
|
FaceManagement faceManagement = BeanUtil.toBean(dto, FaceManagement.class);
|
|
|
faceManagement.setRegisterBase64(map.get(suffix) + imageVo.getBase64());
|
|
|
- return RT.ok(faceManagementService.update(faceManagement));
|
|
|
+ faceManagementService.update(faceManagement);
|
|
|
+ return RT.ok(imageVo.getFolderId());
|
|
|
|
|
|
}
|
|
|
|