Kaynağa Gözat

fix
通讯录查询参数失效

18339543638 1 yıl önce
ebeveyn
işleme
c71abcdefa

+ 5 - 3
nb-im/src/main/resources/mapper/im/ImRoomMapper.xml

@@ -63,9 +63,6 @@
             <if test="query.patientInfo != null">
                 and (patient_code like concat('%',#{query.patientInfo},'%') or patient_name like concat('%',#{query.patientInfo},'%') )
             </if>
-            <if test="query.manageType != null">
-                and manage_type=#{query.manageType}
-            </if>
             <if test="query.patientId != null">
                 and patient_id=#{query.patientId}
             </if>
@@ -80,6 +77,8 @@
             </if>
         </where>
         ) as r
+        join bus_patient as p on r.patient_id=p.id
+        join bus_clinic as c on p.clinic_id=c.id
         left join (select * from im_msg) as rm
         on rm.id=r.last_msg_id
         <if test="query.assistId != null">
@@ -93,6 +92,9 @@
                 and (r.success_time &gt; #{query.successTime}
                 or r.create_time &gt; #{query.successTime})
             </if>
+            <if test="query.manageType != null">
+                and c.manage_type=#{query.manageType}
+            </if>
         </where>
         order by last_msg_time desc
     </select>