|
@@ -9,6 +9,7 @@ import com.diagbot.enums.ScaleTypeEnum;
|
|
|
import com.diagbot.exception.CommonErrorCode;
|
|
|
import com.diagbot.exception.CommonException;
|
|
|
import com.diagbot.service.impl.ScaleContentServiceImpl;
|
|
|
+import com.diagbot.util.RespDTOUtil;
|
|
|
import com.diagbot.vo.PushVO;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Component;
|
|
@@ -36,7 +37,7 @@ public class ScaleContentFacade extends ScaleContentServiceImpl {
|
|
|
public List<ScaleContent> getContent(PushVO pushVO) {
|
|
|
SearchData searchData = pushFacade.assembleData(pushVO);
|
|
|
RespDTO<List<ScaleContent>> res = aiptServiceClient.getScale(searchData);
|
|
|
- if (res == null || !CommonErrorCode.OK.getCode().equals(res.code)) {
|
|
|
+ if (RespDTOUtil.respIsNG(res)) {
|
|
|
throw new CommonException(CommonErrorCode.RPC_ERROR, "远程调用量表内容失败");
|
|
|
}
|
|
|
return res.data;
|