| 
				
				
					
				
				
				 | 
			
			 | 
			@@ -14,6 +14,7 @@ import com.iformall.service.ProductService; | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			import com.iformall.service.UserBasicImageService; | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			import com.iformall.sm.AiCheckPhotoParam; | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			import com.iformall.sm.AiCheckPhotoResult; | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			import com.iformall.sm.AiDigitalAvatarHelper; | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			import com.iformall.sm.AiVideoHelper; | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			import com.iformall.utils.Base64Util; | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			import io.swagger.annotations.Api; | 
		
		
	
	
		
			
				| 
				
					
				
				
					
				
				
				 | 
			
			 | 
			@@ -58,11 +59,12 @@ public class UserBasicImageController extends BaseController { | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        return new ResultData(); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    } | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
  | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    @AuthIgnore | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    @ApiOperation("图片人脸检测") | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    @PostMapping(value = "checkPhoto", consumes = "multipart/*", headers = "content-type=multipart/form-data") | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    @ApiImplicitParam(name = "file", value = "file", dataType = "MultipartFile", paramType = "query", required = true) | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    public ResultData checkPhoto(@RequestPart("file") MultipartFile file) { | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        logger.debug("[" + getIpAddr() + "] PersonPhotoController::checkPhoto"); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        logger.debug("[" + getIpAddr() + "] UserBasicImageController::checkPhoto"); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        if (ObjectUtils.isEmpty(file) || file.getSize() <= 0) { | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "素材为空"); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        } | 
		
		
	
	
		
			
				| 
				
				
				
					
				
				 | 
			
			 | 
			@@ -71,7 +73,7 @@ public class UserBasicImageController extends BaseController { | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            String imgStr = Base64Util.encode(fileBytes); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            AiCheckPhotoParam param = new AiCheckPhotoParam(); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            param.setImg(imgStr); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            AiCheckPhotoResult result = AiVideoHelper.checkPhoto(param); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            AiCheckPhotoResult result = AiDigitalAvatarHelper.checkPhoto(param); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            if (result.isSuccess()) { | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                return new ResultData(); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            } | 
		
		
	
	
		
			
				| 
				
					
				
				
				
				 | 
			
			 | 
			
  |