|
@@ -108,10 +108,21 @@ public class HagContentServiceImpl implements HagContentService {
|
|
|
return fillFailResp("400","deviceId为空");
|
|
|
}
|
|
|
HagSkillReq.HagInquire inquire = skillReq.getInquire();
|
|
|
+ if (Objects.isNull(inquire.getIntent())) {
|
|
|
+ return fillFailResp("400","intent为空");
|
|
|
+ }
|
|
|
HagSkillReq.HagInquire.Intent.Slots slots = inquire.getIntent().getSlots();
|
|
|
+ if (Objects.isNull(slots)) {
|
|
|
+ return fillFailResp("400","slots为空");
|
|
|
+ }
|
|
|
HagSkillReq.HagInquire.Intent.Slots.ContentCode albumCode = slots.getAlbumCode();
|
|
|
+ if (Objects.isNull(albumCode)) {
|
|
|
+ return fillFailResp("400","albumCode为空");
|
|
|
+ }
|
|
|
HagSkillReq.HagInquire.Intent.Slots.ContentCode contentCode = slots.getContentCode();
|
|
|
-
|
|
|
+ if (Objects.isNull(contentCode)) {
|
|
|
+ return fillFailResp("400","contentCode为空");
|
|
|
+ }
|
|
|
List<HagSkillReq.HagInquire.Intent.Slots.ContentCode.Value> values = contentCode.getValues();
|
|
|
if (CollectionUtils.isEmpty(values)) {
|
|
|
return fillFailResp("400","contentCode为空");
|
|
@@ -123,8 +134,6 @@ public class HagContentServiceImpl implements HagContentService {
|
|
|
return fillFailResp("404","媒资数据未找到");
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
return fillSuccessResp(hagContent.getUrl());
|
|
|
}
|
|
|
|