|
@@ -17,29 +17,32 @@
|
17
|
17
|
)
|
18
|
18
|
</insert>
|
19
|
19
|
<select id="buildingDynamicList" resultType="com.huiju.estateagents.entity.TaBuildingDynamic">
|
20
|
|
- select * from ta_building_dynamic where status>-1
|
|
20
|
+ select
|
|
21
|
+ *,
|
|
22
|
+ (select sum(tade.attend_num) from ta_activity_dynamic_enlist tade where tade.dynamic_id = tbd.dynamic_id ) as count
|
|
23
|
+ from ta_building_dynamic tbd where tbd.status>-1
|
21
|
24
|
<if test="name != null and name !=''">
|
22
|
|
- and title like CONCAT('%', #{name} , '%')
|
|
25
|
+ and tbd.title like CONCAT('%', #{name} , '%')
|
23
|
26
|
</if>
|
24
|
27
|
<if test="buildingId != null and buildingId !=''">
|
25
|
|
- and building_id = #{buildingId}
|
|
28
|
+ and tbd.building_id = #{buildingId}
|
26
|
29
|
</if>
|
27
|
30
|
<if test="isEnlist != null and isEnlist !=''">
|
28
|
|
- and is_enlist = #{isEnlist}
|
|
31
|
+ and tbd.is_enlist = #{isEnlist}
|
29
|
32
|
</if>
|
30
|
33
|
<if test="cityId != 0 and cityId != null">
|
31
|
|
- and city_id = #{cityId}
|
|
34
|
+ and tbd.city_id = #{cityId}
|
32
|
35
|
</if>
|
33
|
36
|
<if test="title != null and title != ''">
|
34
|
|
- and title like CONCAT('%', #{title} , '%')
|
|
37
|
+ and tbd.title like CONCAT('%', #{title} , '%')
|
35
|
38
|
</if>
|
36
|
39
|
<if test="orgId != null and orgId != ''">
|
37
|
|
- and org_id = #{orgId}
|
|
40
|
+ and tbd.org_id = #{orgId}
|
38
|
41
|
</if>
|
39
|
42
|
<if test="time != null">
|
40
|
|
- and TO_DAYS(create_date) = TO_DAYS(#{time})
|
|
43
|
+ and TO_DAYS(tbd.create_date) = TO_DAYS(#{time})
|
41
|
44
|
</if>
|
42
|
|
- ORDER BY create_date DESC
|
|
45
|
+ ORDER BY tbd.create_date DESC
|
43
|
46
|
</select>
|
44
|
47
|
|
45
|
48
|
<select id="iBuildingDynamicSelectId" parameterType="string" resultType="com.huiju.estateagents.entity.TaBuildingDynamic">
|