郑永安
2023-06-19 451e341df739f387201914b67323efa1c4f4c8d3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package com.ruoyi.web.controller.system;
 
import com.github.pagehelper.PageInfo;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.system.service.ISysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
@RestController
public class MyUserController {
 
    @Autowired
    ISysUserService userService;
 
    @RequestMapping("/wisdom/user")
    public AjaxResult getUserList(String searchusername, String searchname) {
        SysUser sysUser = new SysUser();
        sysUser.setUserName(searchusername);
        sysUser.setNickName(searchname);
 
        PageInfo pageInfo = new PageInfo(userService.selectUserList(sysUser));
        return AjaxResult.success(pageInfo);
 
    }
 
    @RequestMapping("/wisdom/getUSerById")
    public AjaxResult getUser(Long userId){
        return AjaxResult.success(userService.selectUserById(userId));
    }
}