Commit a95a6b61 by guojuxing

装修页面默认数据添加之前判断是否采用了默认数据

parent 8297db8e
......@@ -71,7 +71,9 @@ public class CustomPageController {
ServiceResponse<AppletCustomPageDTO> defaultPage = appletCustomPageApiService.getDefault(params.getPageType());
if (CollectionUtils.isNotEmpty(list)) {
if (defaultPage.isSuccess()) {
list.add(0, defaultPage.getResult());
if (!list.stream().anyMatch(e -> e.getEnterpriseId() == -1)) {
list.add(0, defaultPage.getResult());
}
} else {
return RestResponse.failure(defaultPage.getCode(), defaultPage.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 to comment