魏超 před 5 roky
rodič
revize
e053555cdc

+ 1
- 1
src/main/java/com/huiju/estateagents/controller/ExtendContentController.java Zobrazit soubor

@@ -109,7 +109,7 @@ public class ExtendContentController extends BaseController {
109 109
             queryWrapper.ne("status",9);
110 110
             queryWrapper.eq(status != null, "status", status);
111 111
             queryWrapper.eq( "org_id", getOrgId(request));
112
-            queryWrapper.and(taPersonBuildingList.size() > 0, wapper -> wapper.in("building_id",taPersonBuildingList.stream().map(TaPersonBuilding::getBuildingId).collect(Collectors.toList())).or().isNull("building_id"));
112
+//            queryWrapper.and(taPersonBuildingList.size() > 0, wapper -> wapper.in("building_id",taPersonBuildingList.stream().map(TaPersonBuilding::getBuildingId).collect(Collectors.toList())).or().isNull("building_id"));
113 113
             queryWrapper.orderByDesc("create_date");
114 114
             IPage<ExtendContent> result = iExtendContentService.page(pg, queryWrapper);
115 115
 

+ 1
- 1
src/main/java/com/huiju/estateagents/entity/HelpActivity.java Zobrazit soubor

@@ -161,5 +161,5 @@ public class HelpActivity implements Serializable {
161 161
      * type(1助力,2拼团)
162 162
      */
163 163
     @TableField(exist = false)
164
-    private Integer type;
164
+    private String type;
165 165
 }

+ 24
- 0
src/main/java/com/huiju/estateagents/entity/TaPersonVisitRecord.java Zobrazit soubor

@@ -130,6 +130,30 @@ public class TaPersonVisitRecord implements Serializable {
130 130
     @TableField(exist = false)
131 131
     private String activityName;
132 132
 
133
+    /**
134
+     * 资讯名称
135
+     */
136
+    @TableField(exist = false)
137
+    private String newsName;
138
+
139
+    /**
140
+     * 助力名称
141
+     */
142
+    @TableField(exist = false)
143
+    private String helpActivityName;
144
+
145
+    /**
146
+     * 拼团名称
147
+     */
148
+    @TableField(exist = false)
149
+    private String groupActivityName;
150
+
151
+    /**
152
+     * H5名称
153
+     */
154
+    @TableField(exist = false)
155
+    private String drainageName;
156
+
133 157
     /**
134 158
      * 分享者名称
135 159
      */

+ 33
- 2
src/main/resources/mapper/HelpActivityMapper.xml Zobrazit soubor

@@ -68,7 +68,10 @@
68 68
 				a.help_activity_id as activityId,
69 69
 				a.img as img,
70 70
                 a.banner_list_img as bannerListImg,
71
-				1 AS type
71
+                a.title as title,
72
+                a.end_date as endDate,
73
+                a.`status` as status,
74
+				"help" AS type
72 75
 			FROM
73 76
 				ta_help_activity a
74 77
 				WHERE
@@ -90,7 +93,10 @@
90 93
 					s.group_activity_id as activityId,
91 94
 					s.main_img as img,
92 95
                     s.banner_list_img as bannerListImg,
93
-					2 AS type
96
+                    s.activity_name as title,
97
+                    s.end_time as endDate,
98
+                    s.status as status,
99
+					"group" AS type
94 100
 				FROM
95 101
 					ta_share_activity s
96 102
 					WHERE
@@ -105,6 +111,31 @@
105 111
                     and s.building_id = #{buildingId}
106 112
                 </if>
107 113
 			)
114
+		UNION ALL
115
+		    (
116
+                SELECT
117
+                t.city_id as cityId,
118
+                t.dynamic_id as activityId,
119
+                t.img_url as img,
120
+                t.banner_list_img as bannerListImg,
121
+                t.title as title,
122
+                t.end_date as endDate,
123
+                t.status as status,
124
+                "activity" AS type
125
+                FROM
126
+                ta_building_dynamic t
127
+                WHERE
128
+                t.org_id =#{orgId} and t.`status` = 1
129
+                <if test="buildingId  == null or  buildingId =='' ">
130
+                    and  t.home = 1
131
+                </if>
132
+                <if test="cityID != null and cityID != ''">
133
+                    and  t.city_id = #{cityID}
134
+                </if>
135
+                <if test="buildingId != null and buildingId != ''">
136
+                    and t.building_id = #{buildingId}
137
+                </if>
138
+            )
108 139
     </select>
109 140
 
110 141
     <select id="helpActivityListEffectivePage" resultType="com.huiju.estateagents.entity.HelpActivity">

+ 11
- 2
src/main/resources/mapper/TaPersonVisitRecordMapper.xml Zobrazit soubor

@@ -125,12 +125,21 @@
125 125
         select * from (
126 126
             select
127 127
             <include refid="columnSql"></include>,
128
-            b.name as activityName,
128
+            b.name as drainageName,
129
+            d.building_name as buildingName,
130
+            tn.news_name as newsName,
131
+            tha.title as helpActivityName,
132
+            tsa.activity_name as groupActivityName,
133
+            tbd.title as activityName,
129 134
             b.drainage_id
130 135
             from ta_person_visit_record t
131 136
             left join ta_drainage b on t.target_id = b.drainage_id
132
-            left join ta_person c on t.share_person_id = c.person_id
133 137
             left join ta_building d on t.target_id = d.building_id
138
+            left join ta_news tn on t.target_id = tn.news_id
139
+            left join ta_help_activity tha on t.target_id = tha.help_activity_id
140
+            left join ta_share_activity tsa on t.target_id = tsa.group_activity_id
141
+            left join ta_building_dynamic tbd on t.target_id = tbd.dynamic_id
142
+            left join ta_person c on t.share_person_id = c.person_id
134 143
             where
135 144
             t.share_person_id is not null
136 145
             <if test="orgId != null and orgId != ''">