| | |
| | | @GetMapping("export-user") |
| | | @ApiOperationSupport(order = 13) |
| | | @ApiOperation(value = "导出用户", notes = "传入user") |
| | | public void exportUser(@ApiIgnore @RequestParam Map<String, Object> user, BladeUser bladeUser, HttpServletResponse response) { |
| | | QueryWrapper<User> queryWrapper = Condition.getQueryWrapper(user, User.class); |
| | | if (!AuthUtil.isAdministrator()) { |
| | | queryWrapper.lambda().eq(User::getTenantId, bladeUser.getTenantId()); |
| | | public void exportUser(@ApiIgnore @RequestParam Map<String, String> user, BladeUser bladeUser, HttpServletResponse response) { |
| | | // QueryWrapper<User> queryWrapper = Condition.getQueryWrapper(user, User.class); |
| | | User users = new User(); |
| | | if (user.get("realName")!=null&&!user.get("realName").equals("")){ |
| | | users.setRealName(user.get("realName").trim()); |
| | | } |
| | | queryWrapper.lambda().eq(User::getIsDeleted, BladeConstant.DB_NOT_DELETED); |
| | | List<UserExcel> list = userService.exportUser(queryWrapper); |
| | | if (user.get("jurisdiction")!=null&&!user.get("jurisdiction").equals("")){ |
| | | users.setJurisdiction(user.get("jurisdiction").trim()); |
| | | } |
| | | if (user.get("workjurisdiction")!=null&&!user.get("workjurisdiction").equals("")){ |
| | | users.setWorkjurisdiction(user.get("workjurisdiction").trim()); |
| | | } |
| | | |
| | | // if (!AuthUtil.isAdministrator()) { |
| | | // queryWrapper.lambda().eq(User::getTenantId, bladeUser.getTenantId()); |
| | | // } |
| | | // queryWrapper.lambda().eq(User::getIsDeleted, BladeConstant.DB_NOT_DELETED); |
| | | List<UserExcel> list = userService.exportUser(users); |
| | | ExcelUtil.export(response, "用户数据" + DateUtil.time(), "用户数据表", list, UserExcel.class); |
| | | } |
| | | |