| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | import com.panzhihua.common.model.vos.community.ComActActivityVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.exceptions.UnAuthenticationException; |
| | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | |
| | | **/ |
| | | @RestController |
| | | @RequestMapping("/user/") |
| | | @Api(tags = {"用户模块"}) |
| | | @Api(tags = {"我的模块"}) |
| | | public class UserApi extends BaseController { |
| | | @Resource |
| | | private UserService userService; |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | @ApiOperation(value = "当前登录用户信息",response = LoginUserInfoVO.class) |
| | | @GetMapping("info") |
| | |
| | | R<LoginUserInfoVO> r = userService.getUserInfoByUserId(userId + ""); |
| | | return r; |
| | | } |
| | | |
| | | @ApiOperation(value = "分页展示我的活动",response = ComActActivityVO.class) |
| | | @GetMapping("pagemyactivity") |
| | | public R pageMyActivity(@RequestBody ComActActivityVO comActActivityVO){ |
| | | Long userId = this.getUserId(); |
| | | // todo 我的活动包括普通社区活动、志愿者活动、党建活动 |
| | | comActActivityVO.setSponsorId(userId);//登录人id 暂时存入负责人字段 |
| | | R r = communityService.pageMyActivity(comActActivityVO); |
| | | return r; |
| | | } |
| | | } |