|
@@ -2,20 +2,25 @@ package com.hssx.cloudmodel.controller;
|
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
+import com.github.pagehelper.PageHelper;
|
|
|
+import com.github.pagehelper.PageInfo;
|
|
|
import com.hssx.cloudmodel.entity.Role;
|
|
|
import com.hssx.cloudmodel.entity.SysUser;
|
|
|
import com.hssx.cloudmodel.service.RoleService;
|
|
|
import com.hssx.cloudmodel.util.HttpRespMsg;
|
|
|
+import com.hssx.cloudmodel.util.PageUtil;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
|
+import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
+import java.util.List;
|
|
|
|
|
|
/**
|
|
|
* <p>
|
|
@@ -75,12 +80,10 @@ public class RoleController {
|
|
|
@ApiOperation("角色列表")
|
|
|
@RequestMapping("/list")
|
|
|
@ResponseBody
|
|
|
- public HttpRespMsg deleteRole(String keyName, HttpServletRequest request,
|
|
|
- HttpServletResponse response) {
|
|
|
+ public HttpRespMsg deleteRole(@RequestParam(required = false) String keyName, HttpServletRequest request,
|
|
|
+ HttpServletResponse response, PageUtil page) {
|
|
|
HttpRespMsg msg = new HttpRespMsg();
|
|
|
- QueryWrapper<Role> qw = new QueryWrapper<>();
|
|
|
- qw.like("role_name",keyName);
|
|
|
- msg.data = roleService.list(qw);
|
|
|
+ msg = roleService.pageList(page,keyName);
|
|
|
return msg;
|
|
|
}
|
|
|
}
|