初始化
commit
11abf54521
|
@ -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,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,62 @@
|
||||||
|
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;
|
||||||
|
}
|
|
@ -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,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,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,94 @@
|
||||||
|
<?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-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>
|
||||||
|
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
|
||||||
|
</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,105 @@
|
||||||
|
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 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 : 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
|
||||||
|
*/
|
||||||
|
@PostMapping("/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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,38 @@
|
||||||
|
package com.grail.doctor.publice.controller;
|
||||||
|
|
||||||
|
import com.grail.common.core.domain.Result;
|
||||||
|
import com.grail.doctor.publice.service.DoctorService;
|
||||||
|
import com.grail.publice.domain.Doctor;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName : DoctorController
|
||||||
|
* @Description : 医生信息
|
||||||
|
* @Author : YHY
|
||||||
|
* @Date: 2023-10-22 10:08
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/doctor")
|
||||||
|
public class DoctorController {
|
||||||
|
@Autowired
|
||||||
|
private DoctorService doctorService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @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
|
||||||
|
*/
|
||||||
|
@PostMapping("/doctorList")
|
||||||
|
public Result<List<Doctor>> doctorList(){
|
||||||
|
Result<List<Doctor>> result = doctorService.doctorList();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,25 @@
|
||||||
|
package com.grail.doctor.publice.mapper;
|
||||||
|
|
||||||
|
import com.grail.common.core.domain.Result;
|
||||||
|
import com.grail.publice.domain.Consultation;
|
||||||
|
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);
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
package com.grail.doctor.publice.mapper;
|
||||||
|
|
||||||
|
import com.grail.publice.domain.Doctor;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName : DoctorMapper
|
||||||
|
* @Description :
|
||||||
|
* @Author : YHY
|
||||||
|
* @Date: 2023-10-22 10:10
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface DoctorMapper {
|
||||||
|
List<Doctor> doctorList();
|
||||||
|
}
|
|
@ -0,0 +1,22 @@
|
||||||
|
package com.grail.doctor.publice.service;
|
||||||
|
|
||||||
|
import com.grail.common.core.domain.Result;
|
||||||
|
import com.grail.publice.domain.Consultation;
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
|
@ -0,0 +1,16 @@
|
||||||
|
package com.grail.doctor.publice.service;
|
||||||
|
|
||||||
|
import com.grail.common.core.domain.Result;
|
||||||
|
import com.grail.publice.domain.Doctor;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName : DoctorService
|
||||||
|
* @Description :
|
||||||
|
* @Author : YHY
|
||||||
|
* @Date: 2023-10-22 10:09
|
||||||
|
*/
|
||||||
|
public interface DoctorService {
|
||||||
|
Result<List<Doctor>> doctorList();
|
||||||
|
}
|
|
@ -0,0 +1,51 @@
|
||||||
|
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 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);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,28 @@
|
||||||
|
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 org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
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<Doctor>> doctorList() {
|
||||||
|
List<Doctor> list = doctorMapper.doctorList();
|
||||||
|
return Result.success(list);
|
||||||
|
}
|
||||||
|
}
|
|
@ -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,33 @@
|
||||||
|
<?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>
|
||||||
|
</mapper>
|
|
@ -0,0 +1,25 @@
|
||||||
|
<?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">
|
||||||
|
|
||||||
|
<select id="doctorList" resultType="com.grail.publice.domain.Doctor">
|
||||||
|
select t_doctor.*,department_name from t_doctor left join
|
||||||
|
t_department on t_doctor.department_id=t_department.department_id
|
||||||
|
<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>
|
||||||
|
</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-pulice 问诊公共模块
|
||||||
|
</description>
|
||||||
|
|
||||||
|
<artifactId>grail-doctor-public</artifactId>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
|
</project>
|
Loading…
Reference in New Issue