XiaoRuby
2023-08-26 8f8ba3c62d6fc9f4733a408daf59a5badd82e5e2
user-server/src/main/java/com/yuanchu/limslaboratory/controller/UserController.java
@@ -4,18 +4,15 @@
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yuanchu.limslaboratory.clients.UserLoginUtils;
import com.yuanchu.limslaboratory.pojo.Enterprise;
import com.yuanchu.limslaboratory.pojo.User;
import com.yuanchu.limslaboratory.service.UserService;
import com.yuanchu.limslaboratory.shiro.realm.ShiroRealm;
import com.yuanchu.limslaboratory.utils.JackSonUtil;
import com.yuanchu.limslaboratory.utils.MyUtil;
import com.yuanchu.limslaboratory.utils.RedisUtil;
import com.yuanchu.limslaboratory.utils.SpringUtil;
import com.yuanchu.limslaboratory.vo.NewPersonnelVo;
import com.yuanchu.limslaboratory.vo.PagePersonnelVo;
import com.yuanchu.limslaboratory.pojo.vo.NewPersonnelVo;
import com.yuanchu.limslaboratory.vo.Result;
import com.yuanchu.limslaboratory.vo.UpdatePersonnelVo;
import com.yuanchu.limslaboratory.pojo.vo.UpdatePersonnelVo;
import io.swagger.annotations.*;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authc.IncorrectCredentialsException;
@@ -135,10 +132,11 @@
    @ApiImplicitParams(value = {
            @ApiImplicitParam(name = "pageNo", value = "起始页", dataTypeClass = Integer.class, required = true),
            @ApiImplicitParam(name = "pageSize", value = "每一页数量", dataTypeClass = Integer.class, required = true),
            @ApiImplicitParam(name = "name", value = "人员名称", dataTypeClass = String.class)
            @ApiImplicitParam(name = "name", value = "人员名称", dataTypeClass = String.class),
            @ApiImplicitParam(name = "status", value = "在职状态", dataTypeClass = Integer.class)
    })
    public Result<Map<String, Object>> getNewPersonnelPage(Integer pageNo, Integer pageSize, String name) {
        IPage<PagePersonnelVo> PageList = userService.getNewPersonnelPage(name, new Page<Objects>(pageNo, pageSize));
    public Result<Map<String, Object>> getNewPersonnelPage(Integer pageNo, Integer pageSize, String name, Integer status) {
        IPage<Map<String, Object>> PageList = userService.getNewPersonnelPage(name, new Page<Objects>(pageNo, pageSize), status);
        Map<String, Object> map = new HashMap<>();
        map.put("row", PageList.getRecords());
        map.put("total", PageList.getTotal());