云立方报错信息修改

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

@@ -28,6 +28,8 @@ public class CommonConstants {
//十秒 //十秒
public static final int TEN_SECONDS = 10000; public static final int TEN_SECONDS = 10000;
public static final int ONE_SECONDS = 1000;
/** /**
* 跟进任务通知缓存时间 1小时 * 跟进任务通知缓存时间 1小时
*/ */

View File

@@ -212,6 +212,7 @@ public enum ErrorCodeEnum {
XFSG_SERVICE_ERROR(103099,"鲜丰服务调用失败",null), XFSG_SERVICE_ERROR(103099,"鲜丰服务调用失败",null),
GET_FIRST_ORDER(103021,"获取鲜丰首批订货金失败",null), GET_FIRST_ORDER(103021,"获取鲜丰首批订货金失败",null),
YLF_ERROR(110001, "云立方接口异常!异常信息:{0}", null), YLF_ERROR(110001, "云立方接口异常!异常信息:{0}", null),
YLF_DATA_IS_NULL(110002, "请联系工程维护云立方系统门店信息!", null),
//装修 //装修
THREE_ACCEPTANCE(121001,"提交三方验收失败",null), THREE_ACCEPTANCE(121001,"提交三方验收失败",null),
CHECK_ITEM(12002,"插入检查项失败",null), CHECK_ITEM(12002,"插入检查项失败",null),

View File

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

View File

@@ -214,7 +214,7 @@ public class OpeningOperationPlanImpl implements OpeningOperationPlanService {
return Boolean.TRUE; return Boolean.TRUE;
} catch (Exception e) { } catch (Exception e) {
log.error("获取鲜丰订货金异常或更新状态失败"); 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); return list.get(0);
} }
} catch (Exception e) { } 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()); throw new ServiceException(ErrorCodeEnum.YLF_ERROR,((ServiceException)e).getErrorMessage());
} }
return null; return null;
@@ -95,6 +98,9 @@ public class YlfServiceImpl implements YlfService {
} }
} catch (Exception e) { } catch (Exception e) {
log.info("调用云立方获取项目列表异常,getProjectList error:{}", 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()); throw new ServiceException(ErrorCodeEnum.YLF_ERROR,((ServiceException)e).getErrorMessage());
} }