浏览代码

Merge branch 'dev' of http://git.ycjcjy.com/zhiyuxing/estateagents into dev

张延森 5 年前
父节点
当前提交
fb9b506c3e

+ 1
- 1
src/main/java/com/huiju/estateagents/common/CommConstant.java 查看文件

@@ -125,7 +125,7 @@ public class CommConstant {
125 125
     public final static String POINTS_CHANGE_DOCUMENT_VERIFY = "document_verify";
126 126
 
127 127
     /**
128
-     * 资料审核
128
+     * 活动签到
129 129
      */
130 130
     public final static String POINTS_CHANGE_ACTIVITY_CHECKIN = "activity_checkin";
131 131
 

+ 1
- 0
src/main/java/com/huiju/estateagents/service/impl/TaPersonServiceImpl.java 查看文件

@@ -262,6 +262,7 @@ public class TaPersonServiceImpl extends ServiceImpl<TaPersonMapper, TaPerson> i
262 262
         result.put("unReadNum", 0);
263 263
         result.put("projects", buildings);
264 264
         result.put("address", taBuilding.getAddress());
265
+        result.put("buildingName", taBuilding.getBuildingName());
265 266
         result.put("coordinate", taBuilding.getCoordinate());
266 267
         result.put("personTags",person.getPersonTags());
267 268
         result.put("posters",taPosterService.getPostersForTarget(user.getUserId().toString(),CommConstant.POSTER_CONTENT_TYPE_PERSON));

+ 17
- 0
src/main/java/com/huiju/estateagents/service/impl/TaPersonVisitRecordServiceImpl.java 查看文件

@@ -10,6 +10,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
10 10
 import com.baomidou.mybatisplus.core.metadata.IPage;
11 11
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
12 12
 import com.huiju.estateagents.common.CommConstant;
13
+import com.huiju.estateagents.common.StringUtils;
13 14
 import com.huiju.estateagents.drainage.entity.TaDrainage;
14 15
 import com.huiju.estateagents.drainage.mapper.TaDrainageMapper;
15 16
 import com.huiju.estateagents.entity.*;
@@ -134,6 +135,22 @@ public class TaPersonVisitRecordServiceImpl extends ServiceImpl<TaPersonVisitRec
134 135
 				e.setShareName(userShareInfo.getNickname());
135 136
 				e.setShareTel(userShareInfo.getPhone());
136 137
 			}
138
+
139
+			if (!StringUtils.isEmpty(e.getDrainageName()) && CommConstant.EVENT_H5.equals(e.getEventType())){
140
+				e.setActivityName(e.getDrainageName());
141
+			}
142
+			if (!StringUtils.isEmpty(e.getBuildingName()) && CommConstant.POSTER_CONTENT_TYPE_BUILDING.equals(e.getEventType())){
143
+				e.setActivityName(e.getBuildingName());
144
+			}
145
+			if (!StringUtils.isEmpty(e.getNewsName()) && CommConstant.POSTER_CONTENT_TYPE_NEWS.equals(e.getEventType())){
146
+				e.setActivityName(e.getNewsName());
147
+			}
148
+			if (!StringUtils.isEmpty(e.getHelpActivityName()) && CommConstant.POINTS_CHANGE_HELP.equals(e.getEventType())){
149
+				e.setActivityName(e.getHelpActivityName());
150
+			}
151
+			if (!StringUtils.isEmpty(e.getGroupActivityName()) && CommConstant.POINTS_CHANGE_GROUP.equals(e.getEventType())){
152
+				e.setActivityName(e.getGroupActivityName());
153
+			}
137 154
 		});
138 155
 		taPersonVisitRecordIPage.setRecords(taPersonVisitRecords);
139 156
 		return taPersonVisitRecordIPage;

+ 1
- 1
src/main/java/com/huiju/estateagents/service/impl/TaRecommendCustomerServiceImpl.java 查看文件

@@ -333,7 +333,7 @@ public class TaRecommendCustomerServiceImpl extends ServiceImpl<TaRecommendCusto
333 333
                 consultantPerson = taPersonMapper.selectOne(query);
334 334
             }
335 335
         } else {
336
-            consultantUser = taUserMapper.selectById(params.getString("realtyConsultant"));
336
+            consultantUser = taUserMapper.selectById(consultantPerson.getUserId());
337 337
         }
338 338
 
339 339
         if (null == consultantUser || consultantUser.getStatus() != CommConstant.STATUS_NORMAL) {

+ 29
- 18
src/main/resources/mapper/TaPersonVisitRecordMapper.xml 查看文件

@@ -141,7 +141,8 @@
141 141
             left join ta_building_dynamic tbd on t.target_id = tbd.dynamic_id
142 142
             left join ta_person c on t.share_person_id = c.person_id
143 143
             where
144
-            t.share_person_id is not null
144
+            1=1
145
+--             t.share_person_id is not null
145 146
             <if test="orgId != null and orgId != ''">
146 147
                 and t.org_id = #{orgId}
147 148
             </if>
@@ -149,7 +150,10 @@
149 150
                 and t.event_type = #{eventType}
150 151
             </if>
151 152
             <if test="activityName !=null and activityName != ''">
152
-                and b.name like concat('%',#{activityName},'%')
153
+                and (
154
+                b.name like concat('%',#{activityName},'%') or d.name like concat('%',#{activityName},'%') or tn.news_name like concat('%',#{activityName},'%')
155
+                or tha.title like concat( '%', #{activityName}, '%' )  or tsa.activity_name like concat('%',#{activityName},'%') or tbd.title like concat('%',#{activityName},'%')
156
+                )
153 157
             </if>
154 158
             <if test="shareName !=null and shareName != ''">
155 159
                 and c.nickname like concat('%',#{shareName},'%')
@@ -164,7 +168,7 @@
164 168
                 and t.consultant_id is null
165 169
             </if>
166 170
             <if test="buildingId !=null and buildingId != ''">
167
-                and d.building_id = #{buildingId}
171
+                and t.building_id = #{buildingId}
168 172
             </if>
169 173
             <if test="personBuildingList != null and personBuildingList.size > 0">
170 174
                 AND t.building_id in
@@ -179,20 +183,22 @@
179 183
     </select>
180 184
 
181 185
     <select id="getConsultantShareInfoList" resultType="com.huiju.estateagents.entity.TaConsultantInfo">
186
+        select * From (
182 187
         select
183 188
         a.url as activity_img,
184 189
         a.building_name as activity_name,
185 190
         a.building_name,
186 191
         a.address,
187 192
         a.price,
188
-        t.event_type
193
+        t.event_type,
194
+		t.visit_time
189 195
         from ta_person_visit_record t
190 196
         left join (select b.url, a.building_name,a.address,a.price,a.building_id from ta_building a left join ta_building_img b on a.building_id = b.building_id where b.img_type = 'list') a on t.target_id = a.building_id
191 197
         where t.event_type = 'building'
192 198
         and t.consultant_id = #{userId}
193 199
         and t.org_id = #{orgId}
194 200
         and t.`event` = 'share'
195
-        order by t.visit_time desc
201
+        group by t.target_id
196 202
 
197 203
         union all
198 204
 
@@ -202,14 +208,15 @@
202 208
         '1' as price,
203 209
         '2' as building_name,
204 210
         '3' as address,
205
-        t.event_type
211
+        t.event_type,
212
+		t.visit_time
206 213
         from ta_person_visit_record t
207 214
         left join ta_building_dynamic b on t.target_id = b.dynamic_id
208 215
         where t.event_type = 'activity'
209 216
         and t.consultant_id = #{userId}
210 217
         and t.org_id = #{orgId}
211 218
         and t.`event` = 'share'
212
-        order by t.visit_time desc
219
+        group by t.target_id
213 220
 
214 221
         union all
215 222
 
@@ -219,14 +226,15 @@
219 226
         '1' as price,
220 227
         '2' as building_name,
221 228
         '3' as address,
222
-        t.event_type
229
+        t.event_type,
230
+		t.visit_time
223 231
         from ta_person_visit_record t
224 232
         left join ta_help_activity c on t.target_id = c.help_activity_id
225 233
         where t.event_type = 'help'
226 234
         and t.consultant_id = #{userId}
227 235
         and t.org_id = #{orgId}
228 236
         and t.`event` = 'share'
229
-        order by t.visit_time desc
237
+        group by t.target_id
230 238
 
231 239
         union all
232 240
 
@@ -236,48 +244,51 @@
236 244
         '1' as price,
237 245
         '2' as building_name,
238 246
         '3' as address,
239
-        t.event_type
247
+        t.event_type,
248
+		t.visit_time
240 249
         from ta_person_visit_record t
241 250
         left join ta_share_activity d on t.target_id = d.group_activity_id
242 251
         where t.event_type = 'group'
243 252
         and t.consultant_id = #{userId}
244 253
         and t.org_id = #{orgId}
245 254
         and t.`event` = 'share'
246
-        order by t.visit_time desc
255
+        group by t.target_id
247 256
 
248 257
         union all
249 258
 
250 259
         select
251 260
         e.news_img as activity_img,
252
-        e.news_name,
261
+        e.news_name as activity_name,
253 262
         '1' as price,
254 263
         '2' as building_name,
255 264
         '3' as address,
256
-        t.event_type
265
+        t.event_type,
266
+		t.visit_time
257 267
         from ta_person_visit_record t
258 268
         left join ta_news e on t.target_id = e.news_id
259 269
         where t.event_type = 'news'
260 270
         and t.consultant_id = #{userId}
261 271
         and t.org_id = #{orgId}
272
+        group by t.target_id
262 273
         and t.`event` = 'share'
263
-        order by t.visit_time desc
264 274
 
265 275
         union all
266 276
 
267 277
         select
268
-        f.share_img as drainage_img,
269
-        f.`name` as drainage_name,
278
+        f.share_img as activity_img,
279
+        f.`name` as activity_name,
270 280
         '1' as price,
271 281
         '2' as building_name,
272 282
         '3' as address,
273
-        t.event_type
283
+        t.event_type,
284
+		t.visit_time
274 285
         from ta_person_visit_record t
275 286
         left join ta_drainage f on t.target_id = f.drainage_id
276 287
         where t.event_type = 'h5'
277 288
         and t.consultant_id = #{userId}
278 289
         and t.org_id = #{orgId}
279 290
         and t.`event` = 'share'
280
-        order by t.visit_time desc
291
+        group by t.target_id ) t order by t.visit_time desc
281 292
     </select>
282 293
 
283 294
     <select id="countShareNumByEventType" resultType="java.lang.Integer">