Commit ea4f2518 authored by tangwei's avatar tangwei

修改分页接口

parent 14089f96
...@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject; ...@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams; import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.constants.CommonConstant; import com.yeejoin.amos.boot.biz.common.constants.CommonConstant;
import com.yeejoin.amos.boot.biz.common.controller.BaseController; import com.yeejoin.amos.boot.biz.common.controller.BaseController;
...@@ -14,6 +15,7 @@ import com.yeejoin.amos.boot.module.common.api.dto.*; ...@@ -14,6 +15,7 @@ import com.yeejoin.amos.boot.module.common.api.dto.*;
import com.yeejoin.amos.boot.module.common.api.entity.OrgUsr; import com.yeejoin.amos.boot.module.common.api.entity.OrgUsr;
import com.yeejoin.amos.boot.module.common.api.excel.ExcelUtil; import com.yeejoin.amos.boot.module.common.api.excel.ExcelUtil;
import com.yeejoin.amos.boot.module.common.api.mapper.OrgUsrMapper; import com.yeejoin.amos.boot.module.common.api.mapper.OrgUsrMapper;
import com.yeejoin.amos.boot.module.common.biz.service.impl.ESOrgUserServicempl;
import com.yeejoin.amos.boot.module.common.biz.service.impl.FireCompanyInfoServiceImpl; import com.yeejoin.amos.boot.module.common.biz.service.impl.FireCompanyInfoServiceImpl;
import com.yeejoin.amos.boot.module.common.biz.service.impl.OrgUsrServiceImpl; import com.yeejoin.amos.boot.module.common.biz.service.impl.OrgUsrServiceImpl;
import com.yeejoin.amos.component.feign.model.FeignClientResult; import com.yeejoin.amos.component.feign.model.FeignClientResult;
...@@ -62,6 +64,9 @@ public class OrgPersonController extends BaseController { ...@@ -62,6 +64,9 @@ public class OrgPersonController extends BaseController {
FireCompanyInfoServiceImpl fireCompanyInfoServiceImpl; FireCompanyInfoServiceImpl fireCompanyInfoServiceImpl;
@Autowired @Autowired
OrgUsrMapper orgUsrMapper; OrgUsrMapper orgUsrMapper;
@Autowired
ESOrgUserServicempl esOrgUserServicempl;
/** /**
* 新增人员信息 * 新增人员信息
* *
...@@ -211,9 +216,9 @@ public class OrgPersonController extends BaseController { ...@@ -211,9 +216,9 @@ public class OrgPersonController extends BaseController {
* @return * @return
*/ */
@TycloudOperation( ApiLevel = UserType.AGENCY) @TycloudOperation( ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/list", method = RequestMethod.GET) @RequestMapping(value = "/list_old", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "列表分页查询", notes = "列表分页查询") @ApiOperation(httpMethod = "GET", value = "列表分页查询", notes = "列表分页查询")
public ResponseModel<Object> listPage(@RequestParam Map<String, Object> requestBody) { public ResponseModel<Object> listPageold(@RequestParam Map<String, Object> requestBody) {
// if(redisUtils.get("userList") != null){ // if(redisUtils.get("userList") != null){
// return ResponseHelper.buildResponse(redisUtils.get("userList")); // return ResponseHelper.buildResponse(redisUtils.get("userList"));
// } // }
...@@ -238,6 +243,17 @@ public class OrgPersonController extends BaseController { ...@@ -238,6 +243,17 @@ public class OrgPersonController extends BaseController {
return ResponseHelper.buildResponse(mapIPage); return ResponseHelper.buildResponse(mapIPage);
} }
@TycloudOperation( ApiLevel = UserType.AGENCY, needAuth = false)
@RequestMapping(value = "/list", method = RequestMethod.GET)
@ApiOperation(httpMethod = "POST", value = "列表分页查询", notes = "列表分页查询")
public ResponseModel<Page<ESOrgUser>> listPage(@RequestParam Map<String, Object> requestBody) {
Page<ESOrgUser> pa= esOrgUserServicempl.listPage(requestBody,Integer.valueOf(requestBody.get("pageNum").toString()),Integer.valueOf(requestBody.get("pageSize").toString()));
return ResponseHelper.buildResponse(pa);
}
/** /**
* 根据当前登陆人获取站内所有人员信息 (表单使用) * 根据当前登陆人获取站内所有人员信息 (表单使用)
* *
...@@ -559,7 +575,7 @@ public class OrgPersonController extends BaseController { ...@@ -559,7 +575,7 @@ public class OrgPersonController extends BaseController {
} }
return orgUsrs; return orgUsrs;
} }
/** /**
* 根据ids查询多人员信息 * 根据ids查询多人员信息
* @param ids * @param ids
......
...@@ -118,7 +118,7 @@ public interface JcsFeign { ...@@ -118,7 +118,7 @@ public interface JcsFeign {
* *
* @return * @return
*/ */
@RequestMapping(value = "/org-person/getPersonByUserId/{userId}", method = RequestMethod.GET, consumes = "application/json") @RequestMapping(value = "//getPersonByUserId/{userId}", method = RequestMethod.GET, consumes = "application/json")
ResponseModel<JSONObject> getPersonByUserId( ResponseModel<JSONObject> getPersonByUserId(
@RequestHeader("appKey") String appKey, @RequestHeader("appKey") String appKey,
@RequestHeader("product") String product, @RequestHeader("product") String product,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment