From e1abcbef168c71a4642cbbc2e543326d4d695d3b Mon Sep 17 00:00:00 2001 From: BLRTTX <2232721325@qq.com> Date: Sun, 22 Dec 2024 20:50:55 +0800 Subject: [PATCH] 12.22 --- .../admin/service/impl/DoctorInfoServiceImpl.java | 2 +- .../admin/service/impl/HospitalInfoServiceImpl.java | 12 ++++++++++++ .../com/atjy/web/admin/vo/doctor/DoctorInfoVo.java | 1 + .../atjy/web/admin/vo/hospital/HospitalInfoVo.java | 3 +++ 4 files changed, 17 insertions(+), 1 deletion(-) diff --git a/web/web-admin/src/main/java/com/atjy/web/admin/service/impl/DoctorInfoServiceImpl.java b/web/web-admin/src/main/java/com/atjy/web/admin/service/impl/DoctorInfoServiceImpl.java index 7873faa..76ea02c 100644 --- a/web/web-admin/src/main/java/com/atjy/web/admin/service/impl/DoctorInfoServiceImpl.java +++ b/web/web-admin/src/main/java/com/atjy/web/admin/service/impl/DoctorInfoServiceImpl.java @@ -61,7 +61,7 @@ public class DoctorInfoServiceImpl extends ServiceImpl().eq(DepartmentInfo::getName, doctorInfoVo.getDepartmentName())).getId()); doctorInfo.setHospitalId(hospitalInfoMapper.selectOne(new LambdaQueryWrapper().eq(HospitalInfo::getHospitalName, doctorInfoVo.getHospitalName())).getId()); doctorInfo.setIsDeleted((byte) 0); - doctorInfo.setDoctorName(doctorInfo.getDoctorName()); + doctorInfo.setDoctorName(doctorInfoVo.getDoctorName()); doctorInfo.setBriefly(doctorInfoVo.getBriefly()); doctorInfo.setSource(doctorInfoVo.getSource()); doctorInfo.setLevel(doctorInfoVo.getLevel()); diff --git a/web/web-admin/src/main/java/com/atjy/web/admin/service/impl/HospitalInfoServiceImpl.java b/web/web-admin/src/main/java/com/atjy/web/admin/service/impl/HospitalInfoServiceImpl.java index 956e578..20edb26 100644 --- a/web/web-admin/src/main/java/com/atjy/web/admin/service/impl/HospitalInfoServiceImpl.java +++ b/web/web-admin/src/main/java/com/atjy/web/admin/service/impl/HospitalInfoServiceImpl.java @@ -8,6 +8,7 @@ import com.atjy.web.admin.mapper.*; import com.atjy.web.admin.service.HospitalInfoService; import com.atjy.web.admin.vo.hospital.HospitalInfoVo; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; @@ -80,6 +81,17 @@ public class HospitalInfoServiceImpl extends ServiceImpl().eq(GraphInfo::getItemId, hospitalInfo.getId()).eq(GraphInfo::getItemType, GraphItemType.DOCTOR)) != null) { + graphInfoMapper.update(new UpdateWrapper().eq("item_type", GraphItemType.HOSPITAL).eq("item_id", hospitalInfo.getId()).set("name", hospitalInfoVo.getGraphName()).set("url", hospitalInfoVo.getUrl())); + } else { + graphInfoMapper.insertOrUpdate(graphInfo); + } + } + graphInfoMapper.insertOrUpdate(graphInfo); } diff --git a/web/web-admin/src/main/java/com/atjy/web/admin/vo/doctor/DoctorInfoVo.java b/web/web-admin/src/main/java/com/atjy/web/admin/vo/doctor/DoctorInfoVo.java index e2fbb2f..639650a 100644 --- a/web/web-admin/src/main/java/com/atjy/web/admin/vo/doctor/DoctorInfoVo.java +++ b/web/web-admin/src/main/java/com/atjy/web/admin/vo/doctor/DoctorInfoVo.java @@ -1,6 +1,7 @@ package com.atjy.web.admin.vo.doctor; import com.atjy.model.entity.DoctorInfo; +import com.baomidou.mybatisplus.annotation.TableField; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; diff --git a/web/web-admin/src/main/java/com/atjy/web/admin/vo/hospital/HospitalInfoVo.java b/web/web-admin/src/main/java/com/atjy/web/admin/vo/hospital/HospitalInfoVo.java index f69db44..ef3a046 100644 --- a/web/web-admin/src/main/java/com/atjy/web/admin/vo/hospital/HospitalInfoVo.java +++ b/web/web-admin/src/main/java/com/atjy/web/admin/vo/hospital/HospitalInfoVo.java @@ -9,6 +9,9 @@ import lombok.Data; @Schema(description = "医院信息实体") public class HospitalInfoVo extends HospitalInfo { + @Schema(description = "图片id") + private Long urlId; + @Schema(description = "图片名称") private String graphName;