From aa93b87b6f8494e6f2f2910fd3e8f2b5364f6328 Mon Sep 17 00:00:00 2001 From: guohb Date: Mon, 20 May 2024 11:00:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=BC=82=E5=B8=B8=E6=8A=9B?= =?UTF-8?q?=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/cool/store/enums/ErrorCodeEnum.java | 4 ++++ .../store/service/impl/CoolStoreStartFlowServiceImpl.java | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) 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()); }