| | |
| | | import com.kidgrow.common.context.ClientContextHolder; |
| | | import com.kidgrow.common.model.*; |
| | | import com.kidgrow.common.utils.ExcelUtil; |
| | | import com.kidgrow.common.utils.StringUtils; |
| | | import com.kidgrow.log.annotation.AuditLog; |
| | | import com.kidgrow.searchcenter.client.service.IQueryService; |
| | | import com.kidgrow.searchcenter.model.LogicDelDto; |
| | |
| | | |
| | | /** |
| | | * 用户登录日志 |
| | | * |
| | | * @param sysUser |
| | | * @return |
| | | */ |
| | |
| | | // log.info("IP:"+request.getHeader(CommonConstant.USER_AGENT_IP)); |
| | | return appUserService.findUsers(params); |
| | | } |
| | | /** |
| | | * 获取医院科室下的所有有效的医生 |
| | | * @param hospitalId |
| | | * @param departmentId |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "用户查询列表") |
| | | @GetMapping("/users/HDoctorusers") |
| | | public ResultBody hospitalDoctorList(@RequestParam Long hospitalId, Long departmentId) { |
| | | if (StringUtils.isNotBlank(hospitalId.toString()) && StringUtils.isNotBlank(departmentId.toString())) { |
| | | return appUserService.hospitalDoctorList(hospitalId, departmentId); |
| | | } else { |
| | | return ResultBody.failed("查询参数有误"); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 修改用户状态 |
| | |
| | | /** |
| | | * 管理后台,给用户重置密码 |
| | | *重置密码后,会将新密码返回到data字段。 |
| | | * |
| | | * @param id |
| | | */ |
| | | @PutMapping(value = "/users/{id}/password") |
| | |
| | | appUserService.updatePassword(sysUser.getId(), sysUser.getOldPassword(), sysUser.getNewPassword(),false); |
| | | return ResultBody.ok().data(true).msg("密码重置成功"); |
| | | } |
| | | |
| | | /** |
| | | * 用户自己修改密码-后端以外 |
| | | */ |
| | |
| | | if (id>0&&!oldPassword.isEmpty()&&!newPassword.isEmpty()&&!refPassword.isEmpty()) { |
| | | if (refPassword.equals(newPassword)) { |
| | | return appUserService.updatePassword(id,oldPassword,newPassword,false).data(true).msg("密码修改成功!"); |
| | | } |
| | | else |
| | | { |
| | | } else { |
| | | return ResultBody.failed("两次新密码输入不一致!").data(false); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | } else { |
| | | return ResultBody.failed("必须参数有误!").data(false); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 用户修改自己的手机号 |
| | | * |
| | | * @param params |
| | | * @return |
| | | */ |
| | | @PutMapping(value="/users/updateusertel") |
| | | public ResultBody updateUserTel(@RequestParam Map<String,Object> params) |
| | | { |
| | | public ResultBody updateUserTel(@RequestParam Map<String, Object> params) { |
| | | return appUserService.updateUserTel(params); |
| | | } |
| | | |
| | | /** |
| | | * 删除用户 |
| | | * |
| | |
| | | private boolean checkAdmin(long id) { |
| | | return id == 1L; |
| | | } |
| | | |
| | | @PostMapping("/users/findAll") |
| | | public ResultBody findAll( @RequestBody Map<String,Object> map) { |
| | | return appUserService.findAll(map); |
| | |
| | | |
| | | /** |
| | | * 根据map查询 总个数 |
| | | * |
| | | * @param map |
| | | * @return |
| | | */ |
| | |
| | | public ResultBody findCountByMap( @RequestBody Map<String,Object> map) { |
| | | return appUserService.findCountByMap(map); |
| | | } |
| | | |
| | | /** |
| | | * 获取当前用的 组织下的所有人员 |
| | | */ |
| | |
| | | public ResultBody getThisUserOrganizationUser(HttpServletRequest request){ |
| | | return appUserService.getThisUserOrganizationUser(request); |
| | | } |
| | | |
| | | /** |
| | | * 通过手机修改密码 |
| | | */ |
| | |
| | | public ResultBody passwordByPhone(@RequestBody Map<String,Object> map) { |
| | | return appUserService.passwordByPhone(map); |
| | | } |
| | | |
| | | /** |
| | | * 通过手机号注册 新用户 |
| | | */ |
| | |
| | | public ResultBody registerByPhone(@RequestBody Map<String,Object> map) { |
| | | return appUserService.registerByPhone(map); |
| | | } |
| | | |
| | | /** |
| | | * 更换手机号 |
| | | */ |