通过redis来进行单据的单号重复判断(修改判断提示)

This commit is contained in:
jishenghua
2025-07-10 09:29:53 +08:00
parent 07d3d70cf6
commit 9330629196
2 changed files with 5 additions and 2 deletions

View File

@@ -1115,8 +1115,8 @@ public class DepotHeadService {
String keyNo = userInfo.getLoginName() + "_" + depotHead.getNumber();
String keyValue = redisService.getCacheObject(keyNo);
if(StringUtil.isNotEmpty(keyValue)) {
throw new BusinessRunTimeException(ExceptionConstants.DEPOT_HEAD_BILL_NUMBER_EXIST_CODE,
String.format(ExceptionConstants.DEPOT_HEAD_BILL_NUMBER_EXIST_MSG));
throw new BusinessRunTimeException(ExceptionConstants.DEPOT_HEAD_SUBMIT_REPEAT_FAILED_CODE,
String.format(ExceptionConstants.DEPOT_HEAD_SUBMIT_REPEAT_FAILED_MSG));
} else {
redisService.storageKeyWithTime(keyNo, depotHead.getNumber(), 10L);
}