提交 5ce0b3ce 编写于 作者: M MaxKey

REST search API default InstId

上级 b05f8f7e
......@@ -19,6 +19,7 @@ package org.maxkey.web.apis.identity.rest;
import java.io.IOException;
import org.apache.commons.lang3.StringUtils;
import org.apache.mybatis.jpa.persistence.JpaPageResults;
import org.maxkey.entity.Message;
import org.maxkey.entity.Organizations;
......@@ -100,6 +101,9 @@ public class RestOrganizationController {
@RequestMapping(value = { "/.search" }, produces = {MediaType.APPLICATION_JSON_VALUE})
@ResponseBody
public ResponseEntity<?> search(@ModelAttribute Organizations org) {
if(StringUtils.isBlank(org.getInstId())){
org.setInstId("1");
}
_logger.debug("Organizations {}" , org);
return new Message<JpaPageResults<Organizations>>(
organizationsService.queryPageResults(org)).buildResponse();
......
......@@ -19,6 +19,7 @@ package org.maxkey.web.apis.identity.rest;
import java.io.IOException;
import org.apache.commons.lang3.StringUtils;
import org.apache.mybatis.jpa.persistence.JpaPageResults;
import org.maxkey.entity.ChangePassword;
import org.maxkey.entity.Message;
......@@ -123,7 +124,10 @@ public class RestUserInfoController {
@RequestMapping(value = { "/.search" }, produces = {MediaType.APPLICATION_JSON_VALUE})
@ResponseBody
public ResponseEntity<?> search(@ModelAttribute UserInfo userInfo) {
_logger.debug("UserInfo {}"+userInfo);
_logger.debug("UserInfo {}",userInfo);
if(StringUtils.isBlank(userInfo.getInstId())){
userInfo.setInstId("1");
}
return new Message<JpaPageResults<UserInfo>>(
userInfoService.queryPageResults(userInfo)).buildResponse();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册