| | |
| | | import com.ruoyi.common.core.exception.ServiceException; |
| | | import com.ruoyi.common.core.utils.StringUtils; |
| | | import com.ruoyi.common.security.utils.SecurityUtils; |
| | | import com.ruoyi.goods.api.domain.TLotteryEvent; |
| | | import com.ruoyi.goods.api.service.LotteryEventClient; |
| | | import com.ruoyi.member.domain.dto.AppMemberBrowseDto; |
| | | import com.ruoyi.member.domain.vo.AppBirthdayCardVo; |
| | | import com.ruoyi.member.domain.vo.AppMemberPrizePageVo; |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.time.LocalDate; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author jqs34 |
| | |
| | | @Resource |
| | | private BrowseRecordService browseRecordService; |
| | | |
| | | @Resource |
| | | private LotteryEventClient lotteryEventClient; |
| | | |
| | | |
| | | @RequestMapping(value = "/getAppUserInfo", method = RequestMethod.POST) |
| | | @ApiOperation(value = "获取用户信息") |
| | | public R<AppUserInfoVo> getAppUserInfo() { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | AppUserInfoVo appUserInfoVo = memberService.getAppUserInfo(userId); |
| | | //判断是否可以抽奖 |
| | | List<TLotteryEvent> data = lotteryEventClient.getLotteryEventList(3).getData(); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | if(data.size() > 0){ |
| | | TLotteryEvent tLotteryEvent = data.get(0); |
| | | appUserInfoVo.setLotteryEventId(tLotteryEvent.getId()); |
| | | appUserInfoVo.setShareName(tLotteryEvent.getActivityProfile()); |
| | | appUserInfoVo.setShareImage(tLotteryEvent.getCoverImage()); |
| | | } |
| | | return R.ok(appUserInfoVo); |
| | | } |
| | | |