云立方报错信息修改
This commit is contained in:
@@ -28,6 +28,8 @@ public class CommonConstants {
|
||||
//十秒
|
||||
public static final int TEN_SECONDS = 10000;
|
||||
|
||||
public static final int ONE_SECONDS = 1000;
|
||||
|
||||
/**
|
||||
* 跟进任务通知缓存时间 1小时
|
||||
*/
|
||||
|
||||
@@ -212,6 +212,7 @@ public enum ErrorCodeEnum {
|
||||
XFSG_SERVICE_ERROR(103099,"鲜丰服务调用失败",null),
|
||||
GET_FIRST_ORDER(103021,"获取鲜丰首批订货金失败",null),
|
||||
YLF_ERROR(110001, "云立方接口异常!异常信息:{0}", null),
|
||||
YLF_DATA_IS_NULL(110002, "请联系工程维护云立方系统门店信息!", null),
|
||||
//装修
|
||||
THREE_ACCEPTANCE(121001,"提交三方验收失败",null),
|
||||
CHECK_ITEM(12002,"插入检查项失败",null),
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user