新增 医生综合信息接口
parent
33b22a5cb6
commit
6a21214ade
|
@ -0,0 +1,58 @@
|
||||||
|
package com.health.system.common.domain;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author 冯凯
|
||||||
|
* @version 1.0
|
||||||
|
* @description: 医生评价实体类
|
||||||
|
* @date 2023/11/2 10:10
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class Appraise {
|
||||||
|
|
||||||
|
/*
|
||||||
|
评价主键id
|
||||||
|
*/
|
||||||
|
private Integer appraiseId;
|
||||||
|
|
||||||
|
/*
|
||||||
|
评价人
|
||||||
|
*/
|
||||||
|
private Long createUser;
|
||||||
|
|
||||||
|
/*
|
||||||
|
评价时间
|
||||||
|
*/
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/*
|
||||||
|
被评价医生id
|
||||||
|
*/
|
||||||
|
private Long doctorId;
|
||||||
|
|
||||||
|
/*
|
||||||
|
文字评价内容
|
||||||
|
*/
|
||||||
|
private String appraiseComment;
|
||||||
|
|
||||||
|
/*
|
||||||
|
专业度评价分数
|
||||||
|
*/
|
||||||
|
private Integer professionScore;
|
||||||
|
|
||||||
|
/*
|
||||||
|
满意度评价分数
|
||||||
|
*/
|
||||||
|
private Integer satisficationScore;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,34 @@
|
||||||
|
package com.health.system.common.domain;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author 冯凯
|
||||||
|
* @version 1.0
|
||||||
|
* @description: 医生综合评价信息实体类
|
||||||
|
* @date 2023/11/2 10:38
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ComprehensiveAppraise {
|
||||||
|
|
||||||
|
/*
|
||||||
|
综合评价id
|
||||||
|
*/
|
||||||
|
private Integer comprehensiveId;
|
||||||
|
|
||||||
|
/*
|
||||||
|
医生id
|
||||||
|
*/
|
||||||
|
private Long doctorId;
|
||||||
|
|
||||||
|
/*
|
||||||
|
好评人数
|
||||||
|
*/
|
||||||
|
private Integer positiveNum;
|
||||||
|
|
||||||
|
/*
|
||||||
|
服务患者人数
|
||||||
|
*/
|
||||||
|
private Integer serviceNum;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,28 @@
|
||||||
|
package com.health.system.common.domain;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author 冯凯
|
||||||
|
* @version 1.0
|
||||||
|
* @description: 礼物实体类
|
||||||
|
* @date 2023/11/2 10:36
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class Gift {
|
||||||
|
|
||||||
|
/*
|
||||||
|
礼物id
|
||||||
|
*/
|
||||||
|
private Integer GiftId;
|
||||||
|
|
||||||
|
/*
|
||||||
|
礼物照片
|
||||||
|
*/
|
||||||
|
private String giftImage;
|
||||||
|
|
||||||
|
/*
|
||||||
|
礼物价格
|
||||||
|
*/
|
||||||
|
private Integer giftPrice;
|
||||||
|
}
|
|
@ -0,0 +1,31 @@
|
||||||
|
package com.health.system.common.domain.response;
|
||||||
|
|
||||||
|
import com.health.system.common.domain.Appraise;
|
||||||
|
import com.health.system.common.domain.Patient;
|
||||||
|
import com.health.system.common.domain.SysUser;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author 冯凯
|
||||||
|
* @version 1.0
|
||||||
|
* @description: 医生评价响应实体类
|
||||||
|
* @date 2023/11/2 10:41
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class AppraiseResponse extends Appraise {
|
||||||
|
|
||||||
|
/*
|
||||||
|
患者用户基本信息
|
||||||
|
*/
|
||||||
|
private SysUser sysUser;
|
||||||
|
|
||||||
|
/*
|
||||||
|
总评价书
|
||||||
|
*/
|
||||||
|
private Integer sumAppraiseAmount;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,21 @@
|
||||||
|
package com.health.system.common.domain.response;
|
||||||
|
|
||||||
|
import com.health.system.common.domain.ComprehensiveAppraise;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author 冯凯
|
||||||
|
* @version 1.0
|
||||||
|
* @description:
|
||||||
|
* @date 2023/11/2 10:45
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class ComprehensiveAppraiseRes extends ComprehensiveAppraise {
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
好评率
|
||||||
|
*/
|
||||||
|
private Integer positiveRate;
|
||||||
|
}
|
|
@ -0,0 +1,21 @@
|
||||||
|
package com.health.system.common.domain.response;
|
||||||
|
|
||||||
|
import com.health.system.common.domain.Gift;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author 冯凯
|
||||||
|
* @version 1.0
|
||||||
|
* @description: 医生收到礼物响应实体类
|
||||||
|
* @date 2023/11/2 11:28
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class GiftResponse {
|
||||||
|
|
||||||
|
private Integer giftId;
|
||||||
|
|
||||||
|
private String giftImage;
|
||||||
|
|
||||||
|
private Integer sumNum;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,75 @@
|
||||||
|
package com.health.system.server.controller;
|
||||||
|
|
||||||
|
import com.dtflys.forest.annotation.Get;
|
||||||
|
import com.health.common.core.domain.Result;
|
||||||
|
import com.health.system.common.domain.response.AppraiseResponse;
|
||||||
|
import com.health.system.common.domain.response.ComprehensiveAppraiseRes;
|
||||||
|
import com.health.system.common.domain.response.GiftResponse;
|
||||||
|
import com.health.system.server.service.DoctorInformationService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author 冯凯
|
||||||
|
* @version 1.0
|
||||||
|
* @description: 医生信息控制层
|
||||||
|
* @date 2023/11/2 10:49
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/doctor")
|
||||||
|
public class DoctorInformationController {
|
||||||
|
|
||||||
|
/*
|
||||||
|
注入医生信息service
|
||||||
|
*/
|
||||||
|
@Autowired
|
||||||
|
private DoctorInformationService doctorInformationService;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: 根据医生id获取医生评价列表
|
||||||
|
* @param: doctorId
|
||||||
|
* @return: Result
|
||||||
|
* @author 冯凯
|
||||||
|
* @date: 2023/11/2 10:53
|
||||||
|
*/
|
||||||
|
@GetMapping("/search/appraiseList/byDoctorId/{doctorId}")
|
||||||
|
|
||||||
|
public Result<List<AppraiseResponse>> searchAppraiseListByDoctorId(@PathVariable Long doctorId){
|
||||||
|
|
||||||
|
List<AppraiseResponse> appraiseResponseList=doctorInformationService.searchAppraiseListByDoctorId(doctorId);
|
||||||
|
return Result.success(appraiseResponseList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: 根据医生id获取医生的礼物统计数列表
|
||||||
|
* @param: doctorId
|
||||||
|
* @return: Result<List<GiftResponse>>
|
||||||
|
* @author 冯凯
|
||||||
|
* @date: 2023/11/2 14:59
|
||||||
|
*/
|
||||||
|
@GetMapping("/search/giftList/byDoctorId/{doctorId}")
|
||||||
|
public Result<List<GiftResponse>> searchGiftListByDoctorId(@PathVariable Integer doctorId){
|
||||||
|
List<GiftResponse> giftResponseMap=doctorInformationService.searchGiftListByDoctorId(doctorId);
|
||||||
|
return Result.success(giftResponseMap);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: 根据医生id查询医生综合评价
|
||||||
|
* @param: doctorId
|
||||||
|
* @return: Result<ComprehensiveAppraiseRes>
|
||||||
|
* @author 冯凯
|
||||||
|
* @date: 2023/11/2 13:32
|
||||||
|
*/
|
||||||
|
@GetMapping("/search/comprehensiveAppraise/byDoctroId/{doctorId}")
|
||||||
|
public Result<ComprehensiveAppraiseRes> searchComprehensiveAppraiseByDoctorId(@PathVariable Integer doctorId){
|
||||||
|
ComprehensiveAppraiseRes comprehensiveAppraiseRes=doctorInformationService.searchComprehensiveAppraiseByDoctorId(doctorId);
|
||||||
|
return Result.success(comprehensiveAppraiseRes);
|
||||||
|
}
|
||||||
|
}
|
|
@ -4,6 +4,7 @@ import com.health.common.core.domain.Result;
|
||||||
import com.health.system.common.domain.BankCard;
|
import com.health.system.common.domain.BankCard;
|
||||||
import com.health.system.server.config.ForestClientInterface;
|
import com.health.system.server.config.ForestClientInterface;
|
||||||
import com.health.system.server.service.SysBankCardService;
|
import com.health.system.server.service.SysBankCardService;
|
||||||
|
import com.health.wallet.remote.RemoteWalletService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
@ -24,6 +25,7 @@ import java.util.Map;
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/bankCard")
|
@RequestMapping("/bankCard")
|
||||||
public class SysBankCardController {
|
public class SysBankCardController {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
注入远程调用第三方接口
|
注入远程调用第三方接口
|
||||||
*/
|
*/
|
||||||
|
@ -38,6 +40,7 @@ public class SysBankCardController {
|
||||||
@PostMapping("/bindUserBank")
|
@PostMapping("/bindUserBank")
|
||||||
public Result bindUserBank(@RequestParam("bankImage") MultipartFile bankImage) throws IOException {
|
public Result bindUserBank(@RequestParam("bankImage") MultipartFile bankImage) throws IOException {
|
||||||
//获取银行卡照片的字节流
|
//获取银行卡照片的字节流
|
||||||
|
|
||||||
Boolean flag=sysBankCardService.bindUserBank(bankImage);
|
Boolean flag=sysBankCardService.bindUserBank(bankImage);
|
||||||
return flag==true?Result.success("","银行卡绑定成功"):Result.error("","银行卡绑定失败");
|
return flag==true?Result.success("","银行卡绑定成功"):Result.error("","银行卡绑定失败");
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,47 @@
|
||||||
|
package com.health.system.server.mapper;
|
||||||
|
|
||||||
|
import com.health.system.common.domain.response.AppraiseResponse;
|
||||||
|
import com.health.system.common.domain.response.ComprehensiveAppraiseRes;
|
||||||
|
import com.health.system.common.domain.response.GiftResponse;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author 冯凯
|
||||||
|
* @version 1.0
|
||||||
|
* @description:医生信息mapper
|
||||||
|
* @date 2023/11/2 10:52
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface DoctorInformationMapper {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: 根据医生id获取医生评价列表
|
||||||
|
* @param: doctorId
|
||||||
|
* @return: Result
|
||||||
|
* @author 冯凯
|
||||||
|
* @date: 2023/11/2 10:53
|
||||||
|
*/
|
||||||
|
List<AppraiseResponse> searchAppraiseListByDoctorId(@Param("doctorId") Long doctorId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: 根据医生id获取医生的礼物统计数列表
|
||||||
|
* @param: doctorId
|
||||||
|
* @return: Result<List<GiftResponse>>
|
||||||
|
* @author 冯凯
|
||||||
|
* @date: 2023/11/2 14:59
|
||||||
|
*/
|
||||||
|
List<GiftResponse> searchGiftListByDoctorId(@Param("doctorId") Integer doctorId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: 根据医生id查询医生综合评价
|
||||||
|
* @param: doctorId
|
||||||
|
* @return: Result<ComprehensiveAppraiseRes>
|
||||||
|
* @author 冯凯
|
||||||
|
* @date: 2023/11/2 13:32
|
||||||
|
*/
|
||||||
|
ComprehensiveAppraiseRes searchComprehensiveAppraiseByDoctorId(@Param("doctorId") Integer doctorId);
|
||||||
|
}
|
|
@ -0,0 +1,45 @@
|
||||||
|
package com.health.system.server.service;
|
||||||
|
|
||||||
|
import com.health.system.common.domain.response.AppraiseResponse;
|
||||||
|
import com.health.system.common.domain.response.ComprehensiveAppraiseRes;
|
||||||
|
import com.health.system.common.domain.response.GiftResponse;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author 冯凯
|
||||||
|
* @version 1.0
|
||||||
|
* @description:医生信息service
|
||||||
|
* @date 2023/11/2 10:51
|
||||||
|
*/
|
||||||
|
public interface DoctorInformationService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: 根据医生id获取医生评价列表
|
||||||
|
* @param: doctorId
|
||||||
|
* @return: Result
|
||||||
|
* @author 冯凯
|
||||||
|
* @date: 2023/11/2 10:53
|
||||||
|
*/
|
||||||
|
List<AppraiseResponse> searchAppraiseListByDoctorId(Long doctorId);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: 根据医生id获取医生的礼物统计数列表
|
||||||
|
* @param: doctorId
|
||||||
|
* @return: Result<List<GiftResponse>>
|
||||||
|
* @author 冯凯
|
||||||
|
* @date: 2023/11/2 14:59
|
||||||
|
*/
|
||||||
|
List<GiftResponse> searchGiftListByDoctorId(Integer doctorId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: 根据医生id查询医生综合评价
|
||||||
|
* @param: doctorId
|
||||||
|
* @return: Result<ComprehensiveAppraiseRes>
|
||||||
|
* @author 冯凯
|
||||||
|
* @date: 2023/11/2 13:32
|
||||||
|
*/
|
||||||
|
ComprehensiveAppraiseRes searchComprehensiveAppraiseByDoctorId(Integer doctorId);
|
||||||
|
}
|
|
@ -0,0 +1,91 @@
|
||||||
|
package com.health.system.server.service.impl;
|
||||||
|
|
||||||
|
import com.health.common.redis.service.RedisService;
|
||||||
|
import com.health.system.common.domain.response.AppraiseResponse;
|
||||||
|
import com.health.system.common.domain.response.ComprehensiveAppraiseRes;
|
||||||
|
import com.health.system.common.domain.response.GiftResponse;
|
||||||
|
import com.health.system.server.mapper.DoctorInformationMapper;
|
||||||
|
import com.health.system.server.service.DoctorInformationService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author 冯凯
|
||||||
|
* @version 1.0
|
||||||
|
* @description:医生信息service
|
||||||
|
* @date 2023/11/2 10:51
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class DoctorInformationServiceImpl implements DoctorInformationService {
|
||||||
|
|
||||||
|
/*
|
||||||
|
注入医生信息mapper
|
||||||
|
*/
|
||||||
|
@Autowired
|
||||||
|
private DoctorInformationMapper doctorInformationMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private RedisService redisService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: 根据医生id获取医生评价列表
|
||||||
|
* @param: doctorId
|
||||||
|
* @return: Result
|
||||||
|
* @author 冯凯
|
||||||
|
* @date: 2023/11/2 10:53
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<AppraiseResponse> searchAppraiseListByDoctorId(Long doctorId) {
|
||||||
|
|
||||||
|
//先从缓存中获取
|
||||||
|
if (redisService.hasKey("DoctorAppraise:"+doctorId)){
|
||||||
|
List<AppraiseResponse> appraiseResponseList = redisService.getCacheList("DoctorAppraise:" + doctorId);
|
||||||
|
return appraiseResponseList;
|
||||||
|
}
|
||||||
|
//没有再从数据库中查询获取
|
||||||
|
List<AppraiseResponse> appraiseResponseList= doctorInformationMapper.searchAppraiseListByDoctorId(doctorId);
|
||||||
|
|
||||||
|
//然后再放入缓存当中
|
||||||
|
redisService.setCacheList("DoctorAppraise:"+doctorId,appraiseResponseList);
|
||||||
|
return appraiseResponseList;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: 根据医生id获取医生的礼物统计数列表
|
||||||
|
* @param: doctorId
|
||||||
|
* @return: Result<List<GiftResponse>>
|
||||||
|
* @author 冯凯
|
||||||
|
* @date: 2023/11/2 14:59
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<GiftResponse> searchGiftListByDoctorId(Integer doctorId) {
|
||||||
|
if (redisService.hasKey("giftCountList:"+doctorId)){
|
||||||
|
List<GiftResponse> giftResponseList = redisService.getCacheList("giftCountList:" + doctorId);
|
||||||
|
return giftResponseList;
|
||||||
|
}
|
||||||
|
List<GiftResponse> giftResponseList = doctorInformationMapper.searchGiftListByDoctorId(doctorId);
|
||||||
|
redisService.setCacheList("giftCountList:"+doctorId,giftResponseList);
|
||||||
|
return giftResponseList;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: 根据医生id查询医生综合评价
|
||||||
|
* @param: doctorId
|
||||||
|
* @return: Result<ComprehensiveAppraiseRes>
|
||||||
|
* @author 冯凯
|
||||||
|
* @date: 2023/11/2 13:32
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ComprehensiveAppraiseRes searchComprehensiveAppraiseByDoctorId(Integer doctorId) {
|
||||||
|
if (redisService.hasKey("comprehensive:"+doctorId)){
|
||||||
|
ComprehensiveAppraiseRes comprehensiveAppraiseRes=redisService.getCacheObject("comprehensive:"+doctorId);
|
||||||
|
return comprehensiveAppraiseRes;
|
||||||
|
}
|
||||||
|
ComprehensiveAppraiseRes comprehensiveAppraiseRes=doctorInformationMapper.searchComprehensiveAppraiseByDoctorId(doctorId);
|
||||||
|
return comprehensiveAppraiseRes;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,61 @@
|
||||||
|
<?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.health.system.server.mapper.DoctorInformationMapper">
|
||||||
|
<resultMap id="appraiseRes" type="com.health.system.common.domain.response.AppraiseResponse">
|
||||||
|
<id column="appraise_id" property="appraiseId"></id>
|
||||||
|
<result column="appraise_comment" property="appraiseComment"></result>
|
||||||
|
<result column="create_user" property="createUser"></result>
|
||||||
|
<result column="create_time" property="createTime"></result>
|
||||||
|
<result column="doctor_id" property="doctorId"></result>
|
||||||
|
<result column="profession_score" property="professionScore"></result>
|
||||||
|
<result column="satisfication_score" property="satisficationScore"></result>
|
||||||
|
<collection property="sysUser" ofType="com.health.system.common.domain.SysUser">
|
||||||
|
<id column="user_id" property="userId"></id>
|
||||||
|
<result column="user_name" property="userName"/>
|
||||||
|
<result column="email" property="email"/>
|
||||||
|
<result column="phone_number" property="phonenumber"/>
|
||||||
|
<result column="avatar" property="avatar"/>
|
||||||
|
</collection>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<resultMap id="comprehensiveAppraise" type="com.health.system.common.domain.response.ComprehensiveAppraiseRes">
|
||||||
|
<id column="comprehensive_id" property="comprehensiveId"></id>
|
||||||
|
<result column="doctor_id" property="doctorId"/>
|
||||||
|
<result column="positive_num" property="positiveNum"/>
|
||||||
|
<result column="service_num" property="serviceNum"/>
|
||||||
|
<result column="positive_rate" property="positiveRate"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="giftListRes">
|
||||||
|
select gd.gift_id,g.gift_image,count(*) as sum_num from tb_gift_doctor gd LEFT JOIN tb_gift g on gd.gift_id=g.gift_id GROUP BY gd.gift_id
|
||||||
|
</sql>
|
||||||
|
<sql id="AppraiseListByDoctorId">
|
||||||
|
select appraise_id,a.create_user,a.create_time,doctor_id,appraise_comment,profession_rate,satisfication_rate, s.user_id,s.user_name,s.email,s.phonenumber,s.avatar
|
||||||
|
from tb_appraise a left join sys_user s
|
||||||
|
on a.create_user=s.user_id
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<sql id="comprehensiveAppraise">
|
||||||
|
select comprehentsive_id,doctro_id,positive_num,service_num,positive_num/service_num*100 as positive_rate from tb_comprehensive_information
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!--根据医生id查询评价列表-->
|
||||||
|
<select id="searchAppraiseListByDoctorId"
|
||||||
|
resultMap="appraiseRes">
|
||||||
|
<include refid="AppraiseListByDoctorId"/>
|
||||||
|
where a.create_user=1
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!--根据医生id查询获取医生礼物统计列表数据-->
|
||||||
|
<select id="searchGiftListByDoctorId" resultType="com.health.system.common.domain.response.GiftResponse">
|
||||||
|
select gd.gift_id,g.gift_image,count(*) as sum_num from tb_gift_doctor gd LEFT JOIN tb_gift g on gd.gift_id=g.gift_id where gd.doctor_id=#{doctorId} GROUP BY gd.gift_id
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!--根据医生id查询医生综合评价-->
|
||||||
|
<select id="searchComprehensiveAppraiseByDoctorId"
|
||||||
|
resultMap="comprehensiveAppraise">
|
||||||
|
<include refid="AppraiseListByDoctorId"/>
|
||||||
|
where doctor_id=#{doctorId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
Loading…
Reference in New Issue