魏超 преди 5 години
родител
ревизия
7b49250bc2
променени са 1 файла, в които са добавени 34 реда и са изтрити 16 реда
  1. 34
    16
      src/main/resources/mapper/TaShareRecordMapper.xml

+ 34
- 16
src/main/resources/mapper/TaShareRecordMapper.xml Целия файл

@@ -93,23 +93,41 @@
93 93
         </if> order by t.create_time desc
94 94
     </select>
95 95
     <select id="getShareRecordSuccessExportList" resultType="com.huiju.estateagents.excel.ShareRecordSuccessExport">
96
-        select
97
-        t.nickname,
98
-        t.phone,
99
-        t.create_time,
100
-        t.end_time,
101
-        t.verification_status
102
-        from ta_share_record t
103
-        where 1=1
104
-        <!--<if test="status != null and status != ''">-->
96
+        (
97
+            select
98
+            t.nickname,
99
+            t.phone,
100
+            t.create_time,
101
+            t.end_time,
102
+            t.verification_status
103
+            from ta_share_record t
104
+            where 1=1
105 105
             and t.status = #{status}
106
-        <!--</if>-->
107
-        <if test="recordId != null and recordId != ''">
108
-            and t.record_id = #{recordId}
109
-        </if>
110
-        <if test="groupActivityId != null and groupActivityId != ''">
111
-            and t.group_Activity_Id = #{groupActivityId}
112
-        </if>
106
+            <if test="recordId != null and recordId != ''">
107
+                and t.record_id = #{recordId}
108
+            </if>
109
+            <if test="groupActivityId != null and groupActivityId != ''">
110
+                and t.group_Activity_Id = #{groupActivityId}
111
+            </if>
112
+        )
113
+        union all
114
+        (
115
+            select
116
+            t.nickname,
117
+            t.phone,
118
+            t.create_time,
119
+            t.end_time,
120
+            t.verification_status
121
+            from ta_share_child_record t
122
+            where 1=1
123
+            and t.status = #{status}
124
+            <if test="recordId != null and recordId != ''">
125
+                and t.record_id = #{recordId}
126
+            </if>
127
+            <if test="groupActivityId != null and groupActivityId != ''">
128
+                and t.group_Activity_Id = #{groupActivityId}
129
+            </if>
130
+        )
113 131
         limit #{pageCode}, #{pageSize}
114 132
     </select>
115 133
     <select id="getShareRecordFailExportList" resultType="com.huiju.estateagents.excel.ShareRecordFailExport">