Commit e1b7531400b7c8c43b6cb346df7ac2120a97e73a
1 parent
2ce3bb67d4
Exists in
master
and in
6 other branches
id调整
Showing 2 changed files with 8 additions and 1 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BaseServiceImpl.java
View file @
e1b7531
... | ... | @@ -37,6 +37,13 @@ |
37 | 37 | |
38 | 38 | @Override |
39 | 39 | public <T> PageResult findMongoPage(Class<T> entity, Query query, Integer page, Integer limit) { |
40 | + if(page == null) { | |
41 | + page = 1; | |
42 | + } | |
43 | + if(limit == null) { | |
44 | + limit = 15; | |
45 | + } | |
46 | + | |
40 | 47 | Long count = mongoTemplate.count(query, entity); |
41 | 48 | query.skip((page - 1) * limit); |
42 | 49 | query.limit(limit); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PlantformConfigServiceImpl.java
View file @
e1b7531
... | ... | @@ -50,7 +50,7 @@ |
50 | 50 | List<Map<String, Object>> restList = new ArrayList<>(); |
51 | 51 | for (PlantformConfigModel configModel : configModels) { |
52 | 52 | Map<String, Object> tempMap = new HashMap<>(); |
53 | - tempMap.put("id", configModel.getId()); | |
53 | + tempMap.put("id", configModel.getId().toString()); | |
54 | 54 | tempMap.put("name", configModel.getValue()); |
55 | 55 | tempMap.put("date", DateUtil.getyyyy_MM_dd_hms(configModel.getCreateDate())); |
56 | 56 | restList.add(tempMap); |