| | |
| | | //如果有人脸照片,处理人脸照片同步 |
| | | String faceid = dealMemberFace(c,path); |
| | | if(StringUtils.isBlank(faceid)){ |
| | | noticeErpFail(c,Constants.ZERO,"人脸信息更新失败,请检查人脸照片是否合法!"); |
| | | c.setHkStatus(Constants.TWO); |
| | | c.setFaceStatus(Constants.TWO); |
| | | c.setRemark("人脸信息更新失败,请检查人脸照片是否合法!!"+result.getMsg()); |
| | | noticeErpFail(c,Constants.ZERO,"人脸信息更新失败,请检查人脸照片是否合法!"); |
| | | }else{ |
| | | c.setFaceId(faceid); |
| | | c.setFaceStatus(Constants.ONE); |
| | |
| | | * @return |
| | | */ |
| | | public static String dealMemberFace(Member c,String path) { |
| | | if(StringUtils.isBlank(c.getFaceId())){ |
| | | BaseResponse<FaceAddOrEditesponse> response = HKService.addFace(getFaceAddModel(c,path)); |
| | | if(response !=null && StringUtils.equals(response.getCode(),HKConstants.RESPONSE_SUCCEE)&& response.getData()!=null ){ |
| | | return response.getData().getFaceId(); |
| | | } |
| | | }else{ |
| | | FaceEditRequest param =getFaceUpdateModel(c,path); |
| | | if(param !=null){ |
| | | BaseResponse response = HKService.editFace(param); |
| | | if(StringUtils.equals(response.getCode(),HKConstants.RESPONSE_SUCCEE) ){ |
| | | return c.getFaceId(); |
| | | try { |
| | | if(StringUtils.isBlank(c.getFaceId())){ |
| | | BaseResponse<FaceAddOrEditesponse> response = HKService.addFace(getFaceAddModel(c,path)); |
| | | if(response !=null && StringUtils.equals(response.getCode(),HKConstants.RESPONSE_SUCCEE)&& response.getData()!=null ){ |
| | | return response.getData().getFaceId(); |
| | | } |
| | | }else{ |
| | | FaceEditRequest param =getFaceUpdateModel(c,path); |
| | | if(param !=null){ |
| | | BaseResponse response = HKService.editFace(param); |
| | | if(response!=null && StringUtils.equals(response.getCode(),HKConstants.RESPONSE_SUCCEE) ){ |
| | | return c.getFaceId(); |
| | | } |
| | | } |
| | | } |
| | | }catch (Exception e){ |
| | | |
| | | } |
| | | |
| | | return null; |
| | | } |
| | | |