去掉分账
This commit is contained in:
		| @ -24,6 +24,7 @@ import java.io.IOException; | ||||
| import java.nio.file.Files; | ||||
| import java.nio.file.Path; | ||||
| import java.nio.file.Paths; | ||||
| import java.util.HashMap; | ||||
| import java.util.List; | ||||
| import java.util.Map; | ||||
| import java.util.Random; | ||||
| @ -44,11 +45,13 @@ public class FaceController { | ||||
|  | ||||
|  | ||||
|     @PostMapping("/register") | ||||
|     public CommonResult<String> faceAdd(SaveDto saveDto) { | ||||
|     public CommonResult<Map<String,String>> faceAdd(SaveDto saveDto) { | ||||
|         Map<String,String> result = new HashMap<>(); | ||||
|  | ||||
|         log.info("添加人脸特征值到数据库"); | ||||
| //        生成雪花id | ||||
|         long nextId = IdUtil.getSnowflake().nextId(); | ||||
|         CommonResult<String> httpResult = CommonResult.success("成功"); | ||||
|         CommonResult<Map<String,String>> httpResult = new CommonResult<>(); | ||||
|         MultipartFile file = saveDto.getFile(); | ||||
|         if (file.isEmpty()) { | ||||
|             httpResult.setMsg("文件为空"); | ||||
| @ -70,8 +73,9 @@ public class FaceController { | ||||
|             userById.setUrl(imagePath); | ||||
|             faceService.getBaseMapper().updateById(userById); | ||||
|         } | ||||
|  | ||||
|         httpResult.setData(String.valueOf(nextId)); | ||||
|         result.put("faceId", String.valueOf(nextId)); | ||||
|         result.put("faceUrl", imagePath); | ||||
|         httpResult.setData(result); | ||||
|         return httpResult; | ||||
|     } | ||||
|  | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 seesaw
					seesaw