多端同时提交

This commit is contained in:
guohb
2024-06-05 17:58:27 +08:00
parent bf5024729d
commit 4a433d7743

View File

@@ -140,6 +140,10 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
if (Objects.isNull(request.getShopId())) {
throw new ServiceException(ErrorCodeEnum.SHOP_ID_NOT_EXIST);
}
SignFranchiseDO isExist = signFranchiseMapper.selectByShopId(request.getShopId());
if (Objects.nonNull(isExist) && Objects.isNull(request.getId())){
throw new ServiceException(ErrorCodeEnum.DUPLICATE_SUBMISSION);
}
String lockKey = "submitSignFranchise:" + request.getShopId();
//流水
String lockValue = UUID.randomUUID().toString();