|
@@ -1,6 +1,7 @@
|
|
|
package com.platform.service.impl;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.platform.entity.Result;
|
|
|
import com.platform.enums.ResultCodeEnum;
|
|
|
import com.platform.exception.CommonBaseException;
|
|
|
import com.platform.vos.RequestScene;
|
|
@@ -58,7 +59,7 @@ public class ZhiHouseService {
|
|
|
if(responseEntity.getStatusCode()!= HttpStatus.OK){
|
|
|
throw new CommonBaseException(ResultCodeEnum.D100,"连接失败");
|
|
|
}
|
|
|
- if (responseEntity.getBody().getCode() != 200) {
|
|
|
+ if (responseEntity.getBody().getCode() != Result.CODE_SUCCESS) {
|
|
|
throw new CommonBaseException(ResultCodeEnum.D100,responseEntity.getBody().getError());
|
|
|
}
|
|
|
|
|
@@ -78,7 +79,7 @@ public class ZhiHouseService {
|
|
|
if(responseEntity.getStatusCode()!= HttpStatus.OK){
|
|
|
throw new CommonBaseException(ResultCodeEnum.D100);
|
|
|
}
|
|
|
- if (responseEntity.getBody().getCode() != 200) {
|
|
|
+ if (responseEntity.getBody().getCode() != Result.CODE_SUCCESS) {
|
|
|
throw new CommonBaseException(ResultCodeEnum.D100,responseEntity.getBody().getError());
|
|
|
}
|
|
|
return responseEntity.getBody();
|
|
@@ -96,7 +97,7 @@ public class ZhiHouseService {
|
|
|
if(responseEntity.getStatusCode()!= HttpStatus.OK){
|
|
|
throw new CommonBaseException(ResultCodeEnum.D100);
|
|
|
}
|
|
|
- if (responseEntity.getBody().getCode() != 200) {
|
|
|
+ if (responseEntity.getBody().getCode() != Result.CODE_SUCCESS) {
|
|
|
throw new CommonBaseException(ResultCodeEnum.D100,responseEntity.getBody().getError());
|
|
|
}
|
|
|
//把信息封装为json
|
|
@@ -120,7 +121,7 @@ public class ZhiHouseService {
|
|
|
if(responseEntity.getStatusCode()!= HttpStatus.OK){
|
|
|
throw new CommonBaseException(ResultCodeEnum.D100);
|
|
|
}
|
|
|
- if (responseEntity.getBody().getCode() != 200) {
|
|
|
+ if (responseEntity.getBody().getCode() != Result.CODE_SUCCESS) {
|
|
|
throw new CommonBaseException(ResultCodeEnum.D100,responseEntity.getBody().getError());
|
|
|
}
|
|
|
}
|