| | |
| | | @Override |
| | | public R<LoginVO> mobileLogin(MobileLoginDTO mobileLogin) { |
| | | String code = redisService.getCacheObject(mobileLogin.getPhone()); |
| | | if(!"999999".equals(mobileLogin.getCode())){ |
| | | // if(!"999999".equals(mobileLogin.getCode())){ |
| | | if(null == code || !code.equals(mobileLogin.getCode())){ |
| | | throw new ServiceException("验证码错误"); |
| | | } |
| | | } |
| | | // } |
| | | //查看用户是否存在 |
| | | AppUser appUser = this.getOne(new LambdaQueryWrapper<AppUser>().eq(AppUser::getPhone, mobileLogin.getPhone()) |
| | | .ne(AppUser::getStatus,AppUserStatusConstant.LOGOUT) |
| | |
| | | List<OrderPageVO> orderPage = this.getBaseMapper().getOrderPage(appUser.getId()); |
| | | Community community = communityMapper.selectById(appUser.getCommunityId()); |
| | | String regionFullName = getRegionFullName(community.getRegionId()); |
| | | orderPage.get(0).setRegionName(regionFullName); |
| | | orderPage.get(0).setRegionId(community.getRegionId()); |
| | | return orderPage.get(0); |
| | | OrderPageVO orderPageVO = orderPage.get(0); |
| | | if (appUser.getEndTime()==null ){ |
| | | orderPageVO.setVipId(null); |
| | | } |
| | | if (appUser.getEndTime()!=null&&appUser.getEndTime().isBefore(LocalDateTime.now())){ |
| | | orderPageVO.setVipId(null); |
| | | } |
| | | orderPageVO.setRegionName(regionFullName); |
| | | orderPageVO.setRegionId(community.getRegionId()); |
| | | return orderPageVO; |
| | | } |
| | | @Autowired |
| | | private RegionMapper regionMapper; |