|
@@ -7,13 +7,17 @@ import com.huiju.estateagents.base.ResponseBean;
|
7
|
7
|
import com.huiju.estateagents.common.CommConstant;
|
8
|
8
|
import com.huiju.estateagents.entity.TaNews;
|
9
|
9
|
import com.huiju.estateagents.entity.TaPerson;
|
|
10
|
+import com.huiju.estateagents.entity.TaPoster;
|
10
|
11
|
import com.huiju.estateagents.entity.TaShareActivity;
|
11
|
12
|
import com.huiju.estateagents.entity.TaShareChildRecord;
|
|
13
|
+import com.huiju.estateagents.entity.TaShareContent;
|
12
|
14
|
import com.huiju.estateagents.entity.TaShareRecord;
|
13
|
15
|
import com.huiju.estateagents.service.ITaPersonService;
|
14
|
16
|
import com.huiju.estateagents.service.ITaShareActivityService;
|
15
|
17
|
import com.huiju.estateagents.service.ITaShareChildRecordService;
|
16
|
18
|
import com.huiju.estateagents.service.ITaShareRecordService;
|
|
19
|
+import com.huiju.estateagents.service.TaPosterService;
|
|
20
|
+import com.huiju.estateagents.service.TaShareContentService;
|
17
|
21
|
import io.swagger.models.auth.In;
|
18
|
22
|
import org.slf4j.Logger;
|
19
|
23
|
import org.slf4j.LoggerFactory;
|
|
@@ -50,6 +54,13 @@ public class TaShareActivityController extends BaseController {
|
50
|
54
|
|
51
|
55
|
@Autowired
|
52
|
56
|
private ITaShareChildRecordService taShareChildRecordService;
|
|
57
|
+
|
|
58
|
+ @Autowired
|
|
59
|
+ private TaPosterService taPosterService;
|
|
60
|
+
|
|
61
|
+ @Autowired
|
|
62
|
+ private TaShareContentService taShareContentService;
|
|
63
|
+
|
53
|
64
|
|
54
|
65
|
/**
|
55
|
66
|
* 分页查询列表
|
|
@@ -224,7 +235,8 @@ public class TaShareActivityController extends BaseController {
|
224
|
235
|
* @param groupActicityId 实体ID
|
225
|
236
|
*/
|
226
|
237
|
@RequestMapping(value="/wx/taShareActivity/{groupActicityId}",method= RequestMethod.GET)
|
227
|
|
- public ResponseBean wxShareActivityGet(@PathVariable Integer groupActicityId, HttpServletRequest request){
|
|
238
|
+ public ResponseBean wxShareActivityGet(@PathVariable Integer groupActicityId,
|
|
239
|
+ @RequestParam(value = "recordId",required = false) Integer recordId, HttpServletRequest request){
|
228
|
240
|
ResponseBean responseBean = new ResponseBean();
|
229
|
241
|
String openid = getOpenId(request);
|
230
|
242
|
Integer orgId = getOrgId(request);
|
|
@@ -240,24 +252,40 @@ public class TaShareActivityController extends BaseController {
|
240
|
252
|
map.put("taShareActivity",taShareActivity);
|
241
|
253
|
|
242
|
254
|
//发起者团长信息
|
243
|
|
- QueryWrapper<TaShareRecord> queryWrapper = new QueryWrapper<>();
|
244
|
|
- queryWrapper.eq("group_activity_id",groupActicityId);
|
245
|
|
- queryWrapper.eq("person_id",person.getPersonId());
|
246
|
|
- queryWrapper.eq("org_id",orgId);
|
247
|
|
- TaShareRecord taShareRecord = taShareRecordService.getOne(queryWrapper);
|
248
|
|
- if (null != taShareRecord){
|
249
|
|
- //团长
|
250
|
|
- taShareActivity.setGroupStatus(CommConstant.HELP_STATUS_INITIATE);
|
251
|
|
- map.put("taShareRecord",taShareRecord);
|
252
|
|
-
|
253
|
|
- //团员
|
254
|
|
- QueryWrapper<TaShareChildRecord> childRecordQueryWrapper = new QueryWrapper<>();
|
255
|
|
- childRecordQueryWrapper.eq("org_id",orgId);
|
256
|
|
- childRecordQueryWrapper.eq("group_activity_id",taShareActivity.getGroupActicityId());
|
257
|
|
- childRecordQueryWrapper.eq("record_id",taShareRecord.getRecordId());
|
258
|
|
- List<TaShareChildRecord> shareChildRecordList = taShareChildRecordService.list(childRecordQueryWrapper);
|
259
|
|
- map.put("shareChildRecordList",shareChildRecordList);
|
260
|
|
- }
|
|
255
|
+ if (null != recordId){
|
|
256
|
+ TaShareRecord taShareRecord = taShareRecordService.getById(recordId);
|
|
257
|
+ if (null != taShareRecord){
|
|
258
|
+ //团长
|
|
259
|
+ taShareActivity.setGroupStatus(CommConstant.HELP_STATUS_INITIATE);
|
|
260
|
+ map.put("taShareRecord",taShareRecord);
|
|
261
|
+
|
|
262
|
+ //团员
|
|
263
|
+ QueryWrapper<TaShareChildRecord> childRecordQueryWrapper = new QueryWrapper<>();
|
|
264
|
+ childRecordQueryWrapper.eq("org_id",orgId);
|
|
265
|
+ childRecordQueryWrapper.eq("group_activity_id",taShareActivity.getGroupActicityId());
|
|
266
|
+ childRecordQueryWrapper.eq("record_id",taShareRecord.getRecordId());
|
|
267
|
+ List<TaShareChildRecord> shareChildRecordList = taShareChildRecordService.list(childRecordQueryWrapper);
|
|
268
|
+ map.put("shareChildRecordList",shareChildRecordList);
|
|
269
|
+ }
|
|
270
|
+ }
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+ //获取海报信息
|
|
274
|
+ QueryWrapper<TaPoster> posterQueryWrapper = new QueryWrapper<>();
|
|
275
|
+ posterQueryWrapper.eq("target_type",CommConstant.GROUP_ACTIVITY);
|
|
276
|
+ posterQueryWrapper.eq("target_id",groupActicityId);
|
|
277
|
+ posterQueryWrapper.eq("org_id",orgId);
|
|
278
|
+ List<TaPoster> postList = taPosterService.list(posterQueryWrapper);
|
|
279
|
+ map.put("postList",postList);
|
|
280
|
+
|
|
281
|
+ //获取分享信息
|
|
282
|
+ QueryWrapper<TaShareContent> taShareContentQueryWrapper = new QueryWrapper<>();
|
|
283
|
+ taShareContentQueryWrapper.eq("share_content_type",CommConstant.GROUP_ACTIVITY);
|
|
284
|
+ taShareContentQueryWrapper.eq("target_id",groupActicityId);
|
|
285
|
+ taShareContentQueryWrapper.eq("org_id",orgId);
|
|
286
|
+ List<TaShareContent> shareContentList = taShareContentService.list(taShareContentQueryWrapper);
|
|
287
|
+ map.put("shareContentList",shareContentList);
|
|
288
|
+
|
261
|
289
|
responseBean.addSuccess(map);
|
262
|
290
|
}catch (Exception e){
|
263
|
291
|
e.printStackTrace();
|