多端同时提交

This commit is contained in:
guohb
2024-06-05 18:01:14 +08:00
parent 4a433d7743
commit 7ba6b0d709
3 changed files with 12 additions and 0 deletions

View File

@@ -95,6 +95,10 @@ public class SysStoreAppServiceImpl implements SysStoreAppService, AuditResultSe
if (Objects.isNull(request)) {
throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
}
SystemBuildingShopDO isExist = systemBuildingShopMapper.selectByShopId(request.getShopId());
if (Objects.nonNull(isExist) && Objects.isNull(request.getId())){
throw new ServiceException(ErrorCodeEnum.DUPLICATE_SUBMISSION);
}
String lockKey = "submitSysBuildStore:" + request.getShopId();
String lockValue = UUID.randomUUID().toString();
boolean acquired = false;