wang-hao-jie
2022-01-06 83e111cb2c6d9ed755bca23df293e412bfa49ebb
xboot-modules/xboot-base/src/main/java/cn/exrick/xboot/base/controller/manage/UserController.java
@@ -528,4 +528,17 @@
            throw new XbootException("该手机号已被注册");
        }
    }
    @RequestMapping(value = "/findByType2", method = RequestMethod.GET)
    @ApiOperation(value = "获取全部用户数据")
    public Result<List<User>> findByType2(int type) {
        List<User> list = userService.findByType2(type);
        // 清除持久上下文环境 避免后面语句导致持久化
        entityManager.clear();
        for (User u : list) {
            u.setPassword(null);
        }
        return new ResultUtil<List<User>>().setData(list);
    }
}