mirror of
https://codeup.aliyun.com/64f7d6b8ce01efaafef1e678/coal/coal.git
synced 2026-01-25 07:46:40 +08:00
完善
This commit is contained in:
@@ -124,12 +124,13 @@ public class EmpSalaryService extends BaseService<EmpSalaryEntity, EmpSalaryRepo
|
||||
EmpSalaryBatchEntity batch = batchService.get(dto.getBatchId());
|
||||
assertBatchEditable(batch);
|
||||
|
||||
RLock lock = redissonClient.getLock("batchModify." + batch.getId());
|
||||
@Cleanup("unlock") RLock lock = redissonClient.getLock("batchModify." + batch.getId());
|
||||
|
||||
boolean tryLock = lock.tryLock();
|
||||
|
||||
if (!tryLock) {
|
||||
batchModifing(batch);
|
||||
lock = null;
|
||||
}
|
||||
|
||||
if (org.apache.commons.collections4.MapUtils.isEmpty(dto.getSalaryItems())) {
|
||||
@@ -822,14 +823,17 @@ select id from tmp1 where rk = 1
|
||||
|
||||
assertBatchEditable(batch);
|
||||
|
||||
RLock lock = redissonClient.getLock("batchModify." + batch.getId());
|
||||
@Cleanup("unlock") RLock lock = redissonClient.getLock("batchModify." + batch.getId());
|
||||
|
||||
boolean tryLock = lock.tryLock();
|
||||
|
||||
if (!tryLock) {
|
||||
lock = null;
|
||||
batchModifing(batch);
|
||||
}
|
||||
|
||||
|
||||
|
||||
List<EmpSalaryItemEntity> items =
|
||||
this.empSalaryItemService.getItems(batch.getOrganizationId());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user