|
@@ -292,16 +292,13 @@ public class TaUserServiceImpl implements ITaUserService {
|
292
|
292
|
response.addError("号码已占用");
|
293
|
293
|
return response;
|
294
|
294
|
}
|
295
|
|
- String data=HKOpenApi.HKpersonPhone(user.getHkUserId(),user.getId(),user.getUserName(),phone);
|
296
|
|
- try {
|
297
|
|
- if (null == data) {
|
298
|
|
- throw new RuntimeException("海康人脸推送失敗!");
|
299
|
|
- }
|
300
|
|
- }catch (Exception e){
|
301
|
|
- e.printStackTrace();
|
302
|
|
- log.error("海康修改电话失敗! {}",e);
|
303
|
|
- throw new RuntimeException("海康修改电话失敗!");
|
304
|
|
- }
|
|
295
|
+ String data=HKOpenApi.HKpersonPhone(user.getHkUserId(),user.getHkPersonNo(),user.getUserName(),phone);
|
|
296
|
+ JSONObject jsonobject = JSONObject.parseObject(data);
|
|
297
|
+ int errorCode = jsonobject.getInteger("errorCode");
|
|
298
|
+ if (errorCode!=0){
|
|
299
|
+ response.addError("海康电话已存在,推送海康电话修改失败");
|
|
300
|
+ return response;
|
|
301
|
+ }
|
305
|
302
|
if(null!=codes && codes.equals(code)){;
|
306
|
303
|
TaUser taUser=new TaUser();
|
307
|
304
|
taUser.setLoginName(phone);
|