调整动态sql

master
gongzhenkun 2 years ago
parent 1e5e4daf36
commit 913d572d46

@ -216,7 +216,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="queryPatintCountByDoctor" resultType="int">
select COUNT(*) from t_patient_hospital_doctor where hospital_id = #{hospitalId} and doctor_id = #{doctorId}
select COUNT(*) from t_patient_hospital_doctor
<where>
<if test="hospitalId != null">
and hospital_id = #{hospitalId}
</if>
<if test="doctorId != null">
and doctor_id = #{doctorId}
</if>
</where>
</select>
<select id="selectAppDoctorDetailById" resultType="com.ruoyi.system.domain.resp.AppDoctorResp">

Loading…
Cancel
Save