初始化
commit
ac53f09dd8
|
@ -0,0 +1,38 @@
|
|||
target/
|
||||
!.mvn/wrapper/maven-wrapper.jar
|
||||
!**/src/main/**/target/
|
||||
!**/src/test/**/target/
|
||||
|
||||
### IntelliJ IDEA ###
|
||||
.idea/modules.xml
|
||||
.idea/jarRepositories.xml
|
||||
.idea/compiler.xml
|
||||
.idea/libraries/
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
|
||||
### Eclipse ###
|
||||
.apt_generated
|
||||
.classpath
|
||||
.factorypath
|
||||
.project
|
||||
.settings
|
||||
.springBeans
|
||||
.sts4-cache
|
||||
|
||||
### NetBeans ###
|
||||
/nbproject/private/
|
||||
/nbbuild/
|
||||
/dist/
|
||||
/nbdist/
|
||||
/.nb-gradle/
|
||||
build/
|
||||
!**/src/main/**/build/
|
||||
!**/src/test/**/build/
|
||||
|
||||
### VS Code ###
|
||||
.vscode/
|
||||
|
||||
### Mac OS ###
|
||||
.DS_Store
|
|
@ -0,0 +1,8 @@
|
|||
# 默认忽略的文件
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# 基于编辑器的 HTTP 客户端请求
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding">
|
||||
<file url="file://$PROJECT_DIR$/grail-doctor-public-common/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/grail-doctor-public-common/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/grail-doctor-public-remote/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/grail-doctor-public-remote/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/grail-doctor-public-server/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/grail-doctor-public-server/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="JpaBuddyIdeaProjectConfig">
|
||||
<option name="renamerInitialized" value="true" />
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="MavenProjectsManager">
|
||||
<option name="originalFiles">
|
||||
<list>
|
||||
<option value="$PROJECT_DIR$/pom.xml" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="17" project-jdk-type="JavaSDK" />
|
||||
<component name="ProjectType">
|
||||
<option name="id" value="jpab" />
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,21 @@
|
|||
FROM anolis-registry.cn-zhangjiakou.cr.aliyuncs.com/openanolis/openjdk:17-8.6
|
||||
|
||||
|
||||
# 暴露端口号
|
||||
EXPOSE 10003/tcp
|
||||
|
||||
|
||||
# 挂载目录位置
|
||||
VOLUME /home/logs/grail-consultation
|
||||
|
||||
#构造 复制外部文件到docker 内部
|
||||
COPY /grail-doctor-public-server/target/grail-doctor-public-server.jar /home/app.jar
|
||||
|
||||
# 工作目录 exec -it 进来就是默认这个目录
|
||||
WORKDIR /home
|
||||
|
||||
# 指定东八区
|
||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > .etc.timezone
|
||||
|
||||
# 启动java程序
|
||||
CMD ["java","-Dfile.encoding=UTF-8","-jar","/home/app.jar"]
|
|
@ -0,0 +1,38 @@
|
|||
target/
|
||||
!.mvn/wrapper/maven-wrapper.jar
|
||||
!**/src/main/**/target/
|
||||
!**/src/test/**/target/
|
||||
|
||||
### IntelliJ IDEA ###
|
||||
.idea/modules.xml
|
||||
.idea/jarRepositories.xml
|
||||
.idea/compiler.xml
|
||||
.idea/libraries/
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
|
||||
### Eclipse ###
|
||||
.apt_generated
|
||||
.classpath
|
||||
.factorypath
|
||||
.project
|
||||
.settings
|
||||
.springBeans
|
||||
.sts4-cache
|
||||
|
||||
### NetBeans ###
|
||||
/nbproject/private/
|
||||
/nbbuild/
|
||||
/dist/
|
||||
/nbdist/
|
||||
/.nb-gradle/
|
||||
build/
|
||||
!**/src/main/**/build/
|
||||
!**/src/test/**/build/
|
||||
|
||||
### VS Code ###
|
||||
.vscode/
|
||||
|
||||
### Mac OS ###
|
||||
.DS_Store
|
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.grail</groupId>
|
||||
<artifactId>grail-doctor-public</artifactId>
|
||||
<version>3.6.3</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>grail-doctor-public-common</artifactId>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>17</maven.compiler.source>
|
||||
<maven.compiler.target>17</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<!-- 项目公共核心依赖 -->
|
||||
<dependency>
|
||||
<groupId>com.grail</groupId>
|
||||
<artifactId>grail-common-core</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,51 @@
|
|||
package com.grail.publice.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @ClassName : Comment
|
||||
* @Description : 问诊好评表
|
||||
* @Author : YHY
|
||||
* @Date: 2023-10-24 14:40
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class Comment {
|
||||
/**
|
||||
* 好评主键Id
|
||||
*/
|
||||
private Integer commentId;
|
||||
/**
|
||||
* 好评文字内容
|
||||
*/
|
||||
private String commentContent;
|
||||
/**
|
||||
* 好评时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
||||
private Date commentTime;
|
||||
/**
|
||||
* 发布评论患者Id
|
||||
*/
|
||||
private Integer userId;
|
||||
/**
|
||||
* 医生专业度
|
||||
*/
|
||||
private Integer commentSpeciality;
|
||||
/**
|
||||
* 医生服务满意度
|
||||
*/
|
||||
private Integer commentSatisfied;
|
||||
/**
|
||||
* 礼物id
|
||||
*/
|
||||
private Integer giftId;
|
||||
}
|
|
@ -0,0 +1,66 @@
|
|||
package com.grail.publice.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @ClassName : Consultation
|
||||
* @Description : 问诊内容详情表
|
||||
* @Author : YHY
|
||||
* @Date: 2023-10-19 20:29
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class Consultation {
|
||||
//主键Id:consultation_id
|
||||
//问诊时间:consultation_time
|
||||
//问诊内容:consultation_content
|
||||
//消息发送人Id:user_id
|
||||
//消息接收人Id:user_id
|
||||
//问诊状态:consultation_status
|
||||
/**
|
||||
* 主键Id
|
||||
*/
|
||||
private Integer consultationId;
|
||||
/**
|
||||
* 问诊时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
||||
private Date consultationTime;
|
||||
/**
|
||||
* 问诊内容
|
||||
*/
|
||||
private String consultationContent;
|
||||
/**
|
||||
* 消息发送人Id
|
||||
*/
|
||||
private Integer userId;
|
||||
/**
|
||||
* 消息发送人姓名
|
||||
*/
|
||||
private String userName;
|
||||
/**
|
||||
* 消息接收人id
|
||||
*/
|
||||
private Integer doctorId;
|
||||
/**
|
||||
* 消息接受人姓名
|
||||
*/
|
||||
private String doctorName;
|
||||
/**
|
||||
* 问诊状态 1:问诊中;2问诊结束
|
||||
*/
|
||||
private Integer consultationStatus;
|
||||
/**
|
||||
* 问诊时间:患者结束问诊的时间
|
||||
*/
|
||||
private Date diagnosisDime;
|
||||
}
|
|
@ -0,0 +1,80 @@
|
|||
package com.grail.publice.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @ClassName : Doctor
|
||||
* @Description : 医生信息表
|
||||
* @Author : YHY
|
||||
* @Date: 2023-10-20 15:09
|
||||
*/
|
||||
@Data
|
||||
public class Doctor {
|
||||
//主键Id:doctor_id
|
||||
//真实姓名:docker_name
|
||||
//所在医院:doctor_hospital
|
||||
//医生职务:doctor_career
|
||||
//形象照片:doctor_picture
|
||||
//个人简介:personal_profile
|
||||
//擅长领域:doctor_field
|
||||
//所属科室外键Id:department_id
|
||||
//自动回复权限:reply_status
|
||||
//自动回复内容:reply_content
|
||||
//-------------------------------------
|
||||
//医生设置的问诊金额 : consultation_price
|
||||
|
||||
/**
|
||||
*主键Id
|
||||
*/
|
||||
private Integer doctorId;
|
||||
/**
|
||||
*真实姓名
|
||||
*/
|
||||
private String dockerName;
|
||||
/**
|
||||
* 所在医院
|
||||
*/
|
||||
private String doctorHospital;
|
||||
/**
|
||||
* 医生职务
|
||||
*/
|
||||
private String doctorCareer;
|
||||
/**
|
||||
* 形象照片
|
||||
*/
|
||||
private String doctorPicture;
|
||||
/**
|
||||
* 个人简介
|
||||
*/
|
||||
private String personalProfile;
|
||||
/**
|
||||
* 擅长领域
|
||||
*/
|
||||
private String doctorField;
|
||||
/**
|
||||
* 所属科室外键Id
|
||||
*/
|
||||
private Integer departmentId;
|
||||
/**
|
||||
* 科室名称
|
||||
*/
|
||||
private String departmentName;
|
||||
/**
|
||||
* 自动回复权限
|
||||
*/
|
||||
private Integer replyStatus;
|
||||
/**
|
||||
* 自动回复内容
|
||||
*/
|
||||
private String replyContent;
|
||||
/**
|
||||
* 医生用户注册Id
|
||||
*/
|
||||
private Integer userId;
|
||||
/**
|
||||
* 医生设置的问诊金额
|
||||
*/
|
||||
private BigDecimal consultationPrice;
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
package com.grail.publice.domain;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @ClassName : Gift
|
||||
* @Description : 礼物列表
|
||||
* @Author : YHY
|
||||
* @Date: 2023-10-24 14:46
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class Gift {
|
||||
/**
|
||||
* 礼物Id
|
||||
*/
|
||||
private Integer giftId;
|
||||
/**
|
||||
* 礼物名称
|
||||
*/
|
||||
private String giftName;
|
||||
/**
|
||||
* 礼物价格
|
||||
*/
|
||||
private Integer giftPrice;
|
||||
/**
|
||||
* 礼物图片
|
||||
*/
|
||||
private String giftPicture;
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
package com.grail.publice.domain;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
|
||||
/**
|
||||
* @ClassName : MiddleDiagnosis
|
||||
* @Description : 问诊咨询结束记录表
|
||||
* @Author : YHY
|
||||
* @Date: 2023-10-26 14:40
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class MiddleDiagnosis {
|
||||
/**
|
||||
* 主键Id
|
||||
*/
|
||||
private Integer diagnosisId;
|
||||
/**
|
||||
* 医生Id
|
||||
*/
|
||||
private Integer doctorId;
|
||||
/**
|
||||
* 科室id
|
||||
*/
|
||||
private Integer departmentId;
|
||||
/**
|
||||
* 评论Id
|
||||
*/
|
||||
private Integer commentId;
|
||||
/**
|
||||
* 医生价格
|
||||
*/
|
||||
private Integer diagnosisCost;
|
||||
/**
|
||||
* 是否给出评论 0:未评论;1:已评论
|
||||
*/
|
||||
private Integer diagnosisStatus;
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package com.grail.publice.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @ClassName : User
|
||||
* @Description : 登录患者表
|
||||
* @Author : YHY
|
||||
* @Date: 2023-10-20 15:08
|
||||
*/
|
||||
@Data
|
||||
public class User {
|
||||
private Integer userId;
|
||||
private String userName;
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
package com.grail.publice.domain.request;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @ClassName : RequestDoctor
|
||||
* @Description : 排序查询
|
||||
* @Author : YHY
|
||||
* @Date: 2023-10-22 10:51
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class RequestDoctor {
|
||||
|
||||
// 点及那个 ,就排序 1综合 2.好评 3.咨询数 4 价格
|
||||
private Integer sort=1;
|
||||
|
||||
// 升序 和 降序
|
||||
private Integer key=1;
|
||||
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
package com.grail.publice.domain.response;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @ClassName : MiddleDiagnosisResponse
|
||||
* @Description : 患者查看历史问诊记录
|
||||
* @Author : YHY
|
||||
* @Date: 2023-10-26 15:18
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class MiddleDiagnosisResponse {
|
||||
/**
|
||||
* 主键Id
|
||||
*/
|
||||
private Integer diagnosisId;
|
||||
/**
|
||||
* 医生Id
|
||||
*/
|
||||
private Integer doctorId;
|
||||
/**
|
||||
* 科室id
|
||||
*/
|
||||
private Integer departmentId;
|
||||
/**
|
||||
* 评论id
|
||||
*/
|
||||
private Integer commentId;
|
||||
/**
|
||||
* 医生问诊费用
|
||||
*/
|
||||
private Integer diagnosisCost;
|
||||
/**
|
||||
* 是否给出评价:0:未评论;1:已评论
|
||||
*/
|
||||
private Integer diagnosisStatus;
|
||||
/**
|
||||
* 医生姓名
|
||||
*/
|
||||
private String doctorName;
|
||||
/**
|
||||
* 医生职务
|
||||
*/
|
||||
private String doctorCareer;
|
||||
/**
|
||||
* 科室名称
|
||||
*/
|
||||
private String departmentName;
|
||||
}
|
|
@ -0,0 +1,55 @@
|
|||
package com.grail.publice.domain.response;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @ClassName : ResponseComment
|
||||
* @Description :
|
||||
* @Author : YHY
|
||||
* @Date: 2023-10-24 15:29
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class ResponseComment {
|
||||
/**
|
||||
* 好评主键Id
|
||||
*/
|
||||
private Integer commentId;
|
||||
/**
|
||||
* 好评文字内容
|
||||
*/
|
||||
private String commentContent;
|
||||
/**
|
||||
* 好评时间
|
||||
*/
|
||||
private Date commentTime;
|
||||
/**
|
||||
* 发布评论患者Id
|
||||
*/
|
||||
private Integer userId;
|
||||
/**
|
||||
* 送礼用户名
|
||||
*/
|
||||
private String userName;
|
||||
/**
|
||||
* 医生专业度
|
||||
*/
|
||||
private Integer commentSpeciality;
|
||||
/**
|
||||
* 医生服务满意度
|
||||
*/
|
||||
private Integer commentSatisfied;
|
||||
/**
|
||||
* 礼物id
|
||||
*/
|
||||
private Integer giftId;
|
||||
/**
|
||||
* 礼物名称
|
||||
*/
|
||||
private String giftName;
|
||||
}
|
|
@ -0,0 +1,71 @@
|
|||
package com.grail.publice.domain.response;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @ClassName : ResponseDoctor
|
||||
* @Description : 医生联查信息请求类
|
||||
* @Author : YHY
|
||||
* @Date: 2023-10-24 13:49
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class ResponseDoctor {
|
||||
/**
|
||||
*主键Id
|
||||
*/
|
||||
private Integer doctorId;
|
||||
/**
|
||||
*真实姓名
|
||||
*/
|
||||
private String dockerName;
|
||||
/**
|
||||
* 所在医院
|
||||
*/
|
||||
private String doctorHospital;
|
||||
/**
|
||||
* 医生职务
|
||||
*/
|
||||
private String doctorCareer;
|
||||
/**
|
||||
* 形象照片
|
||||
*/
|
||||
private String doctorPicture;
|
||||
/**
|
||||
* 个人简介
|
||||
*/
|
||||
private String personalProfile;
|
||||
/**
|
||||
* 擅长领域
|
||||
*/
|
||||
private String doctorField;
|
||||
/**
|
||||
* 所属科室外键Id
|
||||
*/
|
||||
private Integer departmentId;
|
||||
/**
|
||||
* 科室名称
|
||||
*/
|
||||
private String departmentName;
|
||||
/**
|
||||
* 自动回复权限
|
||||
*/
|
||||
private Integer replyStatus;
|
||||
/**
|
||||
* 自动回复内容
|
||||
*/
|
||||
private String replyContent;
|
||||
/**
|
||||
* 医生用户注册Id
|
||||
*/
|
||||
private Integer userId;
|
||||
/**
|
||||
* 医生设置的问诊金额
|
||||
*/
|
||||
private BigDecimal consultationPrice;
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
package com.grail.publice.domain.response;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @ClassName : ResponseGift
|
||||
* @Description : 礼物联查
|
||||
* @Author : YHY
|
||||
* @Date: 2023-10-24 16:28
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class ResponseGift {
|
||||
/**
|
||||
* 礼物Id
|
||||
*/
|
||||
private Integer giftId;
|
||||
/**
|
||||
* 礼物名称
|
||||
*/
|
||||
private String giftName;
|
||||
/**
|
||||
* 礼物价格
|
||||
*/
|
||||
private Integer giftPrice;
|
||||
/**
|
||||
* 礼物图片
|
||||
*/
|
||||
private String giftPicture;
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
target/
|
||||
!.mvn/wrapper/maven-wrapper.jar
|
||||
!**/src/main/**/target/
|
||||
!**/src/test/**/target/
|
||||
|
||||
### IntelliJ IDEA ###
|
||||
.idea/modules.xml
|
||||
.idea/jarRepositories.xml
|
||||
.idea/compiler.xml
|
||||
.idea/libraries/
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
|
||||
### Eclipse ###
|
||||
.apt_generated
|
||||
.classpath
|
||||
.factorypath
|
||||
.project
|
||||
.settings
|
||||
.springBeans
|
||||
.sts4-cache
|
||||
|
||||
### NetBeans ###
|
||||
/nbproject/private/
|
||||
/nbbuild/
|
||||
/dist/
|
||||
/nbdist/
|
||||
/.nb-gradle/
|
||||
build/
|
||||
!**/src/main/**/build/
|
||||
!**/src/test/**/build/
|
||||
|
||||
### VS Code ###
|
||||
.vscode/
|
||||
|
||||
### Mac OS ###
|
||||
.DS_Store
|
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.grail</groupId>
|
||||
<artifactId>grail-doctor-public</artifactId>
|
||||
<version>3.6.3</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>grail-doctor-public-remote</artifactId>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>17</maven.compiler.source>
|
||||
<maven.compiler.target>17</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.grail</groupId>
|
||||
<artifactId>grail-doctor-public-common</artifactId>
|
||||
<version>3.6.3</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
|
@ -0,0 +1 @@
|
|||
# 调用接口相对路径
|
|
@ -0,0 +1,38 @@
|
|||
target/
|
||||
!.mvn/wrapper/maven-wrapper.jar
|
||||
!**/src/main/**/target/
|
||||
!**/src/test/**/target/
|
||||
|
||||
### IntelliJ IDEA ###
|
||||
.idea/modules.xml
|
||||
.idea/jarRepositories.xml
|
||||
.idea/compiler.xml
|
||||
.idea/libraries/
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
|
||||
### Eclipse ###
|
||||
.apt_generated
|
||||
.classpath
|
||||
.factorypath
|
||||
.project
|
||||
.settings
|
||||
.springBeans
|
||||
.sts4-cache
|
||||
|
||||
### NetBeans ###
|
||||
/nbproject/private/
|
||||
/nbbuild/
|
||||
/dist/
|
||||
/nbdist/
|
||||
/.nb-gradle/
|
||||
build/
|
||||
!**/src/main/**/build/
|
||||
!**/src/test/**/build/
|
||||
|
||||
### VS Code ###
|
||||
.vscode/
|
||||
|
||||
### Mac OS ###
|
||||
.DS_Store
|
|
@ -0,0 +1,121 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.grail</groupId>
|
||||
<artifactId>grail-doctor-public</artifactId>
|
||||
<version>3.6.3</version>
|
||||
</parent>
|
||||
|
||||
<version>3.6.3</version>
|
||||
|
||||
<artifactId>grail-doctor-public-server</artifactId>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>17</maven.compiler.source>
|
||||
<maven.compiler.target>17</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- SpringCloud Alibaba Nacos -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringCloud Alibaba Nacos Config -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringCloud Alibaba Sentinel -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringBoot Actuator -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Swagger UI -->
|
||||
<dependency>
|
||||
<groupId>io.springfox</groupId>
|
||||
<artifactId>springfox-swagger-ui</artifactId>
|
||||
<version>${swagger.fox.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Mysql Connector -->
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- grail Common DataSource -->
|
||||
<dependency>
|
||||
<groupId>com.grail</groupId>
|
||||
<artifactId>grail-common-datasource</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- grail Common DataScope -->
|
||||
<dependency>
|
||||
<groupId>com.grail</groupId>
|
||||
<artifactId>grail-common-datascope</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- grail Common Log -->
|
||||
<dependency>
|
||||
<groupId>com.grail</groupId>
|
||||
<artifactId>grail-common-log</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- grail Common Swagger -->
|
||||
<dependency>
|
||||
<groupId>com.grail</groupId>
|
||||
<artifactId>grail-common-swagger</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 商品服务公共依赖 -->
|
||||
<dependency>
|
||||
<groupId>com.grail</groupId>
|
||||
<artifactId>grail-doctor-public-common</artifactId>
|
||||
<version>3.6.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.qiniu</groupId>
|
||||
<artifactId>qiniu-java-sdk</artifactId>
|
||||
<version>7.10.4</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
||||
<build>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>2.3.0.RELEASE</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
||||
</project>
|
|
@ -0,0 +1,23 @@
|
|||
package com.grail.doctor.publice;
|
||||
|
||||
import com.grail.common.security.annotation.EnableCustomConfig;
|
||||
import com.grail.common.security.annotation.EnableRyFeignClients;
|
||||
import com.grail.common.swagger.annotation.EnableCustomSwagger2;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
/**
|
||||
* @ClassName : ConsultationApplication
|
||||
* @Description : 问诊聊天启动类
|
||||
* @Author : YHY
|
||||
* @Date: 2023-10-19 22:27
|
||||
*/
|
||||
@EnableCustomConfig
|
||||
@EnableCustomSwagger2
|
||||
@EnableRyFeignClients
|
||||
@SpringBootApplication
|
||||
public class ConsultationApplication {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(ConsultationApplication.class,args);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,145 @@
|
|||
package com.grail.doctor.publice.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.grail.common.core.domain.Result;
|
||||
import com.grail.doctor.publice.service.CommentServlce;
|
||||
import com.grail.publice.domain.Comment;
|
||||
import com.grail.publice.domain.Gift;
|
||||
import com.grail.publice.domain.response.ResponseComment;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @ClassName : CommentController
|
||||
* @Description : 问诊好评
|
||||
* @Author : YHY
|
||||
* @Date: 2023-10-24 14:53
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/comment")
|
||||
@Log4j2
|
||||
public class CommentController {
|
||||
@Autowired
|
||||
private CommentServlce commentServlce;
|
||||
@Autowired
|
||||
private HttpServletRequest request;
|
||||
|
||||
/**
|
||||
* @Description:医生查询问诊结束后的所有已评论数据 && 礼物详情记录共用
|
||||
No such property: code for class: Script1
|
||||
* @return: com.grail.common.core.domain.Result<java.util.List<com.grail.publice.domain.response.ResponseComment>>
|
||||
* @Author: YHY
|
||||
* @Updator: YHY
|
||||
* @Date 2023/10/24 15:37
|
||||
*/
|
||||
@GetMapping("/commentList")
|
||||
public Result<List<ResponseComment>> commentList(){
|
||||
log.info("功能名称:查询患者问诊评论信息,根据用户选择查科室及详细功能进行排序,请求URL:【{}】,请求方法:【{}】",request.getRequestURI(),
|
||||
request.getMethod());
|
||||
Result<List<ResponseComment>> result = commentServlce.commentList();
|
||||
log.info("功能名称:查询患者问诊评论信息,根据用户选择查科室及详细功能进行排序,请求URL:【{}】,请求方法:【{}】",request.getRequestURI(),
|
||||
request.getMethod());
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description:查询礼物类型
|
||||
No such property: code for class: Script1
|
||||
* @return: com.grail.common.core.domain.Result<java.util.List<com.grail.publice.domain.Gift>>
|
||||
* @Author: YHY
|
||||
* @Updator: YHY
|
||||
* @Date 2023/10/24 16:26
|
||||
*/
|
||||
@GetMapping("/giftList")
|
||||
public Result<List<Gift>> giftList(){
|
||||
log.info("功能名称:查询礼物记录,根据用户选择查科室及详细功能进行排序,请求URL:【{}】,请求方法:【{}】",request.getRequestURI(),
|
||||
request.getMethod());
|
||||
Result<List<Gift>> result = commentServlce.giftList();
|
||||
log.info("功能名称:查询礼物记录,根据用户选择查科室及详细功能进行排序,请求URL:【{}】,请求方法:【{}】",request.getRequestURI(),
|
||||
request.getMethod());
|
||||
return result;
|
||||
}
|
||||
/**
|
||||
* @Description:添加礼物详情
|
||||
No such property: code for class: Script1
|
||||
* @return: com.grail.common.core.domain.Result
|
||||
* @Author: YHY
|
||||
* @Updator: YHY
|
||||
* @Date 2023/10/26 20:39
|
||||
*/
|
||||
@PostMapping("/addGift")
|
||||
public Result addGift(@RequestBody Gift gift){
|
||||
log.info("功能名称:添加礼物,请求URL:【{}】,请求方法:【{}】,请求参数:【{}】",request.getRequestURI(),
|
||||
request.getMethod(),gift);
|
||||
Result result = commentServlce.addGift(gift);
|
||||
log.info("功能名称:添加礼物,根据用户选择查科室及详细功能进行排序,请求URL:【{}】,请求方法:【{}】",request.getRequestURI(),
|
||||
request.getMethod(),JSONObject.toJSONString(result));
|
||||
return result;
|
||||
}
|
||||
/**
|
||||
* @Description: 礼物列表管理下架
|
||||
No such property: code for class: Script1
|
||||
* @return: com.grail.common.core.domain.Result
|
||||
* @Author: YHY
|
||||
* @Updator: YHY
|
||||
* @Date 2023/10/27 16:49
|
||||
*/
|
||||
@PostMapping("/deleteGiftById/{giftId}")
|
||||
public Result deleteGiftById(@PathVariable Integer giftId){
|
||||
log.info("功能名称:礼物管理下架,请求URL:【{}】,请求方法:【{}】,请求参数:【{}】",request.getRequestURI(),
|
||||
request.getMethod(),giftId);
|
||||
Result result = commentServlce.deleteGiftById(giftId);
|
||||
log.info("功能名称:礼物管理下架,请求URL:【{}】,请求方法:【{}】,响应结果:【{}】",request.getRequestURI(),
|
||||
request.getMethod(),JSONObject.toJSONString(result));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public CommentController(CommentServlce commentServlce){
|
||||
this.commentServlce = commentServlce;
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户进行评价
|
||||
* @param comment
|
||||
* @return 是否评价成功结果
|
||||
*/
|
||||
@PostMapping("/addComment")
|
||||
public Result<String> addComment(@RequestBody Comment comment){
|
||||
log.info("功能名称:添加评论,请求URL:【{}】,请求方法:【{}】,请求参数:【{}】",request.getRequestURI(),
|
||||
request.getMethod(),comment);
|
||||
comment.setCommentTime(new Date());
|
||||
commentServlce.addComment(comment);
|
||||
Result result = Result.success();
|
||||
log.info("功能名称:添加评论,请求URL:【{}】,请求方法:【{}】,响应结果:【{}】",request.getRequestURI(),
|
||||
request.getMethod(), JSONObject.toJSONString(result));
|
||||
return Result.success("评论成功");
|
||||
}
|
||||
@PostMapping ("/exit/{userId}")
|
||||
public Result<String> handleExit(@PathVariable Integer userId){
|
||||
//从数据中查询未评价的记录数
|
||||
int unfinishedCount = commentServlce.countUnfinishedComments(userId);
|
||||
|
||||
if (unfinishedCount > 0){
|
||||
//在7天后添加中评
|
||||
LocalDateTime delayedTime = LocalDateTime.now().plusDays(7);
|
||||
commentServlce.addDelayedComment(userId, delayedTime);
|
||||
return Result.success("已成功添加延迟评价任务");
|
||||
}else {
|
||||
//没有未评价的记录不需要添加延迟任务
|
||||
return Result.success("无需添加延迟任务评价");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,129 @@
|
|||
package com.grail.doctor.publice.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.grail.common.core.domain.Result;
|
||||
import com.grail.doctor.publice.service.ConsultationService;
|
||||
import com.grail.publice.domain.Consultation;
|
||||
import com.grail.publice.domain.response.MiddleDiagnosisResponse;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName : ConsultationController
|
||||
* @Description : 公共数据问诊聊天详情
|
||||
* @Author : YHY
|
||||
* @Date: 2023-10-19 21:43
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/consultation")
|
||||
@Log4j2
|
||||
public class ConsultationController {
|
||||
|
||||
@Autowired
|
||||
private ConsultationService consultationService;
|
||||
@Autowired
|
||||
private HttpServletRequest request;
|
||||
|
||||
|
||||
/**
|
||||
* @Description:问诊聊天详情数据
|
||||
No such property: code for class: Script1
|
||||
* @return: com.grail.common.core.domain.Result<java.util.List<com.grail.publice.domain.Consultation>>
|
||||
* @Author: YHY
|
||||
* @Updator: YHY
|
||||
* @Date 2023/10/19 22:12
|
||||
*/
|
||||
@GetMapping("/consultationList")
|
||||
public Result<List<Consultation>> consultationList(){
|
||||
log.info("功能名称:问诊聊天详情数据,请求URL:【{}】,请求方法:【{}】",request.getRequestURI(),
|
||||
request.getMethod());
|
||||
Result<List<Consultation>> result = consultationService.consultationList();
|
||||
log.info("功能名称:问诊聊天详情数据,请求URL:【{}】,请求方法:【{}】",request.getRequestURI(),
|
||||
request.getMethod());
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description:根据Id删除某一条聊天记录
|
||||
No such property: code for class: Script1
|
||||
* @return: com.grail.common.core.domain.Result
|
||||
* @Author: YHY
|
||||
* @Updator: YHY
|
||||
* @Date 2023/10/19 22:17
|
||||
*/
|
||||
@PostMapping("/deleteConsultationById/{consultationId}")
|
||||
public Result deleteConsultationById(@PathVariable("consultationId") Integer consultationId){
|
||||
log.info("功能名称:根据Id删除某一条聊天记录,请求URL:【{}】,请求方法:【{}】,请求参数:【{}】",request.getRequestURI(),
|
||||
request.getMethod(),consultationId);
|
||||
consultationService.deleteConsultationById(consultationId);
|
||||
Result result = Result.success();
|
||||
log.info("功能名称:根据Id删除某一条聊天记录,请求URL:【{}】,请求方法:【{}】,响应结果:【{}】",request.getRequestURI(),
|
||||
request.getMethod(), JSONObject.toJSONString(result));
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description: 发送消息添加聊天记录
|
||||
No such property: code for class: Script1
|
||||
* @return: com.grail.common.core.domain.Result
|
||||
* @Author: YHY
|
||||
* @Updator: YHY
|
||||
* @Date 2023/10/20 11:23
|
||||
*/
|
||||
@PostMapping("/addConsultation")
|
||||
public Result addConsultation(@RequestBody Consultation consultation){
|
||||
log.info("功能名称:发送消息添加聊天记录,请求URL:【{}】,请求方法:【{}】,请求参数:【{}】",request.getRequestURI(),
|
||||
request.getMethod(),consultation);
|
||||
Result result = consultationService.addConsultation(consultation);
|
||||
log.info("功能名称:发送消息添加聊天记录,请求URL:【{}】,请求方法:【{}】,响应结果:【{}】",request.getRequestURI(),
|
||||
request.getMethod(), JSONObject.toJSONString(result));
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description: 根据医生信息是否立即资讯改医生——资讯人数大于5时给出提示
|
||||
No such property: code for class: Script1
|
||||
* @return: com.grail.common.core.domain.Result<java.util.List<com.grail.publice.domain.Consultation>>
|
||||
* @Author: YHY
|
||||
* @Updator: YHY
|
||||
* @Date 2023/10/20 14:30
|
||||
*/
|
||||
@PostMapping("/ImmediateConsultation/doctorId")
|
||||
public Result<List<Consultation>> ImmediateConsultation(@PathVariable("doctorId") Integer doctorId){
|
||||
log.info("功能名称:根据医生信息是否立即资讯改医生,请求URL:【{}】,请求方法:【{}】,请求参数:【{}】",request.getRequestURI(),
|
||||
request.getMethod(),doctorId);
|
||||
Result<List<Consultation>> result = consultationService.ImmediateConsultation(doctorId);
|
||||
log.info("功能名称:根据医生信息是否立即资讯改医生,请求URL:【{}】,请求方法:【{}】,响应结果:【{}】",request.getRequestURI(),
|
||||
request.getMethod(), JSONObject.toJSONString(result));
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description: 患者查看历史问诊详情
|
||||
No such property: code for class: Script1
|
||||
* @return: com.grail.common.core.domain.Result<java.util.List<com.grail.publice.domain.response.MiddleDiagnosisResponse>>
|
||||
* @Author: YHY
|
||||
* @Updator: YHY
|
||||
* @Date 2023/10/26 15:26
|
||||
*/
|
||||
@GetMapping("/middleDiagnosisList")
|
||||
public Result<List<MiddleDiagnosisResponse>> middleDiagnosisList(){
|
||||
log.info("功能名称:患者查询历史问诊,请求URL:【{}】,请求方法:【{}】",request.getRequestURI(),
|
||||
request.getMethod());
|
||||
Result<List<MiddleDiagnosisResponse>> result = consultationService.middleDiagnosisList();
|
||||
log.info("功能名称:患者查询历史问诊,请求URL:【{}】,请求方法:【{}】,响应结果:【{}】",request.getRequestURI(),
|
||||
request.getMethod(),JSONObject.toJSONString(result));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,76 @@
|
|||
package com.grail.doctor.publice.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.grail.common.core.domain.Result;
|
||||
import com.grail.doctor.publice.service.DoctorService;
|
||||
import com.grail.publice.domain.Consultation;
|
||||
import com.grail.publice.domain.Doctor;
|
||||
import com.grail.publice.domain.request.RequestDoctor;
|
||||
import com.grail.publice.domain.response.ResponseDoctor;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName : DoctorController
|
||||
* @Description : 医生信息
|
||||
* @Author : YHY
|
||||
* @Date: 2023-10-22 10:08
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/doctor")
|
||||
@Log4j2
|
||||
public class DoctorController {
|
||||
@Autowired
|
||||
private DoctorService doctorService;
|
||||
@Autowired
|
||||
private HttpServletRequest request;
|
||||
|
||||
/**
|
||||
* @Description:查询医生信息,根据用户选择查科室及详细功能进行排序
|
||||
No such property: code for class: Script1
|
||||
* @return: com.grail.common.core.domain.Result<java.util.List<com.grail.publice.domain.Doctor>>
|
||||
* @Author: YHY
|
||||
* @Updator: YHY
|
||||
* @Date 2023/10/22 15:40
|
||||
*/
|
||||
@GetMapping("/doctorList")
|
||||
public Result<List<ResponseDoctor>> doctorList(@RequestBody RequestDoctor requestDoctor){
|
||||
log.info("功能名称:查询医生信息,根据用户选择查科室及详细功能进行排序,请求URL:【{}】,请求方法:【{}】,请求参数:【{}】",request.getRequestURI(),
|
||||
request.getMethod(),requestDoctor);
|
||||
Result<List<ResponseDoctor>> result = doctorService.doctorList(requestDoctor);
|
||||
log.info("功能名称:查询医生信息,根据用户选择查科室及详细功能进行排序,请求URL:【{}】,请求方法:【{}】,响应结果:【{}】",request.getRequestURI(),
|
||||
request.getMethod(), JSONObject.toJSONString(result));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @Description:根据Id查询医生详细信息
|
||||
No such property: code for class: Script1
|
||||
* @return: com.grail.common.core.domain.Result<com.grail.publice.domain.response.ResponseDoctor>
|
||||
* @Author: YHY
|
||||
* @Updator: YHY
|
||||
* @Date 2023/10/24 14:07
|
||||
*/
|
||||
@GetMapping("/findDoctorById/{doctorId}")
|
||||
public Result<ResponseDoctor> findDoctorById(@PathVariable("doctorId") Integer doctorId){
|
||||
log.info("功能名称:根据Id查询医生详细信息,请求URL:【{}】,请求方法:【{}】,请求参数:【{}】",request.getRequestURI(),
|
||||
request.getMethod(),doctorId);
|
||||
Result<ResponseDoctor> result = doctorService.findDoctorById(doctorId);
|
||||
log.info("功能名称:根据Id查询医生详细信息,请求URL:【{}】,请求方法:【{}】,响应结果:【{}】",request.getRequestURI(),
|
||||
request.getMethod(), JSONObject.toJSONString(result));
|
||||
return result;
|
||||
}
|
||||
|
||||
@PostMapping("/updateDoctor")
|
||||
public Result updateDoctor(@RequestBody Doctor doctor){
|
||||
log.info("功能名称:完善修改医生信息,请求URL:【{}】,请求方法:【{}】,请求参数:【{}】",request.getRequestURI(),
|
||||
request.getMethod(),doctor);
|
||||
Result result = doctorService.updateDoctor(doctor);
|
||||
return result;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
package com.grail.doctor.publice.mapper;
|
||||
|
||||
import com.grail.publice.domain.Comment;
|
||||
import com.grail.publice.domain.Gift;
|
||||
import com.grail.publice.domain.response.ResponseComment;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName : CommentMapper
|
||||
* @Description :
|
||||
* @Author : YHY
|
||||
* @Date: 2023-10-24 15:25
|
||||
*/
|
||||
@Mapper
|
||||
public interface CommentMapper {
|
||||
List<ResponseComment> commentList();
|
||||
|
||||
List<Gift> giftList();
|
||||
|
||||
|
||||
|
||||
void addComment(Comment comment);
|
||||
|
||||
int countUnfinishedComments(Integer userId);
|
||||
|
||||
int addGift(Gift gift);
|
||||
|
||||
int deleteGiftById(@Param("giftId") Integer giftId);
|
||||
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
package com.grail.doctor.publice.mapper;
|
||||
|
||||
import com.grail.common.core.domain.Result;
|
||||
import com.grail.publice.domain.Consultation;
|
||||
import com.grail.publice.domain.response.MiddleDiagnosisResponse;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName : ConsultationMapper
|
||||
* @Description :
|
||||
* @Author : YHY
|
||||
* @Date: 2023-10-19 21:48
|
||||
*/
|
||||
@Mapper
|
||||
public interface ConsultationMapper {
|
||||
List<Consultation> consultationList();
|
||||
|
||||
void deleteConsultationById(@Param("consultationId") Integer consultationId);
|
||||
|
||||
Result addConsultation(Consultation consultation);
|
||||
|
||||
List<Consultation> ImmediateConsultation(@Param("doctorId") Integer doctorId);
|
||||
|
||||
List<MiddleDiagnosisResponse> middleDiagnosisList();
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
package com.grail.doctor.publice.mapper;
|
||||
|
||||
import com.grail.common.core.domain.Result;
|
||||
import com.grail.publice.domain.Doctor;
|
||||
import com.grail.publice.domain.request.RequestDoctor;
|
||||
import com.grail.publice.domain.response.ResponseDoctor;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName : DoctorMapper
|
||||
* @Description :
|
||||
* @Author : YHY
|
||||
* @Date: 2023-10-22 10:10
|
||||
*/
|
||||
@Mapper
|
||||
public interface DoctorMapper {
|
||||
List<ResponseDoctor> doctorList(RequestDoctor requestDoctor);
|
||||
|
||||
Result<ResponseDoctor> findDoctorById(@Param("doctorId") Integer doctorId);
|
||||
|
||||
int updateDoctor(Doctor doctor);
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
package com.grail.doctor.publice.service;
|
||||
|
||||
import com.grail.common.core.domain.Result;
|
||||
import com.grail.publice.domain.Comment;
|
||||
import com.grail.publice.domain.Gift;
|
||||
import com.grail.publice.domain.response.ResponseComment;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName : CommentServlce
|
||||
* @Description :
|
||||
* @Author : YHY
|
||||
* @Date: 2023-10-24 15:23
|
||||
*/
|
||||
public interface CommentServlce {
|
||||
Result<List<ResponseComment>> commentList();
|
||||
|
||||
Result<List<Gift>> giftList();
|
||||
|
||||
void addComment(Comment comment);
|
||||
|
||||
int countUnfinishedComments(Integer userId);
|
||||
|
||||
void addDelayedComment(Integer userId, LocalDateTime delayedTime);
|
||||
|
||||
|
||||
Result addGift(Gift gift);
|
||||
|
||||
Result deleteGiftById(Integer giftId);
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
package com.grail.doctor.publice.service;
|
||||
|
||||
import com.grail.common.core.domain.Result;
|
||||
import com.grail.publice.domain.Consultation;
|
||||
import com.grail.publice.domain.response.MiddleDiagnosisResponse;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName : ConsultationService
|
||||
* @Description :
|
||||
* @Author : YHY
|
||||
* @Date: 2023-10-19 21:47
|
||||
*/
|
||||
public interface ConsultationService {
|
||||
Result<List<Consultation>> consultationList();
|
||||
|
||||
void deleteConsultationById(Integer consultationId);
|
||||
|
||||
Result addConsultation(Consultation consultation);
|
||||
|
||||
Result<List<Consultation>> ImmediateConsultation(Integer doctorId);
|
||||
|
||||
Result<List<MiddleDiagnosisResponse>> middleDiagnosisList();
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
package com.grail.doctor.publice.service;
|
||||
|
||||
import com.grail.common.core.domain.Result;
|
||||
import com.grail.publice.domain.Doctor;
|
||||
import com.grail.publice.domain.request.RequestDoctor;
|
||||
import com.grail.publice.domain.response.ResponseDoctor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName : DoctorService
|
||||
* @Description :
|
||||
* @Author : YHY
|
||||
* @Date: 2023-10-22 10:09
|
||||
*/
|
||||
public interface DoctorService {
|
||||
Result<List<ResponseDoctor>> doctorList(RequestDoctor requestDoctor);
|
||||
|
||||
Result<ResponseDoctor> findDoctorById(Integer doctorId);
|
||||
|
||||
Result updateDoctor(Doctor doctor);
|
||||
}
|
|
@ -0,0 +1,104 @@
|
|||
package com.grail.doctor.publice.service.impl;
|
||||
|
||||
import com.grail.common.core.domain.Result;
|
||||
import com.grail.doctor.publice.mapper.CommentMapper;
|
||||
import com.grail.doctor.publice.service.CommentServlce;
|
||||
import com.grail.publice.domain.Comment;
|
||||
import com.grail.publice.domain.Gift;
|
||||
import com.grail.publice.domain.response.ResponseComment;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
|
||||
/**
|
||||
* @ClassName : CommentServlceimpl
|
||||
* @Description : 问诊好评业务层
|
||||
* @Author : YHY
|
||||
* @Date: 2023-10-24 15:23
|
||||
*/
|
||||
@Service
|
||||
public class CommentServlceimpl implements CommentServlce {
|
||||
@Autowired
|
||||
private CommentMapper commentMapper;//注入CommenMapper实例
|
||||
private final Timer timer;
|
||||
|
||||
public CommentServlceimpl() {
|
||||
this.timer = new Timer();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<List<ResponseComment>> commentList() {
|
||||
List<ResponseComment> list = commentMapper.commentList();
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<List<Gift>> giftList() {
|
||||
List<Gift> list = commentMapper.giftList();
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void addComment(Comment comment) {
|
||||
//根据具体的持久框架,使用相应的方法将comment对象保存到数据库
|
||||
//这里我们假设使用MyBatista,调用commentMapper等方法
|
||||
commentMapper.addComment(comment);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int countUnfinishedComments(Integer userId) {
|
||||
// 根据具体的持久化框架,使用相应的方法查询未评价的记录数
|
||||
// 这里我们假设使用MyBatis,调用commentMapper的方法
|
||||
return commentMapper.countUnfinishedComments(userId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addDelayedComment(Integer userId, LocalDateTime delayedTime) {
|
||||
//计算延迟时间和当前时间之间的时间差
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
long delay = Duration.between(now, delayedTime).toMillis();
|
||||
|
||||
//创建一个 TimeTask 任务
|
||||
TimerTask task = new TimerTask() {
|
||||
@Override
|
||||
public void run() {
|
||||
//任务执行时,添加中评
|
||||
Comment comment = new Comment();
|
||||
comment.setCommentContent("满意");//自动给出中评
|
||||
comment.setCommentTime(new Date()); //默认添加当前时间
|
||||
comment.setUserId(userId); //默认给出评价的用户
|
||||
comment.setCommentSpeciality(3); //表示医生专业度中等评价
|
||||
comment.setCommentSatisfied(3); //表示医生满意度中等评价
|
||||
comment.setGiftId(null); //礼物默认添加为空
|
||||
}
|
||||
};
|
||||
//在指定的延迟时间后执行任务
|
||||
timer.schedule(task, delay);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result addGift(Gift gift) {
|
||||
int i = commentMapper.addGift(gift);
|
||||
return i>0?Result.success(200,"礼物添加成功"):Result.error(500,"礼物添加异常,稍后再试");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result deleteGiftById(Integer giftId) {
|
||||
int i = commentMapper.deleteGiftById(giftId);
|
||||
return i>0?Result.success(200,"礼物已下架"):Result.success(500,"礼物下架失败");
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,58 @@
|
|||
package com.grail.doctor.publice.service.impl;
|
||||
|
||||
import com.grail.common.core.domain.Result;
|
||||
import com.grail.doctor.publice.mapper.ConsultationMapper;
|
||||
import com.grail.doctor.publice.service.ConsultationService;
|
||||
import com.grail.publice.domain.Consultation;
|
||||
import com.grail.publice.domain.response.MiddleDiagnosisResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName : ConsultationServiceimpl
|
||||
* @Description : 问诊聊天详情数据层
|
||||
* @Author : YHY
|
||||
* @Date: 2023-10-19 21:47
|
||||
*/
|
||||
@Service
|
||||
public class ConsultationServiceimpl implements ConsultationService {
|
||||
@Autowired
|
||||
private ConsultationMapper consultationMapper;
|
||||
|
||||
@Override
|
||||
public Result<List<Consultation>> consultationList() {
|
||||
List<Consultation> list = consultationMapper.consultationList();
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteConsultationById(Integer consultationId) {
|
||||
consultationMapper.deleteConsultationById(consultationId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result addConsultation(Consultation consultation) {
|
||||
consultation.setConsultationTime(new Date());
|
||||
return consultationMapper.addConsultation(consultation);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<List<Consultation>> ImmediateConsultation(Integer doctorId) {
|
||||
List<Consultation> list = consultationMapper.ImmediateConsultation(doctorId);
|
||||
int size = list.size();
|
||||
if (size > 5){
|
||||
return Result.error(500,"当前医生问诊患者大于5人,请稍后在试");
|
||||
}
|
||||
Consultation consultation = new Consultation();
|
||||
return consultationMapper.addConsultation(consultation);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<List<MiddleDiagnosisResponse>> middleDiagnosisList() {
|
||||
List<MiddleDiagnosisResponse> list = consultationMapper.middleDiagnosisList();
|
||||
return Result.success(list);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
package com.grail.doctor.publice.service.impl;
|
||||
|
||||
import com.grail.common.core.domain.Result;
|
||||
import com.grail.doctor.publice.mapper.DoctorMapper;
|
||||
import com.grail.doctor.publice.service.DoctorService;
|
||||
import com.grail.publice.domain.Doctor;
|
||||
import com.grail.publice.domain.request.RequestDoctor;
|
||||
import com.grail.publice.domain.response.ResponseDoctor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName : DoctorServiceimpl
|
||||
* @Description : 医生信息数据层
|
||||
* @Author : YHY
|
||||
* @Date: 2023-10-22 10:09
|
||||
*/
|
||||
@Service
|
||||
public class DoctorServiceimpl implements DoctorService {
|
||||
@Autowired
|
||||
private DoctorMapper doctorMapper;
|
||||
|
||||
@Override
|
||||
public Result<List<ResponseDoctor>> doctorList(RequestDoctor requestDoctor) {
|
||||
List<ResponseDoctor> list = doctorMapper.doctorList(requestDoctor);
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<ResponseDoctor> findDoctorById(Integer doctorId) {
|
||||
return doctorMapper.findDoctorById(doctorId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result updateDoctor(Doctor doctor) {
|
||||
int i = doctorMapper.updateDoctor(doctor);
|
||||
return i>0?Result.success(200,"信息完善成功"):Result.error(500,"系统异常");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
Spring Boot Version: ${spring-boot.version}
|
||||
Spring Application Name: ${spring.application.name}
|
|
@ -0,0 +1,29 @@
|
|||
# Tomcat
|
||||
server:
|
||||
port: 10003
|
||||
|
||||
# Spring
|
||||
spring:
|
||||
application:
|
||||
# 应用名称
|
||||
name: grail-consultation
|
||||
profiles:
|
||||
# 环境配置
|
||||
active: dev
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 10.100.1.3:8848
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 10.100.1.3:8848
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
shared-configs:
|
||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
rabbitmq:
|
||||
host: 10.100.1.5
|
||||
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration scan="true" scanPeriod="60 seconds" debug="false">
|
||||
<!-- 日志存放路径 -->
|
||||
<property name="log.path" value="./logs/grail/doctor/public" />
|
||||
<!-- 日志输出格式 -->
|
||||
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
|
||||
|
||||
<!-- 控制台输出 -->
|
||||
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- 系统日志输出 -->
|
||||
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/info.log</file>
|
||||
<!-- 循环政策:基于时间创建日志文件 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 日志文件名格式 -->
|
||||
<fileNamePattern>${log.path}/info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<!-- 日志最大的历史 60天 -->
|
||||
<maxHistory>60</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<!-- 过滤的级别 -->
|
||||
<level>INFO</level>
|
||||
<!-- 匹配时的操作:接收(记录) -->
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/error.log</file>
|
||||
<!-- 循环政策:基于时间创建日志文件 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 日志文件名格式 -->
|
||||
<fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<!-- 日志最大的历史 60天 -->
|
||||
<maxHistory>60</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<!-- 过滤的级别 -->
|
||||
<level>ERROR</level>
|
||||
<!-- 匹配时的操作:接收(记录) -->
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<!-- 系统模块日志级别控制 -->
|
||||
<logger name="com.bawei" level="info" />
|
||||
<!-- Spring日志级别控制 -->
|
||||
<logger name="org.springframework" level="warn" />
|
||||
|
||||
<root level="info">
|
||||
<appender-ref ref="console" />
|
||||
</root>
|
||||
|
||||
<!--系统操作日志-->
|
||||
<root level="info">
|
||||
<appender-ref ref="file_info" />
|
||||
<appender-ref ref="file_error" />
|
||||
</root>
|
||||
</configuration>
|
|
@ -0,0 +1,51 @@
|
|||
<?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="com.grail.doctor.publice.mapper.CommentMapper">
|
||||
<insert id="addComment">
|
||||
INSERT INTO `all_healthcare`.`t_comment` (
|
||||
`comment_id`,
|
||||
`comment_content`,
|
||||
`comment_time`,
|
||||
`user_id`,
|
||||
`comment_speciality`,
|
||||
`comment_satisfied`,
|
||||
`gift_id`) VALUES (
|
||||
#{commentId},
|
||||
#{commentContent},
|
||||
#{commentTime},
|
||||
#{userId},
|
||||
#{commentSpeciality},
|
||||
#{commentSatisfied},
|
||||
#{giftId})
|
||||
</insert>
|
||||
<insert id="addGift">
|
||||
insert into t_gift (
|
||||
"gift_id",
|
||||
"gift_name",
|
||||
"gift_price",
|
||||
"gift_picture") values(
|
||||
#{giftId},
|
||||
#{giftName},
|
||||
#{giftPrice},
|
||||
#{giftPicture})
|
||||
</insert>
|
||||
<delete id="deleteGiftById">
|
||||
delete from t_girt where girt_id=#{giftId}
|
||||
</delete>
|
||||
<select id="countUnfinishedComments" resultType="java.lang.Integer">
|
||||
SELECT COUNT(*) FROM t_comment WHERE user_id = #{userId} AND #{commentId} IS NULL
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
<select id="commentList" resultType="com.grail.publice.domain.response.ResponseComment">
|
||||
select t_comment.*,gift_name,user_name from t_comment left join
|
||||
t_gift on t_comment.gift_id=t_gift.gift_id left join t_user
|
||||
on t_comment.user_id=t_user.user_id
|
||||
</select>
|
||||
<select id="giftList" resultType="com.grail.publice.domain.Gift">
|
||||
select * from t_gift
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -0,0 +1,39 @@
|
|||
<?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="com.grail.doctor.publice.mapper.ConsultationMapper">
|
||||
<insert id="addConsultation">
|
||||
INSERT INTO `All_healthcare`.`t_consultation`
|
||||
(`consultation_id`,
|
||||
`consultation_time`,
|
||||
`consultation_content`,
|
||||
`user_id`,
|
||||
`doctor_id`,
|
||||
`consultation_status`) VALUES (
|
||||
#{consultationId},
|
||||
#{consultationTime}',
|
||||
#{consultationContent},
|
||||
#{userId},
|
||||
#{doctorId},
|
||||
#{consultationStatus});
|
||||
</insert>
|
||||
<delete id="deleteConsultationById">
|
||||
delete from t_consultation where consultation_id=#{consultationId}
|
||||
</delete>
|
||||
|
||||
<select id="consultationList" resultType="com.grail.publice.domain.Consultation">
|
||||
select t_consultation.*,user_name,doctor_name from t_consultation
|
||||
left join t_user on t_consultation.user_id=t_user.user_id
|
||||
left join t_doctor on t_consultation.doctor_id=t_doctor.doctor_id
|
||||
</select>
|
||||
<select id="ImmediateConsultation" resultType="com.grail.publice.domain.Consultation">
|
||||
select t_consultation.*,user_name,doctor_name from t_consultation
|
||||
left join t_user on t_consultation.user_id=t_user.user_id
|
||||
left join t_doctor on t_consultation.doctor_id=t_doctor.doctor_id where doctor_id=#{doctorId}
|
||||
</select>
|
||||
<select id="middleDiagnosisList" resultType="com.grail.publice.domain.response.MiddleDiagnosisResponse">
|
||||
select middle_diagnosis.*,doctor_name,doctor_career,department_name from middle_diagnosis
|
||||
left join t_doctor on middle_diagnosis.doctor_id=t_doctor.doctor_id left join
|
||||
t_comment on middle_diagnosis.comment_id=t_comment.comment_id left join
|
||||
t_department on middle_diagnosis.department_id=t_department.department_id
|
||||
</select>
|
||||
</mapper>
|
|
@ -0,0 +1,45 @@
|
|||
<?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="com.grail.doctor.publice.mapper.DoctorMapper">
|
||||
<update id="updateDoctor">
|
||||
update t_doctor set
|
||||
docker_name=#{dockerName},
|
||||
doctor_hospital=#{doctorHospital},
|
||||
doctor_career=#{doctorCareer},
|
||||
doctor_picture=#{doctorPicture},
|
||||
personal_profile=#{personalProfile},
|
||||
doctor_field=#{doctorField},
|
||||
department_id=#{departmentId},
|
||||
reply_status=#{replyStatus},
|
||||
reply_content=#{replyContent},
|
||||
user_id=#{userId},
|
||||
consultation_price=#{consultationPrice} where doctor_id=#{doctorId}
|
||||
</update>
|
||||
|
||||
<select id="doctorList" resultType="com.grail.publice.domain.response.ResponseDoctor">
|
||||
select t_doctor.*,department_name from t_doctor left join
|
||||
t_department on t_doctor.department_id=t_department.department_id
|
||||
<where>
|
||||
<if test="sort == 1">
|
||||
order by doctor_id <if test="key==1"> desc </if>
|
||||
<if test="key!=1"> asc </if>
|
||||
</if>
|
||||
<if test="sort == 2">
|
||||
order by department_name <if test="key==1"> desc </if>
|
||||
<if test="key!=1"> asc </if>
|
||||
</if>
|
||||
<if test="sort == 3">
|
||||
order by department_name <if test="key==1"> desc </if>
|
||||
<if test="key!=1"> asc </if>
|
||||
</if>
|
||||
<if test="sort == 4">
|
||||
order by consultation_price <if test="key==1"> desc </if>
|
||||
<if test="key!=1"> asc </if>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="findDoctorById" resultType="com.grail.publice.domain.response.ResponseDoctor">
|
||||
select t_doctor.*,department_name from t_doctor left join
|
||||
t_department on t_doctor.department_id=t_department.department_id where doctor_id=#{doctorId}
|
||||
</select>
|
||||
</mapper>
|
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
|
||||
<parent>
|
||||
<groupId>com.grail</groupId>
|
||||
<artifactId>grail-doctor</artifactId>
|
||||
<version>3.6.3</version>
|
||||
</parent>
|
||||
<version>3.6.3</version>
|
||||
<modules>
|
||||
<module>grail-doctor-public-common</module>
|
||||
<module>grail-doctor-public-remote</module>
|
||||
<module>grail-doctor-public-server</module>
|
||||
</modules>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<description>
|
||||
grail-doctor-pulic 问诊公共模块
|
||||
</description>
|
||||
|
||||
<artifactId>grail-doctor-public</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
</project>
|
Loading…
Reference in New Issue