| | |
| | | @ApiImplicitParam(name = "limit", value = "分页结束位置", required = true, dataType = "Integer") |
| | | }) |
| | | @GetMapping |
| | | public PageResult<SysDoctorVo> list(@RequestParam Map<String, Object> params,@LoginUser SysUser user) { |
| | | public PageResult<SysDoctorDto> list(@RequestParam Map<String, Object> params,@LoginUser SysUser user) { |
| | | if(params.size()==0){ |
| | | params.put("page",1); |
| | | params.put("limit",10); |
| | |
| | | public ResultBody findById(@PathVariable Long id) { |
| | | SysDoctor model = sysDoctorService.getById(id); |
| | | return ResultBody.ok().data(model).msg("查询成功"); |
| | | } |
| | | /** |
| | | * 判断用户名是否管理员 |
| | | */ |
| | | @ApiOperation(value = "判断用户名是否管理员") |
| | | @GetMapping("/userName") |
| | | public ResultBody findById(@RequestParam String userName) { |
| | | return sysDoctorService.userIsAdmin(userName); |
| | | } |
| | | /** |
| | | * 根据 Map 查询 |
| | |
| | | } |
| | | return ResultBody.failed().msg(errMsg.toString()); |
| | | } else { |
| | | boolean v= sysDoctorService.saveOrUpdateSer(sysDoctor,request,user); |
| | | |
| | | if(v) { |
| | | return ResultBody.ok().data(sysDoctor).msg("保存成功"); |
| | | } |
| | | else { |
| | | return ResultBody.failed().msg("保存失败"); |
| | | } |
| | | return sysDoctorService.saveOrUpdateSer(sysDoctor,request,user); |
| | | } |
| | | } |
| | | |
| | |
| | | /** |
| | | * 设为管理 |
| | | */ |
| | | @ApiOperation(value = "修改状态") |
| | | @ApiOperation(value = "设为管理员") |
| | | @PostMapping("setadmin") |
| | | public ResultBody setAdmin(@RequestBody Map<String, Object> params) { |
| | | return sysDoctorService.setAdminDoctor(params); |
| | | } |
| | | |
| | | /** |
| | | * 统计医生的数量 |
| | | * @param datatype 业务类型 |
| | | * 0 自注册医生 |
| | | * 1 签约医生 |
| | | * 2 医答医生 |
| | | * 3 C端医生 |
| | | * 4 H端医生 |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "统计医生的数量") |
| | | @GetMapping("chartDoctor") |
| | | public ResultBody chartDoctor(int datatype) { |
| | | int counts= sysDoctorService.chartDoctor(datatype); |
| | | return ResultBody.ok().data(counts).msg("数据获取成功"); |
| | | } |
| | | } |