|
@@ -25,9 +25,9 @@
|
25
|
25
|
when e.building_name != null || e.building_name != '' then e.building_name
|
26
|
26
|
when f.news_name != null || f.news_name != '' then f.news_name
|
27
|
27
|
when g.`name` != null || g.`name` != '' then g.`name`
|
|
28
|
+ when h.sales_batch_name != null || h.sales_batch_name != '' then h.sales_batch_name
|
28
|
29
|
else '空'
|
29
|
30
|
end as shareTitle,t.create_date
|
30
|
|
-
|
31
|
31
|
from ta_share_count t
|
32
|
32
|
left join ta_building_dynamic a on t.be_share = a.dynamic_id and t.tagert_type = 'activity'
|
33
|
33
|
left join ta_help_activity b on t.be_share = b.help_activity_id and t.tagert_type = 'help'
|
|
@@ -35,10 +35,11 @@
|
35
|
35
|
LEFT JOIN ta_drainage d on t.be_share = d.drainage_id and t.tagert_type = 'h5'
|
36
|
36
|
left join ta_building e on t.be_share = e.building_id and t.tagert_type = 'project'
|
37
|
37
|
LEFT JOIN ta_news f on t.be_share = f.news_id and t.tagert_type = 'news'
|
|
38
|
+ LEFT JOIN ta_sales_batch h on t.be_share = h.sales_batch_id and t.tagert_type like CONCAT('house' , '%')
|
38
|
39
|
left JOIN ta_person g on t.be_share = g.person_id and t.tagert_type = 'consultant'
|
39
|
40
|
where t.person_id = #{personId}
|
40
|
41
|
<if test="shareType != null and shareType != ''">
|
41
|
|
- and t.tagert_type = #{shareType}
|
|
42
|
+ and (t.tagert_type = #{shareType} || t.tagert_type like CONCAT(#{shareType} , '%'))
|
42
|
43
|
</if>
|
43
|
44
|
<if test="shareTitle != null and shareTitle != ''">
|
44
|
45
|
and
|
|
@@ -49,7 +50,8 @@
|
49
|
50
|
d.`name` like CONCAT('%', #{shareTitle} , '%') or
|
50
|
51
|
e.building_name like CONCAT('%', #{shareTitle} , '%') or
|
51
|
52
|
f.news_name like CONCAT('%', #{shareTitle} , '%') or
|
52
|
|
- g.`name` like CONCAT('%', #{shareTitle} , '%')
|
|
53
|
+ g.`name` like CONCAT('%', #{shareTitle} , '%') or
|
|
54
|
+ h.sales_batch_name like CONCAT('%', #{shareTitle} , '%')
|
53
|
55
|
)
|
54
|
56
|
</if>
|
55
|
57
|
order by t.create_date desc
|