修复存款失败用户不能正常发送消息的问题

This commit is contained in:
zayac 2024-06-08 16:12:29 +08:00
parent 616d55d1a7
commit 8326e316fb
4 changed files with 173 additions and 178 deletions

View File

@ -62,7 +62,7 @@ import java.util.stream.Collectors;
@Component
@RequiredArgsConstructor
@Slf4j
@Profile("prod")
@Profile("dev")
public class DailyReport {
private final TeamService teamService;
private final DeptService deptService;
@ -142,7 +142,6 @@ public class DailyReport {
// 一小时发送一次
@Scheduled(cron = "0 0 * * * ?")
//@Scheduled(fixedDelay = 6000L)
public void generateTeamReportTask() {
LocalDateTime nowDateTime = LocalDateTime.now();
LocalDate nowDate = LocalDate.now();
@ -235,7 +234,7 @@ public class DailyReport {
String notification = telegramMessageService
.buildFailedPayMessage(accountName, accountMembers);
UserWithRolesAndAccountsResp currUser = accountUsernameToUserMap.get(accountName);
if (DisEnableStatusEnum.ENABLE.equals(currUser.getNeedNotify())) {
if (currUser != null && DisEnableStatusEnum.ENABLE.equals(currUser.getNeedNotify())) {
String botToken = StrUtil.isEmpty(currUser.getBotToken())
? ministerUser.getBotToken()
: currUser.getBotToken();

View File

@ -80,7 +80,6 @@ public class LoginServiceImpl implements LoginService {
private final PasswordEncoder passwordEncoder;
private final OptionService optionService;
@Override
public String accountLogin(String username, String password) {
UserDO user = userService.getByUsername(username);
boolean isError = ObjectUtil.isNull(user) || !passwordEncoder.matches(password, user.getPassword());

View File

@ -90,5 +90,4 @@ public class OptionServiceImpl implements OptionService {
RedisUtils.set(CacheConstants.OPTION_KEY_PREFIX + code.getValue(), value);
return mapper.apply(value);
}
}

View File

@ -95,8 +95,6 @@ public class UserCenterController {
String rawNewPassword = ExceptionUtils.exToNull(() -> SecureUtils.decryptByRsaPrivateKey(updateReq
.getNewPassword()));
ValidationUtils.throwIfNull(rawNewPassword, "新密码解密失败");
ValidationUtils.throwIf(!ReUtil
.isMatch(RegexConstants.PASSWORD, rawNewPassword), "密码长度为 6 到 32 位,可以包含字母、数字、下划线,特殊字符,同时包含字母和数字");
userService.updatePassword(rawOldPassword, rawNewPassword, LoginHelper.getUserId());
return R.ok("修改成功,请牢记你的新密码");
}