Commit e5cb83fecb0320b574dbe157b7d0f6adccaa1fbe
1 parent
af84b11004
Exists in
master
and in
1 other branch
platform permission
add return pageinfo
Showing 3 changed files with 12 additions and 3 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BasicConfigController.java
View file @
e5cb83f
... | ... | @@ -5,6 +5,8 @@ |
5 | 5 | |
6 | 6 | import javax.validation.Valid; |
7 | 7 | |
8 | +import com.lyms.platform.common.constants.ErrorCodeConstants; | |
9 | +import com.lyms.platform.operate.web.result.FrontEndResult; | |
8 | 10 | import org.springframework.beans.factory.annotation.Autowired; |
9 | 11 | import org.springframework.http.MediaType; |
10 | 12 | import org.springframework.stereotype.Controller; |
... | ... | @@ -46,8 +48,9 @@ |
46 | 48 | */ |
47 | 49 | @RequestMapping(method = RequestMethod.GET, value = "/basicConfig") |
48 | 50 | @ResponseBody |
49 | - public BaseListResponse queryBasicConfig(@Valid BasicConfigQueryRequest basicConfigQueryRequest) { | |
50 | - return basicConfigFacade.findBasicConfigList(basicConfigQueryRequest); | |
51 | + public FrontEndResult queryBasicConfig(@Valid BasicConfigQueryRequest basicConfigQueryRequest) { | |
52 | + BaseListResponse baseListResponse = basicConfigFacade.findBasicConfigList(basicConfigQueryRequest); | |
53 | + return FrontEndResult.ini().setData(baseListResponse.getData()).setPageInfo(basicConfigQueryRequest.getPageInfo()).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); | |
51 | 54 | } |
52 | 55 | |
53 | 56 | /** |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BasicConfigFacade.java
View file @
e5cb83f
... | ... | @@ -47,6 +47,11 @@ |
47 | 47 | dataList.add(basicConfigResult); |
48 | 48 | } |
49 | 49 | } |
50 | + basicConfigQueryRequest.setCount(basicConfigQuery.getCount()); | |
51 | + basicConfigQueryRequest.setLimit(basicConfigQuery.getLimit()); | |
52 | + basicConfigQueryRequest.setPage(basicConfigQuery.getPage()); | |
53 | + basicConfigQueryRequest.setLastPage(basicConfigQuery.getLastPage()); | |
54 | + | |
50 | 55 | return new BaseListResponse().setData(dataList).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); |
51 | 56 | } |
52 | 57 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BasicConfigQueryRequest.java
View file @
e5cb83f
... | ... | @@ -2,6 +2,7 @@ |
2 | 2 | |
3 | 3 | import com.lyms.platform.common.core.annotation.form.Form; |
4 | 4 | import com.lyms.platform.common.core.annotation.form.FormParam; |
5 | +import com.lyms.platform.common.dao.BaseQuery; | |
5 | 6 | |
6 | 7 | /** |
7 | 8 | * 基础项查询对象封装 |
... | ... | @@ -10,7 +11,7 @@ |
10 | 11 | * |
11 | 12 | */ |
12 | 13 | @Form |
13 | -public class BasicConfigQueryRequest extends BasePageQueryRequest { | |
14 | +public class BasicConfigQueryRequest extends BaseQuery { | |
14 | 15 | /** |
15 | 16 | * |
16 | 17 | */ |