12.22
This commit is contained in:
parent
b889206ab4
commit
e1abcbef16
|
@ -61,7 +61,7 @@ public class DoctorInfoServiceImpl extends ServiceImpl<DoctorInfoMapper, DoctorI
|
||||||
doctorInfo.setDepartmentId(departmentInfoMapper.selectOne(new LambdaQueryWrapper<DepartmentInfo>().eq(DepartmentInfo::getName, doctorInfoVo.getDepartmentName())).getId());
|
doctorInfo.setDepartmentId(departmentInfoMapper.selectOne(new LambdaQueryWrapper<DepartmentInfo>().eq(DepartmentInfo::getName, doctorInfoVo.getDepartmentName())).getId());
|
||||||
doctorInfo.setHospitalId(hospitalInfoMapper.selectOne(new LambdaQueryWrapper<HospitalInfo>().eq(HospitalInfo::getHospitalName, doctorInfoVo.getHospitalName())).getId());
|
doctorInfo.setHospitalId(hospitalInfoMapper.selectOne(new LambdaQueryWrapper<HospitalInfo>().eq(HospitalInfo::getHospitalName, doctorInfoVo.getHospitalName())).getId());
|
||||||
doctorInfo.setIsDeleted((byte) 0);
|
doctorInfo.setIsDeleted((byte) 0);
|
||||||
doctorInfo.setDoctorName(doctorInfo.getDoctorName());
|
doctorInfo.setDoctorName(doctorInfoVo.getDoctorName());
|
||||||
doctorInfo.setBriefly(doctorInfoVo.getBriefly());
|
doctorInfo.setBriefly(doctorInfoVo.getBriefly());
|
||||||
doctorInfo.setSource(doctorInfoVo.getSource());
|
doctorInfo.setSource(doctorInfoVo.getSource());
|
||||||
doctorInfo.setLevel(doctorInfoVo.getLevel());
|
doctorInfo.setLevel(doctorInfoVo.getLevel());
|
||||||
|
|
|
@ -8,6 +8,7 @@ import com.atjy.web.admin.mapper.*;
|
||||||
import com.atjy.web.admin.service.HospitalInfoService;
|
import com.atjy.web.admin.service.HospitalInfoService;
|
||||||
import com.atjy.web.admin.vo.hospital.HospitalInfoVo;
|
import com.atjy.web.admin.vo.hospital.HospitalInfoVo;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
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.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
@ -80,6 +81,17 @@ public class HospitalInfoServiceImpl extends ServiceImpl<HospitalInfoMapper, Hos
|
||||||
graphInfo.setItemId(hospitalInfo.getId());
|
graphInfo.setItemId(hospitalInfo.getId());
|
||||||
graphInfo.setName(hospitalInfoVo.getGraphName());
|
graphInfo.setName(hospitalInfoVo.getGraphName());
|
||||||
|
|
||||||
|
if (hospitalInfoVo.getUrlId() != null) {
|
||||||
|
graphInfo.setId(hospitalInfoVo.getUrlId());
|
||||||
|
graphInfoMapper.insertOrUpdate(graphInfo);
|
||||||
|
} else {
|
||||||
|
if (graphInfoMapper.selectOne(new LambdaQueryWrapper<GraphInfo>().eq(GraphInfo::getItemId, hospitalInfo.getId()).eq(GraphInfo::getItemType, GraphItemType.DOCTOR)) != null) {
|
||||||
|
graphInfoMapper.update(new UpdateWrapper<GraphInfo>().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);
|
graphInfoMapper.insertOrUpdate(graphInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package com.atjy.web.admin.vo.doctor;
|
package com.atjy.web.admin.vo.doctor;
|
||||||
|
|
||||||
import com.atjy.model.entity.DoctorInfo;
|
import com.atjy.model.entity.DoctorInfo;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,9 @@ import lombok.Data;
|
||||||
@Schema(description = "医院信息实体")
|
@Schema(description = "医院信息实体")
|
||||||
public class HospitalInfoVo extends HospitalInfo {
|
public class HospitalInfoVo extends HospitalInfo {
|
||||||
|
|
||||||
|
@Schema(description = "图片id")
|
||||||
|
private Long urlId;
|
||||||
|
|
||||||
@Schema(description = "图片名称")
|
@Schema(description = "图片名称")
|
||||||
private String graphName;
|
private String graphName;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue