|
|
|
|
379
|
@ApiImplicitParam(dataTypeClass = Integer.class, name = "helpActivityId", paramType = "path", value = "活动状态")
|
379
|
@ApiImplicitParam(dataTypeClass = Integer.class, name = "helpActivityId", paramType = "path", value = "活动状态")
|
380
|
})
|
380
|
})
|
381
|
@RequestMapping(value = "/wx/helpActivity/{helpActivityId}", method = RequestMethod.GET)
|
381
|
@RequestMapping(value = "/wx/helpActivity/{helpActivityId}", method = RequestMethod.GET)
|
382
|
- public ResponseBean wxHelpActivityGet(@PathVariable(value = "helpActivityId") Integer helpActivityId,HttpServletRequest request) {
|
|
|
|
|
382
|
+ public ResponseBean wxHelpActivityGet(@PathVariable(value = "helpActivityId") Integer helpActivityId,
|
|
|
383
|
+ @RequestParam(value = "initiateId",required = false) Integer initiateId,HttpServletRequest request) {
|
383
|
ResponseBean responseBean = new ResponseBean();
|
384
|
ResponseBean responseBean = new ResponseBean();
|
384
|
- String openid = getOpenId(request);
|
|
|
385
|
Integer orgId = getOrgId(request);
|
385
|
Integer orgId = getOrgId(request);
|
386
|
- List<TaPerson> taPersons = taPersonService.getPersonsByOpenId(openid);
|
|
|
387
|
- if (null == taPersons || taPersons.size() != 1) {
|
|
|
388
|
- return ResponseBean.error("验证人员信息失败", ResponseBean.ERROR_UNAVAILABLE);
|
|
|
389
|
- }
|
|
|
390
|
- TaPerson person = taPersons.get(0);
|
|
|
|
|
386
|
+
|
391
|
Map<String,Object> map = new HashMap<>();
|
387
|
Map<String,Object> map = new HashMap<>();
|
392
|
try {
|
388
|
try {
|
393
|
//活动信息
|
389
|
//活动信息
|
|
|
|
|
395
|
map.put("helpActivity",helpActivity);
|
391
|
map.put("helpActivity",helpActivity);
|
396
|
|
392
|
|
397
|
//发起者信息
|
393
|
//发起者信息
|
398
|
- QueryWrapper<HelpInitiateRecord> queryWrapper = new QueryWrapper<>();
|
|
|
399
|
- queryWrapper.eq("help_activity_id",helpActivity.getHelpActivityId());
|
|
|
400
|
- queryWrapper.eq("persion_id",person.getPersonId());
|
|
|
401
|
- queryWrapper.eq("org_id",orgId);
|
|
|
402
|
- HelpInitiateRecord helpInitiateRecord = helpInitiateRecordService.getOne(queryWrapper);
|
|
|
403
|
- if (null != helpInitiateRecord){
|
|
|
404
|
- helpActivity.setHelpStatus(CommConstant.HELP_STATUS_INITIATE);
|
|
|
|
|
394
|
+ if (null != initiateId){
|
|
|
395
|
+ HelpInitiateRecord helpInitiateRecord = helpInitiateRecordService.getById(initiateId);
|
|
|
396
|
+ if (null != helpInitiateRecord){
|
|
|
397
|
+ helpActivity.setHelpStatus(CommConstant.HELP_STATUS_INITIATE);
|
|
|
398
|
+
|
|
|
399
|
+ //助力者信息
|
|
|
400
|
+ QueryWrapper<HelpRecord> helpRecordQueryWrapper = new QueryWrapper<>();
|
|
|
401
|
+ helpRecordQueryWrapper.eq("org_id",orgId);
|
|
|
402
|
+ helpRecordQueryWrapper.eq("help_activity_id",helpActivity.getHelpActivityId());
|
|
|
403
|
+ helpRecordQueryWrapper.eq("help_record_initiate_id",helpInitiateRecord.getHelpRecordInitiateId());
|
|
|
404
|
+ List<HelpRecord> helpRecordList = helpRecordService.list(helpRecordQueryWrapper);
|
|
|
405
|
+
|
|
|
406
|
+ map.put("helpInitiateRecord",helpInitiateRecord);
|
|
|
407
|
+ map.put("helpRecordList",helpRecordList);
|
|
|
408
|
+ }
|
|
|
409
|
+ }
|
405
|
|
410
|
|
406
|
- //助力者信息
|
|
|
407
|
- QueryWrapper<HelpRecord> helpRecordQueryWrapper = new QueryWrapper<>();
|
|
|
408
|
- helpRecordQueryWrapper.eq("org_id",orgId);
|
|
|
409
|
- helpRecordQueryWrapper.eq("help_activity_id",helpActivity.getHelpActivityId());
|
|
|
410
|
- helpRecordQueryWrapper.eq("help_record_initiate_id",helpInitiateRecord.getHelpRecordInitiateId());
|
|
|
411
|
- List<HelpRecord> helpRecordList = helpRecordService.list(helpRecordQueryWrapper);
|
|
|
412
|
-
|
|
|
413
|
- map.put("helpInitiateRecord",helpInitiateRecord);
|
|
|
414
|
- map.put("helpRecordList",helpRecordList);
|
|
|
415
|
- }
|
|
|
416
|
-
|
|
|
417
|
//获取海报信息
|
411
|
//获取海报信息
|
418
|
QueryWrapper<TaPoster> posterQueryWrapper = new QueryWrapper<>();
|
412
|
QueryWrapper<TaPoster> posterQueryWrapper = new QueryWrapper<>();
|
419
|
posterQueryWrapper.eq("target_type",CommConstant.HELP_ACTIVITY);
|
413
|
posterQueryWrapper.eq("target_type",CommConstant.HELP_ACTIVITY);
|