PatientEvaluateMapper.xml
886 字节
<?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.rejoice.user.mapper.PatientEvaluateMapper">
<!--查询所有好评-->
<select id="findAllByDoctorIdPatientEvaluates" resultType="cn.brotop.user.pojo.PatientEvaluate">
select
id,
doctor_evaluate_time as doctorEvaluateTime,
sum(doctor_evaluate) as doctorEvaluate
from tb_patient_evaluate
where doctor_evaluate = #{doctorEvaluate}
GROUP BY id
</select>
<select id="findPatient" resultType="cn.brotop.user.pojo.PatientEvaluate">
select
id,
doctor_evaluate_time as doctorEvaluateTime,
sum(doctor_evaluate) as doctorEvaluate
from tb_patient_evaluate
where doctor_id = #{doctorId}
GROUP BY id
</select>
</mapper>