添加人像库处理算法端返回结果代码调整
This commit is contained in:
		
							parent
							
								
									0a4da40b6b
								
							
						
					
					
						commit
						bd9f27dc09
					
				| @ -73,18 +73,18 @@ public class FaceLibraryServiceImpl extends ServiceImpl<FaceLibraryMapper, FaceL | |||||||
|             FaceLibraryVO faceLibraryVO = new FaceLibraryVO(); |             FaceLibraryVO faceLibraryVO = new FaceLibraryVO(); | ||||||
|             faceLibraryVO.setLibraryId(faceLibrary.getIdFactory().toString()); |             faceLibraryVO.setLibraryId(faceLibrary.getIdFactory().toString()); | ||||||
|             faceLibraryVO.setName(faceLibrary.getFactoryName()); |             faceLibraryVO.setName(faceLibrary.getFactoryName()); | ||||||
|             String result = (String) httpUtil.post(link + ApiUrlEnum.FACELIB_POSTURL.getUrl(), faceLibraryVO, String.class); |             ApiVO faceLibrary1 = (ApiVO) httpUtil.post(link + ApiUrlEnum.FACELIB_POSTURL.getUrl(), faceLibraryVO, ApiVO.class); | ||||||
|             if(! result.equals("ok")){ |             if (! faceLibrary1.getCode().equals(200)) { | ||||||
|                 throw new DkException("算法端新增库失败"); |                 throw new DkException("算法端新增库失败, " + faceLibrary1.getMessage()); | ||||||
|             } |             } | ||||||
|             int insert = faceLibraryMapper.insert(faceLibrary); |             int insert = faceLibraryMapper.insert(faceLibrary); | ||||||
|             if(insert<0){ |             if(insert<0){ | ||||||
|                 throw new DkException("MySQL新增库失败"); |                 throw new DkException("MySQL新增库失败"); | ||||||
|             } |             } | ||||||
|  |             return faceLibrary; | ||||||
|         }catch (Exception e){ |         }catch (Exception e){ | ||||||
|             throw new DkException("新增库失败"+e.getMessage()); |             throw new DkException("新增库失败"+e.getMessage()); | ||||||
|         } |         } | ||||||
|         return faceLibrary; |  | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     @Override |     @Override | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user