mirror of
https://gitee.com/dromara/MaxKey.git
synced 2026-05-14 12:32:09 +08:00
REST search API default InstId
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user