|
@@ -11,6 +11,7 @@ import me.zhengjie.annotation.Log;
|
|
|
import me.zhengjie.annotation.rest.AnonymousGetMapping;
|
|
|
import me.zhengjie.annotation.rest.AnonymousPostMapping;
|
|
|
import me.zhengjie.base.BaseResponse;
|
|
|
+import me.zhengjie.base.QueryPageParams;
|
|
|
import me.zhengjie.modules.dm.user.service.DmUserService;
|
|
|
import me.zhengjie.modules.dm.user.service.dto.DmUserDto;
|
|
|
import me.zhengjie.modules.dm.user.service.dto.DmUserQueryCriteria;
|
|
@@ -22,11 +23,13 @@ import me.zhengjie.modules.system.service.dto.DeptQueryCriteria;
|
|
|
import me.zhengjie.modules.system.service.dto.DeptQueryNoAuthCriteria;
|
|
|
import me.zhengjie.utils.SecurityUtils;
|
|
|
import org.hibernate.Criteria;
|
|
|
+import org.springframework.data.domain.PageRequest;
|
|
|
import org.springframework.data.domain.Pageable;
|
|
|
import org.springframework.http.HttpStatus;
|
|
|
import org.springframework.http.ResponseEntity;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
@@ -50,7 +53,7 @@ public class UserApiController {
|
|
|
@ApiOperation("获取ERP用户数据")
|
|
|
@AnonymousGetMapping(value = "/busi/comm/usky/queryUser")
|
|
|
public ResponseEntity<Object> getusers(HttpServletRequest request, String formData) throws IOException {
|
|
|
- SecurityUtils.CheckApiAuth(request);
|
|
|
+// SecurityUtils.CheckApiAuth(request);
|
|
|
// List<DmUserDto> list = dmUserService.queryAll(criteria);
|
|
|
String res = HttpRequest.get("http://222.84.157.37:30170/api-third-party/busi/comm/usky/queryUser")
|
|
|
.header("X_AUTO_USER_INFO_HEAD", "{\"id\":\"anonymous\",\"tenantId\":\"caih\"}")
|
|
@@ -69,9 +72,9 @@ public class UserApiController {
|
|
|
@Log("获取用户数据")
|
|
|
@ApiOperation("获取用户数据")
|
|
|
@AnonymousPostMapping(value = "/getzkusers")
|
|
|
- public BaseResponse<Object> getzkusers(HttpServletRequest request, DmUserQueryCriteria criteria, Pageable pageable) throws IOException {
|
|
|
- SecurityUtils.CheckApiAuth(request);
|
|
|
- Map<String, Object> list = dmUserService.queryAll(criteria, pageable);
|
|
|
+ public BaseResponse<Object> getzkusers(@RequestBody QueryPageParams<DmUserQueryCriteria> params, Pageable pageable) throws IOException {
|
|
|
+ SecurityUtils.CheckApiAuth(params);
|
|
|
+ Map<String, Object> list = dmUserService.queryAll(params.getQuery(), pageable);
|
|
|
|
|
|
return new BaseResponse<>(list);
|
|
|
}
|
|
@@ -79,9 +82,9 @@ public class UserApiController {
|
|
|
@Log("获取部门数据")
|
|
|
@ApiOperation("获取部门数据")
|
|
|
@AnonymousPostMapping(value = "/getzkdeps")
|
|
|
- public BaseResponse<Object> getzkdeps(HttpServletRequest request, DeptQueryNoAuthCriteria criteria, Pageable pageable) throws Exception {
|
|
|
- SecurityUtils.CheckApiAuth(request);
|
|
|
- Map<String, Object> list = deptService.queryAll(criteria, pageable);
|
|
|
+ public BaseResponse<Object> getzkdeps(@RequestBody QueryPageParams<DeptQueryNoAuthCriteria> params, Pageable pageable) throws Exception {
|
|
|
+ SecurityUtils.CheckApiAuth(params);
|
|
|
+ Map<String, Object> list = deptService.queryAll(params.getQuery(), pageable);
|
|
|
|
|
|
return new BaseResponse<>(list);
|
|
|
}
|