魏超 5 年前
父节点
当前提交
55799120e9

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

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

+ 17
- 16
src/main/resources/mapper/TaPersonVisitRecordMapper.xml 查看文件

183
     </select>
183
     </select>
184
 
184
 
185
     <select id="getConsultantShareInfoList" resultType="com.huiju.estateagents.entity.TaConsultantInfo">
185
     <select id="getConsultantShareInfoList" resultType="com.huiju.estateagents.entity.TaConsultantInfo">
186
+        select * From (
186
         select
187
         select
187
         a.url as activity_img,
188
         a.url as activity_img,
188
         a.building_name as activity_name,
189
         a.building_name as activity_name,
189
         a.building_name,
190
         a.building_name,
190
         a.address,
191
         a.address,
191
         a.price,
192
         a.price,
192
-        t.event_type
193
+        t.event_type,
194
+		t.visit_time
193
         from ta_person_visit_record t
195
         from ta_person_visit_record t
194
         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
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
195
         where t.event_type = 'building'
197
         where t.event_type = 'building'
197
         and t.org_id = #{orgId}
199
         and t.org_id = #{orgId}
198
         and t.`event` = 'share'
200
         and t.`event` = 'share'
199
         group by t.target_id
201
         group by t.target_id
200
-        order by t.visit_time desc
201
 
202
 
202
         union all
203
         union all
203
 
204
 
207
         '1' as price,
208
         '1' as price,
208
         '2' as building_name,
209
         '2' as building_name,
209
         '3' as address,
210
         '3' as address,
210
-        t.event_type
211
+        t.event_type,
212
+		t.visit_time
211
         from ta_person_visit_record t
213
         from ta_person_visit_record t
212
         left join ta_building_dynamic b on t.target_id = b.dynamic_id
214
         left join ta_building_dynamic b on t.target_id = b.dynamic_id
213
         where t.event_type = 'activity'
215
         where t.event_type = 'activity'
215
         and t.org_id = #{orgId}
217
         and t.org_id = #{orgId}
216
         and t.`event` = 'share'
218
         and t.`event` = 'share'
217
         group by t.target_id
219
         group by t.target_id
218
-        order by t.visit_time desc
219
 
220
 
220
         union all
221
         union all
221
 
222
 
225
         '1' as price,
226
         '1' as price,
226
         '2' as building_name,
227
         '2' as building_name,
227
         '3' as address,
228
         '3' as address,
228
-        t.event_type
229
+        t.event_type,
230
+		t.visit_time
229
         from ta_person_visit_record t
231
         from ta_person_visit_record t
230
         left join ta_help_activity c on t.target_id = c.help_activity_id
232
         left join ta_help_activity c on t.target_id = c.help_activity_id
231
         where t.event_type = 'help'
233
         where t.event_type = 'help'
233
         and t.org_id = #{orgId}
235
         and t.org_id = #{orgId}
234
         and t.`event` = 'share'
236
         and t.`event` = 'share'
235
         group by t.target_id
237
         group by t.target_id
236
-        order by t.visit_time desc
237
 
238
 
238
         union all
239
         union all
239
 
240
 
243
         '1' as price,
244
         '1' as price,
244
         '2' as building_name,
245
         '2' as building_name,
245
         '3' as address,
246
         '3' as address,
246
-        t.event_type
247
+        t.event_type,
248
+		t.visit_time
247
         from ta_person_visit_record t
249
         from ta_person_visit_record t
248
         left join ta_share_activity d on t.target_id = d.group_activity_id
250
         left join ta_share_activity d on t.target_id = d.group_activity_id
249
         where t.event_type = 'group'
251
         where t.event_type = 'group'
251
         and t.org_id = #{orgId}
253
         and t.org_id = #{orgId}
252
         and t.`event` = 'share'
254
         and t.`event` = 'share'
253
         group by t.target_id
255
         group by t.target_id
254
-        order by t.visit_time desc
255
 
256
 
256
         union all
257
         union all
257
 
258
 
258
         select
259
         select
259
         e.news_img as activity_img,
260
         e.news_img as activity_img,
260
-        e.news_name,
261
+        e.news_name as activity_name,
261
         '1' as price,
262
         '1' as price,
262
         '2' as building_name,
263
         '2' as building_name,
263
         '3' as address,
264
         '3' as address,
264
-        t.event_type
265
+        t.event_type,
266
+		t.visit_time
265
         from ta_person_visit_record t
267
         from ta_person_visit_record t
266
         left join ta_news e on t.target_id = e.news_id
268
         left join ta_news e on t.target_id = e.news_id
267
         where t.event_type = 'news'
269
         where t.event_type = 'news'
269
         and t.org_id = #{orgId}
271
         and t.org_id = #{orgId}
270
         group by t.target_id
272
         group by t.target_id
271
         and t.`event` = 'share'
273
         and t.`event` = 'share'
272
-        order by t.visit_time desc
273
 
274
 
274
         union all
275
         union all
275
 
276
 
276
         select
277
         select
277
-        f.share_img as drainage_img,
278
-        f.`name` as drainage_name,
278
+        f.share_img as activity_img,
279
+        f.`name` as activity_name,
279
         '1' as price,
280
         '1' as price,
280
         '2' as building_name,
281
         '2' as building_name,
281
         '3' as address,
282
         '3' as address,
282
-        t.event_type
283
+        t.event_type,
284
+		t.visit_time
283
         from ta_person_visit_record t
285
         from ta_person_visit_record t
284
         left join ta_drainage f on t.target_id = f.drainage_id
286
         left join ta_drainage f on t.target_id = f.drainage_id
285
         where t.event_type = 'h5'
287
         where t.event_type = 'h5'
286
         and t.consultant_id = #{userId}
288
         and t.consultant_id = #{userId}
287
         and t.org_id = #{orgId}
289
         and t.org_id = #{orgId}
288
         and t.`event` = 'share'
290
         and t.`event` = 'share'
289
-        group by t.target_id
290
-        order by t.visit_time desc
291
+        group by t.target_id ) t order by t.visit_time desc
291
     </select>
292
     </select>
292
 
293
 
293
     <select id="countShareNumByEventType" resultType="java.lang.Integer">
294
     <select id="countShareNumByEventType" resultType="java.lang.Integer">