| | |
| | | import com.kidgrow.common.model.ResultBody; |
| | | import com.kidgrow.common.model.SysUser; |
| | | import com.kidgrow.common.service.impl.SuperServiceImpl; |
| | | import com.kidgrow.common.utils.StringUtils; |
| | | import com.kidgrow.usercenter.mapper.SysDepartmentMapper; |
| | | import com.kidgrow.usercenter.mapper.SysHospitalMapper; |
| | | import com.kidgrow.usercenter.model.SysDepartment; |
| | |
| | | int j=departmentMapper.updateById(sysDepartment); |
| | | return (j > 0) ? ResultBody.ok().data(sysHospital).msg("删除成功") : ResultBody.failed("删除失败"); |
| | | } |
| | | |
| | | /** |
| | | * 更新医院logo |
| | | * @param params |
| | | * @return |
| | | */ |
| | | @Override |
| | | public ResultBody updateLogo(Map<String, Object> params) { |
| | | Long hospitalId = MapUtils.getLong(params, "hospitalId"); |
| | | String hospitalLogo=MapUtils.getString(params, "hospitalLogo"); |
| | | String hospitalLitLogo=MapUtils.getString(params, "hospitalLitLogo"); |
| | | if (StringUtils.isNotBlank(hospitalId.toString())&&StringUtils.isNotBlank(hospitalLogo)&&StringUtils.isNotBlank(hospitalLitLogo)) { |
| | | SysHospital sysHospital=baseMapper.selectById(hospitalId); |
| | | if (sysHospital != null) { |
| | | sysHospital.setHospitalLogo(hospitalLogo); |
| | | sysHospital.setHospitalLitLogo(hospitalLitLogo); |
| | | int u=baseMapper.updateById(sysHospital); |
| | | return ResultBody.ok().data(u>0); |
| | | } |
| | | else |
| | | { |
| | | return ResultBody.failed("医院数据有误!"); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | return ResultBody.failed("修改数据有误!"); |
| | | } |
| | | } |
| | | } |