|
@@ -22,6 +22,7 @@ import javax.annotation.Resource;
|
|
|
import java.io.*;
|
|
|
import java.net.URLEncoder;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
+import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
@@ -45,6 +46,7 @@ public class SinglePageServiceImpl implements SinglePageService {
|
|
|
*/
|
|
|
@Override
|
|
|
public PageContent getFreePageById(Integer id) {
|
|
|
+ if (id == null) { return null;}
|
|
|
return singlePageDao.getFreePageById(id);
|
|
|
}
|
|
|
|
|
@@ -55,6 +57,7 @@ public class SinglePageServiceImpl implements SinglePageService {
|
|
|
*/
|
|
|
@Override
|
|
|
public PageContent getTopicPageById(Integer id) {
|
|
|
+ if (id == null) { return null;}
|
|
|
return singlePageDao.getTopicPageById(id);
|
|
|
}
|
|
|
|
|
@@ -73,6 +76,7 @@ public class SinglePageServiceImpl implements SinglePageService {
|
|
|
*/
|
|
|
@Override
|
|
|
public JsonModel<List<PageFloor>> getTopicDataById(Integer id) {
|
|
|
+ if (id == null) { return JsonModel.error("参数异常", null);}
|
|
|
List<PageFloor> pageFloors = singlePageDao.getFloorByPageId(id);
|
|
|
if (!CollectionUtils.isEmpty(pageFloors)) {
|
|
|
pageFloors.forEach(floor -> {
|