云立方报错信息修改

This commit is contained in:
苏竹红
2024-06-05 16:29:50 +08:00
parent ccc5d4b608
commit 3f88f78745
5 changed files with 11 additions and 2 deletions

View File

@@ -97,7 +97,7 @@ public class ApplyLicenseServiceImpl implements ApplyLicenseService {
String lockKey = "submitLicense:" + request.getShopId();
String lockValue = UUID.randomUUID().toString();
boolean acquired = Boolean.FALSE;
acquired = redisUtilPool.setNxExpire(lockKey, lockValue, CommonConstants.TEN_SECONDS);
acquired = redisUtilPool.setNxExpire(lockKey, lockValue, CommonConstants.ONE_SECONDS);
if (!acquired) {
throw new ServiceException(ErrorCodeEnum.DUPLICATE_SUBMISSION);
}

View File

@@ -214,7 +214,7 @@ public class OpeningOperationPlanImpl implements OpeningOperationPlanService {
return Boolean.TRUE;
} catch (Exception e) {
log.error("获取鲜丰订货金异常或更新状态失败");
throw new ServiceException(ErrorCodeEnum.YLF_ERROR);
throw new ServiceException(ErrorCodeEnum.GET_FIRST_ORDER);
}
}

View File

@@ -53,6 +53,9 @@ public class YlfServiceImpl implements YlfService {
return list.get(0);
}
} catch (Exception e) {
if ("无对应数据!".equals(((ServiceException)e).getErrorMessage())){
throw new ServiceException(ErrorCodeEnum.YLF_DATA_IS_NULL);
}
throw new ServiceException(ErrorCodeEnum.YLF_ERROR,((ServiceException)e).getErrorMessage());
}
return null;
@@ -95,6 +98,9 @@ public class YlfServiceImpl implements YlfService {
}
} catch (Exception e) {
log.info("调用云立方获取项目列表异常,getProjectList error:{}", e);
if ("无对应数据!".equals(((ServiceException)e).getErrorMessage())){
throw new ServiceException(ErrorCodeEnum.YLF_DATA_IS_NULL);
}
throw new ServiceException(ErrorCodeEnum.YLF_ERROR,((ServiceException)e).getErrorMessage());
}