推送明细

This commit is contained in:
钱涛 2024-12-09 16:55:22 +08:00
parent 887531ba5d
commit 2932df22e9
1 changed files with 6 additions and 6 deletions

View File

@ -480,7 +480,7 @@ public class PushServiceImpl extends Service implements PushService {
String sql = String.format("insert into %s (%s) values (%s)", tableName, String.join(",", fields), values.stream().map(Object::toString).collect(Collectors.joining(",")));
PushRecordDetailPO pushRecordDetailPO = PushRecordDetailPO.builder()
.id(recordId)
.id(IdGenerator.generate())
.acctEmpId(emp.getId())
.recordId(record.getId())
.status(PushRecordDetailStatusEnum.PREPARE.getValue())
@ -501,8 +501,8 @@ public class PushServiceImpl extends Service implements PushService {
}
);
} catch (Exception e) {
removeRecords(recordIds);
log.error("推送失败", e);
removeRecords(recordIds);
throw new SalaryRunTimeException("推送失败");
}
@ -571,11 +571,11 @@ public class PushServiceImpl extends Service implements PushService {
public void removeRecords(List<Long> recordIds) {
recordIds.forEach(recordId -> {
PushRecordPO recordPO = getPushRecordMapper().getById(recordId);
if (recordPO == null){
throw new SalaryRunTimeException("推送记录不存在");
}
if (recordPO != null) {
getPushRecordDetailMapper().deleteByRecordId(recordId);
getPushRecordMapper().delete(recordPO);
}
});
}