This commit is contained in:
Harryxzy 2024-02-28 09:17:28 +08:00
parent 9e8fbbef89
commit f9163340e5
3 changed files with 8 additions and 4 deletions

View File

@ -76,6 +76,6 @@ public interface SalaryAcctResultLogMapper {
* @param salaryAcctEmployeeIds
* @param lockSalaryItemIds
*/
void deleteBySalaryAcctEmpIdExceptItemIds(@Param("salaryAcctEmployeeIds") Collection<Long> salaryAcctEmployeeIds,
void deleteBySalaryAcctEmpIdExceptItemIds(@Param("salaryAcctEmployeeIds") List<Long> salaryAcctEmployeeIds,
@Param("exceptItems") Collection<Long> lockSalaryItemIds, @Param("updateTime") Date updateTime);
}

View File

@ -68,5 +68,5 @@ public interface SalaryAcctResultLogService {
* @param salaryAcctEmployeeIds
* @param lockSalaryItemIds
*/
void deleteBySalaryAcctEmpIdExceptItemIds(Collection<Long> salaryAcctEmployeeIds, Collection<Long> lockSalaryItemIds);
void deleteBySalaryAcctEmpIdExceptItemIds(List<Long> salaryAcctEmployeeIds, Collection<Long> lockSalaryItemIds);
}

View File

@ -60,7 +60,11 @@ public class SalaryAcctResultLogServiceImpl extends Service implements SalaryAcc
}
@Override
public void deleteBySalaryAcctEmpIdExceptItemIds(Collection<Long> salaryAcctEmployeeIds, Collection<Long> lockSalaryItemIds) {
getSalaryAcctResultLogMapper().deleteBySalaryAcctEmpIdExceptItemIds(salaryAcctEmployeeIds,lockSalaryItemIds, new Date());
public void deleteBySalaryAcctEmpIdExceptItemIds(List<Long> salaryAcctEmployeeIds, Collection<Long> lockSalaryItemIds) {
// 分片
List<List<Long>> partition = Lists.partition(salaryAcctEmployeeIds, 50);
partition.forEach(part -> {
getSalaryAcctResultLogMapper().deleteBySalaryAcctEmpIdExceptItemIds(part,lockSalaryItemIds, new Date());
});
}
}