| | |
| | | import java.util.Comparator; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.Optional; |
| | | import java.util.concurrent.atomic.AtomicBoolean; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.constants.HttpStatus; |
| | | import org.apache.commons.lang.StringUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | | import org.springframework.util.ObjectUtils; |
| | |
| | | Object data = r.getData(); |
| | | if (!ObjectUtils.isEmpty(data)) { |
| | | LoginUserInfoVO loginUserInfoVO = (LoginUserInfoVO)data; |
| | | //是否保存unionid |
| | | // if (Objects.isNull(loginUserInfoVO.getUnionid()) || "无".equals(loginUserInfoVO.getUnionid())) { |
| | | // return R.fail(HttpStatus.UNAUTHORIZED, "token过期"); |
| | | // } |
| | | R r1 = communityService.detailHouse(userId); |
| | | if(StringUtils.isNotEmpty(loginUserInfoVO.getIdCard())){ |
| | | //查询实名用户绑定的实有人口地址 |
| | | R r4=communityService.selectByIdCard(loginUserInfoVO.getIdCard()); |
| | | if(R.isOk(r4)){ |
| | | String address= (String) r4.getData(); |
| | | if(StringUtils.isNotEmpty(address)){ |
| | | loginUserInfoVO.setAddress(address); |
| | | r.setData(loginUserInfoVO); |
| | | } |
| | | } |
| | | } |
| | | if (null != communityId && 0 != communityId) { |
| | | R r2 = communityService.detailCommunity(communityId); |
| | | if (R.isOk(r2)) { |
| | |
| | | @ApiOperation(value = "我的活动", response = ComActActivityVO.class) |
| | | @ApiImplicitParam(name = "status", value = "活动状态(4 进行中 5 已结束 6 已取消)", required = false) |
| | | @GetMapping("listactivity") |
| | | public R listActivity(@RequestParam("status") Integer status) { |
| | | public R listActivity(@RequestParam(value = "status", required = false) Integer status) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | Long userId = loginUserInfo.getUserId(); |
| | | Long communityId = loginUserInfo.getCommunityId(); |
| | | List<ComActActivityVO> comActActivityVOS = new ArrayList<>(); |
| | | R r = communityService.listActivity(userId, status); |
| | | if (R.isOk(r)) { |
| | | if (R.isOk(r)&&r.getData()!=null) { |
| | | comActActivityVOS = (List<ComActActivityVO>)r.getData(); |
| | | } |
| | | R r1 = partyBuildingService.listActivity(userId, communityId, status); |