# Conflicts:
#	doctor-api/doctor-api-system/src/main/java/doctor/system/api/domain/User.java
#	doctor-modules/doctor-health/src/main/java/doctor/controller/HealthDepartmentController.java
#	doctor-modules/doctor-health/src/main/java/doctor/controller/InformationController.java
#	doctor-modules/doctor-health/src/main/java/doctor/domain/entity/InquiryDetailsRecordEntity.java
#	doctor-modules/doctor-health/src/main/java/doctor/domain/vo/DoctorVo.java
cbx
zmyYYDS 2024-01-16 21:41:56 +08:00
commit d63616c133
24 changed files with 341 additions and 236 deletions

View File

@ -1,11 +1,20 @@
package doctor.system.api.domain;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
/**
* @ClassName : User
* @Description :
* @Author : FJJ
* @Date: 2024-01-10 20:46
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class User {
private Integer id;
private String phone;
@ -20,6 +29,7 @@ public class User {
private Integer weight;
private String invitationCode;
private Date updateTime;
private Date createTime;
private Long createTime;
}

View File

@ -0,0 +1,36 @@
package doctor.controller;
import doctor.common.core.domain.HealthR;
import doctor.domain.entity.DoctorEntity;
import doctor.service.DoctorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.print.Doc;
import java.util.List;
/**
* @BelongsProject: Medical_Treatment
* @BelongsPackage: doctor.controller
* @Author: jpz
* @CreateTime: 2024/1/15 11:30
*/
@RestController
@RequestMapping("/user/inquiry/v1")
public class DoctorController {
@Autowired
private DoctorService doctorService;
@GetMapping("/findDoctorList")
public HealthR<List<DoctorEntity>> findDoctorList(@RequestParam Integer deptId,
@RequestParam Integer condition,
@RequestParam Integer sortBy,
@RequestParam(value = "page",defaultValue = "1") Integer page,
@RequestParam(value = "count",defaultValue = "5") Integer count
){
List<DoctorEntity> list=doctorService.findDoctorList(deptId);
return HealthR.ok(list);
}
}

View File

@ -1,11 +1,10 @@
package doctor.controller;
import doctor.common.core.domain.HealthR;
import doctor.common.core.domain.R;
import doctor.domain.entity.*;
import doctor.service.DepartmentService;
import doctor.service.DiseaseCategoryService;
import doctor.service.DiseaseKnowledgeService;
import doctor.service.HealthDepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
@ -14,17 +13,17 @@ import org.springframework.web.bind.annotation.RestController;
import java.util.List;
import static com.github.pagehelper.page.PageMethod.startPage;
import static doctor.common.core.utils.PageUtils.startPage;
/**
* @BelongsProject: Medical_Treatment
* @BelongsPackage: doctor.controller
* @Author: jpz
* @CreateTime: 2024/1/10 20:56
*/
@RestController
@RequestMapping("/knowledgeBase/v1")
public class HealthDepartmentController {
@Autowired
private HealthDepartmentService healthV1Service;
@Autowired
private DiseaseCategoryService diseaseCategoryService;
@RequestMapping("/share/knowledgeBase/v1")
public class DiseaseKnowledgeController {
@Autowired
private DiseaseKnowledgeService diseaseKnowledgeService;
//罕见病症详情
@ -46,17 +45,23 @@ public class HealthDepartmentController {
List<DrugsCategory> list=diseaseKnowledgeService.findDrugsKnowledgeList(drugsCategoryId);
return HealthR.ok(list);
}
@GetMapping("/findDiseaseCategory")
public HealthR<List<DiseaseCategory>> findDiseaseCategory(@RequestParam Integer departmentId){
List<DiseaseCategory> list=diseaseCategoryService.findDiseaseCategory(departmentId);
@GetMapping("/findDrugsKnowledge")
public HealthR <DrugsKnowledge> findDrugsKnowledge(@RequestParam Integer id){
DrugsKnowledge list=diseaseKnowledgeService.findDrugsKnowledge(id);
return HealthR.ok(list);
}
@GetMapping("/popularSearch")
public HealthR<List<PopularSearchEntity>> popularSeach(){
List<PopularSearchEntity> list=diseaseKnowledgeService.popularSeach();
return HealthR.ok(list);
}
@GetMapping("/findDepartment")
public HealthR<List<DepartmentEntity>> findDepartment(){
List<DepartmentEntity> departmentEntities=healthV1Service.findDepartment();
return HealthR.ok(departmentEntities);
}
}

View File

@ -5,10 +5,7 @@ import doctor.domain.entity.Information;
import doctor.domain.entity.InformationPlate;
import doctor.service.InformationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@ -21,7 +18,8 @@ import static com.github.pagehelper.page.PageMethod.startPage;
* @CreateTime: 2024/1/11 16:19
*/
@RestController
@RequestMapping("/information/v1")
@RequestMapping("/share/information/v1")
public class InformationController {
@Autowired
private InformationService informationService;
@ -38,4 +36,11 @@ public class InformationController {
List<InformationPlate> list=informationService.findInformationPlateList();
return HealthR.ok(list);
}
@GetMapping("/findInformation")
public HealthR<Information> findInformation(@RequestParam Long infoId,
@RequestHeader(name="userId",required = false)Long userId,
@RequestHeader(name = "sessionId",required = false)String sessionId){
Information list=informationService.findInformation(infoId);
return HealthR.ok(list,"查询成功");
}
}

View File

@ -0,0 +1,32 @@
package doctor.domain.entity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;
/**
* @BelongsProject: Medical_Treatment
* @BelongsPackage: doctor.domain.entity
* @Author: jpz
* @CreateTime: 2024/1/15 11:32
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class DoctorEntity {
private Integer id;
private Integer departmentId;
private String email;
private String userName;
private Integer reviewStatus;
private String phone;
private String pwd;
private String name;
private String imagePic;
private String inauguralHospital;
private String personalProfile;
private String goodFieId;
private Date createTime;
}

View File

@ -1,5 +1,8 @@
package doctor.domain.entity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.w3c.dom.Text;
import java.util.Date;
@ -10,6 +13,9 @@ import java.util.Date;
* @Author: jpz
* @CreateTime: 2024/1/10 22:00
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class DrugsKnowledge {
private Integer id;
private Integer drugsCategoryId;
@ -27,123 +33,5 @@ public class DrugsKnowledge {
private String approvalNumber;
private Date createTime;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getDrugsCategoryId() {
return drugsCategoryId;
}
public void setDrugsCategoryId(Integer drugsCategoryId) {
this.drugsCategoryId = drugsCategoryId;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Text getPicture() {
return picture;
}
public void setPicture(Text picture) {
this.picture = picture;
}
public String getEffect() {
return effect;
}
public void setEffect(String effect) {
this.effect = effect;
}
public Text getTaboo() {
return taboo;
}
public void setTaboo(Text taboo) {
this.taboo = taboo;
}
public String getShape() {
return shape;
}
public void setShape(String shape) {
this.shape = shape;
}
public String getPacking() {
return packing;
}
public void setPacking(String packing) {
this.packing = packing;
}
public Text getComponent() {
return component;
}
public void setComponent(Text component) {
this.component = component;
}
public Text getUsage() {
return usage;
}
public void setUsage(Text usage) {
this.usage = usage;
}
public Text getSideEffects() {
return sideEffects;
}
public void setSideEffects(Text sideEffects) {
this.sideEffects = sideEffects;
}
public String getStorage() {
return storage;
}
public void setStorage(String storage) {
this.storage = storage;
}
public Text getMindMatter() {
return mindMatter;
}
public void setMindMatter(Text mindMatter) {
this.mindMatter = mindMatter;
}
public String getApprovalNumber() {
return approvalNumber;
}
public void setApprovalNumber(String approvalNumber) {
this.approvalNumber = approvalNumber;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}

View File

@ -1,106 +1,54 @@
package doctor.domain.entity;
import org.springframework.format.annotation.DateTimeFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;
/**
* @ClassName : InquiryDetailsRecordEntity
* @Description :
* @Author : FJJ
* @Date: 2024-01-12 17:26
* @BelongsProject: Medical_Treatment
* @BelongsPackage: doctor.domain.entity
* @Author: jpz
* @CreateTime: 2024/1/12 21:46
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class InquiryDetailsRecordEntity {
//主键id
private Integer id;
//问诊记录
private Integer inquiryId;
//用户id
private Integer userId;
//好友id
private Integer friendId;
//问诊内容
private String askContent;
//问诊图片
private String askImage;
//语音聊天
private String voiceChat;
//方向1=发送 2=接收
private Integer direction;
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
//问诊时间
private Date askTime;
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
//创建时间
private Date createTime;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getInquiryId() {
return inquiryId;
}
public void setInquiryId(Integer inquiryId) {
this.inquiryId = inquiryId;
}
public Integer getUserId() {
return userId;
}
public void setUserId(Integer userId) {
this.userId = userId;
}
public Integer getFriendId() {
return friendId;
}
public void setFriendId(Integer friendId) {
this.friendId = friendId;
}
public String getAskContent() {
return askContent;
}
public void setAskContent(String askContent) {
this.askContent = askContent;
}
public String getAskImage() {
return askImage;
}
public void setAskImage(String askImage) {
this.askImage = askImage;
}
public String getVoiceChat() {
return voiceChat;
}
public void setVoiceChat(String voiceChat) {
this.voiceChat = voiceChat;
}
public Integer getDirection() {
return direction;
}
public void setDirection(Integer direction) {
this.direction = direction;
}
public Date getAskTime() {
return askTime;
}
public void setAskTime(Date askTime) {
this.askTime = askTime;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}

View File

@ -0,0 +1,26 @@
package doctor.domain.entity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;
/**
* @BelongsProject: Medical_Treatment
* @BelongsPackage: doctor.domain.entity
* @Author: jpz
* @CreateTime: 2024/1/12 21:52
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class InquiryRecordEntity {
private Integer id;
private Integer userId;
private Integer doctorId;
private Integer status;
private Integer showStatus;
private Date inquiryTime;
private Date createTime;
}

View File

@ -0,0 +1,22 @@
package doctor.domain.entity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;
/**
* @BelongsProject: Medical_Treatment
* @BelongsPackage: doctor.domain.entity
* @Author: jpz
* @CreateTime: 2024/1/14 16:00
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class PopularSearchEntity {
private Integer id;
private String name;
private Date createTime;
}

View File

@ -1,16 +1,27 @@
package doctor.domain.vo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @BelongsProject: Medical_Treatment
* @BelongsPackage: doctor.domain.vo
* @Author: jpz
* @CreateTime: 2024/1/15 11:38
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class DoctorVo {
private Integer departmentId;
private String departmentName;
private String goodField;
private Integer id;
private Integer doctorId;
private String doctorName;
private String imagePic;
private String inauguralHospital;
private String jobTitle;
private String name;
private String personalProfile;
private String inauguralHospital;
private double praise;
private Integer serverNum;
private Integer servicePrice;
private Integer praiseNum;
private Integer badNum;
}

View File

@ -18,5 +18,16 @@ public class DrugsKnowledgeVo {
private Integer drugsCategoryId;
private String name;
private String picture;
private String effect;
private String taboo;
private String shape;
private String packing;
private String component;
private String usage;
private String sideEffects;
private String storage;
private String mindMatter;
private String approvalNumber;
}

View File

@ -19,5 +19,6 @@ public class InformationVo {
private String thumbnail;
private String source;
private long releaseTime;
private Integer whetherCollection;
}

View File

@ -1,9 +1,6 @@
package doctor.mapper;
import doctor.domain.entity.DiseaseKnowledge;
import doctor.domain.entity.DrugsCategory;
import doctor.domain.entity.Information;
import doctor.domain.entity.InformationPlate;
import doctor.domain.entity.*;
import org.mybatis.spring.annotation.MapperScan;
import java.util.List;
@ -23,4 +20,8 @@ public interface DiseaseKnowledgeMapper {
List<DrugsCategory> findDrugsKnowledgeList(Integer drugsCategoryId);
DrugsKnowledge findDrugsKnowledge(Integer id);
List<PopularSearchEntity> popularSeach();
}

View File

@ -0,0 +1,17 @@
package doctor.mapper;
import doctor.domain.entity.DoctorEntity;
import org.mybatis.spring.annotation.MapperScan;
import java.util.List;
/**
* @BelongsProject: Medical_Treatment
* @BelongsPackage: doctor.mapper
* @Author: jpz
* @CreateTime: 2024/1/15 11:54
*/
@MapperScan
public interface DoctorMapper {
List<DoctorEntity> findDoctorList(Integer deptId);
}

View File

@ -18,4 +18,6 @@ public interface InformationMapper {
List<InformationPlate> findInformationPlateList();
Information findInformation(Long infoId);
}

View File

@ -1,7 +1,6 @@
package doctor.service;
import doctor.domain.entity.DiseaseKnowledge;
import doctor.domain.entity.DrugsCategory;
import doctor.domain.entity.*;
import java.util.List;
@ -19,4 +18,8 @@ public interface DiseaseKnowledgeService {
List<DrugsCategory> findDrugsKnowledgeList(Integer drugsCategoryId);
DrugsKnowledge findDrugsKnowledge(Integer id);
List<PopularSearchEntity> popularSeach();
}

View File

@ -0,0 +1,15 @@
package doctor.service;
import doctor.domain.entity.DoctorEntity;
import java.util.List;
/**
* @BelongsProject: Medical_Treatment
* @BelongsPackage: doctor.service
* @Author: jpz
* @CreateTime: 2024/1/15 11:32
*/
public interface DoctorService {
List<DoctorEntity> findDoctorList(Integer deptId);
}

View File

@ -16,4 +16,7 @@ public interface InformationService {
List<Information> findInformationList(Integer plateId);
List<InformationPlate> findInformationPlateList();
Information findInformation(Long infoId);
}

View File

@ -1,7 +1,6 @@
package doctor.service.impl;
import doctor.domain.entity.DiseaseKnowledge;
import doctor.domain.entity.DrugsCategory;
import doctor.domain.entity.*;
import doctor.mapper.DiseaseKnowledgeMapper;
import doctor.service.DiseaseKnowledgeService;
import org.springframework.beans.factory.annotation.Autowired;
@ -34,5 +33,17 @@ public class DiseaseKnowledgeServiceimpl implements DiseaseKnowledgeService {
return diseaseKnowledgeMapper.findDrugsKnowledgeList(drugsCategoryId);
}
@Override
public DrugsKnowledge findDrugsKnowledge(Integer id) {
return diseaseKnowledgeMapper.findDrugsKnowledge(id);
}
@Override
public List<PopularSearchEntity> popularSeach() {
return diseaseKnowledgeMapper.popularSeach();
}
}

View File

@ -0,0 +1,26 @@
package doctor.service.impl;
import doctor.domain.entity.DoctorEntity;
import doctor.mapper.DoctorMapper;
import doctor.service.DoctorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @BelongsProject: Medical_Treatment
* @BelongsPackage: doctor.service.impl
* @Author: jpz
* @CreateTime: 2024/1/15 11:45
*/
@Service
public class DoctorServiceimpl implements DoctorService {
@Autowired
private DoctorMapper doctorMapper;
@Override
public List<DoctorEntity> findDoctorList(Integer deptId) {
return doctorMapper.findDoctorList(deptId);
}
}

View File

@ -29,4 +29,11 @@ public class InformationServiceimpl implements InformationService {
public List<InformationPlate> findInformationPlateList() {
return informationMapper.findInformationPlateList();
}
@Override
public Information findInformation(Long infoId) {
return informationMapper.findInformation(infoId);
}
}

View File

@ -16,5 +16,12 @@
select *
from drugs_knowledge where drugs_category_id = #{drugsCategoryId}
</select>
<select id="findDrugsKnowledge" resultType="doctor.domain.entity.DrugsKnowledge">
select *from drugs_knowledge where id=#{id}
</select>
<select id="popularSeach" resultType="doctor.domain.entity.PopularSearchEntity">
select *from popular_search
</select>
</mapper>

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="doctor.mapper.DoctorMapper">
<select id="findDoctorList" resultType="doctor.domain.entity.DoctorEntity">
select *
from doctor where department_id = #{deptId}
</select>
</mapper>
2

View File

@ -14,4 +14,9 @@
select *
from information where plate_id = #{plateId}
</select>
<select id="findInformation" resultType="doctor.domain.entity.Information">
select *
from information where plate_id=#{infoId}
</select>
</mapper>