魏超 5 年前
父节点
当前提交
7b49250bc2
共有 1 个文件被更改,包括 34 次插入16 次删除
  1. 34
    16
      src/main/resources/mapper/TaShareRecordMapper.xml

+ 34
- 16
src/main/resources/mapper/TaShareRecordMapper.xml 查看文件

93
         </if> order by t.create_time desc
93
         </if> order by t.create_time desc
94
     </select>
94
     </select>
95
     <select id="getShareRecordSuccessExportList" resultType="com.huiju.estateagents.excel.ShareRecordSuccessExport">
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
             and t.status = #{status}
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
         limit #{pageCode}, #{pageSize}
131
         limit #{pageCode}, #{pageSize}
114
     </select>
132
     </select>
115
     <select id="getShareRecordFailExportList" resultType="com.huiju.estateagents.excel.ShareRecordFailExport">
133
     <select id="getShareRecordFailExportList" resultType="com.huiju.estateagents.excel.ShareRecordFailExport">