| | |
| | | * @param accType 账号类型 |
| | | * @return |
| | | */ |
| | | public CtAccount getByAccAndType(String acc, String accType){ |
| | | public CtAccount getByAccAndType(String acc, int accType){ |
| | | QueryWrapper<CtAccount> accountWrapper = new QueryWrapper<>(); |
| | | accountWrapper.eq("acc", acc) |
| | | .eq("acc_type", accType); |
| | | CtAccount ctAccount = this.getOne(accountWrapper); |
| | | return ctAccount; |
| | | } |
| | | |
| | | /** |
| | | * 根据用户编号和类型查询 |
| | | * @param userId 用户编号 |
| | | * @param accType 账号类型 |
| | | * @return |
| | | */ |
| | | public CtAccount getByUserIdAndType(String userId, int accType){ |
| | | QueryWrapper<CtAccount> accountWrapper = new QueryWrapper<>(); |
| | | accountWrapper.eq("user_id", userId) |
| | | .eq("acc_type", accType); |
| | | CtAccount ctAccount = this.getOne(accountWrapper); |
| | | return ctAccount; |
| | |
| | | if (checkCredential(ctAccountLoginDTO.getCipher(), ctAccount)) { |
| | | //返回结果 |
| | | UserLoginDTO userLoginDTO = new UserLoginDTO(); |
| | | CtUser ctUser = ctUserService.getByIdFromRedis(ctAccount.getUserId()); |
| | | CtUser ctUser = ctUserService.getById(ctAccount.getUserId()); |
| | | if (ObjectUtils.isEmpty(ctUser)){ |
| | | return ReturnFailUtils.getRepInfo("账号或密码错误,请确认后重试!"); |
| | | } |