功能完善
parent
11abf54521
commit
4a96df6661
|
@ -0,0 +1,47 @@
|
|||
package com.grail.publice.domain;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
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;
|
||||
/**
|
||||
* 好评时间
|
||||
*/
|
||||
private Date commentTime;
|
||||
/**
|
||||
* 发布评论患者Id
|
||||
*/
|
||||
private Integer userId;
|
||||
/**
|
||||
* 医生专业度
|
||||
*/
|
||||
private Integer commentSpeciality;
|
||||
/**
|
||||
* 医生服务满意度
|
||||
*/
|
||||
private Integer commentSatisfied;
|
||||
/**
|
||||
* 礼物id
|
||||
*/
|
||||
private Integer giftId;
|
||||
}
|
|
@ -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,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,67 @@
|
|||
package com.grail.doctor.publice.controller;
|
||||
|
||||
import com.grail.common.core.domain.Result;
|
||||
import com.grail.doctor.publice.service.CommentServlce;
|
||||
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.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
|
@ -36,7 +36,7 @@ public class ConsultationController {
|
|||
* @Updator: YHY
|
||||
* @Date 2023/10/19 22:12
|
||||
*/
|
||||
@PostMapping("/consultationList")
|
||||
@GetMapping("/consultationList")
|
||||
public Result<List<Consultation>> consultationList(){
|
||||
log.info("功能名称:问诊聊天详情数据,请求URL:【{}】,请求方法:【{}】",request.getRequestURI(),
|
||||
request.getMethod());
|
||||
|
|
|
@ -1,13 +1,17 @@
|
|||
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.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
@ -18,9 +22,12 @@ import java.util.List;
|
|||
*/
|
||||
@RestController
|
||||
@RequestMapping("/doctor")
|
||||
@Log4j2
|
||||
public class DoctorController {
|
||||
@Autowired
|
||||
private DoctorService doctorService;
|
||||
@Autowired
|
||||
private HttpServletRequest request;
|
||||
|
||||
/**
|
||||
* @Description:查询医生信息,根据用户选择查科室及详细功能进行排序
|
||||
|
@ -30,9 +37,32 @@ public class DoctorController {
|
|||
* @Updator: YHY
|
||||
* @Date 2023/10/22 15:40
|
||||
*/
|
||||
@PostMapping("/doctorList")
|
||||
public Result<List<Doctor>> doctorList(){
|
||||
Result<List<Doctor>> result = doctorService.doctorList();
|
||||
@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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
package com.grail.doctor.publice.mapper;
|
||||
|
||||
import com.grail.publice.domain.Gift;
|
||||
import com.grail.publice.domain.response.ResponseComment;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
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();
|
||||
}
|
|
@ -1,7 +1,11 @@
|
|||
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;
|
||||
|
||||
|
@ -13,5 +17,7 @@ import java.util.List;
|
|||
*/
|
||||
@Mapper
|
||||
public interface DoctorMapper {
|
||||
List<Doctor> doctorList();
|
||||
List<ResponseDoctor> doctorList(RequestDoctor requestDoctor);
|
||||
|
||||
Result<ResponseDoctor> findDoctorById(@Param("doctorId") Integer doctorId);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
package com.grail.doctor.publice.service;
|
||||
|
||||
import com.grail.common.core.domain.Result;
|
||||
import com.grail.publice.domain.Gift;
|
||||
import com.grail.publice.domain.response.ResponseComment;
|
||||
|
||||
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();
|
||||
}
|
|
@ -2,6 +2,8 @@ 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;
|
||||
|
||||
|
@ -12,5 +14,7 @@ import java.util.List;
|
|||
* @Date: 2023-10-22 10:09
|
||||
*/
|
||||
public interface DoctorService {
|
||||
Result<List<Doctor>> doctorList();
|
||||
Result<List<ResponseDoctor>> doctorList(RequestDoctor requestDoctor);
|
||||
|
||||
Result<ResponseDoctor> findDoctorById(Integer doctorId);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
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.Gift;
|
||||
import com.grail.publice.domain.response.ResponseComment;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName : CommentServlceimpl
|
||||
* @Description : 问诊好评业务层
|
||||
* @Author : YHY
|
||||
* @Date: 2023-10-24 15:23
|
||||
*/
|
||||
@Service
|
||||
public class CommentServlceimpl implements CommentServlce {
|
||||
@Autowired
|
||||
private CommentMapper commentMapper;
|
||||
|
||||
@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);
|
||||
}
|
||||
}
|
|
@ -4,8 +4,11 @@ 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;
|
||||
|
||||
|
@ -21,8 +24,13 @@ public class DoctorServiceimpl implements DoctorService {
|
|||
private DoctorMapper doctorMapper;
|
||||
|
||||
@Override
|
||||
public Result<List<Doctor>> doctorList() {
|
||||
List<Doctor> list = doctorMapper.doctorList();
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.grail.doctor.publice.mapper.CommentMapper">
|
||||
|
||||
<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>
|
|
@ -2,24 +2,30 @@
|
|||
<!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 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
|
||||
<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>
|
||||
<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>
|
||||
|
|
Loading…
Reference in New Issue