顾绍勇 5 vuotta sitten
vanhempi
commit
de2d0745cf
1 muutettua tiedostoa jossa 7 lisäystä ja 1 poistoa
  1. 7
    1
      src/main/resources/mapper/sample/TaContactMapper.xml

+ 7
- 1
src/main/resources/mapper/sample/TaContactMapper.xml Näytä tiedosto

@@ -3,6 +3,12 @@
3 3
 <mapper namespace="com.huiju.estateagents.sample.mapper.TaContactMapper">
4 4
 
5 5
     <select id="taContactInfoBySampleId" resultType="com.huiju.estateagents.sample.entity.TaContact">
6
-        select * From ta_contact t where t.contact_id in (select a.contact_id from ta_sample_contact a where a.sample_id = #{id})
6
+        SELECT
7
+            *
8
+        FROM
9
+            ta_contact t
10
+        WHERE
11
+            t.contact_id IN ( SELECT a.contact_id FROM ta_sample_contact a WHERE a.sample_id = #{id} )
12
+            AND t.`status` = 1
7 13
     </select>
8 14
 </mapper>