Commit 9ba9446f by lzy

空指针

parent 8fe7fbd9
......@@ -56,9 +56,11 @@ public class DemoProductDeviceService extends DemoCommonService {
try {
DemoResponseMessage responseMessage = sendPost(url, request);
if (responseMessage.getRetcode() == 0) {
if(responseMessage.getData() != null){
DemoDeviceEntity demoDeviceEntities = JSON.parseObject(responseMessage.getData().toString(),DemoDeviceEntity.class);
return demoDeviceEntities;
}
}
log.error("获取设备接口失败:{}", responseMessage.getMsg());
} catch (IOException e) {
log.error("调用:{}接口异常:{}", url, e.getMessage());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment