| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.panzhihua.common.model.vos.community.ComActActivityVO; |
| | | import com.panzhihua.common.model.vos.community.ComActEasyPhotoVO; |
| | | import com.panzhihua.common.model.vos.community.ComActMicroWishVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngStructHouseVO; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import com.panzhihua.common.model.vos.user.ComMngFamilyInfoVO; |
| | | import com.panzhihua.common.model.vos.user.UserPhoneVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | |
| | | @ApiOperation(value = "当前登录用户信息", response = LoginUserInfoVO.class) |
| | | @GetMapping("info") |
| | | public R getUserInfo() { |
| | | Long userId = this.getUserId(); |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | Long communityId = loginUserInfo.getCommunityId(); |
| | | Long userId = loginUserInfo.getUserId(); |
| | | Long areaId = loginUserInfo.getAreaId(); |
| | | R<LoginUserInfoVO> r = userService.getUserInfoByUserId(userId + ""); |
| | | if (R.isOk(r)) { |
| | | Object data = r.getData(); |
| | | if (!ObjectUtils.isEmpty(data)) { |
| | | LoginUserInfoVO loginUserInfoVO = (LoginUserInfoVO) data; |
| | | R r1 = communityService.detailHouse(userId); |
| | | R r2=communityService.detailCommunity(communityId); |
| | | R r3=communityService.detailArea(areaId); |
| | | if (R.isOk(r1)) { |
| | | Object data1 = r1.getData(); |
| | | if (!ObjectUtils.isEmpty(data1)) { |
| | |
| | | r.setData(loginUserInfoVO); |
| | | } |
| | | } |
| | | if (R.isOk(r2)) { |
| | | Object data1 = r2.getData(); |
| | | if (!ObjectUtils.isEmpty(data1)) { |
| | | loginUserInfoVO.setComActVO(JSONObject.parseObject(JSONObject.toJSONString(data1),ComActVO.class)); |
| | | r.setData(loginUserInfoVO); |
| | | } |
| | | } |
| | | if (R.isOk(r3)) { |
| | | Object data1 = r3.getData(); |
| | | if (!ObjectUtils.isEmpty(data1)) { |
| | | loginUserInfoVO.setComMngStructAreaVO(JSONObject.parseObject(JSONObject.toJSONString(data1),ComMngStructAreaVO.class)); |
| | | r.setData(loginUserInfoVO); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return r; |