| | |
| | | |
| | | public Integer getUserId(){ |
| | | String username = JwtTokenUtils.getUsername(); |
| | | TAppUser appUser = appUserService.getOne(new QueryWrapper<TAppUser>().eq("phone", username).eq("isDelete",0)); |
| | | TAppUser appUser = appUserService.getOne(new QueryWrapper<TAppUser>().eq("openId", username).eq("isDelete",0)); |
| | | return appUser.getId(); |
| | | } |
| | | |
| | | public TAppUser getLoginUser(){ |
| | | String username = JwtTokenUtils.getUsername(); |
| | | TAppUser TAppUser = appUserService.getOne(new QueryWrapper<TAppUser>().eq("phone", username).eq("isDelete",0)); |
| | | TAppUser TAppUser = appUserService.getOne(new QueryWrapper<TAppUser>().eq("openId", username).eq("isDelete",0)); |
| | | return TAppUser; |
| | | } |
| | | |
| | |
| | | */ |
| | | public void logoff(){ |
| | | String username = JwtTokenUtils.getUsername(); |
| | | TAppUser userName = appUserService.getOne(new QueryWrapper<TAppUser>().eq("phone", username).eq("isDelete",0)); |
| | | TAppUser userName = appUserService.getOne(new QueryWrapper<TAppUser>().eq("openId", username).eq("isDelete",0)); |
| | | userName.setIsDelete(true); |
| | | appUserService.saveOrUpdate(userName); |
| | | } |
| | | |
| | | public Boolean checkPhoneExits(String phone){ |
| | | TAppUser userName = appUserService.getOne(new QueryWrapper<TAppUser>().eq("phone", phone).eq("isDelete",0)); |
| | | TAppUser userName = appUserService.getOne(new QueryWrapper<TAppUser>().eq("openId", phone).eq("isDelete",0)); |
| | | if(userName!=null){ |
| | | return true; |
| | | }else{ |