| | |
| | | @Override |
| | | public R<LoginVo> registerAccount(RegisterAccount registerAccount) { |
| | | //校验验证码 |
| | | String code = redisService.getCacheObject(registerAccount.getPhone()); |
| | | if(!"999999".equals(registerAccount.getCode())){ |
| | | if(null == code || !code.equals(registerAccount.getCode())){ |
| | | return R.fail("验证码错误"); |
| | | } |
| | | } |
| | | // String code = redisService.getCacheObject(registerAccount.getPhone()); |
| | | // if(!"999999".equals(registerAccount.getCode())){ |
| | | // if(null == code || !code.equals(registerAccount.getCode())){ |
| | | // return R.fail("验证码错误"); |
| | | // } |
| | | // } |
| | | //使用jscode获取微信openid |
| | | Map<String, Object> map = weChatUtil.code2Session(registerAccount.getJscode()); |
| | | Integer errcode = Integer.valueOf(map.get("errcode").toString()); |
| | |
| | | |
| | | //获取微信推广二维码 |
| | | String fileName = UUID.randomUUID() + ".jpg"; |
| | | String getwxacodeunlimit = weChatUtil.getwxacodeunlimit("pages/login/login", "id=" + appUser.getId(), EnvVersion.RELEASE, filePath + fileName); |
| | | String getwxacodeunlimit = weChatUtil.getwxacodeunlimit("pages/start/start", "id=" + appUser.getId(), EnvVersion.RELEASE, filePath + fileName); |
| | | appUser.setQrCode(getwxacodeunlimit); |
| | | this.updateById(appUser); |
| | | |
| | |
| | | loginVo.setFailureTime(Long.valueOf(tokenApplet.get("expires_in").toString())); |
| | | return R.ok(loginVo); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 会员等级变化 |
| | | */ |
| | |
| | | .eq(AppUser::getStatus, 1).in(AppUser::getId, replaceable)); |
| | | for (AppUser appUser : list) { |
| | | Long data = orderClient.getOrderCountByAppUserId(appUser.getId()).getData(); |
| | | if(data == 0){ |
| | | if(data == 0L){ |
| | | appUser.setChangePromoter(1); |
| | | this.updateById(appUser); |
| | | } |
| | |
| | | Set<Integer> shopIds = shopR.getData(); |
| | | if (!CollectionUtils.isEmpty(shopIds)){ |
| | | appUser.setShopIds(shopIds); |
| | | }else { |
| | | return new Page<>(); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public List<AppUser> getAppUserByPhoneNoFilter(String phone) { |
| | | return this.baseMapper.getAppUserByPhoneNoFilter(phone); |
| | | } |
| | | } |