Commit db34e588b950cce7e3e8a59f2e694a2aa8d54565
1 parent
711da73a59
Exists in
master
and in
3 other branches
增加权限
Showing 2 changed files with 29 additions and 7 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BasicConfigFacade.java
View file @
db34e58
| ... | ... | @@ -32,13 +32,27 @@ |
| 32 | 32 | * @return 返回结果 |
| 33 | 33 | */ |
| 34 | 34 | public BaseListResponse findBasicConfigList(BasicConfigQueryRequest basicConfigQueryRequest) { |
| 35 | + | |
| 35 | 36 | BasicConfigQuery basicConfigQuery = new BasicConfigQuery(); |
| 36 | 37 | basicConfigQuery.setNeed("1"); |
| 37 | 38 | basicConfigQuery.setPage(basicConfigQueryRequest.getPage()); |
| 38 | 39 | basicConfigQuery.setLimit(basicConfigQueryRequest.getLimit()); |
| 39 | 40 | basicConfigQuery.setYn(YnEnums.YES.getId()); |
| 40 | 41 | basicConfigQuery.setKeyword(basicConfigQueryRequest.getKeywords()); |
| 42 | + basicConfigQuery.setParentId(basicConfigQueryRequest.getId()); | |
| 41 | 43 | List<BasicConfig> data = basicConfigService.queryBasicConfig(basicConfigQuery); |
| 44 | + | |
| 45 | + return new BaseListResponse().setData(buildResult(data)).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setPageInfo(basicConfigQuery.getPageInfo()); | |
| 46 | + } | |
| 47 | + | |
| 48 | +/* public BaseListResponse findByParentId(String id){ | |
| 49 | + BasicConfigQuery basicConfigQuery = new BasicConfigQuery(); | |
| 50 | + basicConfigQuery.setParentId(id); | |
| 51 | + List<BasicConfig> data = basicConfigService.queryBasicConfig(basicConfigQuery); | |
| 52 | + return new BaseListResponse().setData(buildResult(data)).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); | |
| 53 | + }*/ | |
| 54 | + | |
| 55 | + public List<BasicConfigResult> buildResult( List<BasicConfig> data){ | |
| 42 | 56 | List<BasicConfigResult> dataList = new ArrayList<>(); |
| 43 | 57 | if (CollectionUtils.isNotEmpty(data)) { |
| 44 | 58 | for (BasicConfig basicConfig : data) { |
| 45 | 59 | |
| ... | ... | @@ -47,13 +61,11 @@ |
| 47 | 61 | dataList.add(basicConfigResult); |
| 48 | 62 | } |
| 49 | 63 | } |
| 50 | - basicConfigQueryRequest.setCount(basicConfigQuery.getCount()); | |
| 51 | - basicConfigQueryRequest.setLimit(basicConfigQuery.getLimit()); | |
| 52 | - basicConfigQueryRequest.setPage(basicConfigQuery.getPage()); | |
| 53 | - basicConfigQueryRequest.setLastPage(basicConfigQuery.getLastPage()); | |
| 54 | - | |
| 55 | - return new BaseListResponse().setData(dataList).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); | |
| 64 | + return dataList; | |
| 56 | 65 | } |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 57 | 69 | |
| 58 | 70 | /** |
| 59 | 71 | * 修改一条基础项配置 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BasicConfigQueryRequest.java
View file @
db34e58
| ... | ... | @@ -19,7 +19,17 @@ |
| 19 | 19 | |
| 20 | 20 | @FormParam |
| 21 | 21 | private String keywords; |
| 22 | - | |
| 22 | + @FormParam | |
| 23 | + private String id; | |
| 24 | + | |
| 25 | + public String getId() { | |
| 26 | + return id; | |
| 27 | + } | |
| 28 | + | |
| 29 | + public void setId(String id) { | |
| 30 | + this.id = id; | |
| 31 | + } | |
| 32 | + | |
| 23 | 33 | public String getKeywords() { |
| 24 | 34 | return keywords; |
| 25 | 35 | } |