|
@@ -155,21 +155,17 @@
|
155
|
155
|
SELECT
|
156
|
156
|
t.*,
|
157
|
157
|
e.create_date as visit_time
|
158
|
|
- FROM ta_share_person_from e
|
|
158
|
+ FROM ta_customer_from e
|
159
|
159
|
INNER JOIN ta_person t ON t.person_id = e.person_id
|
160
|
160
|
WHERE e.org_id = #{orgId}
|
161
|
|
- AND e.share_person = #{userId}
|
162
|
|
- AND (
|
163
|
|
- e.target_type IN ( 'card_share', 'building_share', 'dynamic_share', 'group_share', 'h5_share', 'help_share', 'house_share', 'live_share', 'news_share', 'poster' )
|
164
|
|
- or ( e.target_type = 'share' and e.target_id = 'index' )
|
165
|
|
- )
|
166
|
|
- AND e.create_date BETWEEN #{startDate} and #{endDate}
|
167
|
161
|
<if test="buildingId != null and buildingId !=''">
|
168
|
162
|
AND e.building_id = #{buildingId}
|
169
|
163
|
</if>
|
170
|
|
- AND e.is_first_time = 1
|
|
164
|
+ AND e.target_type is not null
|
|
165
|
+ AND e.create_date BETWEEN #{startDate} and #{endDate}
|
|
166
|
+ AND e.is_project_first = 1
|
|
167
|
+ AND t.user_id = #{userId}
|
171
|
168
|
|
172
|
|
- AND t.phone is not null
|
173
|
169
|
AND t.person_type != 'Realty Consultant'
|
174
|
170
|
|
175
|
171
|
<!-- 为了与存储过程一致 -->
|