From a18396e831dd80112333496b128f32ad8b12b069 Mon Sep 17 00:00:00 2001 From: ljl Date: Mon, 5 Feb 2024 15:53:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ms/biz/service/impl/ShopServiceImpl.java | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/ms-biz/src/main/java/com/ms/biz/service/impl/ShopServiceImpl.java b/ms-biz/src/main/java/com/ms/biz/service/impl/ShopServiceImpl.java index ea57162..3b217d0 100644 --- a/ms-biz/src/main/java/com/ms/biz/service/impl/ShopServiceImpl.java +++ b/ms-biz/src/main/java/com/ms/biz/service/impl/ShopServiceImpl.java @@ -1,9 +1,6 @@ package com.ms.biz.service.impl; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; -import java.util.Map; +import java.util.*; import cn.hutool.core.util.ObjectUtil; import com.doudian.open.core.AccessToken; @@ -181,9 +178,12 @@ public class ShopServiceImpl implements ShopService { GetAuthInfoResponseDTO response = dsApiService.getAuthInfo(shopId); if (response.isSuccess()) { + if (Objects.equals(response.getAuthStatus(), "notBind")) { + throw new BindMemberNotExistsException(); + } data.setBindName(response.getMemberName()); } else { - throw new RuntimeException(response.getReason()); + throw new BusinessException(response.getReason()); } } @@ -200,7 +200,11 @@ public class ShopServiceImpl implements ShopService { CommonResponseDTO response = dsApiService.delAuthShop(shopId); if (!response.isSuccess()) { - throw new BusinessException(response.getReason()); + if (Objects.equals(response.getCode(), "biz.platform-shop-member-not-exist")) { + throw new MemberAlreadyUnbindException(); + } else { + throw new BusinessException(response.getReason()); + } } shopTo1688DsMemberMapper.deleteByPrimaryKey(member.getShopTo1688DsMemberId());