| | |
| | | import org.springblade.modules.system.excel.*; |
| | | import org.springblade.modules.system.node.TreeNode; |
| | | import org.springblade.modules.system.service.*; |
| | | import org.springblade.modules.system.vo.UserInfoDetail; |
| | | import org.springblade.modules.system.vo.UserVO; |
| | | import org.springblade.modules.system.wrapper.UserWrapper; |
| | | import org.springblade.modules.training.entity.TrainingRegistration; |
| | |
| | | |
| | | //返回 |
| | | return R.success("成功"); |
| | | } |
| | | |
| | | /** |
| | | * 微信注册 |
| | | * @param user |
| | | * @return |
| | | */ |
| | | @PostMapping("/wxRegister") |
| | | public R wxRegister(User user){ |
| | | //密码加密 |
| | | if (Func.isNotEmpty(user.getPassword())) { |
| | | user.setPassword(DigestUtil.encrypt(user.getPassword())); |
| | | } |
| | | |
| | | Boolean result = userService.wxRegister(user); |
| | | return R.status(result); |
| | | } |
| | | |
| | | /** |
| | |
| | | return R.success("操作成功"); |
| | | } |
| | | |
| | | // /** |
| | | // * 导出用户 |
| | | // */ |
| | | // @GetMapping("export-user") |
| | | // @ApiOperationSupport(order = 13) |
| | | // @ApiOperation(value = "导出用户", notes = "传入user") |
| | | // public void exportUser(@ApiIgnore @RequestParam Map<String, Object> user, BladeUser bladeUser, HttpServletResponse response) { |
| | | /** |
| | | * 导出用户 |
| | | */ |
| | | @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()); |
| | | // } |
| | | // queryWrapper.lambda().eq(User::getIsDeleted, BladeConstant.DB_NOT_DELETED); |
| | | // List<UserExcel> list = userService.exportUser(queryWrapper); |
| | | // ExcelUtil.export(response, "用户数据" + DateUtil.time(), "用户数据表", list, UserExcel.class); |
| | | // } |
| | | List<UserExcel> list = userService.exportUser(user); |
| | | ExcelUtil.export(response, "用户数据" + DateUtil.time(), "用户数据表", list, UserExcel.class); |
| | | } |
| | | |
| | | |
| | | /** |
| | |
| | | public R dataHandler() { |
| | | return R.data(userService.dataHandler()); |
| | | } |
| | | |
| | | |
| | | //获取用户表和用户详情表的信息 |
| | | @GetMapping("/getUserInfoDetail") |
| | | public R getUserInfoDetail(String id){ |
| | | UserInfoDetail userInfoDetail = userService.getUserInfoDetail(id); |
| | | return R.data(userInfoDetail); |
| | | } |
| | | |
| | | @PostMapping("/batchAudit") |
| | | public R batchAudit(String ids,String auditStatus){ |
| | | boolean result = userService.batchAudit(ids,auditStatus); |
| | | return R.status(result); |
| | | } |
| | | |
| | | |
| | | } |