| | |
| | | import com.kidgrow.common.constant.SecurityConstants; |
| | | import com.kidgrow.common.model.*; |
| | | import com.kidgrow.common.service.impl.SuperServiceImpl; |
| | | import com.kidgrow.common.utils.StringUtils; |
| | | import com.kidgrow.redis.util.RedisConstant; |
| | | import com.kidgrow.redis.util.RedisUtils; |
| | | import com.kidgrow.usercenter.mapper.SysDoctorMapper; |
| | |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * 根据userid删除医生数据 |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public int deleteByUserId(Long userId) { |
| | | Map<String, Object> params = new HashMap<>(); |
| | | params.put("userId", userId); |
| | | return baseMapper.deleteByMap(params); |
| | | } |
| | | @Override |
| | | public ResultBody enable(Map<String, Object> params) { |
| | | Long aLong = MapUtils.getLong(params,"id"); |
| | |
| | | return ResultBody.failed("业务参数有误!").data(false); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 判断用户名是否管理员 |
| | | * @param userName |
| | | * @return |
| | | */ |
| | | @Override |
| | | public ResultBody userIsAdmin(String userName) { |
| | | if (StringUtils.isNotBlank(userName)) { |
| | | SysDoctor sysDoctor= baseMapper.userIsAdmin(userName); |
| | | if (sysDoctor != null) { |
| | | return ResultBody.ok().data(sysDoctor.getIsAdminUser()); |
| | | } |
| | | else |
| | | { |
| | | return ResultBody.failed().data(false); |
| | | } |
| | | }else |
| | | { |
| | | return ResultBody.failed("用户名不能为空!").data(false); |
| | | } |
| | | } |
| | | } |