修复存款失败用户不能正常发送消息的问题
This commit is contained in:
parent
616d55d1a7
commit
8326e316fb
@ -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();
|
||||
@ -331,7 +330,7 @@ public class DailyReport {
|
||||
}
|
||||
String percent = getPercent(totalNewFirstDeposit, totalNewMember);
|
||||
synchronized (rows) {
|
||||
rows.add(new String[] {accountResp.getPlatformName(), String.valueOf(totalNewMember), String
|
||||
rows.add(new String[]{accountResp.getPlatformName(), String.valueOf(totalNewMember), String
|
||||
.valueOf(totalNewFirstDeposit), percent});
|
||||
}
|
||||
}, asyncTaskExecutor))
|
||||
@ -342,7 +341,7 @@ public class DailyReport {
|
||||
// 对 rows 列表进行排序
|
||||
rows.sort(Comparator.comparing((String[] row) -> row[0].length()).thenComparing(row -> row[0]));
|
||||
|
||||
rows.add(new String[] {"总计", String.valueOf(totals[0]), String.valueOf(totals[1]),
|
||||
rows.add(new String[]{"总计", String.valueOf(totals[0]), String.valueOf(totals[1]),
|
||||
getPercent(totals[1], totals[0])});
|
||||
String message = TableFormatter.formatTableAsHtml(rows);
|
||||
if (ministerUser.getNeedNotify() == DisEnableStatusEnum.ENABLE) {
|
||||
|
@ -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());
|
||||
|
@ -90,5 +90,4 @@ public class OptionServiceImpl implements OptionService {
|
||||
RedisUtils.set(CacheConstants.OPTION_KEY_PREFIX + code.getValue(), value);
|
||||
return mapper.apply(value);
|
||||
}
|
||||
|
||||
}
|
@ -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("修改成功,请牢记你的新密码");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user