diff --git a/coolstore-partner-common/src/main/java/com/cool/store/enums/ErrorCodeEnum.java b/coolstore-partner-common/src/main/java/com/cool/store/enums/ErrorCodeEnum.java index 335b0505e..90e504260 100644 --- a/coolstore-partner-common/src/main/java/com/cool/store/enums/ErrorCodeEnum.java +++ b/coolstore-partner-common/src/main/java/com/cool/store/enums/ErrorCodeEnum.java @@ -180,6 +180,10 @@ public enum ErrorCodeEnum { UNISSUED_STATEMENT(109010, "该门店未发布账单,无法付款", null), + FRANCHISE_AGREEMENT_FALSE(109011, "特许经营合同API调用失败", null), + + NEW_STORE_FALSE(109011, "新店开业流程API调用失败", null), + INSERT_OPENING_OPERATION_PLAN_AUDIT_FALSE(103001,"插入运营方案审核信息失败",null), INSERT_OPENING_OPERATION_PLAN_FALSE(103002,"插入运营方案失败",null), diff --git a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/CoolStoreStartFlowServiceImpl.java b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/CoolStoreStartFlowServiceImpl.java index 8bcdb171b..6a183fe32 100644 --- a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/CoolStoreStartFlowServiceImpl.java +++ b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/CoolStoreStartFlowServiceImpl.java @@ -52,7 +52,8 @@ public class CoolStoreStartFlowServiceImpl implements CoolStoreStartFlowService InitiatingResponse initiatingResponse = httpRestTemplateService.postForObject(url, request, InitiatingResponse.class); log.info("newStore API response:{}", JSONObject.toJSONString(initiatingResponse)); if (initiatingResponse.getCode() != 0L) { - return new ResponseResult(500, initiatingResponse.getMsg(), initiatingResponse.getData()); + throw new ServiceException(ErrorCodeEnum.FRANCHISE_AGREEMENT_FALSE, initiatingResponse.getMsg(),initiatingResponse.getData()); +// return new ResponseResult(500, initiatingResponse.getMsg(), initiatingResponse.getData()); } else { //更新阶段信息 shopStageInfoDAO.updateShopStageAndAuditInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_31, null); @@ -78,7 +79,8 @@ public class CoolStoreStartFlowServiceImpl implements CoolStoreStartFlowService InitiatingResponse initiatingResponse = httpRestTemplateService.postForObject(url, request, InitiatingResponse.class); log.info("franchiseAgreement API response:{}", JSONObject.toJSONString(initiatingResponse)); if (initiatingResponse.getCode() != 0L) { - return new ResponseResult(500, initiatingResponse.getMsg(), initiatingResponse.getData()); +// throw new ServiceException(500, initiatingResponse.getMsg(), initiatingResponse.getData()); + throw new ServiceException(ErrorCodeEnum.FRANCHISE_AGREEMENT_FALSE, initiatingResponse.getMsg(),initiatingResponse.getData()); } else { return new ResponseResult(200000, initiatingResponse.getMsg(), initiatingResponse.getData()); }