diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/AppController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/AppController.java index 659a779..8ec6115 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/AppController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/AppController.java @@ -84,8 +84,7 @@ public class AppController extends BaseController @GetMapping("/doctor/info") public AjaxResult doctorInformation(Long doctorId) { - TDoctor tDoctor = tDoctorService.selectTDoctorById(doctorId); - return AjaxResult.success(tDoctor); + return AjaxResult.success(tDoctorService.selectAppDoctorDetailById(doctorId)); } /** diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/resp/AppDoctorResp.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/resp/AppDoctorResp.java new file mode 100644 index 0000000..e0ba830 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/resp/AppDoctorResp.java @@ -0,0 +1,226 @@ +package com.ruoyi.system.domain.resp; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.Serializable; + +/** + * App端医生信息反参实体 + * + * @author gongzhenkun + * @date 2022/8/9 17:39 + */ +@ApiModel(value = "AppDoctorResp", description = "App端医生信息反参实体") +public class AppDoctorResp implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * ID + */ + private Long id; + + /** + * 用户ID + */ + @ApiModelProperty("用户ID") + private Long userId; + + /** + * 编号 + */ + @ApiModelProperty("编号") + private String identifier; + + /** + * 名称 + */ + @ApiModelProperty("名称") + private String name; + + /** + * 电话 + */ + @ApiModelProperty("电话") + private String phone; + + /** + * 用户性别(0男 1女 2未知) + */ + @ApiModelProperty("用户性别: 0=男,1=女,2=未知") + private String sex; + + /** + * 年龄 + */ + @ApiModelProperty("年龄") + private Integer age; + + /** + * 婚姻状态(0未婚 1已婚 2未知) + */ + @ApiModelProperty("婚姻状态: 0=未婚,1=已婚,2=未知") + private String marriage; + + /** + * 职称 + */ + @ApiModelProperty("职称") + private String title; + + /** + * 专长 + */ + @ApiModelProperty("专长") + private String speciality; + + /** + * 简介 + */ + @ApiModelProperty("简介") + private String introduction; + + /** + * 职业医师照片路径 + */ + @ApiModelProperty("职业医师照片路径") + private String medicalLicense; + + /** + * 二维码base64 + */ + @ApiModelProperty("二维码base64") + private String qrCode; + + /** + * 医院 + */ + @ApiModelProperty("医院Id") + private Long hospitalId; + + /** + * 医院 + */ + @ApiModelProperty("医院名称") + private String hospitalName; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(String identifier) { + this.identifier = identifier; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } + + public String getSex() { + return sex; + } + + public void setSex(String sex) { + this.sex = sex; + } + + public Integer getAge() { + return age; + } + + public void setAge(Integer age) { + this.age = age; + } + + public String getMarriage() { + return marriage; + } + + public void setMarriage(String marriage) { + this.marriage = marriage; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public String getSpeciality() { + return speciality; + } + + public void setSpeciality(String speciality) { + this.speciality = speciality; + } + + public String getIntroduction() { + return introduction; + } + + public void setIntroduction(String introduction) { + this.introduction = introduction; + } + + public String getMedicalLicense() { + return medicalLicense; + } + + public void setMedicalLicense(String medicalLicense) { + this.medicalLicense = medicalLicense; + } + + public String getQrCode() { + return qrCode; + } + + public void setQrCode(String qrCode) { + this.qrCode = qrCode; + } + + public String getHospitalName() { + return hospitalName; + } + + public void setHospitalName(String hospitalName) { + this.hospitalName = hospitalName; + } + + public Long getHospitalId() { + return hospitalId; + } + + public void setHospitalId(Long hospitalId) { + this.hospitalId = hospitalId; + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TDoctorMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TDoctorMapper.java index 6978432..2a60247 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TDoctorMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TDoctorMapper.java @@ -3,6 +3,7 @@ package com.ruoyi.system.mapper; import java.util.List; import com.ruoyi.system.domain.TDoctor; import com.ruoyi.system.domain.req.PcTDoctorQueryByPageReq; +import com.ruoyi.system.domain.resp.AppDoctorResp; import com.ruoyi.system.domain.resp.PcTDoctorQueryByPageResp; import org.apache.ibatis.annotations.Param; @@ -81,5 +82,12 @@ public interface TDoctorMapper */ int queryPatintCountByDoctor(@Param("hospitalId")Long hospitalId, @Param("doctorId")Long doctorId); + /** + * 查询医生信息 + * + * @param id 医生信息主键 + * @return 医生信息 + */ + public AppDoctorResp selectAppDoctorDetailById(Long id); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/ITDoctorService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/ITDoctorService.java index 055d95a..fb47d16 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/ITDoctorService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/ITDoctorService.java @@ -3,6 +3,7 @@ package com.ruoyi.system.service; import java.util.List; import com.ruoyi.system.domain.TDoctor; import com.ruoyi.system.domain.req.PcTDoctorQueryByPageReq; +import com.ruoyi.system.domain.resp.AppDoctorResp; import com.ruoyi.system.domain.resp.PcTDoctorQueryByPageResp; /** @@ -62,4 +63,12 @@ public interface ITDoctorService public int deleteTDoctorById(Long id); List queryByPage(PcTDoctorQueryByPageReq pcTDoctorQueryByPageReq); + + /** + * 查询医生信息 + * + * @param id 医生信息主键 + * @return 医生信息 + */ + public AppDoctorResp selectAppDoctorDetailById(Long id); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TDoctorServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TDoctorServiceImpl.java index 2959d9d..edf4104 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TDoctorServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TDoctorServiceImpl.java @@ -3,6 +3,7 @@ package com.ruoyi.system.service.impl; import java.util.List; import com.ruoyi.common.utils.DateUtils; import com.ruoyi.system.domain.req.PcTDoctorQueryByPageReq; +import com.ruoyi.system.domain.resp.AppDoctorResp; import com.ruoyi.system.domain.resp.PcTDoctorQueryByPageResp; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -102,4 +103,15 @@ public class TDoctorServiceImpl implements ITDoctorService pcTDoctorQueryByPageResps.stream().forEach(a -> a.setCountPatints(tDoctorMapper.queryPatintCountByDoctor(pcTDoctorQueryByPageReq.getHospitalId(),a.getId()))); return pcTDoctorQueryByPageResps; } + + /** + * 查询医生信息 + * + * @param id 医生信息主键 + * @return 医生信息 + */ + @Override + public AppDoctorResp selectAppDoctorDetailById(Long id) { + return tDoctorMapper.selectAppDoctorDetailById(id); + } } diff --git a/ruoyi-system/src/main/resources/mapper/system/TDoctorMapper.xml b/ruoyi-system/src/main/resources/mapper/system/TDoctorMapper.xml index 302c25b..afa30b9 100644 --- a/ruoyi-system/src/main/resources/mapper/system/TDoctorMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/TDoctorMapper.xml @@ -179,4 +179,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + \ No newline at end of file