顾绍勇 5 년 전
부모
커밋
de2d0745cf
1개의 변경된 파일7개의 추가작업 그리고 1개의 파일을 삭제
  1. 7
    1
      src/main/resources/mapper/sample/TaContactMapper.xml

+ 7
- 1
src/main/resources/mapper/sample/TaContactMapper.xml 파일 보기

@@ -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>