| | |
| | | package com.kidgrow.usercenter.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.kidgrow.common.annotation.LoginUser; |
| | | import com.kidgrow.common.controller.BaseController; |
| | | import com.kidgrow.common.model.PageResult; |
| | |
| | | SysDepartment model = sysDepartmentService.getById(id); |
| | | return ResultBody.ok().data(model).msg("查询成功"); |
| | | } |
| | | |
| | | /** |
| | | * 查询 |
| | | */ |
| | | @ApiOperation(value = "更新支付功能的开通状态") |
| | | @GetMapping("/updatePay") |
| | | public ResultBody updatePay(Long departmentId,Boolean isPay) { |
| | | boolean isPays = sysDepartmentService.updatePay(departmentId,isPay); |
| | | return ResultBody.ok().data(isPays).msg("操作成功"); |
| | | } |
| | | /** |
| | | * 查询 |
| | | */ |
| | | @ApiOperation(value = "查看支付功能的开通状态") |
| | | @GetMapping("/getPayMes") |
| | | public ResultBody getPayMes(Long departmentId) { |
| | | SysDepartment model = sysDepartmentService.getById(departmentId); |
| | | return ResultBody.ok().data(model.getIsPay()).msg("操作成功"); |
| | | } |
| | | /** |
| | | * 根据SysDepartment当做查询条件进行查询 |
| | | */ |
| | |
| | | public ResultBody findListByHospitalId(@RequestParam Map<String, Object> params) { |
| | | return sysDepartmentService.findListByHospitalId(params); |
| | | } |
| | | @PostMapping |
| | | public ResultBody update(@RequestBody SysDepartment sysDepartment){ |
| | | if(sysDepartment.getId()==null){ |
| | | return ResultBody.failed("请输入id"); |
| | | } |
| | | QueryWrapper queryWrapper =new QueryWrapper(); |
| | | queryWrapper.eq("id",sysDepartment.getId()); |
| | | boolean update = sysDepartmentService.update(sysDepartment, queryWrapper); |
| | | if(update){ |
| | | return ResultBody.ok(); |
| | | }else { |
| | | return ResultBody.failed("更新数据失败"); |
| | | } |
| | | } |
| | | /** |
| | | *运动处方调用 是否开通服务 |
| | | */ |
| | | |
| | | @PostMapping("getHealth") |
| | | public ResultBody getHealth(@RequestBody SysDepartment sysDepartment){ |
| | | if(sysDepartment.getId()==null){ |
| | | return ResultBody.failed("请输入id"); |
| | | } |
| | | return sysDepartmentService.getHealth(sysDepartment); |
| | | } |
| | | |
| | | } |