fubojin пре 1 месец
родитељ
комит
90adbae457
100 измењених фајлова са 1215 додато и 337 уклоњено
  1. 14 0
      pom.xml
  2. 4 4
      yami-shop-api/src/main/java/com/yami/shop/api/controller/AddrController.java
  3. 2 2
      yami-shop-api/src/main/java/com/yami/shop/api/controller/DeliveryController.java
  4. 4 4
      yami-shop-api/src/main/java/com/yami/shop/api/controller/MyOrderController.java
  5. 8 7
      yami-shop-api/src/main/java/com/yami/shop/api/controller/MyShopDetailController.java
  6. 4 4
      yami-shop-api/src/main/java/com/yami/shop/api/controller/OrderController.java
  7. 36 36
      yami-shop-api/src/main/java/com/yami/shop/api/controller/OrderRefundController.java
  8. 3 2
      yami-shop-api/src/main/java/com/yami/shop/api/controller/PayController.java
  9. 3 3
      yami-shop-api/src/main/java/com/yami/shop/api/controller/ProdCommController.java
  10. 1 1
      yami-shop-api/src/main/java/com/yami/shop/api/controller/ProdController.java
  11. 2 2
      yami-shop-api/src/main/java/com/yami/shop/api/controller/QrcodeTicketController.java
  12. 2 2
      yami-shop-api/src/main/java/com/yami/shop/api/controller/ShopCartController.java
  13. 2 2
      yami-shop-api/src/main/java/com/yami/shop/api/controller/UserCollectionController.java
  14. 1 1
      yami-shop-api/src/main/java/com/yami/shop/api/controller/UserCollectionShopController.java
  15. 15 14
      yami-shop-api/src/main/java/com/yami/shop/api/controller/UserRegisterController.java
  16. 3 2
      yami-shop-api/src/main/java/com/yami/shop/api/listener/ConfirmOrderListener.java
  17. 10 9
      yami-shop-api/src/main/java/com/yami/shop/api/listener/SubmitOrderListener.java
  18. 1 1
      yami-shop-bean/pom.xml
  19. 41 0
      yami-shop-bean/src/main/java/com/yami/shop/bean/model/Channel.java
  20. 2 2
      yami-shop-bean/src/main/java/com/yami/shop/bean/model/ChannelProd.java
  21. 65 0
      yami-shop-bean/src/main/java/com/yami/shop/bean/model/Dept.java
  22. 45 0
      yami-shop-bean/src/main/java/com/yami/shop/bean/model/DeptUser.java
  23. 37 0
      yami-shop-bean/src/main/java/com/yami/shop/bean/vo/ChannelProdExportVO.java
  24. 54 0
      yami-shop-bean/src/main/java/com/yami/shop/bean/vo/ChannelProdImportVO.java
  25. 3 2
      yami-shop-common/src/main/java/com/yami/shop/common/config/DefaultExceptionHandlerConfig.java
  26. 70 0
      yami-shop-common/src/main/java/com/yami/shop/common/exception/GlobalException.java
  27. 102 0
      yami-shop-common/src/main/java/com/yami/shop/common/handler/PlatformExceptionHandler.java
  28. 3 2
      yami-shop-common/src/main/java/com/yami/shop/common/util/HttpContextUtils.java
  29. 12 11
      yami-shop-coupon/yami-shop-coupon-comment/src/main/java/com/yami/shop/coupon/comment/service/impl/CouponServiceImpl.java
  30. 4 3
      yami-shop-coupon/yami-shop-coupon-multishop/src/main/java/com/yami/shop/coupon/multishop/controller/CouponController.java
  31. 5 4
      yami-shop-coupon/yami-shop-coupon-platform/src/main/java/com/yami/shop/coupon/platform/controller/CouponController.java
  32. 2 2
      yami-shop-delivery/yami-shop-delivery-api/src/main/java/com/yami/shop/delivery/api/controller/MyDeliveryController.java
  33. 1 1
      yami-shop-delivery/yami-shop-delivery-comment/src/main/java/com/yami/shop/delivery/comment/service/impl/DeliveryOrderServiceImpl.java
  34. 5 4
      yami-shop-delivery/yami-shop-delivery-comment/src/main/java/com/yami/shop/delivery/comment/service/impl/TransportManagerServiceImpl.java
  35. 3 2
      yami-shop-delivery/yami-shop-delivery-comment/src/main/java/com/yami/shop/delivery/comment/service/impl/TransportServiceImpl.java
  36. 1 1
      yami-shop-delivery/yami-shop-delivery-multishop/src/main/java/com/yami/shop/delivery/multishop/controller/FetchController.java
  37. 2 2
      yami-shop-delivery/yami-shop-delivery-multishop/src/main/java/com/yami/shop/delivery/multishop/controller/OrderDeliveryController.java
  38. 3 3
      yami-shop-delivery/yami-shop-delivery-platform/src/main/java/com/yami/shop/delivery/platform/controller/FetchController.java
  39. 2 1
      yami-shop-delivery/yami-shop-delivery-platform/src/main/java/com/yami/shop/delivery/platform/controller/OrderDeliveryController.java
  40. 1 1
      yami-shop-discount/yami-shop-discount-api/src/main/java/com/yami/shop/discount/api/controller/DiscountController.java
  41. 4 3
      yami-shop-discount/yami-shop-discount-comment/src/main/java/com/yami/shop/discount/comment/service/impl/DiscountServiceImpl.java
  42. 2 2
      yami-shop-discount/yami-shop-discount-multishop/src/main/java/com/yami/shop/discount/platform/controller/DiscountController.java
  43. 4 3
      yami-shop-discount/yami-shop-discount-platform/src/main/java/com/yami/shop/discount/platform/controller/DiscountController.java
  44. 3 2
      yami-shop-distribution/yami-shop-distribution-api/src/main/java/com/yami/shop/distribution/api/controller/DistributionLevelController.java
  45. 1 1
      yami-shop-distribution/yami-shop-distribution-api/src/main/java/com/yami/shop/distribution/api/controller/DistributionQrCodeController.java
  46. 16 16
      yami-shop-distribution/yami-shop-distribution-api/src/main/java/com/yami/shop/distribution/api/controller/DistributionRegisterController.java
  47. 1 1
      yami-shop-distribution/yami-shop-distribution-api/src/main/java/com/yami/shop/distribution/api/controller/DistributionUserController.java
  48. 3 3
      yami-shop-distribution/yami-shop-distribution-api/src/main/java/com/yami/shop/distribution/api/controller/DistributionUserIncomeController.java
  49. 1 1
      yami-shop-distribution/yami-shop-distribution-api/src/main/java/com/yami/shop/distribution/api/controller/DistributionUserWalletController.java
  50. 5 5
      yami-shop-distribution/yami-shop-distribution-api/src/main/java/com/yami/shop/distribution/api/controller/DistributionWithdrawCashController.java
  51. 4 3
      yami-shop-distribution/yami-shop-distribution-comment/src/main/java/com/yami/shop/distribution/comment/listener/PaySuccessOrderListener.java
  52. 3 2
      yami-shop-distribution/yami-shop-distribution-comment/src/main/java/com/yami/shop/distribution/comment/service/impl/DistributionLevelServiceImpl.java
  53. 2 1
      yami-shop-distribution/yami-shop-distribution-comment/src/main/java/com/yami/shop/distribution/comment/service/impl/DistributionProdServiceImpl.java
  54. 3 2
      yami-shop-distribution/yami-shop-distribution-comment/src/main/java/com/yami/shop/distribution/comment/service/impl/DistributionUserIncomeServiceImpl.java
  55. 5 4
      yami-shop-distribution/yami-shop-distribution-comment/src/main/java/com/yami/shop/distribution/comment/service/impl/DistributionWithdrawCashServiceImpl.java
  56. 11 11
      yami-shop-distribution/yami-shop-distribution-multishop/src/main/java/com/yami/shop/distribution/multishop/controller/DistributionProdController.java
  57. 3 2
      yami-shop-distribution/yami-shop-distribution-multishop/src/main/java/com/yami/shop/distribution/multishop/listener/OrderRefundListener.java
  58. 3 2
      yami-shop-distribution/yami-shop-distribution-platform/src/main/java/com/yami/shop/distribution/platform/controller/DistributionBasicSetController.java
  59. 3 2
      yami-shop-distribution/yami-shop-distribution-platform/src/main/java/com/yami/shop/distribution/platform/controller/DistributionProdController.java
  60. 4 4
      yami-shop-distribution/yami-shop-distribution-platform/src/main/java/com/yami/shop/distribution/platform/controller/DistributionWithdrawCashController.java
  61. 16 16
      yami-shop-groupbuy/yami-shop-groupbuy-api/src/main/java/com/yami/shop/groupbuy/api/controller/GroupOrderController.java
  62. 2 2
      yami-shop-groupbuy/yami-shop-groupbuy-api/src/main/java/com/yami/shop/groupbuy/api/controller/GroupTeamController.java
  63. 8 7
      yami-shop-groupbuy/yami-shop-groupbuy-comment/src/main/java/com/yami/shop/groupbuy/comment/service/impl/GroupOrderServiceImpl.java
  64. 2 1
      yami-shop-groupbuy/yami-shop-groupbuy-comment/src/main/java/com/yami/shop/groupbuy/comment/service/impl/GroupPayServiceImpl.java
  65. 6 6
      yami-shop-groupbuy/yami-shop-groupbuy-multishop/src/main/java/com/yami/shop/groupbuy/multishop/controller/GroupActivityController.java
  66. 8 8
      yami-shop-groupbuy/yami-shop-groupbuy-multishop/src/main/java/com/yami/shop/groupbuy/multishop/controller/GroupProdController.java
  67. 4 3
      yami-shop-groupbuy/yami-shop-groupbuy-platform/src/main/java/com/yami/shop/groupbuy/platform/controller/GroupActivityController.java
  68. 2 1
      yami-shop-mp/yami-shop-mp-api/src/main/java/com/yami/shop/mp/comment/api/controller/JsapiController.java
  69. 2 1
      yami-shop-mp/yami-shop-mp-comment/src/main/java/com/yami/shop/mp/comment/component/WxMaServiceClusterImpl.java
  70. 3 2
      yami-shop-mp/yami-shop-mp-comment/src/main/java/com/yami/shop/mp/comment/component/WxMpServiceClusterImpl.java
  71. 2 1
      yami-shop-mp/yami-shop-mp-platform/src/main/java/com/yami/shop/mp/comment/platform/controller/WeixinMaterialController.java
  72. 2 1
      yami-shop-mp/yami-shop-mp-platform/src/main/java/com/yami/shop/mp/comment/platform/service/impl/WeixinMaterialServiceImpl.java
  73. 1 1
      yami-shop-multishop/src/main/java/com/yami/shop/multishop/controller/AttributeController.java
  74. 3 2
      yami-shop-multishop/src/main/java/com/yami/shop/multishop/controller/BrandController.java
  75. 3 3
      yami-shop-multishop/src/main/java/com/yami/shop/multishop/controller/CategoryController.java
  76. 2 1
      yami-shop-multishop/src/main/java/com/yami/shop/multishop/controller/FileController.java
  77. 22 22
      yami-shop-multishop/src/main/java/com/yami/shop/multishop/controller/OrderController.java
  78. 6 6
      yami-shop-multishop/src/main/java/com/yami/shop/multishop/controller/OrderRefundController.java
  79. 1 1
      yami-shop-multishop/src/main/java/com/yami/shop/multishop/controller/PickAddrController.java
  80. 1 1
      yami-shop-multishop/src/main/java/com/yami/shop/multishop/controller/ProdCommController.java
  81. 12 12
      yami-shop-multishop/src/main/java/com/yami/shop/multishop/controller/ProductController.java
  82. 1 1
      yami-shop-multishop/src/main/java/com/yami/shop/multishop/controller/ShopBankCardController.java
  83. 3 2
      yami-shop-multishop/src/main/java/com/yami/shop/multishop/controller/ShopDetailController.java
  84. 3 2
      yami-shop-multishop/src/main/java/com/yami/shop/multishop/controller/ShopWithdrawCashController.java
  85. 1 1
      yami-shop-multishop/src/main/java/com/yami/shop/multishop/controller/SpecController.java
  86. 2 1
      yami-shop-platform/src/main/java/com/yami/shop/platform/controller/AreaController.java
  87. 3 2
      yami-shop-platform/src/main/java/com/yami/shop/platform/controller/BrandController.java
  88. 4 5
      yami-shop-platform/src/main/java/com/yami/shop/platform/controller/CategoryController.java
  89. 147 0
      yami-shop-platform/src/main/java/com/yami/shop/platform/controller/ChannelProdController.java
  90. 141 0
      yami-shop-platform/src/main/java/com/yami/shop/platform/controller/DeptController.java
  91. 116 0
      yami-shop-platform/src/main/java/com/yami/shop/platform/controller/DeptUserController.java
  92. 2 1
      yami-shop-platform/src/main/java/com/yami/shop/platform/controller/FileController.java
  93. 2 1
      yami-shop-platform/src/main/java/com/yami/shop/platform/controller/OrderController.java
  94. 2 1
      yami-shop-platform/src/main/java/com/yami/shop/platform/controller/ProductController.java
  95. 3 2
      yami-shop-platform/src/main/java/com/yami/shop/platform/controller/ScoreProductController.java
  96. 4 3
      yami-shop-platform/src/main/java/com/yami/shop/platform/controller/ShopAuditingController.java
  97. 4 3
      yami-shop-platform/src/main/java/com/yami/shop/platform/controller/ShopDetailController.java
  98. 4 3
      yami-shop-platform/src/main/java/com/yami/shop/platform/controller/ShopWithdrawCashController.java
  99. 1 0
      yami-shop-platform/src/main/java/com/yami/shop/platform/controller/hb/GoodsController.java
  100. 5 4
      yami-shop-platform/src/main/java/com/yami/shop/platform/task/OrderRefundTask.java

+ 14 - 0
pom.xml

@@ -98,6 +98,8 @@
                 <artifactId>swagger-bootstrap-ui</artifactId>
                 <version>${swagger-bootstrap.version}</version>
             </dependency>
+
+
             <dependency>
                 <groupId>com.aliyun</groupId>
                 <artifactId>aliyun-java-sdk-core</artifactId>
@@ -182,6 +184,18 @@
 
     <dependencies>
 
+        <!-- 推荐版本 -->
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>easyexcel</artifactId>
+            <version>3.3.3</version>
+        </dependency>
+        <!-- Apache Commons Lang -->
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-lang3</artifactId>
+            <version>3.12.0</version>
+        </dependency>
 
         <dependency>
             <groupId>org.projectlombok</groupId>

+ 4 - 4
yami-shop-api/src/main/java/com/yami/shop/api/controller/AddrController.java

@@ -91,7 +91,7 @@ public class AddrController {
         UserAddr userAddr = mapperFacade.map(addrParam, UserAddr.class);
 
         if (addrCount >= MAX_USER_ADDR) {
-            throw new YamiShopBindException("收货地址已达到上限,无法再新增地址");
+            throw new GlobalException("收货地址已达到上限,无法再新增地址");
         } else if (addrCount == 0) {
             userAddr.setCommonAddr(1);
         } else {
@@ -182,7 +182,7 @@ public class AddrController {
         String userId = SecurityUtils.getUser().getUserId();
         UserAddr userAddr = userAddrService.getUserAddrByUserId(addrId, userId);
         if (userAddr == null) {
-            throw new YamiShopBindException("该地址已被删除");
+            throw new GlobalException("该地址已被删除");
         }
 
         return ResponseEntity.ok(mapperFacade.map(userAddr, UserAddrDto.class));
@@ -195,7 +195,7 @@ public class AddrController {
         String userId = SecurityUtils.getUser().getUserId();
         UserAddr userAddr = userAddrService.getUserAddrByUserId(addrId, userId);
         if (userAddr == null) {
-            throw new YamiShopBindException("该地址已被删除");
+            throw new GlobalException("该地址已被删除");
         }
         Transport2 transport2 = transportManagerService.calculateTransfeeStart(shopId, userAddr.getLongitude(), userAddr.getLatitude());
 
@@ -212,7 +212,7 @@ public class AddrController {
         if (ObjectUtil.isNotEmpty(addrId)) {
             UserAddr userAddr = userAddrService.getUserAddrByUserId(addrId, userId);
             if (userAddr == null) {
-                throw new YamiShopBindException("该地址已被删除");
+                throw new GlobalException("该地址已被删除");
             }
             longitude = userAddr.getLongitude();
             latitude = userAddr.getLatitude();

+ 2 - 2
yami-shop-api/src/main/java/com/yami/shop/api/controller/DeliveryController.java

@@ -65,7 +65,7 @@ public class DeliveryController {
         // 查询交易单
         Delivery delivery = deliveryService.getById(order.getDvyId());
         if (null == delivery) {
-            throw new YamiShopBindException("交易单号不存在");
+            throw new GlobalException("交易单号不存在");
         }
         // 查询物流详情信息
         // 物流公司名称、官网、订单号、物流详情信息
@@ -79,7 +79,7 @@ public class DeliveryController {
         } catch (Exception e) {
             e.printStackTrace();
             log.error("物流详情查询出错  => {}", e);
-            throw new YamiShopBindException("查询出错");
+            throw new GlobalException("查询出错");
         }
         return ResponseEntity.ok(orderStatusResponse);
     }

+ 4 - 4
yami-shop-api/src/main/java/com/yami/shop/api/controller/MyOrderController.java

@@ -271,7 +271,7 @@ public class MyOrderController {
         String userId = SecurityUtils.getUser().getUserId();
         Order order = orderService.getOrderByOrderNumberAndUserId(orderNumber, userId, true);
         if (!Objects.equals(order.getStatus(), OrderStatus.UNPAY.value())) {
-            throw new YamiShopBindException("订单已支付,无法取消订单");
+            throw new GlobalException("订单已支付,无法取消订单");
         }
 
         List<OrderItem> orderItems = orderItemService.getOrderItemsByOrderNumber(orderNumber);
@@ -297,10 +297,10 @@ public class MyOrderController {
         Order order = orderService.getOrderByOrderNumberAndUserId(orderNumber, userId, true);
 
         if (!Objects.equals(order.getStatus(), OrderStatus.CONSIGNMENT.value())) {
-            throw new YamiShopBindException("订单未发货,无法确认收货");
+            throw new GlobalException("订单未发货,无法确认收货");
         }
         if (Objects.equals(order.getRefundStatus(), RefundStatusEnum.APPLY.value())) {
-            throw new YamiShopBindException("订单退款中,无法确认收货");
+            throw new GlobalException("订单退款中,无法确认收货");
         }
         List<OrderItem> orderItems = orderItemService.getOrderItemsByOrderNumber(orderNumber);
         order.setOrderItems(orderItems);
@@ -326,7 +326,7 @@ public class MyOrderController {
         Order order = orderService.getOrderByOrderNumberAndUserId(orderNumber, userId, true);
 
         if (!Objects.equals(order.getStatus(), OrderStatus.SUCCESS.value()) && !Objects.equals(order.getStatus(), OrderStatus.CLOSE.value()) ) {
-            throw new YamiShopBindException("订单未完成或未关闭,无法删除订单");
+            throw new GlobalException("订单未完成或未关闭,无法删除订单");
         }
 
         // 删除订单

+ 8 - 7
yami-shop-api/src/main/java/com/yami/shop/api/controller/MyShopDetailController.java

@@ -19,6 +19,7 @@ import com.yami.shop.bean.param.ShopDetailParam;
 import com.yami.shop.bean.enums.SmsType;
 import com.yami.shop.bean.model.ShopAuditing;
 import com.yami.shop.bean.model.ShopDetail;
+import com.yami.shop.common.exception.GlobalException;
 import com.yami.shop.common.exception.YamiShopBindException;
 import com.yami.shop.security.api.util.SecurityUtils;
 import com.yami.shop.security.comment.model.UpdatePasswordDto;
@@ -72,21 +73,21 @@ public class MyShopDetailController {
 		ShopDetail shopDetail = shopDetailService.getShopDetailByUserId(userId);
 
         if (shopDetail == null) {
-            throw new YamiShopBindException("请先进行开店申请");
+            throw new GlobalException("请先进行开店申请");
         }
 
         if (StrUtil.isNotBlank(shopDetail.getMobile())) {
-            throw new YamiShopBindException("店铺账号已设置不能修改");
+            throw new GlobalException("店铺账号已设置不能修改");
         }
 
 
         ShopDetail dbUsernameUser = shopDetailService.getShopByMobile(usernameAndPasswordDto.getUsername());
         if (dbUsernameUser != null) {
-            throw new YamiShopBindException("该账号已经开通过店铺,无法重复开通");
+            throw new GlobalException("该账号已经开通过店铺,无法重复开通");
         }
 
         if (!smsLogService.checkValidCode(usernameAndPasswordDto.getUsername(), usernameAndPasswordDto.getCode(), SmsType.VALID)){
-            throw new YamiShopBindException("验证码有误或已过期");
+            throw new GlobalException("验证码有误或已过期");
         }
 
         String password = passwordEncoder.encode(usernameAndPasswordDto.getPassword());
@@ -107,11 +108,11 @@ public class MyShopDetailController {
 
 		ShopDetail shopDetail = shopDetailService.getShopDetailByUserId(userId);
 		if (shopDetail == null) {
-			throw new YamiShopBindException("请先进行开店申请");
+			throw new GlobalException("请先进行开店申请");
 		}
 
 		if (!passwordEncoder.matches(updatePasswordDto.getPassword(), shopDetail.getPassword())) {
-			throw new YamiShopBindException("原密码不正确");
+			throw new GlobalException("原密码不正确");
 		}
 		//新密码
 		String newPassword = passwordEncoder.encode(updatePasswordDto.getNewPassword());
@@ -144,7 +145,7 @@ public class MyShopDetailController {
 	public ResponseEntity<Void> sendLoginCode(@Valid @RequestBody SendSmsParam sendSmsParam) {
 		String userId = SecurityUtils.getUser().getUserId();
 		if (Objects.isNull(sendSmsParam.getMobile())){
-			throw new YamiShopBindException("手机号不能为空");
+			throw new GlobalException("手机号不能为空");
 		}
 		smsLogService.sendSms(SmsType.VALID, userId ,sendSmsParam.getMobile(), Maps.newHashMap());
 		return ResponseEntity.ok().build();

+ 4 - 4
yami-shop-api/src/main/java/com/yami/shop/api/controller/OrderController.java

@@ -86,7 +86,7 @@ public class OrderController {
                 byId1.setTotalStocks(byIdss.getStocks());
                 productService.updateById(byId1);
                 if (skuStock && byId1.getTotalStocks() < byId.getBasketCount()) {
-                    throw new YamiShopBindException("当前选择的规格库存不足!");
+                    throw new GlobalException("当前选择的规格库存不足!");
                 }
             });
         }else {
@@ -96,7 +96,7 @@ public class OrderController {
             byId1.setTotalStocks(byId.getStocks());
             productService.updateById(byId1);
             if (skuStock && byId1.getTotalStocks() < orderParam.getOrderItem().getProdCount()) {
-                throw new YamiShopBindException("当前选择的规格库存不足!");
+                throw new GlobalException("当前选择的规格库存不足!");
             }
         }
         String userId = SecurityUtils.getUser().getUserId();
@@ -108,7 +108,7 @@ public class OrderController {
         // 组装获取用户提交的购物车商品项
         List<ShopCartItemDto> shopCartItems = basketService.getShopCartItemsByOrderItems(orderParam.getBasketIds(), orderParam.getOrderItem(), userId);
         if (CollectionUtil.isEmpty(shopCartItems)) {
-            throw new YamiShopBindException("请选择您需要的商品加入购物车");
+            throw new GlobalException("请选择您需要的商品加入购物车");
         }
 
         // 根据店铺组装购车中的商品信息,返回每个店铺中的购物车商品信息
@@ -259,7 +259,7 @@ public class OrderController {
         ShopCartOrderMergerDto mergerOrder = orderService.getConfirmOrderCache(userId + submitOrderParam.getUuid());
 
         if (mergerOrder == null) {
-            throw new YamiShopBindException("订单已过期,请重新下单");
+            throw new GlobalException("订单已过期,请重新下单");
         }
 
         List<OrderShopParam> orderShopParams = submitOrderParam.getOrderShopParam();

+ 36 - 36
yami-shop-api/src/main/java/com/yami/shop/api/controller/OrderRefundController.java

@@ -92,7 +92,7 @@ public class OrderRefundController {
     public ResponseEntity<Boolean> getIsDistribution( String orderNumber){
         Order order = orderService.getOrderByOrderNumber(orderNumber);
         if(ObjectUtil.isEmpty(order)){
-            throw new YamiShopBindException("订单编号不存在,订单编号是否正确");
+            throw new GlobalException("订单编号不存在,订单编号是否正确");
         }
         // 已支付订单取消订单,已付款后需要相应处理物流状态
         OrderDetailRequest orderDetailRequest = new OrderDetailRequest();
@@ -118,20 +118,20 @@ public class OrderRefundController {
         Order order = orderService.getOrderByOrderNumberAndUserId(orderRefundParam.getOrderNumber(), userId, true);
 
         if (!Objects.equals(order.getIsPayed(), 1)) {
-            throw new YamiShopBindException("当前订单还未付款,无法申请");
+            throw new GlobalException("当前订单还未付款,无法申请");
         }
 
         if (Objects.equals(order.getStatus(), OrderStatus.CLOSE.value())) {
-            throw new YamiShopBindException("当前订单已失败,不允许退款");
+            throw new GlobalException("当前订单已失败,不允许退款");
         }
 
         if (Objects.equals(order.getStatus(), OrderStatus.WAIT_GROUP.value())) {
-            throw new YamiShopBindException("当前订单正在等待成团状态,需等待成团才能进行下一步操作");
+            throw new GlobalException("当前订单正在等待成团状态,需等待成团才能进行下一步操作");
         }
 
 
 //        if (!Objects.equals(orderRefundParam.getRefundType(),RefundType.ALL.value()) && Objects.equals(order.getStatus(),OrderStatus.PADYED.value())) {
-//            throw new YamiShopBindException("未发货订单仅支持整单退款");
+//            throw new GlobalException("未发货订单仅支持整单退款");
 //        }
 //        // 代发货整单退款不可以输入金额,为固定全额退款
 //        if (Objects.equals(orderRefundParam.getRefundType(),RefundType.ALL.value()) && Objects.equals(order.getStatus(),OrderStatus.PADYED.value())) {
@@ -139,25 +139,25 @@ public class OrderRefundController {
 //        }
 
         if (orderRefundParam.getRefundAmount() > (order.getActualTotal())) {
-            throw new YamiShopBindException("退款金额已超出订单金额,无法申请");
+            throw new GlobalException("退款金额已超出订单金额,无法申请");
         }
 
         //待收货 -> 整单退款 -> 退款金额 < 订单金额 - 运费金额 当前配送费为提前支付,退款时直接进行退款
 //        if (Objects.equals(order.getStatus(), OrderStatus.CONSIGNMENT.value()) && orderRefundParam.getRefundType().equals(RefundType.ALL.value())) {
 //            Double refundAmount = Arith.sub(order.getActualTotal(), order.getFreightAmount());
 //            if (orderRefundParam.getRefundAmount() > refundAmount) {
-//                throw new YamiShopBindException("退款金额已超出订单金额,无法申请");
+//                throw new GlobalException("退款金额已超出订单金额,无法申请");
 //            }
 //        }
 
         if (!orderRefundService.checkRefundDate(order)) {
-            throw new YamiShopBindException("当前订单已确认收货超过" + Constant.MAX_FINALLY_REFUND_TIME + "天,无法退款");
+            throw new GlobalException("当前订单已确认收货超过" + Constant.MAX_FINALLY_REFUND_TIME + "天,无法退款");
         }
         if (Objects.equals(order.getOrderType(), Constant.ORDER_TYPE_SCORE)) {
-            throw new YamiShopBindException("积分商品,无法退款");
+            throw new GlobalException("积分商品,无法退款");
         }
         if (Objects.equals(orderRefundParam.getRefundType(), RefundType.ALL.value()) && (!Objects.isNull(order.getRefundStatus()) && !Objects.equals(order.getRefundStatus(), RefundStatusEnum.DISAGREE.value()))) {
-            throw new YamiShopBindException("该订单已有商品正在退款中,不能再进行整单退款");
+            throw new GlobalException("该订单已有商品正在退款中,不能再进行整单退款");
         }
 
 // 已支付订单取消订单,已付款后需要相应处理物流状态
@@ -168,7 +168,7 @@ public class OrderRefundController {
             OrderStatusResponse orderStatusResponse = paoTuiApi.deliveryRoute(orderDetailRequest);
             if (ObjectUtil.isNotEmpty(orderStatusResponse.getInfo()) && orderStatusResponse.getInfo().size()>0){
                 if(orderStatusResponse.getInfo().get(0).getStatus()==40){
-                    throw new YamiShopBindException("正在配送中,无法取消");
+                    throw new GlobalException("正在配送中,无法取消");
                 }else if(orderStatusResponse.getInfo().get(0).getStatus()<40){
                     //        //先取消配送订单
                     CancelOrderRequest cancelOrderRequest = new CancelOrderRequest();
@@ -188,10 +188,10 @@ public class OrderRefundController {
 
         for (OrderRefund orderRefund : orderRefunds) {
             if (Objects.equals(RefundType.ALL.value(), orderRefund.getRefundType())) {
-                throw new YamiShopBindException("该订单正在进行整单退款,无法进行新的退款操作");
+                throw new GlobalException("该订单正在进行整单退款,无法进行新的退款操作");
             }
             if (Objects.equals(orderRefund.getOrderItemId(), orderRefundParam.getOrderItemId())) {
-                throw new YamiShopBindException("该商品正在进行退款中,无法进行新的退款操作");
+                throw new GlobalException("该商品正在进行退款中,无法进行新的退款操作");
             }
         }
 
@@ -210,7 +210,7 @@ public class OrderRefundController {
                     .eq(OrderItem::getOrderItemId, orderRefundParam.getOrderItemId())
                     .eq(OrderItem::getOrderNumber, orderRefundParam.getOrderNumber()));
             if (orderItem == null) {
-                throw new YamiShopBindException("该物品在订单中不存在");
+                throw new GlobalException("该物品在订单中不存在");
             }
             boolean isCanRefund = false;
             //  查看是否有支付金额和积分都为空的订单,有则抛出异常
@@ -221,11 +221,11 @@ public class OrderRefundController {
                 }
             }
             if (isCanRefund) {
-                throw new YamiShopBindException("该订单部分订单项支付金额和积分为0,无法使用部分退款!");
+                throw new GlobalException("该订单部分订单项支付金额和积分为0,无法使用部分退款!");
             }
 
             if (order.getPlatformAmount() > 0 && !Arith.isEquals(orderRefundParam.getRefundAmount(), orderItem.getActualTotal())) {
-                throw new YamiShopBindException("该订单有使用平台优惠,无法使用部分退款!");
+                throw new GlobalException("该订单有使用平台优惠,无法使用部分退款!");
             }
             // 计算该订单项的分销金额
             newOrderRefund.setDistributionTotalAmount(orderService.sumTotalDistributionAmountByOrderItem(Collections.singletonList(orderItem)));
@@ -241,20 +241,20 @@ public class OrderRefundController {
 
             // 判断退款数量是否溢出
             if (orderRefundParam.getGoodsNum() > orderItem.getProdCount()) {
-                throw new YamiShopBindException("退款物品数量已超出订单中的数量,不允许申请");
+                throw new GlobalException("退款物品数量已超出订单中的数量,不允许申请");
             }
 
             // 判断退款金额是否超出订单金额
             double refundSingleAmount = Arith.div(orderRefundParam.getRefundAmount(), orderRefundParam.getGoodsNum(), 3);
             double singleAmount = Arith.div(orderItem.getActualTotal(), orderItem.getProdCount(), 3);
             if (refundSingleAmount > orderItem.getProductTotalAmount() || refundSingleAmount > singleAmount) {
-                throw new YamiShopBindException("退款金额已超出订单金额,无法申请");
+                throw new GlobalException("退款金额已超出订单金额,无法申请");
             }
 
             // 一个订单项只能申请一次退款
             for (OrderRefund orderRefund : orderRefunds) {
                 if (Objects.equals(orderRefund.getOrderId(), orderItem.getOrderItemId())) {
-                    throw new YamiShopBindException("退款订单项已处理,请勿重复申请");
+                    throw new GlobalException("退款订单项已处理,请勿重复申请");
                 }
             }
         }
@@ -343,27 +343,27 @@ public class OrderRefundController {
     public ResponseEntity<String> submitExpress(@PathVariable("refundSn") String refundSn) {
         OrderRefund orderRefund = orderRefundService.getOrderRefundByRefundSn(refundSn);
         if (Objects.isNull(orderRefund)) {
-            throw new YamiShopBindException("查询不到退款信息");
+            throw new GlobalException("查询不到退款信息");
         }
 
         String userId = SecurityUtils.getUser().getUserId();
         if (!Objects.equals(orderRefund.getUserId(), userId)) {
-            throw new YamiShopBindException("申请失败,您没有该权限");
+            throw new GlobalException("申请失败,您没有该权限");
         }
 
         if (!Objects.equals(orderRefund.getApplyType(), 2)) {
-            throw new YamiShopBindException("当前申请类型不允许提交物流信息操作");
+            throw new GlobalException("当前申请类型不允许提交物流信息操作");
         }
 
         if (!Objects.equals(orderRefund.getReturnMoneySts(), ReturnMoneyStsType.PROCESSING.value())) {
-            throw new YamiShopBindException("当前状态不允许提交物流信息操作");
+            throw new GlobalException("当前状态不允许提交物流信息操作");
         }
 
         RefundDelivery refundDelivery = refundDeliveryService.getOne(new LambdaQueryWrapper<RefundDelivery>()
                 .eq(RefundDelivery::getRefundSn, refundSn));
 
         if (refundDelivery.getPayer().equals("2") && !refundDelivery.isPay()) {
-            throw new YamiShopBindException("未支付退货费用");
+            throw new GlobalException("未支付退货费用");
         }
         Order order = orderService.getById(orderRefund.getOrderId());
         UserAddr userAddrOrder = userAddrService.getUserAddrByUserId(order.getAddrOrderId(), userId);
@@ -439,15 +439,15 @@ public class OrderRefundController {
         String userId = SecurityUtils.getUser().getUserId();
         OrderRefund orderRefund = orderRefundService.getOrderRefundByRefundSn(orderRefundExpressParam.getRefundSn());
         if (Objects.isNull(orderRefund)) {
-            throw new YamiShopBindException("查询不到退款信息");
+            throw new GlobalException("查询不到退款信息");
         }
 
         if (!Objects.equals(orderRefund.getUserId(), userId)) {
-            throw new YamiShopBindException("申请失败,您没有此权限");
+            throw new GlobalException("申请失败,您没有此权限");
         }
 
         if (!Objects.equals(orderRefund.getReturnMoneySts(), ReturnMoneyStsType.CONSIGNMENT.value())) {
-            throw new YamiShopBindException("当前状态不允许更新物流信息操作");
+            throw new GlobalException("当前状态不允许更新物流信息操作");
         }
 
         // 填写物流信息
@@ -476,19 +476,19 @@ public class OrderRefundController {
     public ResponseEntity<String> cancel(@RequestBody String refundSn) {
         OrderRefundDto orderRefund = orderRefundService.getOrderRefundByRefundSn(refundSn);
         if (Objects.isNull(orderRefund)) {
-            throw new YamiShopBindException("撤销失败 退款订单不存在");
+            throw new GlobalException("撤销失败 退款订单不存在");
         }
         if (Objects.equals(orderRefund.getReturnMoneySts(), ReturnMoneyStsType.PROCESSING.value())) {
-            throw new YamiShopBindException("卖家正在处理退款,不能撤销退款申请");
+            throw new GlobalException("卖家正在处理退款,不能撤销退款申请");
         }
         if (Objects.equals(orderRefund.getReturnMoneySts(), ReturnMoneyStsType.CONSIGNMENT.value())) {
-            throw new YamiShopBindException("买家已发货,不能撤销退款申请");
+            throw new GlobalException("买家已发货,不能撤销退款申请");
         }
         if (Objects.equals(orderRefund.getReturnMoneySts(), ReturnMoneyStsType.RECEIVE.value())) {
-            throw new YamiShopBindException("卖家已收货,不能撤销退款申请");
+            throw new GlobalException("卖家已收货,不能撤销退款申请");
         }
         if (Objects.equals(orderRefund.getReturnMoneySts(), ReturnMoneyStsType.SUCCESS.value())) {
-            throw new YamiShopBindException("退款成功,不能撤销退款申请");
+            throw new GlobalException("退款成功,不能撤销退款申请");
         }
         String userId = SecurityUtils.getUser().getUserId();
 
@@ -506,7 +506,7 @@ public class OrderRefundController {
             // 订单项数量
             int orderItemCount = orderItemService.count(new LambdaQueryWrapper<OrderItem>().eq(OrderItem::getOrderNumber, order.getOrderNumber()));
             if (refundCount == orderItemCount) {
-                throw new YamiShopBindException("该订单所有商品都进行退款,已无法取消退款");
+                throw new GlobalException("该订单所有商品都进行退款,已无法取消退款");
             }
         }
 
@@ -514,7 +514,7 @@ public class OrderRefundController {
                 Objects.equals(orderRefund.getReturnMoneySts(), ReturnMoneyStsType.FAIL.value()) ||
                 Objects.equals(orderRefund.getReturnMoneySts(), ReturnMoneyStsType.REJECT.value()) ||
                 Objects.equals(orderRefund.getReturnMoneySts(), ReturnMoneyStsType.CANCEL.value())) {
-            throw new YamiShopBindException("撤销失败 当前状态不允许此操作");
+            throw new GlobalException("撤销失败 当前状态不允许此操作");
         }
 
         Date now = new Date();
@@ -550,11 +550,11 @@ public class OrderRefundController {
         OrderRefundDto orderRefundDto = orderRefundService.getOrderRefundByRefundSn(refundSn);
 
         if (orderRefundDto == null) {
-            throw new YamiShopBindException("查看失败 该退款订单不存在");
+            throw new GlobalException("查看失败 该退款订单不存在");
         }
 
         if (!Objects.equals(orderRefundDto.getUserId(), SecurityUtils.getUser().getUserId())) {
-            throw new YamiShopBindException("查看失败 您没有此权限");
+            throw new GlobalException("查看失败 您没有此权限");
         }
 
         ApiOrderRefundDto apiOrderRefundDto = mapperFacade.map(orderRefundDto, ApiOrderRefundDto.class);

+ 3 - 2
yami-shop-api/src/main/java/com/yami/shop/api/controller/PayController.java

@@ -17,6 +17,7 @@ import com.yami.shop.bean.app.param.PayParam;
 import com.yami.shop.bean.model.Order;
 import com.yami.shop.bean.model.RefundDelivery;
 import com.yami.shop.bean.pay.PayInfoDto;
+import com.yami.shop.common.exception.GlobalException;
 import com.yami.shop.common.exception.YamiShopBindException;
 import com.yami.shop.security.api.model.YamiUser;
 import com.yami.shop.security.api.util.SecurityUtils;
@@ -54,7 +55,7 @@ public class PayController {
         String userId = user.getUserId();
 
         if (!user.isEnabled()) {
-            throw new YamiShopBindException("您已被禁用,不能购买,请联系平台客服");
+            throw new GlobalException("您已被禁用,不能购买,请联系平台客服");
         }
 
 
@@ -82,7 +83,7 @@ public class PayController {
         RefundDelivery refundDelivery = refundDeliveryService.getOne(new LambdaQueryWrapper<RefundDelivery>()
                 .eq(RefundDelivery::getRefundSn, payParam.getOrderNumbers()));
         if (refundDelivery.getPayer().equals("1")) {
-            throw new YamiShopBindException("无需支付");
+            throw new GlobalException("无需支付");
         }
 
         PayInfoDto payInfoDto = new PayInfoDto();

+ 3 - 3
yami-shop-api/src/main/java/com/yami/shop/api/controller/ProdCommController.java

@@ -66,10 +66,10 @@ public class ProdCommController {
 
         OrderItem orderItem = orderItemService.getById(orderItemId);
         if (orderItem == null) {
-            throw new YamiShopBindException("订单项不存在");
+            throw new GlobalException("订单项不存在");
         }
         if (Objects.equals(orderItem.getCommSts(), 1)) {
-            throw new YamiShopBindException("改订单项已评论,请勿重复评论");
+            throw new GlobalException("改订单项已评论,请勿重复评论");
         }
 
         String userId = SecurityUtils.getUser().getUserId();
@@ -77,7 +77,7 @@ public class ProdCommController {
         Order order = orderService.getOrderByOrderNumberAndUserId(orderItem.getOrderNumber(),userId, true);
 
         if (!Objects.equals(order.getStatus(), OrderStatus.SUCCESS.value())) {
-            throw new YamiShopBindException("请确认收货后再进行评论");
+            throw new GlobalException("请确认收货后再进行评论");
         }
 
         prodCommService.comm(orderItem, prodCommParam);

+ 1 - 1
yami-shop-api/src/main/java/com/yami/shop/api/controller/ProdController.java

@@ -57,7 +57,7 @@ public class ProdController {
 
         Product product = prodService.getProductByProdId(prodId);
         if (product == null || product.getStatus() != 1) {
-            throw new YamiShopBindException("商品已下线");
+            throw new GlobalException("商品已下线");
         }
 
         List<Sku> skuList = skuService.listByProdId(prodId);

+ 2 - 2
yami-shop-api/src/main/java/com/yami/shop/api/controller/QrcodeTicketController.java

@@ -67,7 +67,7 @@ public class QrcodeTicketController {
         if(Objects.equals(type, 1) || Objects.equals(type, 2)) {
             page = "pages/prod/prod";
         } else {
-            throw new YamiShopBindException("无法获取页面信息");
+            throw new GlobalException("无法获取页面信息");
         }
 
 
@@ -106,7 +106,7 @@ public class QrcodeTicketController {
         if (qrcodeTicket == null ||
                 (qrcodeTicket.getExpireTime() !=null
                         && qrcodeTicket.getExpireTime().getTime() < System.currentTimeMillis())) {
-            throw new YamiShopBindException("二维码已过期");
+            throw new GlobalException("二维码已过期");
         }
         return ResponseEntity.ok(qrcodeTicket);
     }

+ 2 - 2
yami-shop-api/src/main/java/com/yami/shop/api/controller/ShopCartController.java

@@ -120,7 +120,7 @@ public class ShopCartController {
                 basket.setBasketCount(param.getCount() + shopCartItemDto.getProdCount());
                 basket.setBasketId(shopCartItemDto.getBasketId());
                 if (skuParam.getStocks() < basket.getBasketCount() && param.getCount() > 0){
-                    throw new YamiShopBindException("商品库存不足");
+                    throw new GlobalException("商品库存不足");
                 }
                 // 防止购物车变成负数
                 if (basket.getBasketCount() <= 0) {
@@ -145,7 +145,7 @@ public class ShopCartController {
             return ResponseEntity.badRequest().body("库存不足");
         }
         if (skuParam.getStocks() <  param.getCount()){
-            throw new YamiShopBindException("商品库存不足");
+            throw new GlobalException("商品库存不足");
         }
         // 所有都正常时
         basketService.addShopCartItem(param,userId);

+ 2 - 2
yami-shop-api/src/main/java/com/yami/shop/api/controller/UserCollectionController.java

@@ -58,7 +58,7 @@ public class UserCollectionController {
     public ResponseEntity<Boolean> isCollection(Long prodId) {
         if (productService.count(new LambdaQueryWrapper<Product>()
                 .eq(Product::getProdId, prodId)) < 1) {
-            throw new YamiShopBindException("该商品不存在");
+            throw new GlobalException("该商品不存在");
         }
         return ResponseEntity.ok(userCollectionService.count(new LambdaQueryWrapper<UserCollection>()
                 .eq(UserCollection::getProdId, prodId)
@@ -70,7 +70,7 @@ public class UserCollectionController {
     @ApiImplicitParam(name = "prodId", value = "商品id", required = true, dataType = "Long")
     public ResponseEntity<Boolean> addOrCancel(@RequestBody Long prodId) {
         if (Objects.isNull(productService.getProductByProdId(prodId))) {
-            throw new YamiShopBindException("该商品不存在");
+            throw new GlobalException("该商品不存在");
         }
         Boolean isAdd = false;
         String userId = SecurityUtils.getUser().getUserId();

+ 1 - 1
yami-shop-api/src/main/java/com/yami/shop/api/controller/UserCollectionShopController.java

@@ -62,7 +62,7 @@ public class UserCollectionShopController {
     @ApiImplicitParam(name = "shopId", value = "店铺id", required = true, dataType = "Long")
     public ResponseEntity<Boolean> addOrCancel(@RequestBody Long shopId) {
         if (Objects.isNull(shopDetailService.getById(shopId))) {
-            throw new YamiShopBindException("该店铺不存在");
+            throw new GlobalException("该店铺不存在");
         }
         Boolean isAdd = false;
         String userId = SecurityUtils.getUser().getUserId();

+ 15 - 14
yami-shop-api/src/main/java/com/yami/shop/api/controller/UserRegisterController.java

@@ -22,6 +22,7 @@ import com.yami.shop.bean.app.param.SendSmsParam;
 import com.yami.shop.bean.app.param.UserRegisterParam;
 import com.yami.shop.bean.enums.SmsType;
 import com.yami.shop.bean.model.User;
+import com.yami.shop.common.exception.GlobalException;
 import com.yami.shop.common.exception.YamiShopBindException;
 import com.yami.shop.common.util.IPHelper;
 import com.yami.shop.common.util.PrincipalUtil;
@@ -90,7 +91,7 @@ public class UserRegisterController {
 	@ApiOperation(value="发送注册验证码", notes="发送注册验证码")
 	public ResponseEntity<Void> register(@Valid @RequestBody SendSmsParam sendSmsParam) {
 		if (userService.count(new LambdaQueryWrapper<User>().eq(User::getUserMobile, sendSmsParam.getMobile())) > 0) {
-			throw new YamiShopBindException("该手机号已注册,无法重新注册");
+			throw new GlobalException("该手机号已注册,无法重新注册");
 		}
 		// 每个手机号每分钟只能发十个注册的验证码,免得接口被利用
 		smsLogService.sendSms(SmsType.REGISTER, sendSmsParam.getMobile(), sendSmsParam.getMobile(), Maps.newHashMap());
@@ -102,7 +103,7 @@ public class UserRegisterController {
 	public ResponseEntity<String> register(@Valid @RequestBody CheckRegisterSmsParam checkRegisterSmsParam) {
 		// 每个ip每分钟只能发十个注册的验证码,免得接口被利用
 		if (!smsLogService.checkValidCode(checkRegisterSmsParam.getMobile(), checkRegisterSmsParam.getValidCode(), SmsType.REGISTER)){
-			throw new YamiShopBindException("验证码有误或已过期");
+			throw new GlobalException("验证码有误或已过期");
 		}
 		String checkRegisterSmsFlag = IdUtil.simpleUUID();
 		RedisUtil.set(CHECK_REGISTER_SMS_FLAG + checkRegisterSmsFlag, checkRegisterSmsParam.getMobile(), 600);
@@ -134,7 +135,7 @@ public class UserRegisterController {
 			userService.validate(userRegisterParam, CHECK_REGISTER_SMS_FLAG + userRegisterParam.getCheckRegisterSmsFlag());
 			// 正在进行申请注册
 			if (userService.count(new LambdaQueryWrapper<User>().eq(User::getUserMobile,userRegisterParam.getMobile())) > 0) {
-				throw new YamiShopBindException("手机号已存在,无法注册");
+				throw new GlobalException("手机号已存在,无法注册");
 			}
 		}
 		// 小程序注册/绑定手机号
@@ -149,10 +150,10 @@ public class UserRegisterController {
 					mobile = wxMaPhoneNumberInfo.getPhoneNumber();
 
 				} catch (Exception e) {
-					throw new YamiShopBindException("授权失败,请重新授权");
+					throw new GlobalException("授权失败,请重新授权");
 				}
 				if (StrUtil.isBlank(mobile)) {
-					throw new YamiShopBindException("无法获取用户手机号信息");
+					throw new GlobalException("无法获取用户手机号信息");
 				}
 				user = yamiUserDetailsService.loadUserByMobileOrUserName(mobile, 0);
 			}
@@ -160,19 +161,19 @@ public class UserRegisterController {
 			else if (Objects.equals(3, userRegisterParam.getValidateType())) {
 				user = yamiUserDetailsService.loadUserByMobileOrUserName(mobile, 0);
 				if (user == null) {
-					throw new YamiShopBindException("账号或密码不正确");
+					throw new GlobalException("账号或密码不正确");
 				}
 				String encodedPassword = user.getLoginPassword();
 				String rawPassword = userRegisterParam.getPassword();
 				// 密码不正确
 				if (StrUtil.isBlank(encodedPassword) || !passwordEncoder.matches(rawPassword,encodedPassword)){
-					throw new YamiShopBindException("账号或密码不正确");
+					throw new GlobalException("账号或密码不正确");
 				}
 			}
 			// 通过验证码校验
 			else {
 				if (!smsLogService.checkValidCode(userRegisterParam.getMobile(), userRegisterParam.getValidCode(), SmsType.VALID)){
-					throw new YamiShopBindException("验证码有误或已过期");
+					throw new GlobalException("验证码有误或已过期");
 				}
 			}
 		}
@@ -193,7 +194,7 @@ public class UserRegisterController {
 
 			// 如果有用户名,就判断用户名格式是否正确
 			if (!PrincipalUtil.isUserName(userRegisterParam.getUserName())) {
-				throw new YamiShopBindException("用户名应由4-16位数字字母下划线组成");
+				throw new GlobalException("用户名应由4-16位数字字母下划线组成");
 			}
 
 			user.setModifyTime(now);
@@ -234,10 +235,10 @@ public class UserRegisterController {
 	public ResponseEntity<String> checkUpdatePwdSms(@Valid @RequestBody CheckRegisterSmsParam checkRegisterSmsParam) {
 		User user = userService.getOne(new LambdaQueryWrapper<User>().eq(User::getUserMobile, checkRegisterSmsParam.getMobile()));
 		if (user == null) {
-			throw new YamiShopBindException("无法获取用户信息");
+			throw new GlobalException("无法获取用户信息");
 		}
 		if (!smsLogService.checkValidCode(user.getUserMobile(), checkRegisterSmsParam.getValidCode(), SmsType.UPDATE_PASSWORD)){
-			throw new YamiShopBindException("验证码有误或已过期");
+			throw new GlobalException("验证码有误或已过期");
 		}
 		String checkRegisterSmsFlag = IdUtil.simpleUUID();
 		RedisUtil.set(CHECK_UPDATE_PWD_SMS_FLAG + checkRegisterSmsFlag, checkRegisterSmsParam.getMobile(), 600);
@@ -249,15 +250,15 @@ public class UserRegisterController {
 	public ResponseEntity<Void> updatePwd(@Valid @RequestBody UserRegisterParam userRegisterParam) {
 		User user = userService.getOne(new LambdaQueryWrapper<User>().eq(User::getUserMobile, userRegisterParam.getMobile()));
 		if (user == null) {
-			throw new YamiShopBindException("无法获取用户信息");
+			throw new GlobalException("无法获取用户信息");
 		}
 		// 看看有没有校验验证码成功的标识
 		userService.validate(userRegisterParam, CHECK_UPDATE_PWD_SMS_FLAG + userRegisterParam.getCheckRegisterSmsFlag());
 		if (StrUtil.isBlank(userRegisterParam.getPassword())) {
-			throw new YamiShopBindException("新密码不能为空");
+			throw new GlobalException("新密码不能为空");
 		}
 		if (StrUtil.equals(passwordEncoder.encode(userRegisterParam.getPassword()),user.getLoginPassword())) {
-			throw new YamiShopBindException("新密码不能与原密码相同!");
+			throw new GlobalException("新密码不能与原密码相同!");
 		}
 		user.setModifyTime(new Date());
 		user.setLoginPassword(passwordEncoder.encode(userRegisterParam.getPassword()));

+ 3 - 2
yami-shop-api/src/main/java/com/yami/shop/api/listener/ConfirmOrderListener.java

@@ -21,6 +21,7 @@ import com.yami.shop.bean.model.Product;
 import com.yami.shop.bean.model.Sku;
 import com.yami.shop.bean.model.UserAddr;
 import com.yami.shop.bean.order.ConfirmOrderOrder;
+import com.yami.shop.common.exception.GlobalException;
 import com.yami.shop.common.exception.YamiShopBindException;
 import com.yami.shop.common.util.Arith;
 import com.yami.shop.delivery.comment.service.TransportManagerService;
@@ -92,10 +93,10 @@ public class ConfirmOrderListener {
             // 获取sku信息
             Sku sku = skuService.getSkuBySkuId(shopCartItem.getSkuId());
             if (product == null || sku == null) {
-                throw new YamiShopBindException("购物车包含无法识别的商品");
+                throw new GlobalException("购物车包含无法识别的商品");
             }
             if (product.getStatus() != 1 || sku.getStatus() != 1) {
-                throw new YamiShopBindException("商品[" + sku.getProdName() + "]已下架");
+                throw new GlobalException("商品[" + sku.getProdName() + "]已下架");
             }
 
             totalCount = shopCartItem.getProdCount() + totalCount;

+ 10 - 9
yami-shop-api/src/main/java/com/yami/shop/api/listener/SubmitOrderListener.java

@@ -21,6 +21,7 @@ import com.yami.shop.bean.enums.OrderType;
 import com.yami.shop.bean.event.SubmitOrderEvent;
 import com.yami.shop.bean.model.*;
 import com.yami.shop.bean.order.SubmitOrderOrder;
+import com.yami.shop.common.exception.GlobalException;
 import com.yami.shop.common.exception.YamiShopBindException;
 import com.yami.shop.common.util.Arith;
 import com.yami.shop.dao.*;
@@ -92,7 +93,7 @@ public class SubmitOrderListener {
         // 把订单地址保存到数据库
         UserAddrOrder userAddrOrder = mapperFacade.map(mergerOrder.getUserAddr(), UserAddrOrder.class);
         if (userAddrOrder == null) {
-            throw new YamiShopBindException("请填写收货地址");
+            throw new GlobalException("请填写收货地址");
         }
         userAddrOrder.setUserId(userId);
         userAddrOrder.setCreateTime(now);
@@ -224,7 +225,7 @@ public class SubmitOrderListener {
             if (skuMapper.updateStocks(sku) == 0) {
                 skuService.removeSkuCacheBySkuId(key, sku.getProdId());
                 productService.removeProductCacheByProdId(sku.getProdId());
-                throw new YamiShopBindException("商品:[" + sku.getProdName() + "]库存不足");
+                throw new GlobalException("商品:[" + sku.getProdName() + "]库存不足");
             }
         });
 
@@ -233,7 +234,7 @@ public class SubmitOrderListener {
 
             if (productMapper.updateStocks(prod) == 0) {
                 productService.removeProductCacheByProdId(prodId);
-                throw new YamiShopBindException("商品:[" + prod.getProdName() + "]库存不足");
+                throw new GlobalException("商品:[" + prod.getProdName() + "]库存不足");
             }
         });
 
@@ -243,11 +244,11 @@ public class SubmitOrderListener {
     private Product checkAndGetProd(Long prodId, ShopCartItemDto shopCartItem, Map<Long, Product> prodStocksMap) {
         Product product = productService.getProductByProdId(prodId);
         if (product == null) {
-            throw new YamiShopBindException("购物车包含无法识别的商品");
+            throw new GlobalException("购物车包含无法识别的商品");
         }
 
         if (product.getStatus() != 1) {
-            throw new YamiShopBindException("商品[" + product.getProdName() + "]已下架");
+            throw new GlobalException("商品[" + product.getProdName() + "]已下架");
         }
 
         // 商品需要改变的库存
@@ -268,7 +269,7 @@ public class SubmitOrderListener {
 
         // -1为无限库存
         if (product.getTotalStocks() != -1 && mapProduct.getTotalStocks() > product.getTotalStocks()) {
-            throw new YamiShopBindException("商品:[" + product.getProdName() + "]库存不足");
+            throw new GlobalException("商品:[" + product.getProdName() + "]库存不足");
         }
 
         return product;
@@ -279,15 +280,15 @@ public class SubmitOrderListener {
         // 获取sku信息
         Sku sku = skuService.getSkuBySkuId(skuId);
         if (sku == null) {
-            throw new YamiShopBindException("购物车包含无法识别的商品");
+            throw new GlobalException("购物车包含无法识别的商品");
         }
 
         if (sku.getStatus() != 1) {
-            throw new YamiShopBindException("商品[" + sku.getProdName() + "]已下架");
+            throw new GlobalException("商品[" + sku.getProdName() + "]已下架");
         }
         // -1为无限库存
         if (sku.getStocks() != -1 && shopCartItem.getProdCount() > sku.getStocks()) {
-            throw new YamiShopBindException("商品:[" + sku.getProdName() + "]库存不足");
+            throw new GlobalException("商品:[" + sku.getProdName() + "]库存不足");
         }
 
         if (sku.getStocks() != -1) {

+ 1 - 1
yami-shop-bean/pom.xml

@@ -23,4 +23,4 @@
             <artifactId>spring-boot-starter-validation</artifactId>
         </dependency>
     </dependencies>
-</project>
+</project>

+ 41 - 0
yami-shop-bean/src/main/java/com/yami/shop/bean/model/Channel.java

@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2018-2999 广州亚米信息科技有限公司 All rights reserved.
+ *
+ * https://www.gz-yami.com/
+ *
+ * 未经允许,不可做商业用途!
+ *
+ * 版权所有,侵权必究!
+ */
+
+package com.yami.shop.bean.model;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * 渠道管理
+ * @author lgh on 2024/01/01.
+ */
+@Data
+@TableName("tz_channel")
+public class Channel implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(type = IdType.INPUT)
+    private Long id;
+
+    /**
+     * 渠道名称
+     */
+    private Long channelName;
+
+}

+ 2 - 2
yami-shop-bean/src/main/java/com/yami/shop/bean/model/ChannelProd.java

@@ -38,7 +38,7 @@ public class ChannelProd implements Serializable {
     /**
      * 渠道ID
      */
-    private Long shannerId;
+    private Long channelId;
 
     /**
      * 单品ID
@@ -58,7 +58,7 @@ public class ChannelProd implements Serializable {
     /**
      * 渠道对应商品售价
      */
-    private BigDecimal shannerProdPrice;
+    private BigDecimal channelProdPrice;
 
     /**
      * 删除状态(0-正常,1-删除)

+ 65 - 0
yami-shop-bean/src/main/java/com/yami/shop/bean/model/Dept.java

@@ -0,0 +1,65 @@
+
+package com.yami.shop.bean.model;
+
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 部门实体类
+ *
+ * @author
+ */
+@Data
+@TableName("tz_sys_dept")
+public class Dept implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 部门ID
+     */
+    @TableId
+    private Long deptId;
+
+    /**
+     * 部门名称
+     */
+    private String deptName;
+
+    /**
+     * 部门描述
+     */
+    private String description;
+
+    /**
+     * 父级部门ID
+     */
+    private Long parentId;
+
+    /**
+     * 部门层级
+     */
+    private Integer level;
+
+    /**
+     * 排序
+     */
+    private Integer seq;
+
+    /**
+     * 状态 1:正常 0:禁用
+     */
+    private Integer status;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    /**
+     * 更新时间
+     */
+    private Date updateTime;
+}

+ 45 - 0
yami-shop-bean/src/main/java/com/yami/shop/bean/model/DeptUser.java

@@ -0,0 +1,45 @@
+
+package com.yami.shop.bean.model;
+
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 部门员工关联表
+ *
+ * @author
+ */
+@Data
+@TableName("tz_sys_dept_user")
+public class DeptUser implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键ID
+     */
+    @TableId
+    private Long id;
+
+    /**
+     * 部门ID
+     */
+    private Long deptId;
+
+    /**
+     * 用户ID
+     */
+    private String userId;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    /**
+     * 更新时间
+     */
+    private Date updateTime;
+}

+ 37 - 0
yami-shop-bean/src/main/java/com/yami/shop/bean/vo/ChannelProdExportVO.java

@@ -0,0 +1,37 @@
+package com.yami.shop.bean.vo;
+
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+/**
+ * 渠道商品导出VO
+ */
+@Data
+public class ChannelProdExportVO {
+
+    @ExcelProperty(value = "海博商品ID", index = 0)
+    private String skuId;
+
+    @ExcelProperty(value = "商品名称", index = 1)
+    private String skuName;
+
+    @ExcelProperty(value = "销售渠道", index = 2)
+    private String channelName;
+
+    @ExcelProperty(value = "门店名称", index = 3)
+    private String shopName;
+
+
+    @ExcelProperty(value = "进货价", index = 4)
+    private BigDecimal purchasePrice;
+
+    @ExcelProperty(value = "出货价", index = 5)
+    private BigDecimal deliveryPrice;
+
+    @ExcelProperty(value = "渠道售价", index = 6)
+    private BigDecimal channelProdPrice;
+
+}

+ 54 - 0
yami-shop-bean/src/main/java/com/yami/shop/bean/vo/ChannelProdImportVO.java

@@ -0,0 +1,54 @@
+package com.yami.shop.bean.vo;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.alibaba.excel.annotation.write.style.ColumnWidth;
+import com.alibaba.excel.annotation.write.style.ContentStyle;
+import com.alibaba.excel.annotation.write.style.HeadStyle;
+import com.alibaba.excel.enums.poi.FillPatternTypeEnum;
+import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
+import lombok.Data;
+import java.math.BigDecimal;
+
+/**
+ * 导出模板(导入)
+ */
+@Data
+@HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 40) // 表头背景色(40=橙色)
+@ContentStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 9) // 内容背景色(9=淡黄色)
+public class ChannelProdImportVO {
+
+
+    @ExcelProperty(value = "海博商品ID", index = 0)
+    @ColumnWidth(20) // 列宽
+    @ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER) // 居中对齐
+    private String skuId;
+
+    @ExcelProperty(value = "商品名称", index = 1)
+    @ColumnWidth(40) // 列宽
+    @ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.LEFT)
+    private String skuName;
+
+    @ExcelProperty(value = "销售渠道", index = 2)
+    @ColumnWidth(20) // 列宽
+    @ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.LEFT)
+    private String channelName;
+
+    @ExcelProperty(value = "门店名称", index = 3)
+    @ColumnWidth(20) // 列宽
+    @ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.LEFT)
+    private String shopName;
+
+
+    @ExcelProperty(value = "进货价(元)", index = 4)
+    @ColumnWidth(20) // 列宽
+    private BigDecimal purchasePrice;
+
+    @ExcelProperty(value = "出货价(元)", index = 5)
+    @ColumnWidth(20) // 列宽
+    private BigDecimal deliveryPrice;
+
+    @ExcelProperty(value = "渠道售价(元)", index = 6)
+    @ColumnWidth(20) // 列宽
+    private BigDecimal channelProdPrice;
+
+}

+ 3 - 2
yami-shop-common/src/main/java/com/yami/shop/common/config/DefaultExceptionHandlerConfig.java

@@ -11,6 +11,7 @@
 package com.yami.shop.common.config;
 
 import com.yami.shop.common.exception.YamiShopBindException;
+import com.yami.shop.common.util.R;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.http.HttpStatus;
 import org.springframework.http.ResponseEntity;
@@ -44,8 +45,8 @@ public class DefaultExceptionHandlerConfig {
     }
 
     @ExceptionHandler(YamiShopBindException.class)
-    public ResponseEntity<String> unauthorizedExceptionHandler(YamiShopBindException e){
+    public R<String> unauthorizedExceptionHandler(YamiShopBindException e){
         log.error("YamiShopBindException Message :{}",e.getMessage());
-        return ResponseEntity.status(e.getHttpStatusCode()).body(e.getMessage());
+        return R.FAIL();
     }
 }

+ 70 - 0
yami-shop-common/src/main/java/com/yami/shop/common/exception/GlobalException.java

@@ -0,0 +1,70 @@
+package com.yami.shop.common.exception;
+
+import com.yami.shop.common.util.IBasicInfo;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * <p>TODO</p>
+ *
+ * @author mr wang
+ * @version 1.0.0
+ * @since 2025-08-26
+ */
+@Setter
+@Getter
+public class GlobalException extends RuntimeException {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 错误码
+     */
+    protected String errorCode;
+    /**
+     * 错误信息
+     */
+    protected String errorMsg;
+
+    public GlobalException() {
+        super();
+    }
+
+    public GlobalException(IBasicInfo IBasicInfo) {
+        super(String.valueOf(IBasicInfo.getCode()));
+        this.errorCode = String.valueOf(IBasicInfo.getCode());
+        this.errorMsg = IBasicInfo.getValue();
+    }
+
+    public GlobalException(IBasicInfo IBasicInfo, Throwable cause) {
+        super(String.valueOf(IBasicInfo.getCode()), cause);
+        this.errorCode = String.valueOf(IBasicInfo.getCode());
+        this.errorMsg = IBasicInfo.getValue();
+    }
+
+    public GlobalException(String errorMsg) {
+        super(errorMsg);
+        this.errorMsg = errorMsg;
+    }
+
+    public GlobalException(String errorCode, String errorMsg) {
+        super(errorCode);
+        this.errorCode = errorCode;
+        this.errorMsg = errorMsg;
+    }
+
+    public GlobalException(String errorCode, String errorMsg, Throwable cause) {
+        super(errorCode, cause);
+        this.errorCode = errorCode;
+        this.errorMsg = errorMsg;
+    }
+
+
+    public String getMessage() {
+        return errorMsg;
+    }
+
+    @Override
+    public Throwable fillInStackTrace() {
+        return this;
+    }
+}

+ 102 - 0
yami-shop-common/src/main/java/com/yami/shop/common/handler/PlatformExceptionHandler.java

@@ -0,0 +1,102 @@
+package com.yami.shop.common.handler;
+
+import com.yami.shop.common.enums.ResponseEnum;
+import com.yami.shop.common.exception.GlobalException;
+import com.yami.shop.common.util.R;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.validation.ObjectError;
+import org.springframework.web.bind.MethodArgumentNotValidException;
+import org.springframework.web.bind.annotation.ControllerAdvice;
+import org.springframework.web.bind.annotation.ExceptionHandler;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.util.NestedServletException;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.List;
+
+/**
+ * <p>TODO</p>
+ *
+ * @author mr wang
+ * @version 1.0.0
+ * @since 2025-08-26
+ */
+
+@Slf4j
+@ControllerAdvice
+public class PlatformExceptionHandler {
+    /**
+     * <p>优雅的处理自定义全局异常</p>
+     *
+     * @param req 原生request
+     * @param g   自定义异常
+     * @return R<String> 自定义返回结果
+     */
+    @ResponseBody
+    @ExceptionHandler(value = GlobalException.class)
+    public R<String> defaultErrorHandler(HttpServletRequest req, GlobalException g) {
+        //自定义处理
+        return R.FAIL(g.getErrorCode(), g.getErrorMsg());
+    }
+
+
+
+    /**
+     * <p>优雅的处理自定义全局异常</p>
+     *
+     * @param req 原生request
+     * @param g   自定义异常
+     * @return R<String> 自定义返回结果
+     */
+    @ResponseBody
+    @ExceptionHandler(value = SecurityException.class)
+    public R<String> defaultErrorHandler(HttpServletRequest req, SecurityException g) {
+        //自定义处理
+        return R.FAIL(400, g.getMessage());
+    }
+
+    /**
+     * <p>抛出断言异常</p>
+     *
+     * @param req 原生request
+     * @param g   自定义异常
+     * @return R<String> 自定义返回结果
+     */
+    @ResponseBody
+    @ExceptionHandler(value = NestedServletException.class)
+    public R<String> defaultErrorHandler(HttpServletRequest req, NestedServletException g) {
+        //自定义处理
+        return R.FAIL(g.getCause().getMessage());
+    }
+
+    /**
+     * 数据校验异常处理
+     *
+     * @param req 原生request
+     * @param e   自定义异常
+     * @return R<String> 自定义返回结果
+     */
+    @ResponseBody
+    @ExceptionHandler(MethodArgumentNotValidException.class)
+    public R<String> dataCheckErrorHandler(HttpServletRequest req, MethodArgumentNotValidException e) {
+        log.error("数据校验异常,原因是:", e);
+        List<ObjectError> allErrors = e.getBindingResult().getAllErrors();
+        return R.FAIL(allErrors.get(0).getDefaultMessage());
+    }
+
+
+    /**
+     * <p>处理其他异常</p>
+     *
+     * @param req 原生request
+     * @param e   其他异常
+     * @return R<String> 自定义返回结果
+     */
+    @ExceptionHandler(value = Exception.class)
+    @ResponseBody
+    public R<String> exceptionHandler(HttpServletRequest req, Exception e) {
+        log.error("未知异常!原因是:", e);
+        return R.FAIL(ResponseEnum.ERROR.getValue());
+    }
+
+}

+ 3 - 2
yami-shop-common/src/main/java/com/yami/shop/common/util/HttpContextUtils.java

@@ -10,6 +10,7 @@
 
 package com.yami.shop.common.util;
 
+import com.yami.shop.common.exception.GlobalException;
 import com.yami.shop.common.exception.YamiShopBindException;
 import com.yami.shop.common.xss.XssUtil;
 import lombok.experimental.UtilityClass;
@@ -50,7 +51,7 @@ public class HttpContextUtils{
 
     public String getStringFromStream(HttpServletRequest req) {
         if (req.getContentLength() > MAX_STRING_SIZE) {
-            throw new YamiShopBindException("请求数据过长");
+            throw new GlobalException("请求数据过长");
         }
         ServletInputStream is;
         try {
@@ -65,7 +66,7 @@ public class HttpContextUtils{
                 }
             }
             if (nTotalRead > MAX_STRING_SIZE) {
-                throw new YamiShopBindException("请求数据过长");
+                throw new GlobalException("请求数据过长");
             }
             return XssUtil.clean(new String(bytes, 0, nTotalRead, StandardCharsets.UTF_8));
         } catch (IOException e) {

+ 12 - 11
yami-shop-coupon/yami-shop-coupon-comment/src/main/java/com/yami/shop/coupon/comment/service/impl/CouponServiceImpl.java

@@ -26,6 +26,7 @@ import com.yami.shop.bean.event.ScoreOrderEvent;
 import com.yami.shop.bean.model.OfflineHandleEvent;
 import com.yami.shop.bean.param.OfflineHandleEventAuditParam;
 import com.yami.shop.common.config.Constant;
+import com.yami.shop.common.exception.GlobalException;
 import com.yami.shop.common.exception.YamiShopBindException;
 import com.yami.shop.common.util.PageParam;
 import com.yami.shop.coupon.comment.Enums.CouponStatusEnum;
@@ -80,7 +81,7 @@ public class CouponServiceImpl extends ServiceImpl<CouponMapper, Coupon> impleme
         if ((Objects.equals(CouponProdType.PROD_IN.value(), coupon.getSuitableProdType())
                 || Objects.equals(CouponProdType.PROD_NO_IN.value(), coupon.getSuitableProdType()))
                 && CollectionUtils.isEmpty(coupon.getCouponProds())) {
-            throw new YamiShopBindException("商品不能为空");
+            throw new GlobalException("商品不能为空");
         }
         // 结束时间小于等于当前时间
         if (coupon.getValidTimeType() == 1) {
@@ -198,13 +199,13 @@ public class CouponServiceImpl extends ServiceImpl<CouponMapper, Coupon> impleme
         if ((Objects.equals(CouponProdType.PROD_IN.value(), coupon.getSuitableProdType())
                 || Objects.equals(CouponProdType.PROD_NO_IN.value(), coupon.getSuitableProdType()))
                 && CollectionUtils.isEmpty(coupon.getCouponProds())) {
-            throw new YamiShopBindException("商品不能为空");
+            throw new GlobalException("商品不能为空");
         }
         if (coupon.getLimitNum() <= 0) {
-            throw new YamiShopBindException("优惠券限领数量需大于0");
+            throw new GlobalException("优惠券限领数量需大于0");
         }
         if (coupon.getValidTimeType() == 1 && coupon.getStartTime().getTime() > coupon.getEndTime().getTime()) {
-            throw new YamiShopBindException("开始时间需大于结束时间");
+            throw new GlobalException("开始时间需大于结束时间");
         }
         // 结束时间小于等于当前时间
         Date nowTime = new Date();
@@ -237,7 +238,7 @@ public class CouponServiceImpl extends ServiceImpl<CouponMapper, Coupon> impleme
         couponUserMapper.insert(couponUser);
         // 更新库存
         if (couponMapper.updateCouponStocksAndVersion(coupon.getCouponId()) < 1) {
-            throw new YamiShopBindException("优惠券库存不足");
+            throw new GlobalException("优惠券库存不足");
         }
     }
 
@@ -245,19 +246,19 @@ public class CouponServiceImpl extends ServiceImpl<CouponMapper, Coupon> impleme
         Date nowTime = new Date();
         // 当优惠券状态不为投放时
         if (coupon.getOverdueStatus() == 0 || coupon.getPutonStatus() != 1) {
-            throw new YamiShopBindException("该券无法被领取");
+            throw new GlobalException("该券无法被领取");
         }
         // 当优惠券不在规定时间内(类型为固定时间) 优惠券使用时间,不是领取时间,一般优惠券都是可以领,还不能用的
 //        if (coupon.getValidTimeType() == 1 && (coupon.getEndTime().getTime() < nowTime.getTime() || coupon.getStartTime().getTime() > nowTime.getTime())) {
-//            throw new YamiShopBindException("不在可领取的时间范围内");
+//            throw new GlobalException("不在可领取的时间范围内");
 //        }
         // 当优惠券无库存时
         if (coupon.getStocks() == 0) {
-            throw new YamiShopBindException("该券领完了!");
+            throw new GlobalException("该券领完了!");
         }
         int count = couponUserMapper.selectCount(new LambdaQueryWrapper<CouponUser>().eq(CouponUser::getUserId, userId).eq(CouponUser::getCouponId, coupon.getCouponId()));
         if (count >= coupon.getLimitNum()) {
-            throw new YamiShopBindException("该券已达个人领取上限,无法继续领取");
+            throw new GlobalException("该券已达个人领取上限,无法继续领取");
         }
         CouponUser couponUser = new CouponUser();
         couponUser.setUserId(userId);
@@ -305,12 +306,12 @@ public class CouponServiceImpl extends ServiceImpl<CouponMapper, Coupon> impleme
         // 获取未被删除的优惠券数量
         Integer useCount = couponUserMapper.selectCount(new LambdaQueryWrapper<CouponUser>().eq(CouponUser::getCouponId, couponId).eq(CouponUser::getIsDelete, 0));
         if (useCount > 0) {
-            throw new YamiShopBindException("该优惠券已被领取,删除失败");
+            throw new GlobalException("该优惠券已被领取,删除失败");
         }
 
         Coupon coupon = couponMapper.selectById(couponId);
         if (Objects.equals(coupon.getPutonStatus(), 1)) {
-            throw new YamiShopBindException("该优惠券已投放,删除失败");
+            throw new GlobalException("该优惠券已投放,删除失败");
         }
         //删除优惠券关联的商品
         couponProdMapper.delete(new LambdaQueryWrapper<CouponProd>().eq(CouponProd::getCouponId, couponId));

+ 4 - 3
yami-shop-coupon/yami-shop-coupon-multishop/src/main/java/com/yami/shop/coupon/multishop/controller/CouponController.java

@@ -18,6 +18,7 @@ import com.yami.shop.bean.enums.CouponType;
 import com.yami.shop.bean.enums.OfflineHandleEventType;
 import com.yami.shop.bean.model.OfflineHandleEvent;
 import com.yami.shop.bean.param.OfflineHandleEventAuditParam;
+import com.yami.shop.common.exception.GlobalException;
 import com.yami.shop.common.exception.YamiShopBindException;
 import com.yami.shop.common.util.PageParam;
 import com.yami.shop.coupon.comment.model.Coupon;
@@ -99,7 +100,7 @@ public class CouponController {
         Long shopId = SecurityUtils.getShopUser().getShopId();
         Coupon dbCoupon = couponService.getById(coupon.getCouponId());
         if (!Objects.equals(dbCoupon.getShopId(), shopId)) {
-            throw new YamiShopBindException("没有权限修改该优惠券信息");
+            throw new GlobalException("没有权限修改该优惠券信息");
         }
         coupon.setShopId(shopId);
         couponService.updateCouponAndCouponProds(coupon);
@@ -114,7 +115,7 @@ public class CouponController {
         Long shopId = SecurityUtils.getShopUser().getShopId();
         Coupon dbCoupon = couponService.getById(couponId);
         if (!Objects.equals(dbCoupon.getShopId(), shopId)) {
-            throw new YamiShopBindException("没有权限修改该优惠券信息");
+            throw new GlobalException("没有权限修改该优惠券信息");
         }
         couponService.deleteByCouponId(couponId);
         return ResponseEntity.ok().build();
@@ -136,7 +137,7 @@ public class CouponController {
     public ResponseEntity<Void> auditApply(@RequestBody OfflineHandleEventAuditParam offlineHandleEventAuditParam) {
         Coupon coupon = couponService.getCouponAndCouponProdsByCouponId(offlineHandleEventAuditParam.getHandleId());
         if (coupon == null) {
-            throw new YamiShopBindException("未找到该活动信息");
+            throw new GlobalException("未找到该活动信息");
         }
         couponService.auditApply(offlineHandleEventAuditParam.getEventId(), offlineHandleEventAuditParam.getHandleId(), offlineHandleEventAuditParam.getReapplyReason());
         // 移除缓存

+ 5 - 4
yami-shop-coupon/yami-shop-coupon-platform/src/main/java/com/yami/shop/coupon/platform/controller/CouponController.java

@@ -17,6 +17,7 @@ import com.yami.shop.bean.enums.OfflineHandleEventType;
 import com.yami.shop.bean.model.OfflineHandleEvent;
 import com.yami.shop.bean.param.OfflineHandleEventAuditParam;
 import com.yami.shop.common.config.Constant;
+import com.yami.shop.common.exception.GlobalException;
 import com.yami.shop.common.exception.YamiShopBindException;
 import com.yami.shop.common.util.PageParam;
 import com.yami.shop.coupon.comment.model.Coupon;
@@ -96,7 +97,7 @@ public class CouponController {
     @PreAuthorize("@pms.hasPermission('platform:coupon:update')")
     public ResponseEntity<IPage<Coupon>> couponByScore(@RequestBody @Valid Coupon coupon) {
         if(coupon.getScorePrice() == null){
-            throw new YamiShopBindException("请输入正确的积分数量");
+            throw new GlobalException("请输入正确的积分数量");
         }
         coupon.setIsScoreType(1);
         couponService.updateById(coupon);
@@ -153,7 +154,7 @@ public class CouponController {
         Long sysUserId = SecurityUtils.getSysUser().getUserId();
         Coupon coupon = couponService.getCouponAndCouponProdsByCouponId(offlineHandleEvent.getHandleId());
         if (coupon == null) {
-            throw new YamiShopBindException("未找到该活动信息");
+            throw new GlobalException("未找到该活动信息");
         }
         couponService.offline(coupon, offlineHandleEvent.getOfflineReason(), sysUserId);
         return ResponseEntity.ok().build();
@@ -168,7 +169,7 @@ public class CouponController {
         Long sysUserId = SecurityUtils.getSysUser().getUserId();
         Coupon coupon = couponService.getCouponAndCouponProdsByCouponId(offlineHandleEventAuditParam.getHandleId());
         if (coupon == null) {
-            throw new YamiShopBindException("未找到该活动信息");
+            throw new GlobalException("未找到该活动信息");
         }
         couponService.auditCoupon(offlineHandleEventAuditParam, sysUserId);
         // 移除缓存
@@ -198,7 +199,7 @@ public class CouponController {
         // 查询平台下优惠券
         Coupon dbCoupon = couponService.getById(coupon.getCouponId());
         if(null == dbCoupon){
-            throw new YamiShopBindException("优惠券不存在");
+            throw new GlobalException("优惠券不存在");
         }
         coupon.setShopId(dbCoupon.getShopId());
         couponService.updateCouponAndCouponProds(coupon);

+ 2 - 2
yami-shop-delivery/yami-shop-delivery-api/src/main/java/com/yami/shop/delivery/api/controller/MyDeliveryController.java

@@ -70,7 +70,7 @@ public class MyDeliveryController {
             }
         } catch (Exception e) {
             e.printStackTrace();
-            throw new YamiShopBindException("查询出错");
+            throw new GlobalException("查询出错");
         }
         return ResponseEntity.ok(deliveryOrders);
     }
@@ -92,7 +92,7 @@ public class MyDeliveryController {
             orderStatusResponse = paoTuiApi.deliveryRoute(orderDetailRequest);
         } catch (Exception e) {
             e.printStackTrace();
-            throw new YamiShopBindException("查询出错");
+            throw new GlobalException("查询出错");
         }
         return ResponseEntity.ok(orderStatusResponse);
     }

+ 1 - 1
yami-shop-delivery/yami-shop-delivery-comment/src/main/java/com/yami/shop/delivery/comment/service/impl/DeliveryOrderServiceImpl.java

@@ -214,7 +214,7 @@ public class DeliveryOrderServiceImpl extends ServiceImpl<DeliveryOrderMapper, D
 //                }
 //                Integer prodCount = deliveryMap.get(selectOrderItem.getOrderItemId());
 //                if(prodCount > selectOrderItem.getChangeNum()){
-//                    throw new YamiShopBindException("部分订单可发货数量不足!");
+//                    throw new GlobalException("部分订单可发货数量不足!");
 //                }
 //            }
 //        }

+ 5 - 4
yami-shop-delivery/yami-shop-delivery-comment/src/main/java/com/yami/shop/delivery/comment/service/impl/TransportManagerServiceImpl.java

@@ -17,6 +17,7 @@ import com.yami.shop.bean.app.dto.ProductItemDto;
 import com.yami.shop.bean.app.dto.ShopCartItemDto;
 import com.yami.shop.bean.enums.TransportChargeType;
 import com.yami.shop.bean.model.*;
+import com.yami.shop.common.exception.GlobalException;
 import com.yami.shop.common.exception.YamiShopBindException;
 import com.yami.shop.common.util.Arith;
 import com.yami.shop.common.util.Json;
@@ -202,14 +203,14 @@ public class TransportManagerServiceImpl implements TransportManagerService {
         Double latitude = userAddr.getLatitude();
 
         if (longitude.equals(0.0)) {
-            throw new YamiShopBindException("收货地址经纬度为空");
+            throw new GlobalException("收货地址经纬度为空");
         }
 
         ShopDetail shopDetailByShopId = shopDetailService.getShopDetailByShopId(shopId);
         double v = calculateDistance(latitude, longitude, Double.valueOf(shopDetailByShopId.getShopLat()), Double.valueOf(shopDetailByShopId.getShopLng()));
         Transport2 byDistance = transport2Service.findByDistance(shopId, v);
         if (ObjectUtil.isEmpty(byDistance)) {
-            throw new YamiShopBindException("超出配送范围");
+            throw new GlobalException("超出配送范围");
         }
         // todo 计算价格
 
@@ -221,14 +222,14 @@ public class TransportManagerServiceImpl implements TransportManagerService {
 
 
         if (longitude.equals(0.0)) {
-            throw new YamiShopBindException("收货地址经纬度为空");
+            throw new GlobalException("收货地址经纬度为空");
         }
 
         ShopDetail shopDetailByShopId = shopDetailService.getShopDetailByShopId(shopId);
         double v = calculateDistance(latitude, longitude, Double.valueOf(shopDetailByShopId.getShopLat()), Double.valueOf(shopDetailByShopId.getShopLng()));
         Transport2 byDistance = transport2Service.findByDistance(shopId, v);
         if (ObjectUtil.isEmpty(byDistance)) {
-            throw new YamiShopBindException("超出配送范围");
+            throw new GlobalException("超出配送范围");
         }
         // todo 计算价格
 

+ 3 - 2
yami-shop-delivery/yami-shop-delivery-comment/src/main/java/com/yami/shop/delivery/comment/service/impl/TransportServiceImpl.java

@@ -15,6 +15,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.yami.shop.bean.model.Area;
 import com.yami.shop.bean.model.Product;
+import com.yami.shop.common.exception.GlobalException;
 import com.yami.shop.common.exception.YamiShopBindException;
 import com.yami.shop.delivery.comment.dao.TranscityMapper;
 import com.yami.shop.delivery.comment.dao.TransfeeMapper;
@@ -110,7 +111,7 @@ public class TransportServiceImpl extends ServiceImpl<TransportMapper, Transport
 		for (TransfeeFree transfeeFree : transfeeFrees) {
 			List<Area> cityList = transfeeFree.getFreeCityList();
 			if (CollectionUtil.isEmpty(cityList)) {
-				throw new YamiShopBindException("请选择指定包邮城市");
+				throw new GlobalException("请选择指定包邮城市");
 			}
 			// 当地址不为空时
 			for (Area area : cityList) {
@@ -168,7 +169,7 @@ public class TransportServiceImpl extends ServiceImpl<TransportMapper, Transport
 					.eq(Product::getDeliveryTemplateId,id)
 			);
 			if (count>0){
-				throw new YamiShopBindException("模板 "+ dbTransport.getTransName() +" 正在使用中,无法进行删除操作");
+				throw new GlobalException("模板 "+ dbTransport.getTransName() +" 正在使用中,无法进行删除操作");
 			}
 			List<Long> transfeeIds = dbTransport.getTransfees().stream().map(Transfee::getTransfeeId).collect(Collectors.toList());
 			// 删除所有运费项包含的城市

+ 1 - 1
yami-shop-delivery/yami-shop-delivery-multishop/src/main/java/com/yami/shop/delivery/multishop/controller/FetchController.java

@@ -123,7 +123,7 @@ public class FetchController {
     public ResponseEntity<Void> auditApply(@RequestBody OfflineHandleEventAuditParam offlineHandleEventAuditParam) {
         Fetch seckill = fetchService.getById(offlineHandleEventAuditParam.getHandleId());
         if (seckill == null) {
-            throw new YamiShopBindException("未找到该自提点信息");
+            throw new GlobalException("未找到该自提点信息");
         }
         fetchService.auditApply(offlineHandleEventAuditParam.getEventId(), offlineHandleEventAuditParam.getHandleId(), offlineHandleEventAuditParam.getReapplyReason());
 

+ 2 - 2
yami-shop-delivery/yami-shop-delivery-multishop/src/main/java/com/yami/shop/delivery/multishop/controller/OrderDeliveryController.java

@@ -80,7 +80,7 @@ public class OrderDeliveryController {
         List<OrderItem> orderItems = orderItemService.list(new LambdaQueryWrapper<OrderItem>()
                 .eq(OrderItem::getOrderNumber, orderNumber).eq(OrderItem::getShopId, shopId));
         if (CollectionUtils.isEmpty(orderItems)) {
-            throw new YamiShopBindException("订单不存在!");
+            throw new GlobalException("订单不存在!");
         }
         Map<Long, Integer> orderItemMap = null;
         if (Objects.nonNull(order.getRefundStatus())) {
@@ -163,7 +163,7 @@ public class OrderDeliveryController {
             }
         } catch (Exception e) {
             e.printStackTrace();
-            throw new YamiShopBindException("查询出错");
+            throw new GlobalException("查询出错");
         }
         UserAddrOrder userAddrOrder = userAddrOrderService.selectByAddrOrderId(order.getAddrOrderId());
         orderParam.setUserAddrOrder(userAddrOrder);

+ 3 - 3
yami-shop-delivery/yami-shop-delivery-platform/src/main/java/com/yami/shop/delivery/platform/controller/FetchController.java

@@ -11,7 +11,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.yami.shop.bean.enums.OfflineHandleEventType;
 import com.yami.shop.bean.model.OfflineHandleEvent;
 import com.yami.shop.bean.param.OfflineHandleEventAuditParam;
-import com.yami.shop.common.exception.YamiShopBindException;
+import com.yami.shop.common.exception.GlobalException;
 import com.yami.shop.common.util.PageParam;
 import com.yami.shop.delivery.comment.model.Fetch;
 import com.yami.shop.delivery.comment.service.FetchService;
@@ -109,7 +109,7 @@ public class FetchController {
         Fetch fetch = fetchService.getById(offlineHandleEvent.getHandleId());
 
         if (fetch == null) {
-            throw new YamiShopBindException("未找到该自提点信息");
+            throw new GlobalException("未找到该自提点信息");
         }
         Long sysUserId = SecurityUtils.getSysUser().getUserId();
         fetchService.offline(fetch, offlineHandleEvent.getOfflineReason(), sysUserId);
@@ -138,7 +138,7 @@ public class FetchController {
         Long sysUserId = SecurityUtils.getSysUser().getUserId();
         Fetch fetch = fetchService.getById(offlineHandleEventAuditParam.getHandleId());
         if (fetch == null) {
-            throw new YamiShopBindException("未找到自提点信息");
+            throw new GlobalException("未找到自提点信息");
         }
         fetchService.auditSeckill(offlineHandleEventAuditParam, sysUserId);
 

+ 2 - 1
yami-shop-delivery/yami-shop-delivery-platform/src/main/java/com/yami/shop/delivery/platform/controller/OrderDeliveryController.java

@@ -12,6 +12,7 @@ package com.yami.shop.delivery.platform.controller;
 
 import com.yami.shop.bean.model.Order;
 import com.yami.shop.bean.model.OrderItem;
+import com.yami.shop.common.exception.GlobalException;
 import com.yami.shop.common.exception.YamiShopBindException;
 import com.yami.shop.delivery.comment.api.paotui.PaoTuiApi;
 import com.yami.shop.delivery.comment.api.paotui.model.request.OrderDetailRequest;
@@ -98,7 +99,7 @@ public class OrderDeliveryController {
             }
         } catch (Exception e) {
             e.printStackTrace();
-            throw new YamiShopBindException("查询出错");
+            throw new GlobalException("查询出错");
         }
         orderParam.setDeliveryExpresses(deliveryOrders);
         return ResponseEntity.ok(orderParam);

+ 1 - 1
yami-shop-discount/yami-shop-discount-api/src/main/java/com/yami/shop/discount/api/controller/DiscountController.java

@@ -113,7 +113,7 @@ public class DiscountController {
     public ResponseEntity<DiscountDto> getDiscountByDiscountId(@PathVariable("discountId") Long discountId) {
         DiscountDto discountDto = discountService.getDiscountByDiscountId(discountId);
         if (Objects.isNull(discountDto)){
-            throw new YamiShopBindException("该活动不存在或者已结束");
+            throw new GlobalException("该活动不存在或者已结束");
         }
         return ResponseEntity.ok(discountDto);
     }

+ 4 - 3
yami-shop-discount/yami-shop-discount-comment/src/main/java/com/yami/shop/discount/comment/service/impl/DiscountServiceImpl.java

@@ -22,6 +22,7 @@ import com.yami.shop.bean.model.OfflineHandleEvent;
 import com.yami.shop.bean.model.Product;
 import com.yami.shop.bean.param.OfflineHandleEventAuditParam;
 import com.yami.shop.bean.param.ProductParam;
+import com.yami.shop.common.exception.GlobalException;
 import com.yami.shop.common.exception.YamiShopBindException;
 import com.yami.shop.common.util.PageParam;
 import com.yami.shop.discount.comment.Enums.DiscountStatusEnum;
@@ -67,7 +68,7 @@ public class DiscountServiceImpl extends ServiceImpl<DiscountMapper, Discount> i
     public void updateDiscountAndItemAndProd(@Valid Discount discount) {
         Discount discountDB = discountMapper.selectById(discount.getDiscountId());
         if (discountDB.getStatus() > 1 && discount.getStatus() < 2){
-            throw new YamiShopBindException("该活动已被平台下线,不能再更改状态");
+            throw new GlobalException("该活动已被平台下线,不能再更改状态");
         }
         discountMapper.updateById(discount);
 
@@ -97,7 +98,7 @@ public class DiscountServiceImpl extends ServiceImpl<DiscountMapper, Discount> i
     private void insertDiscountItems(@Valid Discount discount, List<DiscountItem> discountItems) {
         for (DiscountItem discountItem : discountItems) {
             if (discountItem.getNeedAmount() == null || discountItem.getDiscount() == null) {
-                throw new YamiShopBindException("请填写完整满减信息");
+                throw new GlobalException("请填写完整满减信息");
             }
             discountItem.setDiscountId(discount.getDiscountId());
         }
@@ -112,7 +113,7 @@ public class DiscountServiceImpl extends ServiceImpl<DiscountMapper, Discount> i
 
         List<DiscountItem> discountItems = discount.getDiscountItems();
         if (CollectionUtil.isEmpty(discountItems)) {
-            throw new YamiShopBindException("活动项不能为空,最少要有一个活动项");
+            throw new GlobalException("活动项不能为空,最少要有一个活动项");
         }
         insertDiscountItems(discount, discountItems);
         if (discount.getSuitableProdType() != 0) {

+ 2 - 2
yami-shop-discount/yami-shop-discount-multishop/src/main/java/com/yami/shop/discount/platform/controller/DiscountController.java

@@ -72,7 +72,7 @@ public class DiscountController {
         Long shopId = SecurityUtils.getShopUser().getShopId();
         Discount discount = discountService.getDiscountAndItemAndProdById(discountId);
         if (!Objects.equals(shopId, discount.getShopId())) {
-            throw new YamiShopBindException("您无权获取此活动信息");
+            throw new GlobalException("您无权获取此活动信息");
         }
         return ResponseEntity.ok(discount);
     }
@@ -139,7 +139,7 @@ public class DiscountController {
     public ResponseEntity<Void> auditApply(@RequestBody OfflineHandleEventAuditParam offlineHandleEventAuditParam) {
         Discount discount = discountService.getDiscountAndItemAndProdById(offlineHandleEventAuditParam.getHandleId());
         if (discount == null) {
-            throw new YamiShopBindException("未找到此活动信息");
+            throw new GlobalException("未找到此活动信息");
         }
         // 提交审核
         discountService.auditApply(offlineHandleEventAuditParam.getEventId(), offlineHandleEventAuditParam.getHandleId(), offlineHandleEventAuditParam.getReapplyReason());

+ 4 - 3
yami-shop-discount/yami-shop-discount-platform/src/main/java/com/yami/shop/discount/platform/controller/DiscountController.java

@@ -15,6 +15,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.yami.shop.bean.enums.OfflineHandleEventType;
 import com.yami.shop.bean.model.OfflineHandleEvent;
 import com.yami.shop.bean.param.OfflineHandleEventAuditParam;
+import com.yami.shop.common.exception.GlobalException;
 import com.yami.shop.common.exception.YamiShopBindException;
 import com.yami.shop.common.util.PageParam;
 import com.yami.shop.discount.comment.model.Discount;
@@ -71,7 +72,7 @@ public class DiscountController {
         Long sysUserId = SecurityUtils.getSysUser().getUserId();
         Discount discount = discountService.getById(offlineHandleEvent.getHandleId());
         if (discount == null) {
-            throw new YamiShopBindException("未找到此活动信息");
+            throw new GlobalException("未找到此活动信息");
         }
         discountService.offline(discount, offlineHandleEvent.getOfflineReason(), sysUserId);
 
@@ -89,7 +90,7 @@ public class DiscountController {
     public ResponseEntity<Void> delete(@PathVariable Long discountId) {
         Discount discount = discountService.getDiscountAndItemAndProdById(discountId);
         if (discount == null) {
-            throw new YamiShopBindException("未找到该活动信息");
+            throw new GlobalException("未找到该活动信息");
         }
         discountService.deleteDiscountsAndItemsAndProds(discountId, discount.getShopId());
         return ResponseEntity.ok().build();
@@ -114,7 +115,7 @@ public class DiscountController {
         Long sysUserId = SecurityUtils.getSysUser().getUserId();
         Discount discount = discountService.getDiscountAndItemAndProdById(offlineHandleEventAuditParam.getHandleId());
         if (discount == null) {
-            throw new YamiShopBindException("未找到该活动信息");
+            throw new GlobalException("未找到该活动信息");
         }
         discountService.auditDiscount(offlineHandleEventAuditParam, sysUserId);
 

+ 3 - 2
yami-shop-distribution/yami-shop-distribution-api/src/main/java/com/yami/shop/distribution/api/controller/DistributionLevelController.java

@@ -13,6 +13,7 @@ package com.yami.shop.distribution.api.controller;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.yami.shop.common.config.Constant;
+import com.yami.shop.common.exception.GlobalException;
 import com.yami.shop.common.exception.YamiShopBindException;
 import com.yami.shop.distribution.comment.dto.DistributionLevelDto;
 import com.yami.shop.distribution.comment.model.DistributionLevelAuditing;
@@ -89,7 +90,7 @@ public class DistributionLevelController {
         DistributionUser distributionUser = distributionUserService.getByUserIdAndShopId(userId, shopId);
 
         if (distributionUser == null || !Objects.equals(distributionUser.getState(), 1)) {
-            throw new YamiShopBindException("你还不是分销员,无法进行升级操作");
+            throw new GlobalException("你还不是分销员,无法进行升级操作");
         }
 
         DistributionLevelSet distributionLevelSet = distributionLevelSetService.getByShopId();
@@ -98,7 +99,7 @@ public class DistributionLevelController {
         Integer level = distributionUser.getLevel();
 
         if (distributionLevelSet.getDistributionLevels().size() <= level) {
-            throw new YamiShopBindException("已达到等级上限");
+            throw new GlobalException("已达到等级上限");
         }
 
         distributionLevelService.tryingToUpgrade(distributionUser, distributionLevelSet);

+ 1 - 1
yami-shop-distribution/yami-shop-distribution-api/src/main/java/com/yami/shop/distribution/api/controller/DistributionQrCodeController.java

@@ -83,7 +83,7 @@ public class DistributionQrCodeController {
         }else if(Objects.equals(type, 3))  {
             page = "pages/snapUpDetail/snapUpDetail";
         } else {
-            throw new YamiShopBindException("无法获取页面信息");
+            throw new GlobalException("无法获取页面信息");
         }
 
         JSONObject jsonObject = new JSONObject();

+ 16 - 16
yami-shop-distribution/yami-shop-distribution-api/src/main/java/com/yami/shop/distribution/api/controller/DistributionRegisterController.java

@@ -88,29 +88,29 @@ public class DistributionRegisterController {
         Long shopId = Constant.PLATFORM_SHOP_ID;
         DistributionRecruitSet distributionRecruitSet = distributionRecruitSetService.getByShopId();
         if (distributionRecruitSet.getState() == 0) {
-            throw new YamiShopBindException("推广计划已关闭");
+            throw new GlobalException("推广计划已关闭");
         }
         // 店铺分销员审核设置
         DistributionAuditingSet distributionAuditingSet = distributionAuditingSetService.getByShopId();
         //判断传入的资料是否齐全
         DistributionAuditingInfoVO distributionAuditingInfoVO =distributionAuditingSet.getAuditingInfo();
         if(distributionAuditingInfoVO == null){
-            throw new YamiShopBindException("分销设置异常");
+            throw new GlobalException("分销设置异常");
         }
 
         if(distributionAuditingInfoVO.getIdentityCardNumber()){
             if(!StrUtil.isNotBlank(distributionUserParam.getIdentityCardNumber())){
-                throw new YamiShopBindException("申请填写信息不全,需要身份证号");
+                throw new GlobalException("申请填写信息不全,需要身份证号");
             }
         }
         if(distributionAuditingInfoVO.getIdentityCardPic()){
             if(!StrUtil.isNotBlank(distributionUserParam.getIdentityCardPicBack())||!StrUtil.isNotBlank(distributionUserParam.getIdentityCardPicFront())||!StrUtil.isNotBlank(distributionUserParam.getIdentityCardPicHold())){
-                throw new YamiShopBindException("申请填写信息不全,需要身份证照片");
+                throw new GlobalException("申请填写信息不全,需要身份证照片");
             }
         }
         if(distributionAuditingInfoVO.getRealName()){
             if(!StrUtil.isNotBlank(distributionUserParam.getRealName())){
-                throw new YamiShopBindException("申请填写信息不全,需要真实姓名");
+                throw new GlobalException("申请填写信息不全,需要真实姓名");
             }
         }
         YamiUser user = SecurityUtils.getUser();
@@ -120,13 +120,13 @@ public class DistributionRegisterController {
 
         if (distributionUser != null) {
             if (distributionUser.getState() == 0) {
-                throw new YamiShopBindException("你已经提交过审核了,请耐心等待");
+                throw new GlobalException("你已经提交过审核了,请耐心等待");
             }else if(distributionUser.getState() == -1){
-                throw new YamiShopBindException("封禁中不可申请,请联系管理员");
+                throw new GlobalException("封禁中不可申请,请联系管理员");
             }else if(distributionUser.getState() == 2){
-                throw new YamiShopBindException("已清退不可申请,请联系管理员");
+                throw new GlobalException("已清退不可申请,请联系管理员");
             }else if (distributionUser.getState() == 1) {
-                throw new YamiShopBindException("你的审核已经通过,无需再次审核");
+                throw new GlobalException("你的审核已经通过,无需再次审核");
             }
         }
 
@@ -139,13 +139,13 @@ public class DistributionRegisterController {
         if (StrUtil.isNotBlank(distributionUserParam.getSharerCardNo())) {
             DistributionUser parentUser = distributionUserService.getByCardNo(distributionUserParam.getSharerCardNo());
             if (parentUser == null) {
-                throw new YamiShopBindException("无法获取邀请人信息");
+                throw new GlobalException("无法获取邀请人信息");
             }
             if (!Objects.equals(parentUser.getShopId(),shopId)) {
-                throw new YamiShopBindException("邀请人店铺信息有误");
+                throw new GlobalException("邀请人店铺信息有误");
             }
             if (Objects.equals(parentUser.getUserId(), userId)) {
-                throw new YamiShopBindException("自己无法邀请自己");
+                throw new GlobalException("自己无法邀请自己");
             }
 
             //设置上级id
@@ -178,7 +178,7 @@ public class DistributionRegisterController {
                     }
                 }
                 if (!has) {
-                    throw new YamiShopBindException("不符合申请条件,请联系客服进行申请");
+                    throw new GlobalException("不符合申请条件,请联系客服进行申请");
                 }
             }
 
@@ -190,13 +190,13 @@ public class DistributionRegisterController {
                     userShoppingDataDto.setSumOfConsumption(0.0);
                 }
                 if (userShoppingDataDto.getSumOfConsumption() < distributionAuditingSet.getAuditingConditions().getExpenseAmount()) {
-                    throw new YamiShopBindException("消费金额不符合要求");
+                    throw new GlobalException("消费金额不符合要求");
                 }
             }
             //判断是否需要达到消费笔数条件
             if (distributionAuditingSet.getAuditingConditions().getExpenseNumber() != null) {
                 if (userShoppingDataDto.getExpenseNumber() < distributionAuditingSet.getAuditingConditions().getExpenseNumber()) {
-                    throw new YamiShopBindException("消费笔数不符合要求");
+                    throw new GlobalException("消费笔数不符合要求");
                 }
             }
             //判断是否关注公众号
@@ -204,7 +204,7 @@ public class DistributionRegisterController {
 //                AppConnect appConnect = appConnectService.getByBizUserId(user.getBizUserId(), App.MP);
 //
 //                if (appConnect == null) {
-//                    throw new YamiShopBindException("请先关注公众号");
+//                    throw new GlobalException("请先关注公众号");
 //                }
 //            }
             distributionUser.setState(1);

+ 1 - 1
yami-shop-distribution/yami-shop-distribution-api/src/main/java/com/yami/shop/distribution/api/controller/DistributionUserController.java

@@ -60,7 +60,7 @@ public class DistributionUserController {
 //        Long shopId = 0L;
         DistributionUser distributionUser = distributionUserService.getByUserIdAndShopId(SecurityUtils.getUser().getUserId(), shopId);
         if (Objects.isNull(distributionUser)) {
-            throw new YamiShopBindException("您还不是销售员");
+            throw new GlobalException("您还不是销售员");
         }
         return ResponseEntity.ok(distributionUserService.getAchievementDataDtoById(distributionUser.getDistributionUserId()));
     }

+ 3 - 3
yami-shop-distribution/yami-shop-distribution-api/src/main/java/com/yami/shop/distribution/api/controller/DistributionUserIncomeController.java

@@ -42,7 +42,7 @@ public class DistributionUserIncomeController {
         String userId = SecurityUtils.getUser().getUserId();
         DistributionUser distributionUser = distributionUserService.getByUserIdAndShopId(userId, shopId);
         if (Objects.isNull(distributionUser)) {
-            throw new YamiShopBindException("您还不是本店的分销员");
+            throw new GlobalException("您还不是本店的分销员");
         }
         return ResponseEntity.ok(distributionUserIncomeService.statisticsDistributionUserIncome(distributionUser.getDistributionUserId()));
     }
@@ -54,7 +54,7 @@ public class DistributionUserIncomeController {
         String userId = SecurityUtils.getUser().getUserId();
         DistributionUser distributionUser = distributionUserService.getByUserIdAndShopId(userId, shopId);
         if (Objects.isNull(distributionUser)) {
-            throw new YamiShopBindException("您还不是本店的分销员 ");
+            throw new GlobalException("您还不是本店的分销员 ");
         }
         IPage<DistributionUserIncomeDto> distributionUserIncomeDto = distributionUserIncomeService.getDistributionUserIncomePage(page, distributionUser.getDistributionUserId());
         return ResponseEntity.ok(distributionUserIncomeDto);
@@ -69,7 +69,7 @@ public class DistributionUserIncomeController {
         Long shopId = Constant.PLATFORM_SHOP_ID;
         DistributionUser distributionUser = distributionUserService.getByUserIdAndShopId(SecurityUtils.getUser().getUserId(), shopId);
         if (Objects.isNull(distributionUser)) {
-            throw new YamiShopBindException("您还不是本店的分销员 ");
+            throw new GlobalException("您还不是本店的分销员 ");
         }
         IPage<DistributionUserIncomeOrderDto> result = distributionUserIncomeService.getMyPromotionOrderByState(page, distributionUser.getDistributionUserId(), state);
         return ResponseEntity.ok(result);

+ 1 - 1
yami-shop-distribution/yami-shop-distribution-api/src/main/java/com/yami/shop/distribution/api/controller/DistributionUserWalletController.java

@@ -53,7 +53,7 @@ public class DistributionUserWalletController {
         Long shopId = Constant.PLATFORM_SHOP_ID;
         DistributionUser distributionUser = distributionUserService.getByUserIdAndShopId(SecurityUtils.getUser().getUserId(), shopId);
         if (Objects.isNull(distributionUser)) {
-            throw new YamiShopBindException("您还不是销售员");
+            throw new GlobalException("您还不是销售员");
         }
         return ResponseEntity.ok(distributionUserWalletService.getDistributionUserWalletDtoByDistributionUserId(distributionUser.getDistributionUserId()));
     }

+ 5 - 5
yami-shop-distribution/yami-shop-distribution-api/src/main/java/com/yami/shop/distribution/api/controller/DistributionWithdrawCashController.java

@@ -76,7 +76,7 @@ public class DistributionWithdrawCashController {
     public ResponseEntity<IPage<DistributionWithdrawCashDto>> page(PageParam<DistributionWithdrawCashDto> page) {
         DistributionUser distributionUser = distributionUserService.getByUserIdAndShopId(SecurityUtils.getUser().getUserId(), Constant.PLATFORM_SHOP_ID);
         if (Objects.isNull(distributionUser)) {
-            throw new YamiShopBindException("您还不是分销员");
+            throw new GlobalException("您还不是分销员");
         }
         return ResponseEntity.ok(distributionWithdrawCashService.distributionWithdrawCashDtoPageByUserId(page, distributionUser.getDistributionUserId()));
     }
@@ -87,13 +87,13 @@ public class DistributionWithdrawCashController {
         String userId = SecurityUtils.getUser().getUserId();
         DistributionUser distributionUser = distributionUserService.getByUserIdAndShopId(userId, Constant.PLATFORM_SHOP_ID);
         if (distributionUser == null || distributionUser.getState() != 1) {
-            throw new YamiShopBindException("未找到分销员信息或分销员不在正常状态,请稍后重试");
+            throw new GlobalException("未找到分销员信息或分销员不在正常状态,请稍后重试");
         }
         AppConnect appConnect = appConnectService.getOne(new LambdaQueryWrapper<AppConnect>()
                 .eq(AppConnect::getUserId, distributionUser.getUserId())
                 .eq(AppConnect::getAppId, 1));
         if (appConnect == null) {
-          throw new YamiShopBindException("未找到此用户信息");
+          throw new GlobalException("未找到此用户信息");
         }
         //发起提现
         distributionWithdrawCashService.apply(distributionWithdrawCashSaceParam.getAmount(), distributionUser, appConnect);
@@ -114,7 +114,7 @@ public class DistributionWithdrawCashController {
         //获取玩家最近的提现次数
         //判断是否能够提现
         if (distributionWithdrawCashService.getCountByRangeTimeAndDistributionUserId(new RangeTimeParam(calendar.getTime(), new Date()), distributionUserId) >= distributionWithdrawCashSet.getNumber()) {
-            throw new YamiShopBindException("提现次数为" + distributionWithdrawCashSet.getFrequency() + "天" + distributionWithdrawCashSet.getNumber() + "次");
+            throw new GlobalException("提现次数为" + distributionWithdrawCashSet.getFrequency() + "天" + distributionWithdrawCashSet.getNumber() + "次");
         }
         return ResponseEntity.ok(true);
     }
@@ -124,7 +124,7 @@ public class DistributionWithdrawCashController {
     public ResponseEntity<Double> getUserTotalWithdrawCash() {
         DistributionUser distributionUser = distributionUserService.getByUserIdAndShopId(SecurityUtils.getUser().getUserId(), Constant.PLATFORM_SHOP_ID);
         if (Objects.isNull(distributionUser)) {
-            throw new YamiShopBindException("未找到分销员信息");
+            throw new GlobalException("未找到分销员信息");
         }
         Long distributionUserId = distributionUser.getDistributionUserId();
         Long walletId = distributionUserWalletService.getWalletIdByDistributionUserId(distributionUserId);

+ 4 - 3
yami-shop-distribution/yami-shop-distribution-comment/src/main/java/com/yami/shop/distribution/comment/listener/PaySuccessOrderListener.java

@@ -20,6 +20,7 @@ import com.yami.shop.bean.model.OrderItem;
 import com.yami.shop.bean.model.ShopWallet;
 import com.yami.shop.bean.order.PaySuccessOrderOrder;
 import com.yami.shop.common.config.Constant;
+import com.yami.shop.common.exception.GlobalException;
 import com.yami.shop.common.exception.YamiShopBindException;
 import com.yami.shop.common.response.ServerResponse;
 import com.yami.shop.common.util.Arith;
@@ -169,7 +170,7 @@ public class PaySuccessOrderListener {
             shopWalletLogService.saveShopWalletLog(shopWallet, newShopWallet, ShopWalletChangeReason.DISTRIBUTION_AMOUNT, order.getOrderNumber());
             // 使用乐观锁进行更新
             if (!shopWalletService.updateById(newShopWallet)) {
-                throw new YamiShopBindException("更新店铺钱包信息失败");
+                throw new GlobalException("更新店铺钱包信息失败");
             }
         }
         // 更新分销订单项
@@ -293,7 +294,7 @@ public class PaySuccessOrderListener {
             boolean distributionUserWalletUpdateSuccess = distributionUserWalletService.updateById(distributionUserWallet);
 
             if (!distributionUserWalletUpdateSuccess) {
-                throw new YamiShopBindException("更新推广员钱包信息失败");
+                throw new GlobalException("更新推广员钱包信息失败");
             }
         } else {
             log.info("默认奖励为0,不结算");
@@ -339,7 +340,7 @@ public class PaySuccessOrderListener {
         //更新邀请人钱包
         boolean parentDistributionUserWalletUpdateSuccess = distributionUserWalletService.updateById(parentDistributionUserWallet);
         if (!parentDistributionUserWalletUpdateSuccess) {
-            throw new YamiShopBindException("更新推广员的邀请人钱包失败");
+            throw new GlobalException("更新推广员的邀请人钱包失败");
         }
 
     }

+ 3 - 2
yami-shop-distribution/yami-shop-distribution-comment/src/main/java/com/yami/shop/distribution/comment/service/impl/DistributionLevelServiceImpl.java

@@ -12,6 +12,7 @@ package com.yami.shop.distribution.comment.service.impl;
 
 import cn.hutool.core.collection.CollectionUtil;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.yami.shop.common.exception.GlobalException;
 import com.yami.shop.common.exception.YamiShopBindException;
 import com.yami.shop.dao.OrderMapper;
 import com.yami.shop.distribution.comment.dao.DistributionLevelAuditingMapper;
@@ -95,7 +96,7 @@ public class DistributionLevelServiceImpl extends ServiceImpl<DistributionLevelM
     public void tryingToUpgrade(DistributionUser distributionUser, DistributionLevelSet distributionLevelSet) {
         DistributionLevel nextDistributionLevelInfo = getLevelInfo(distributionUser.getLevel() +1, distributionLevelSet.getDistributionLevels());
         if (nextDistributionLevelInfo == null) {
-            throw new YamiShopBindException("您的等级已经达到上限了");
+            throw new GlobalException("您的等级已经达到上限了");
         }
 
         //获取要升级等级的条件数据
@@ -107,7 +108,7 @@ public class DistributionLevelServiceImpl extends ServiceImpl<DistributionLevelM
         DistributionUserAchievementDataDto distributionUserAchievementDataDto=distributionUserMapper.getLevelDistributionUserAchievementDataByDistributionUserId(distributionUser.getDistributionUserId());
 
         if(!isConditions(distributionUserAchievementDataDto,distributionLevelConditionData,levelSetConditionsSwitch,distributionUser)){
-            throw new YamiShopBindException("您不符合升级条件");
+            throw new GlobalException("您不符合升级条件");
         }
         // 升级
         distributionUserMapper.updateLevel(distributionUser.getDistributionUserId(),nextDistributionLevelInfo.getLevel());

+ 2 - 1
yami-shop-distribution/yami-shop-distribution-comment/src/main/java/com/yami/shop/distribution/comment/service/impl/DistributionProdServiceImpl.java

@@ -18,6 +18,7 @@ import com.yami.shop.bean.enums.OfflineHandleEventType;
 import com.yami.shop.bean.model.OfflineHandleEvent;
 import com.yami.shop.bean.model.OrderItem;
 import com.yami.shop.bean.param.OfflineHandleEventAuditParam;
+import com.yami.shop.common.exception.GlobalException;
 import com.yami.shop.common.exception.YamiShopBindException;
 import com.yami.shop.common.util.Arith;
 import com.yami.shop.common.util.Json;
@@ -238,7 +239,7 @@ public class DistributionProdServiceImpl extends ServiceImpl<DistributionProdMap
 
         // 更新活动状态为下线
         if (distributionProdMapper.updateState(distributionProd.getDistributionProdId(), DistributionProdStateEnum.OFFLINE.getValue()) < 0) {
-            throw new YamiShopBindException("更新活动商品失败");
+            throw new GlobalException("更新活动商品失败");
         }
     }
 

+ 3 - 2
yami-shop-distribution/yami-shop-distribution-comment/src/main/java/com/yami/shop/distribution/comment/service/impl/DistributionUserIncomeServiceImpl.java

@@ -14,6 +14,7 @@ import cn.hutool.core.date.DateUtil;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.yami.shop.common.exception.GlobalException;
 import com.yami.shop.common.exception.YamiShopBindException;
 import com.yami.shop.common.util.Arith;
 import com.yami.shop.common.util.PageParam;
@@ -96,7 +97,7 @@ public class DistributionUserIncomeServiceImpl extends ServiceImpl<DistributionU
             // 减少用户的待结算佣金,添加已结算金额
             DistributionUserWallet distributionUserWallet = distributionUserWalletMapper.selectById(distributionUserIncome.getWalletId());
             if (distributionUserWallet == null) {
-                throw new YamiShopBindException("未找到分销员信息");
+                throw new GlobalException("未找到分销员信息");
             }
 
             // 添加分销钱包日志
@@ -114,7 +115,7 @@ public class DistributionUserIncomeServiceImpl extends ServiceImpl<DistributionU
         // 批量更新分销收入状态
         if (CollectionUtils.isNotEmpty(updateBatchDistributionUserIncomeList)) {
             if (distributionUserIncomeMapper.updateBatchState(updateBatchDistributionUserIncomeList, DistributionUserIncomeStateEnum.COMMISSION.getValue()) <= 0) {
-                throw new YamiShopBindException("批量更新分销收入状态失败");
+                throw new GlobalException("批量更新分销收入状态失败");
             }
         }
 

+ 5 - 4
yami-shop-distribution/yami-shop-distribution-comment/src/main/java/com/yami/shop/distribution/comment/service/impl/DistributionWithdrawCashServiceImpl.java

@@ -19,6 +19,7 @@ import com.yami.shop.bean.enums.EnterpriseApplyType;
 import com.yami.shop.bean.enums.EnterprisePayStatus;
 import com.yami.shop.bean.model.EnterprisePay;
 import com.yami.shop.common.config.Constant;
+import com.yami.shop.common.exception.GlobalException;
 import com.yami.shop.common.exception.YamiShopBindException;
 import com.yami.shop.common.util.Arith;
 import com.yami.shop.dao.EnterprisePayMapper;
@@ -87,10 +88,10 @@ public class DistributionWithdrawCashServiceImpl extends ServiceImpl<Distributio
 
         //结算提现金额是否超出限制
         if (amount > distributionWithdrawCashSet.getAmountMax()) {
-            throw new YamiShopBindException("提现金额大于最大提现金额");
+            throw new GlobalException("提现金额大于最大提现金额");
         }
         if (amount < distributionWithdrawCashSet.getAmountMin()) {
-            throw new YamiShopBindException("提现金额小于最小提现金额");
+            throw new GlobalException("提现金额小于最小提现金额");
         }
         //获取店铺设置的提现频率算出时间区间
         Calendar calendar = Calendar.getInstance();
@@ -98,12 +99,12 @@ public class DistributionWithdrawCashServiceImpl extends ServiceImpl<Distributio
         RangeTimeParam rangeTimeParam = new RangeTimeParam(calendar.getTime(), new Date());
         //获取用户最近的提现次数,判断是否能够提现
         if (distributionWithdrawCashMapper.getCountByRangeTimeAndDistributionUserId(rangeTimeParam, distributionUser.getDistributionUserId()) >= distributionWithdrawCashSet.getNumber()) {
-            throw new YamiShopBindException("提现次数为" + distributionWithdrawCashSet.getFrequency() + "天" + distributionWithdrawCashSet.getNumber() + "次");
+            throw new GlobalException("提现次数为" + distributionWithdrawCashSet.getFrequency() + "天" + distributionWithdrawCashSet.getNumber() + "次");
         }
 
         //判断提现金额 是否大于钱包金额
         if (distributionUserWallet.getSettledAmount() < amount) {
-            throw new YamiShopBindException("提现失败,余额不足");
+            throw new GlobalException("提现失败,余额不足");
         }
 
         //扣除可提现余额

+ 11 - 11
yami-shop-distribution/yami-shop-distribution-multishop/src/main/java/com/yami/shop/distribution/multishop/controller/DistributionProdController.java

@@ -91,7 +91,7 @@ public class DistributionProdController {
                 .eq(DistributionProd::getProdId, distributionProd.getProdId())
                 .eq(DistributionProd::getShopId, distributionProd.getShopId()));
         if (count>0){
-            throw new YamiShopBindException("分销商品已经存在");
+            throw new GlobalException("分销商品已经存在");
         }
         // 校验数据
         validateDistributionProd(distributionProd);
@@ -166,7 +166,7 @@ public class DistributionProdController {
     public ResponseEntity<Void> auditApply(@RequestBody OfflineHandleEventAuditParam offlineHandleEventAuditParam) {
         DistributionProd distributionProd = distributionProdService.getById(offlineHandleEventAuditParam.getHandleId());
         if (distributionProd == null) {
-            throw new YamiShopBindException("未找到分销商品信息信息");
+            throw new GlobalException("未找到分销商品信息信息");
         }
         distributionProdService.auditApply(offlineHandleEventAuditParam.getEventId(), offlineHandleEventAuditParam.getHandleId(), offlineHandleEventAuditParam.getReapplyReason());
         return ResponseEntity.ok().build();
@@ -189,7 +189,7 @@ public class DistributionProdController {
     private void validateDistributionProd(DistributionProd distributionProd) {
         Product product = productService.getProductByProdId(distributionProd.getProdId());
         if (product == null) {
-            throw new YamiShopBindException("未找到此商品");
+            throw new GlobalException("未找到此商品");
         }
         // 如果不使用需要校验
         if (distributionProd.getDefaultReward() == 1) {
@@ -201,14 +201,14 @@ public class DistributionProdController {
             // 奖励数额设置(0 固定奖励,1 根据等级奖励)
             if (distributionProd.getAwardNumberSet() == 0) {
                 if (Double.parseDouble(distributionProd.getAwardNumbers()) >= 100) {
-                    throw new YamiShopBindException("固定奖励比例设置不能超过100%");
+                    throw new GlobalException("固定奖励比例设置不能超过100%");
                 }
             }
             if (distributionProd.getAwardNumberSet() == 1) {
                 List<String> awardList = JSONUtil.parseArray(distributionProd.getAwardNumbers()).toList(String.class);
                 List<Double> list = awardList.stream().map(Double::parseDouble).collect(Collectors.toList());
                 if (list.stream().anyMatch(item -> item > 100)) {
-                    throw new YamiShopBindException("等级奖励比例设置不能超过100%");
+                    throw new GlobalException("等级奖励比例设置不能超过100%");
                 }
             }
 
@@ -218,14 +218,14 @@ public class DistributionProdController {
             // 奖励数额设置(0 固定奖励,1 根据等级奖励)
             if (distributionProd.getAwardNumberSet() == 0) {
                 if (Double.parseDouble(distributionProd.getAwardNumbers()) > product.getPrice()) {
-                    throw new YamiShopBindException("固定奖励设置不能超商品的原价格");
+                    throw new GlobalException("固定奖励设置不能超商品的原价格");
                 }
             }
             if (distributionProd.getAwardNumberSet() == 1) {
                 List<String> awardList = JSONUtil.parseArray(distributionProd.getAwardNumbers()).toList(String.class);
                 List<Double> list = awardList.stream().map(Double::parseDouble).collect(Collectors.toList());
                 if (list.stream().anyMatch(item -> item > product.getPrice())) {
-                    throw new YamiShopBindException("等级奖励设置不能超商品的原价格");
+                    throw new GlobalException("等级奖励设置不能超商品的原价格");
                 }
             }
         }
@@ -239,14 +239,14 @@ public class DistributionProdController {
             // 奖励数额设置(0 固定奖励,1 根据等级奖励)
             if (distributionProd.getAwardNumberSet() == 0) {
                 if (Double.parseDouble(distributionProd.getParentAwardNumbers()) >= 100) {
-                    throw new YamiShopBindException("邀请人固定奖励比例设置不能超过100%");
+                    throw new GlobalException("邀请人固定奖励比例设置不能超过100%");
                 }
             }
             if (distributionProd.getAwardNumberSet() == 1) {
                 List<String> awardList = JSONUtil.parseArray(distributionProd.getParentAwardNumbers()).toList(String.class);
                 List<Double> list = awardList.stream().map(Double::parseDouble).collect(Collectors.toList());
                 if (list.stream().anyMatch(item -> item > 100)) {
-                    throw new YamiShopBindException("邀请人等级奖励比例设置不能超过100%");
+                    throw new GlobalException("邀请人等级奖励比例设置不能超过100%");
                 }
             }
 
@@ -256,14 +256,14 @@ public class DistributionProdController {
             // 奖励数额设置(0 固定奖励,1 根据等级奖励)
             if (distributionProd.getAwardNumberSet() == 0) {
                 if (Double.parseDouble(distributionProd.getParentAwardNumbers()) > product.getPrice()) {
-                    throw new YamiShopBindException("邀请人固定奖励设置不能超商品的原价格");
+                    throw new GlobalException("邀请人固定奖励设置不能超商品的原价格");
                 }
             }
             if (distributionProd.getAwardNumberSet() == 1) {
                 List<String> awardList = JSONUtil.parseArray(distributionProd.getParentAwardNumbers()).toList(String.class);
                 List<Double> list = awardList.stream().map(Double::parseDouble).collect(Collectors.toList());
                 if (list.stream().anyMatch(item -> item > product.getPrice())) {
-                    throw new YamiShopBindException("邀请人等级奖励设置不能超商品的原价格");
+                    throw new GlobalException("邀请人等级奖励设置不能超商品的原价格");
                 }
             }
         }

+ 3 - 2
yami-shop-distribution/yami-shop-distribution-multishop/src/main/java/com/yami/shop/distribution/multishop/listener/OrderRefundListener.java

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.yami.shop.bean.dto.OrderRefundDto;
 import com.yami.shop.bean.event.OrderRefundSuccessEvent;
 import com.yami.shop.bean.model.OrderItem;
+import com.yami.shop.common.exception.GlobalException;
 import com.yami.shop.common.exception.YamiShopBindException;
 import com.yami.shop.common.util.Arith;
 import com.yami.shop.distribution.comment.Enums.DistributionUserIncomeStateEnum;
@@ -59,7 +60,7 @@ public class OrderRefundListener {
             for (DistributionUserIncome distributionUserIncome : distributionUserIncomeList) {
                 DistributionUserWallet distributionUserWallet = distributionUserWalletMapper.selectById(distributionUserIncome.getWalletId());
                 if (distributionUserWallet == null) {
-                    throw new YamiShopBindException("未找到分销员信息");
+                    throw new GlobalException("未找到分销员信息");
                 }
 
                 // 添加分销钱包日志
@@ -78,7 +79,7 @@ public class OrderRefundListener {
         // 批量更新分销收入状态
         if (CollectionUtils.isNotEmpty(updateBatchDistributionUserIncomeList)) {
             if (distributionUserIncomeMapper.updateBatchState(updateBatchDistributionUserIncomeList, DistributionUserIncomeStateEnum.INVALID.getValue()) <= 0) {
-                throw new YamiShopBindException("批量更新分销收入状态失败");
+                throw new GlobalException("批量更新分销收入状态失败");
             }
         }
 

+ 3 - 2
yami-shop-distribution/yami-shop-distribution-platform/src/main/java/com/yami/shop/distribution/platform/controller/DistributionBasicSetController.java

@@ -5,6 +5,7 @@ import com.yami.shop.bean.enums.OfflineHandleEventType;
 import com.yami.shop.bean.model.OfflineHandleEvent;
 import com.yami.shop.bean.param.OfflineHandleEventAuditParam;
 import com.yami.shop.common.config.Constant;
+import com.yami.shop.common.exception.GlobalException;
 import com.yami.shop.common.exception.YamiShopBindException;
 import com.yami.shop.common.util.PageParam;
 import com.yami.shop.distribution.comment.model.DistributionAuditing;
@@ -78,7 +79,7 @@ public class DistributionBasicSetController {
     public ResponseEntity<Void> offline(@RequestBody OfflineHandleEvent offlineHandleEvent) {
         DistributionBasicSet distributionBasicSet = distributionBasicSetService.getById(offlineHandleEvent.getHandleId());
         if (distributionBasicSet == null) {
-            throw new YamiShopBindException("未找到该店铺分销基础设置信息");
+            throw new GlobalException("未找到该店铺分销基础设置信息");
         }
         Long sysUserId = SecurityUtils.getSysUser().getUserId();
         distributionBasicSetService.offline(distributionBasicSet, offlineHandleEvent.getOfflineReason(), sysUserId);
@@ -97,7 +98,7 @@ public class DistributionBasicSetController {
         Long sysUserId = SecurityUtils.getSysUser().getUserId();
         DistributionBasicSet distributionBasicSet = distributionBasicSetService.getById(offlineHandleEventAuditParam.getHandleId());
         if (distributionBasicSet == null) {
-            throw new YamiShopBindException("未找到该店铺分销基础设置信息");
+            throw new GlobalException("未找到该店铺分销基础设置信息");
         }
         distributionBasicSetService.auditDistributionBasicSet(offlineHandleEventAuditParam, sysUserId);
         // 清理缓存

+ 3 - 2
yami-shop-distribution/yami-shop-distribution-platform/src/main/java/com/yami/shop/distribution/platform/controller/DistributionProdController.java

@@ -17,6 +17,7 @@ import com.yami.shop.bean.enums.OfflineHandleEventType;
 import com.yami.shop.bean.model.OfflineHandleEvent;
 import com.yami.shop.bean.param.OfflineHandleEventAuditParam;
 import com.yami.shop.common.config.Constant;
+import com.yami.shop.common.exception.GlobalException;
 import com.yami.shop.common.exception.YamiShopBindException;
 import com.yami.shop.common.util.PageParam;
 import com.yami.shop.distribution.comment.model.DistributionProd;
@@ -166,7 +167,7 @@ public class DistributionProdController {
         Long sysUserId = SecurityUtils.getSysUser().getUserId();
         DistributionProd distributionProd = distributionProdService.getById(offlineHandleEvent.getHandleId());
         if (distributionProd == null) {
-            throw new YamiShopBindException("未找到分销商品信息");
+            throw new GlobalException("未找到分销商品信息");
         }
         distributionProdService.offline(distributionProd, offlineHandleEvent.getOfflineReason(), sysUserId);
         return ResponseEntity.ok().build();
@@ -181,7 +182,7 @@ public class DistributionProdController {
         Long sysUserId = SecurityUtils.getSysUser().getUserId();
         DistributionProd distributionProd = distributionProdService.getById(offlineHandleEventAuditParam.getHandleId());
         if (distributionProd == null) {
-            throw new YamiShopBindException("未找到该分销商品信息");
+            throw new GlobalException("未找到该分销商品信息");
         }
         distributionProdService.auditDistributionProd(offlineHandleEventAuditParam, sysUserId);
 

+ 4 - 4
yami-shop-distribution/yami-shop-distribution-platform/src/main/java/com/yami/shop/distribution/platform/controller/DistributionWithdrawCashController.java

@@ -57,24 +57,24 @@ public class DistributionWithdrawCashController {
 //    public ResponseEntity<Void> update(@PathVariable String withdrawCashId) {
 //        DistributionWithdrawCash distributionWithdrawCash = distributionWithdrawCashService.getById(withdrawCashId);
 //        if (distributionWithdrawCash == null) {
-//            throw new YamiShopBindException("无法获取提现信息");
+//            throw new GlobalException("无法获取提现信息");
 //        }
 //        Long walletId = distributionWithdrawCash.getWalletId();
 //
 //        DistributionUserWallet wallet = distributionUserWalletService.getById(walletId);
 //
 //        if (wallet == null) {
-//            throw new YamiShopBindException("无法获取用户钱包信息");
+//            throw new GlobalException("无法获取用户钱包信息");
 //        }
 //
 //        DistributionUser distributionUser = distributionUserService.getById(wallet.getDistributionUserId());
 //
 //        if (distributionUser == null) {
-//            throw new YamiShopBindException("无法获取用户信息");
+//            throw new GlobalException("无法获取用户信息");
 //        }
 //
 //        if (!Objects.equals(distributionUser.getShopId(), Constant.PLATFORM_SHOP_ID)) {
-//            throw new YamiShopBindException("没有权限修改提现信息");
+//            throw new GlobalException("没有权限修改提现信息");
 //        }
 //
 //        distributionWithdrawCash.setState(1);

+ 16 - 16
yami-shop-groupbuy/yami-shop-groupbuy-api/src/main/java/com/yami/shop/groupbuy/api/controller/GroupOrderController.java

@@ -76,43 +76,43 @@ public class GroupOrderController {
         if (apiGroupOrderParam.getGroupTeamId() != 0) {
             GroupTeam groupTeam = groupTeamService.getById(apiGroupOrderParam.getGroupTeamId());
             if (Objects.isNull(groupTeam)) {
-                throw new YamiShopBindException("未找到拼团团队信息");
+                throw new GlobalException("未找到拼团团队信息");
             }
             if (!TeamStatusEnum.IN_GROUP.value().equals(groupTeam.getStatus())) {
-                throw new YamiShopBindException("拼团团队不在拼团中,不能参与拼团");
+                throw new GlobalException("拼团团队不在拼团中,不能参与拼团");
             }
         }
         GroupProd groupProd = groupProdService.getGroupProdByGroupSkuId(apiGroupOrderParam.getGroupSkuId());
         if (Objects.isNull(groupProd) || !Objects.equals(groupProd.getStatus(), 1)) {
-            throw new YamiShopBindException("活动商品不在正常状态");
+            throw new GlobalException("活动商品不在正常状态");
         }
         // 校验商品规格信息
         ApiGroupSkuInfoDto groupSkuInfoDto = groupSkuService.getSkuInfoByGroupSkuId(apiGroupOrderParam.getGroupSkuId());
         if (Objects.isNull(groupSkuInfoDto)) {
-            throw new YamiShopBindException("活动商品规格已售空或已下架");
+            throw new GlobalException("活动商品规格已售空或已下架");
         }
         if (groupSkuInfoDto.getProdStatus() != ProdStatusEnums.NORMAL.getValue()) {
-            throw new YamiShopBindException("活动商品不在上架状态,确认订单失败");
+            throw new GlobalException("活动商品不在上架状态,确认订单失败");
         }
         // 校验活动
         ApiGroupActivityDto groupActivityInfo = groupActivityService.getApiGroupActivityInfo(groupProd.getGroupActivityId(), groupProd.getProdId());
         if (!Objects.equals(groupActivityInfo.getActivityStatus(), ActivityStatusEnum.UNDER_WAY.value())) {
-            throw new YamiShopBindException("拼团活动不在进行中,请稍后重试");
+            throw new GlobalException("拼团活动不在进行中,请稍后重试");
         }
         if (groupSkuInfoDto.getStocks() != -1 && groupSkuInfoDto.getStocks() < apiGroupOrderParam.getProdCount()) {
-            throw new YamiShopBindException("库存量不足,请重新选择购买数量");
+            throw new GlobalException("库存量不足,请重新选择购买数量");
         }
         if (Objects.equals(groupActivityInfo.getHasMaxNum(), 1)) {
             Integer hasOrderCount = groupOrderService.getUserHadOrderCountByGroupProdId(userId, groupProd.getGroupProdId());
             if (hasOrderCount + apiGroupOrderParam.getProdCount() > groupActivityInfo.getMaxNum()) {
                 String prodName = StrUtil.isEmpty(groupSkuInfoDto.getSkuName()) ? groupSkuInfoDto.getProdName() : groupSkuInfoDto.getSkuName();
-                throw new YamiShopBindException("活动商品【" + prodName + "】限购数量为" + groupActivityInfo.getMaxNum() + "件,您已购买" + hasOrderCount + "件,现购" + apiGroupOrderParam.getProdCount() + "件,超出最大的购买数量");
+                throw new GlobalException("活动商品【" + prodName + "】限购数量为" + groupActivityInfo.getMaxNum() + "件,您已购买" + hasOrderCount + "件,现购" + apiGroupOrderParam.getProdCount() + "件,超出最大的购买数量");
             }
         }
         // 查看未完成的订单数量
         int unGroupOrderCount = groupOrderService.getUserUnGroupOrderCount(userId, groupProd.getGroupProdId());
         if (unGroupOrderCount > 0) {
-            throw new YamiShopBindException("您已有待成团或拼团中的订单,请在拼团成功后重试");
+            throw new GlobalException("您已有待成团或拼团中的订单,请在拼团成功后重试");
         }
 
         // 计算商品总金额
@@ -179,36 +179,36 @@ public class GroupOrderController {
         String userId = SecurityUtils.getUser().getUserId();
         ApiGroupUserOrderDto hadConfirmOrder = groupOrderService.getConfirmOrderCache(userId);
         if (Objects.isNull(hadConfirmOrder)) {
-            throw new YamiShopBindException("订单已过期,请重新下单");
+            throw new GlobalException("订单已过期,请重新下单");
         }
         if (Objects.isNull(hadConfirmOrder.getUserAddrDto())) {
-            throw new YamiShopBindException("请填写正确的收货地址");
+            throw new GlobalException("请填写正确的收货地址");
         }
 
         // 校验活动
         ApiGroupActivityDto apiGroupActivityInfo = groupActivityService.getApiGroupActivityInfo(hadConfirmOrder.getGroupActivityId(), hadConfirmOrder.getProdId());
         if (!Objects.equals(apiGroupActivityInfo.getActivityStatus(), ActivityStatusEnum.UNDER_WAY.value())) {
-            throw new YamiShopBindException("拼团活动不在进行中,不能参与拼团");
+            throw new GlobalException("拼团活动不在进行中,不能参与拼团");
         }
         // 校验活动商品是否处于失效状态
         GroupProd groupProd = groupProdService.getGroupProdByGroupSkuId(hadConfirmOrder.getGroupSkuId());
         if (Objects.isNull(groupProd) || groupProd.getStatus() != 1) {
-            throw new YamiShopBindException("活动商品已失效或不存在");
+            throw new GlobalException("活动商品已失效或不存在");
         }
         List<GroupOrder> groupOrderList = groupOrderService.listByGroupProdId(groupProd.getGroupProdId(), userId);
         long count = groupOrderList.stream().filter(groupOrder -> Objects.equals(groupOrder.getStatus(), GroupOrderStatusEnum.WAITING_PAY.value())).count();
         if (count > 0) {
-            throw new YamiShopBindException("您正在参加此活动,请在拼团成功后重试");
+            throw new GlobalException("您正在参加此活动,请在拼团成功后重试");
         }
         // 校验拼团团队是否可以参团
         if (Objects.nonNull(hadConfirmOrder.getGroupTempId()) && hadConfirmOrder.getGroupTempId() != 0) {
             GroupTeam groupTeam = groupTeamService.getById(hadConfirmOrder.getGroupTempId());
             if (!Objects.equals(TeamStatusEnum.IN_GROUP.value(), groupTeam.getStatus())) {
-                throw new YamiShopBindException("该拼团团队已关闭,不能继续参团");
+                throw new GlobalException("该拼团团队已关闭,不能继续参团");
             }
             long hadJoinCount = groupOrderList.stream().filter(item -> Objects.equals(item.getGroupTeamId(), groupTeam.getGroupTeamId())).count();
             if (hadJoinCount > 0) {
-                throw new YamiShopBindException("您已参加过此团,不能重复参团");
+                throw new GlobalException("您已参加过此团,不能重复参团");
             }
         }
         String orderNumber = groupOrderService.submit(userId, hadConfirmOrder, apiGroupOrderSubmitParam.getRemarks());

+ 2 - 2
yami-shop-groupbuy/yami-shop-groupbuy-api/src/main/java/com/yami/shop/groupbuy/api/controller/GroupTeamController.java

@@ -78,7 +78,7 @@ public class GroupTeamController {
         // 获取拼团团队信息
         ApiGroupTeamDto groupTeam = groupTeamService.getApiGroupTeamDto(groupTeamId);
         if (groupTeam == null) {
-            throw new YamiShopBindException("该拼团单不存在");
+            throw new GlobalException("该拼团单不存在");
         }
 
         // 获取参团的用户列表
@@ -88,7 +88,7 @@ public class GroupTeamController {
         // 获取商品信息
         ApiGroupProdDto groupProd = groupProdService.getApiGroupProdDto(groupTeam.getGroupProdId());
         if (groupProd == null) {
-            throw new YamiShopBindException("拼团商品不存在,该拼团单已无效");
+            throw new GlobalException("拼团商品不存在,该拼团单已无效");
         }
 
         // 获取SKU列表

+ 8 - 7
yami-shop-groupbuy/yami-shop-groupbuy-comment/src/main/java/com/yami/shop/groupbuy/comment/service/impl/GroupOrderServiceImpl.java

@@ -14,6 +14,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.yami.shop.bean.enums.OrderStatus;
 import com.yami.shop.bean.enums.OrderType;
 import com.yami.shop.bean.model.*;
+import com.yami.shop.common.exception.GlobalException;
 import com.yami.shop.common.exception.YamiShopBindException;
 import com.yami.shop.dao.OrderSettlementMapper;
 import com.yami.shop.dao.ProductMapper;
@@ -100,7 +101,7 @@ public class GroupOrderServiceImpl extends ServiceImpl<GroupOrderMapper, GroupOr
         // 获取订单地址
         UserAddrOrder userAddrOrder = mapperFacade.map(hadConfirmOrder.getUserAddrDto(), UserAddrOrder.class);
         if (Objects.isNull(userAddrOrder)) {
-            throw new YamiShopBindException("请填写收货地址");
+            throw new GlobalException("请填写收货地址");
         }
         userAddrOrder.setUserId(userId);
         userAddrOrder.setCreateTime(now);
@@ -109,32 +110,32 @@ public class GroupOrderServiceImpl extends ServiceImpl<GroupOrderMapper, GroupOr
         // 检验并更新商品
         Product product = productService.getProductByProdId(hadConfirmOrder.getProdId());
         if (Objects.isNull(product)) {
-            throw new YamiShopBindException("查找不到该商品信息");
+            throw new GlobalException("查找不到该商品信息");
         }
         if (product.getStatus() != 1) {
-            throw new YamiShopBindException("商品[" + product.getProdName() + "]已下架");
+            throw new GlobalException("商品[" + product.getProdName() + "]已下架");
         }
         Product calProd = new Product();
         calProd.setProdId(product.getProdId());
         calProd.setTotalStocks(hadConfirmOrder.getProdTotalCount());
         if (productMapper.updateStocks(calProd) == 0) {
-            throw new YamiShopBindException("商品:[" + product.getProdName() + "]库存不足");
+            throw new GlobalException("商品:[" + product.getProdName() + "]库存不足");
         }
 
         // 检验并更新商品规格
         ApiGroupSkuInfoDto apiGroupSkuInfoDto = groupSkuService.getSkuInfoByGroupSkuId(hadConfirmOrder.getGroupSkuId());
         if (Objects.isNull(apiGroupSkuInfoDto)) {
-            throw new YamiShopBindException("商品已售空或已下架");
+            throw new GlobalException("商品已售空或已下架");
         }
         if (apiGroupSkuInfoDto.getStocks() != -1 && apiGroupSkuInfoDto.getStocks() < hadConfirmOrder.getProdTotalCount()) {
-            throw new YamiShopBindException("库存量不足,请重新选择购买数量");
+            throw new GlobalException("库存量不足,请重新选择购买数量");
         }
         Sku sku = new Sku();
         sku.setSkuId(apiGroupSkuInfoDto.getSkuId());
         sku.setStocks(hadConfirmOrder.getProdTotalCount());
         if (apiGroupSkuInfoDto.getStocks() != -1) {
             if (skuMapper.updateStocks(sku) <= 0) {
-                throw new YamiShopBindException("商品:[" + apiGroupSkuInfoDto.getProdName() + "]库存不足");
+                throw new GlobalException("商品:[" + apiGroupSkuInfoDto.getProdName() + "]库存不足");
             }
         }
         // 插入订单

+ 2 - 1
yami-shop-groupbuy/yami-shop-groupbuy-comment/src/main/java/com/yami/shop/groupbuy/comment/service/impl/GroupPayServiceImpl.java

@@ -11,6 +11,7 @@ package com.yami.shop.groupbuy.comment.service.impl;
 import cn.hutool.core.date.DateUtil;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.yami.shop.bean.model.Order;
+import com.yami.shop.common.exception.GlobalException;
 import com.yami.shop.common.exception.YamiShopBindException;
 import com.yami.shop.common.util.Arith;
 import com.yami.shop.dao.OrderMapper;
@@ -109,7 +110,7 @@ public class GroupPayServiceImpl implements GroupPayService {
                     groupTeam.setStatus(TeamStatusEnum.SUCCESS.value());
                     // 更新将所有的订单订单待发货
                     if (orderMapper.updateToWaitDelivery(groupTeam.getGroupTeamId()) <= 0) {
-                        throw new YamiShopBindException("更新拼团订单为待发货失败,请稍后重试");
+                        throw new GlobalException("更新拼团订单为待发货失败,请稍后重试");
                     }
                 }
                 groupOrder.setStatus(GroupOrderStatusEnum.SUCCESS.value());

+ 6 - 6
yami-shop-groupbuy/yami-shop-groupbuy-multishop/src/main/java/com/yami/shop/groupbuy/multishop/controller/GroupActivityController.java

@@ -125,12 +125,12 @@ public class GroupActivityController {
     public ResponseEntity<Boolean> activeGroupActivity(@PathVariable Long groupActivityId) {
         GroupActivity groupActivity = groupActivityService.getById(groupActivityId);
         if (groupActivity == null) {
-            throw new YamiShopBindException("未找到此拼团活动信息");
+            throw new GlobalException("未找到此拼团活动信息");
         }
         // 获取活动中是否存在活动商品
         List<GroupProd> groupProdList = groupProdService.list(new LambdaUpdateWrapper<GroupProd>().eq(GroupProd::getGroupActivityId, groupActivity.getGroupActivityId()));
         if (CollectionUtil.isEmpty(groupProdList)) {
-            throw new YamiShopBindException("启用失败,请至少选择一个活动商品");
+            throw new GlobalException("启用失败,请至少选择一个活动商品");
         }
         // 启用状态
         groupActivity.setStatus(1);
@@ -150,12 +150,12 @@ public class GroupActivityController {
         // 查看活动是否为失效状态或者活动结束
         GroupActivity groupActivity = groupActivityService.getById(groupActivityId);
         if (Objects.isNull(groupActivity)) {
-            throw new YamiShopBindException("未找到此活动,请稍后重试");
+            throw new GlobalException("未找到此活动,请稍后重试");
         }
         if (!(Objects.equals(groupActivity.getActivityStatus(), ActivityStatusEnum.FINISHED.value()) ||
                 Objects.equals(groupActivity.getActivityStatus(), ActivityStatusEnum.EXPIRED.value()) ||
                 Objects.equals(groupActivity.getActivityStatus(), ActivityStatusEnum.NOT_STARTED.value()))) {
-            throw new YamiShopBindException("该活动状态下不能进行删除");
+            throw new GlobalException("该活动状态下不能进行删除");
         }
         groupActivityService.updateToDelete(groupActivityId);
 
@@ -181,11 +181,11 @@ public class GroupActivityController {
         // 查看活动
         GroupActivity groupActivity = groupActivityService.getById(groupActivityId);
         if (Objects.isNull(groupActivity) || !Objects.equals(groupActivity.getActivityStatus(), ActivityStatusEnum.UNDER_WAY.value())) {
-            throw new YamiShopBindException("失效失败,活动不在进行中无法进行失效操作");
+            throw new GlobalException("失效失败,活动不在进行中无法进行失效操作");
         }
         Long shopId = SecurityUtils.getShopUser().getShopId();
         if (!Objects.equals(groupActivity.getShopId(), shopId)) {
-            throw new YamiShopBindException("您无权操作此活动");
+            throw new GlobalException("您无权操作此活动");
         }
         List<Product> productList = groupActivityService.invalidGroupActivity(groupActivity);
 

+ 8 - 8
yami-shop-groupbuy/yami-shop-groupbuy-multishop/src/main/java/com/yami/shop/groupbuy/multishop/controller/GroupProdController.java

@@ -122,17 +122,17 @@ public class GroupProdController {
         // 校验店铺
         GroupProd groupProd = groupProdService.getById(groupProdId);
         if (Objects.isNull(groupProd)) {
-            throw new YamiShopBindException("活动商品不存在,请稍后重试");
+            throw new GlobalException("活动商品不存在,请稍后重试");
         }
         Long shopId = SecurityUtils.getShopUser().getShopId();
         if (!Objects.equals(shopId, groupProd.getShopId())) {
-            throw new YamiShopBindException("您无权对此活动商品进行操作");
+            throw new GlobalException("您无权对此活动商品进行操作");
         }
         // 校验活动是否开始
         GroupActivity groupActivity = groupActivityService.getById(groupProd.getGroupActivityId());
         if (Objects.equals(groupActivity.getActivityStatus(), ActivityStatusEnum.UNDER_WAY.value())
                 && Objects.equals(groupProd.getStatus(), GroupProdStatusEnum.NORMAL.value())) {
-            throw new YamiShopBindException("活动进行中,不能删除活动商品,您可以等待活动结束后或失效该拼团活动后进行操作");
+            throw new GlobalException("活动进行中,不能删除活动商品,您可以等待活动结束后或失效该拼团活动后进行操作");
         }
 
         // 如果活动未开始,则删除无用记录
@@ -173,12 +173,12 @@ public class GroupProdController {
         Long shopId = SecurityUtils.getShopUser().getShopId();
         List<Long> prodIds = groupProdParam.getProdIds();
         if (CollectionUtil.isEmpty(prodIds)) {
-            throw new YamiShopBindException("添加拼团商品不能为空");
+            throw new GlobalException("添加拼团商品不能为空");
         }
         for (Long prodId : prodIds) {
             Product product = productService.getProductByProdId(prodId);
             if (!Objects.equals(product.getShopId(), shopId)) {
-                throw new YamiShopBindException("您无权操作此商品【" + product.getProdName() + "】");
+                throw new GlobalException("您无权操作此商品【" + product.getProdName() + "】");
             }
         }
 
@@ -213,16 +213,16 @@ public class GroupProdController {
     public ResponseEntity<Void> invalidGroupProd(@PathVariable Long groupProdId) {
         GroupProd groupProd = groupProdService.getById(groupProdId);
         if (Objects.isNull(groupProd) || !Objects.equals(groupProd.getStatus(), GroupProdStatusEnum.NORMAL.value())) {
-            throw new YamiShopBindException("活动商品不存在或已经失效");
+            throw new GlobalException("活动商品不存在或已经失效");
         }
         Long shopId = SecurityUtils.getShopUser().getShopId();
         if (!Objects.equals(groupProd.getShopId(), shopId)) {
-            throw new YamiShopBindException("您无权操作此活动");
+            throw new GlobalException("您无权操作此活动");
         }
         // 查看活动
         ApiGroupActivityDto apiGroupActivityInfo = groupActivityService.getApiGroupActivityInfo(groupProd.getGroupActivityId(), groupProd.getProdId());
         if (Objects.isNull(apiGroupActivityInfo) || !Objects.equals(apiGroupActivityInfo.getActivityStatus(), ActivityStatusEnum.UNDER_WAY.value())) {
-            throw new YamiShopBindException("操作失败,活动不存在或已结束");
+            throw new GlobalException("操作失败,活动不存在或已结束");
 
         }
         groupProdService.invalidGroupProd(groupProd);

+ 4 - 3
yami-shop-groupbuy/yami-shop-groupbuy-platform/src/main/java/com/yami/shop/groupbuy/platform/controller/GroupActivityController.java

@@ -13,6 +13,7 @@ import com.yami.shop.bean.enums.OfflineHandleEventType;
 import com.yami.shop.bean.model.OfflineHandleEvent;
 import com.yami.shop.bean.param.OfflineHandleEventAuditParam;
 import com.yami.shop.common.annotation.SysLog;
+import com.yami.shop.common.exception.GlobalException;
 import com.yami.shop.common.exception.YamiShopBindException;
 import com.yami.shop.common.util.PageParam;
 import com.yami.shop.groupbuy.comment.dto.GroupActivityDto;
@@ -84,13 +85,13 @@ public class GroupActivityController {
         // 查看活动是否为失效状态或者活动结束
         GroupActivity groupActivity = groupActivityService.getById(groupActivityId);
         if (Objects.isNull(groupActivity)) {
-            throw new YamiShopBindException("未找到此活动,请稍后重试");
+            throw new GlobalException("未找到此活动,请稍后重试");
         }
         // 如果活动状态不在 【未开始】、【已结束】、【已失效】的状态下无法进行删除操作
         if (!(Objects.equals(groupActivity.getActivityStatus(), ActivityStatusEnum.EXPIRED.value()) ||
                 Objects.equals(groupActivity.getActivityStatus(), ActivityStatusEnum.FINISHED.value()) ||
                 Objects.equals(groupActivity.getActivityStatus(), ActivityStatusEnum.NOT_STARTED.value()))) {
-            throw new YamiShopBindException("该活动状态下不能进行删除");
+            throw new GlobalException("该活动状态下不能进行删除");
         }
         groupActivityService.updateToDelete(groupActivityId);
 
@@ -116,7 +117,7 @@ public class GroupActivityController {
     public ResponseEntity<Void> offline(@RequestBody OfflineHandleEvent offlineHandleEvent) {
         GroupActivity groupActivity = groupActivityService.getById(offlineHandleEvent.getHandleId());
         if(groupActivity == null){
-            throw new YamiShopBindException("未找到此拼团活动信息");
+            throw new GlobalException("未找到此拼团活动信息");
         }
         Long sysUserId = SecurityUtils.getSysUser().getUserId();
         groupActivityService.offline(groupActivity, offlineHandleEvent.getOfflineReason(), sysUserId);

+ 2 - 1
yami-shop-mp/yami-shop-mp-api/src/main/java/com/yami/shop/mp/comment/api/controller/JsapiController.java

@@ -1,5 +1,6 @@
 package com.yami.shop.mp.comment.api.controller;
 
+import com.yami.shop.common.exception.GlobalException;
 import com.yami.shop.common.exception.YamiShopBindException;
 import com.yami.shop.config.WxConfig;
 import io.swagger.annotations.ApiOperation;
@@ -26,7 +27,7 @@ public class JsapiController {
         try {
             jsapiSignature = wxConfig.getWxMpService().createJsapiSignature(url);
         } catch (WxErrorException e) {
-            throw new YamiShopBindException(e.getError().toString());
+            throw new GlobalException(e.getError().toString());
         }
 
         return ResponseEntity.ok(jsapiSignature);

+ 2 - 1
yami-shop-mp/yami-shop-mp-comment/src/main/java/com/yami/shop/mp/comment/component/WxMaServiceClusterImpl.java

@@ -4,6 +4,7 @@ package com.yami.shop.mp.comment.component;
 import cn.binarywang.wx.miniapp.api.WxMaService;
 import cn.binarywang.wx.miniapp.api.impl.WxMaServiceImpl;
 import cn.hutool.http.HttpUtil;
+import com.yami.shop.common.exception.GlobalException;
 import com.yami.shop.common.exception.YamiShopBindException;
 import lombok.extern.slf4j.Slf4j;
 import me.chanjar.weixin.common.bean.WxAccessToken;
@@ -46,7 +47,7 @@ public class WxMaServiceClusterImpl extends WxMaServiceImpl {
             }
 
             if (!lockSuccess) {
-                throw new YamiShopBindException("服务器繁忙,请稍后再试");
+                throw new GlobalException("服务器繁忙,请稍后再试");
             }
 
             if (!this.getWxMaConfig().isAccessTokenExpired()) {

+ 3 - 2
yami-shop-mp/yami-shop-mp-comment/src/main/java/com/yami/shop/mp/comment/component/WxMpServiceClusterImpl.java

@@ -3,6 +3,7 @@ package com.yami.shop.mp.comment.component;
 import cn.hutool.http.HttpUtil;
 import com.google.gson.JsonObject;
 import com.google.gson.JsonParser;
+import com.yami.shop.common.exception.GlobalException;
 import com.yami.shop.common.exception.YamiShopBindException;
 import me.chanjar.weixin.common.enums.WxType;
 import me.chanjar.weixin.common.bean.WxAccessToken;
@@ -52,7 +53,7 @@ public class WxMpServiceClusterImpl extends WxMpServiceHttpClientImpl {
             }
 
             if (!doingUpdateAccessToken) {
-                throw new YamiShopBindException("服务器繁忙,请稍后再试");
+                throw new GlobalException("服务器繁忙,请稍后再试");
             }
 
             if (!this.getWxMpConfigStorage().isAccessTokenExpired()) {
@@ -92,7 +93,7 @@ public class WxMpServiceClusterImpl extends WxMpServiceHttpClientImpl {
             }
 
             if (!doingUpdateTicket) {
-                throw new YamiShopBindException("服务器繁忙,请稍后再试");
+                throw new GlobalException("服务器繁忙,请稍后再试");
             }
             if (!this.getWxMpConfigStorage().isTicketExpired(type)) {
                 this.getWxMpConfigStorage().getTicket(type);

+ 2 - 1
yami-shop-mp/yami-shop-mp-platform/src/main/java/com/yami/shop/mp/comment/platform/controller/WeixinMaterialController.java

@@ -13,6 +13,7 @@ package com.yami.shop.mp.comment.platform.controller;
 import cn.hutool.core.util.StrUtil;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.yami.shop.common.exception.GlobalException;
 import com.yami.shop.common.exception.YamiShopBindException;
 import com.yami.shop.common.util.Json;
 import com.yami.shop.common.util.PageParam;
@@ -67,7 +68,7 @@ public class WeixinMaterialController {
 	@PreAuthorize("@pms.hasPermission('weixin:material:sync')")
 	public ResponseEntity<Void> sync(@PathVariable String type) throws WxErrorException{
 		if (StrUtil.isBlank(type)) {
-			throw new YamiShopBindException("请选择素材类型");
+			throw new GlobalException("请选择素材类型");
 		}
 		List<WeixinMaterial> allMaterial = new ArrayList<>();
 		// 每页大小

+ 2 - 1
yami-shop-mp/yami-shop-mp-platform/src/main/java/com/yami/shop/mp/comment/platform/service/impl/WeixinMaterialServiceImpl.java

@@ -12,6 +12,7 @@ package com.yami.shop.mp.comment.platform.service.impl;
 
 import cn.hutool.core.collection.CollectionUtil;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.yami.shop.common.exception.GlobalException;
 import com.yami.shop.common.exception.YamiShopBindException;
 import com.yami.shop.config.WxConfig;
 import com.yami.shop.mp.comment.dao.WeixinMaterialMapper;
@@ -54,7 +55,7 @@ public class WeixinMaterialServiceImpl extends ServiceImpl<WeixinMaterialMapper,
         try {
             wxConfig.getWxMpService().getMaterialService().materialDelete(mediaId);
         } catch (WxErrorException e) {
-            throw new YamiShopBindException(e.getError().getErrorMsg());
+            throw new GlobalException(e.getError().getErrorMsg());
         }
     }
 

+ 1 - 1
yami-shop-multishop/src/main/java/com/yami/shop/multishop/controller/AttributeController.java

@@ -73,7 +73,7 @@ public class AttributeController {
 	public ResponseEntity<Void> update(@Valid ProdProp prodProp){
 		ProdProp dbProdProp = prodPropService.getById(prodProp.getPropId());
 		if (!Objects.equals(dbProdProp.getShopId(), SecurityUtils.getShopUser().getShopId())) {
-			throw new YamiShopBindException("没有权限获取该商品规格信息");
+			throw new GlobalException("没有权限获取该商品规格信息");
 		}
 		prodProp.setRule(ProdPropRule.ATTRIBUTE.value());
 		prodProp.setShopId(SecurityUtils.getShopUser().getShopId());

+ 3 - 2
yami-shop-multishop/src/main/java/com/yami/shop/multishop/controller/BrandController.java

@@ -15,6 +15,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.yami.shop.bean.model.Brand;
 import com.yami.shop.common.config.Constant;
+import com.yami.shop.common.exception.GlobalException;
 import com.yami.shop.common.exception.YamiShopBindException;
 import com.yami.shop.common.util.PageParam;
 import com.yami.shop.security.multishop.util.SecurityUtils;
@@ -72,7 +73,7 @@ public class BrandController {
         Long shopId = SecurityUtils.getShopUser().getShopId();
         Brand dbBrand = brandService.getByBrandName(brand.getBrandName(),shopId);
         if (dbBrand != null) {
-            throw new YamiShopBindException("该品牌名称已存在");
+            throw new GlobalException("该品牌名称已存在");
         }
         Date date = new Date();
         brand.setUpdateTime(date);
@@ -89,7 +90,7 @@ public class BrandController {
     public ResponseEntity<Void> update(@RequestBody @Valid Brand brand) {
         Brand dbBrand = brandService.getByBrandName(brand.getBrandName(),SecurityUtils.getShopUser().getShopId());
         if (dbBrand != null && !Objects.equals(dbBrand.getBrandId(), brand.getBrandId())) {
-            throw new YamiShopBindException("该品牌名称已存在");
+            throw new GlobalException("该品牌名称已存在");
         }
         brand.setUpdateTime(new Date());
         brandService.updateById(brand);

+ 3 - 3
yami-shop-multishop/src/main/java/com/yami/shop/multishop/controller/CategoryController.java

@@ -71,7 +71,7 @@ public class CategoryController {
 		Category categoryName = categoryService.getOne(new LambdaQueryWrapper<Category>().eq(Category::getCategoryName,category.getCategoryName())
 				.eq(Category::getShopId,category.getShopId()));
 		if(categoryName != null){
-			throw new YamiShopBindException("类目名称已存在!");
+			throw new GlobalException("类目名称已存在!");
 		}
 		categoryService.saveCategroy(category);
 		return ResponseEntity.ok().build();
@@ -98,7 +98,7 @@ public class CategoryController {
 		Category categoryName = categoryService.getOne(new LambdaQueryWrapper<Category>().eq(Category::getCategoryName,category.getCategoryName())
 														.eq(Category::getShopId,category.getShopId()).ne(Category::getCategoryId,category.getCategoryId()));
 		if(categoryName != null){
-			throw new YamiShopBindException("类目名称已存在!");
+			throw new GlobalException("类目名称已存在!");
 		}
 		category.setOldCategoryName(categoryDB.getCategoryName());
 		categoryService.updateCategroy(category);
@@ -154,7 +154,7 @@ public class CategoryController {
 	@ResponseBody
 	public ResponseEntity exportExcel(@RequestParam("excelFile") MultipartFile excelFile) throws Exception {
 		if(excelFile == null) {
-			throw new YamiShopBindException("网络繁忙,请稍后重试");
+			throw new GlobalException("网络繁忙,请稍后重试");
 		}
 		Long shopId = SecurityUtils.getShopUser().getShopId();
 		return ResponseEntity.ok("成功导入: " + categoryService.parseCategoryFile(excelFile,shopId) + "条数据!");

+ 2 - 1
yami-shop-multishop/src/main/java/com/yami/shop/multishop/controller/FileController.java

@@ -13,6 +13,7 @@ package com.yami.shop.multishop.controller;
 import cn.hutool.core.io.FileUtil;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.yami.shop.bean.model.AttachFile;
+import com.yami.shop.common.exception.GlobalException;
 import com.yami.shop.common.exception.YamiShopBindException;
 import com.yami.shop.common.util.PageParam;
 import com.yami.shop.config.ShopConfig;
@@ -98,7 +99,7 @@ public class FileController {
 	@PutMapping("/updateFileName")
 	public ResponseEntity<Boolean> updateFileName(@RequestBody AttachFile attachFile) {
 		if (Objects.isNull(attachFile.getFileName())){
-			throw new YamiShopBindException("图片名称不能为空");
+			throw new GlobalException("图片名称不能为空");
 		}
 		return ResponseEntity.ok(attachFileService.updateFileName(attachFile));
 	}

+ 22 - 22
yami-shop-multishop/src/main/java/com/yami/shop/multishop/controller/OrderController.java

@@ -100,14 +100,14 @@ public class OrderController {
         Long shopId = SecurityUtils.getShopUser().getShopId();
         Order order = orderService.getOrderByOrderNumberAndShopId(deliveryOrderParam.getOrderNumber(),shopId,true);
         if (!Objects.equals(order.getStatus(), OrderStatus.PADYED.value()) && Objects.equals(order.getDvyType(), DvyType.FETCH.value())){
-            throw new YamiShopBindException("订单不处于待入库状态,无法进行入库");
+            throw new GlobalException("订单不处于待入库状态,无法进行入库");
         }else if (!Objects.equals(order.getStatus(), OrderStatus.PADYED.value())){
-            throw new YamiShopBindException("订单不处于待发货状态,无法进行发货");
+            throw new GlobalException("订单不处于待发货状态,无法进行发货");
         }
         List<OrderRefund> orderRefunds = orderRefundService.getProcessingOrderRefundByOrderId(order.getOrderId());
 
         if (CollectionUtil.isNotEmpty(orderRefunds)) {
-            throw new YamiShopBindException("该订单有退款信息正在处理当中,请处理完毕之后再进行发货的操作!");
+            throw new GlobalException("该订单有退款信息正在处理当中,请处理完毕之后再进行发货的操作!");
         }
 
         Order orderParam = new Order();
@@ -136,7 +136,7 @@ public class OrderController {
     @PutMapping("/changeAmount")
     public ResponseEntity<Void> changeAmount(@RequestBody Order order) {
         if(order.getFreightAmount()<0){
-            throw new YamiShopBindException("运费不能小于零");
+            throw new GlobalException("运费不能小于零");
         }
         if(Objects.isNull(order.getFreightAmount())){
             order.setFreightAmount(0.00);
@@ -162,7 +162,7 @@ public class OrderController {
             UserAddrOrder userAddrOrder = order.getUserAddrOrder();
             userAddrOrderService.updateById(userAddrOrder);
         }else {
-            throw new YamiShopBindException("订单状态异常,无法更改订单地址");
+            throw new GlobalException("订单状态异常,无法更改订单地址");
         }
         return ResponseEntity.ok().body("修改成功");
     }
@@ -215,21 +215,21 @@ public class OrderController {
 //        Order order = orderService.getOrderByOrderNumberAndUserId(orderRefundParam.getOrderNumber(), userId, true);
         Order order = orderService.getOne(new LambdaQueryWrapper<Order>().eq(Order::getOrderNumber,orderRefundParam.getOrderNumber()));
         if (!Objects.equals(order.getIsPayed(), 1)) {
-            throw new YamiShopBindException("当前订单还未付款,无法取消");
+            throw new GlobalException("当前订单还未付款,无法取消");
         }
         orderRefundParam.setBuyerMobile(order.getUserMobile());
         orderRefundParam.setRefundAmount(order.getTotal());
         if (Objects.equals(order.getStatus(), OrderStatus.CLOSE.value())) {
-            throw new YamiShopBindException("当前订单已失败");
+            throw new GlobalException("当前订单已失败");
         }
 
         if (Objects.equals(order.getStatus(), OrderStatus.WAIT_GROUP.value())) {
-            throw new YamiShopBindException("当前订单正在等待成团状态,需等待成团才能进行下一步操作");
+            throw new GlobalException("当前订单正在等待成团状态,需等待成团才能进行下一步操作");
         }
 
 
 //        if (!Objects.equals(orderRefundParam.getRefundType(),RefundType.ALL.value()) && Objects.equals(order.getStatus(),OrderStatus.PADYED.value())) {
-//            throw new YamiShopBindException("未发货订单仅支持整单退款");
+//            throw new GlobalException("未发货订单仅支持整单退款");
 //        }
 //        // 代发货整单退款不可以输入金额,为固定全额退款
 //        if (Objects.equals(orderRefundParam.getRefundType(),RefundType.ALL.value()) && Objects.equals(order.getStatus(),OrderStatus.PADYED.value())) {
@@ -237,25 +237,25 @@ public class OrderController {
 //        }
 
 //        if (orderRefundParam.getRefundAmount() > order.getActualTotal()) {
-//            throw new YamiShopBindException("退款金额已超出订单金额,无法申请");
+//            throw new GlobalException("退款金额已超出订单金额,无法申请");
 //        }
 
         //待收货 -> 整单退款 -> 退款金额 < 订单金额 - 运费金额
         if (Objects.equals(order.getStatus(), OrderStatus.CONSIGNMENT.value()) && orderRefundParam.getRefundType().equals(RefundType.ALL.value())) {
             Double refundAmount = Arith.sub(order.getActualTotal(),order.getFreightAmount());
             if (orderRefundParam.getRefundAmount() > refundAmount){
-                throw new YamiShopBindException("退款金额已超出订单金额,无法申请");
+                throw new GlobalException("退款金额已超出订单金额,无法申请");
             }
         }
 
         if (!orderRefundService.checkRefundDate(order)) {
-            throw new YamiShopBindException("当前订单已确认收货超过" + Constant.MAX_FINALLY_REFUND_TIME + "天,无法退款");
+            throw new GlobalException("当前订单已确认收货超过" + Constant.MAX_FINALLY_REFUND_TIME + "天,无法退款");
         }
         if (Objects.equals(order.getOrderType(),Constant.ORDER_TYPE_SCORE)) {
-            throw new YamiShopBindException("积分商品,无法退款");
+            throw new GlobalException("积分商品,无法退款");
         }
         if (Objects.equals(orderRefundParam.getRefundType(),RefundType.ALL.value()) && (!Objects.isNull(order.getRefundStatus()) && !Objects.equals(order.getRefundStatus(), RefundStatusEnum.DISAGREE.value()))) {
-            throw new YamiShopBindException("该订单已有商品正在退款中,不能再进行整单退款");
+            throw new GlobalException("该订单已有商品正在退款中,不能再进行整单退款");
         }
         // 生成退款单信息
         OrderRefund newOrderRefund = new OrderRefund();
@@ -265,10 +265,10 @@ public class OrderController {
 
         for (OrderRefund orderRefund : orderRefunds) {
             if (Objects.equals(RefundType.ALL.value(),orderRefund.getRefundType())) {
-                throw new YamiShopBindException("该订单正在进行整单退款,无法进行新的退款操作");
+                throw new GlobalException("该订单正在进行整单退款,无法进行新的退款操作");
             }
             if (Objects.equals(orderRefund.getOrderItemId(), orderRefundParam.getOrderItemId())) {
-                throw new YamiShopBindException("该商品正在进行退款中,无法进行新的退款操作");
+                throw new GlobalException("该商品正在进行退款中,无法进行新的退款操作");
             }
         }
 
@@ -287,7 +287,7 @@ public class OrderController {
                     .eq(OrderItem::getOrderItemId, orderRefundParam.getOrderItemId())
                     .eq(OrderItem::getOrderNumber, orderRefundParam.getOrderNumber()));
             if (orderItem == null) {
-                throw new YamiShopBindException("该物品在订单中不存在");
+                throw new GlobalException("该物品在订单中不存在");
             }
             boolean isCanRefund = false;
             //  查看是否有支付金额和积分都为空的订单,有则抛出异常
@@ -298,11 +298,11 @@ public class OrderController {
                 }
             }
             if (isCanRefund) {
-                throw new YamiShopBindException("该订单部分订单项支付金额和积分为0,无法使用部分退款!");
+                throw new GlobalException("该订单部分订单项支付金额和积分为0,无法使用部分退款!");
             }
 
             if (order.getPlatformAmount() > 0 && !Arith.isEquals(orderRefundParam.getRefundAmount(), orderItem.getActualTotal())) {
-                throw new YamiShopBindException("该订单有使用平台优惠,无法使用部分退款!");
+                throw new GlobalException("该订单有使用平台优惠,无法使用部分退款!");
             }
             // 计算该订单项的分销金额
             newOrderRefund.setDistributionTotalAmount(orderService.sumTotalDistributionAmountByOrderItem(Collections.singletonList(orderItem)));
@@ -318,20 +318,20 @@ public class OrderController {
 
             // 判断退款数量是否溢出
             if (orderRefundParam.getGoodsNum() > orderItem.getProdCount()) {
-                throw new YamiShopBindException("退款物品数量已超出订单中的数量,不允许申请");
+                throw new GlobalException("退款物品数量已超出订单中的数量,不允许申请");
             }
 
             // 判断退款金额是否超出订单金额
             double refundSingleAmount = Arith.div(orderRefundParam.getRefundAmount(), orderRefundParam.getGoodsNum(), 3);
             double singleAmount = Arith.div(orderItem.getActualTotal(), orderItem.getProdCount(), 3);
             if (refundSingleAmount > orderItem.getProductTotalAmount() || refundSingleAmount > singleAmount) {
-                throw new YamiShopBindException("退款金额已超出订单金额,无法申请");
+                throw new GlobalException("退款金额已超出订单金额,无法申请");
             }
 
             // 一个订单项只能申请一次退款
             for (OrderRefund orderRefund : orderRefunds) {
                 if (Objects.equals(orderRefund.getOrderId(), orderItem.getOrderItemId())) {
-                    throw new YamiShopBindException("退款订单项已处理,请勿重复申请");
+                    throw new GlobalException("退款订单项已处理,请勿重复申请");
                 }
             }
         }

+ 6 - 6
yami-shop-multishop/src/main/java/com/yami/shop/multishop/controller/OrderRefundController.java

@@ -178,7 +178,7 @@ public class OrderRefundController {
     @PutMapping("/returnMoney")
     public ResponseEntity<Void> returnMoney(@RequestBody OrderRefundParam orderRefundParam) {
         if (Objects.isNull(orderRefundParam.getIsReceiver())) {
-            throw new YamiShopBindException("退货状态不能为空");
+            throw new GlobalException("退货状态不能为空");
         }
         // 退货处理
         OrderRefundDto orderRefundDto = orderRefundService.returnMoney(orderRefundParam, SecurityUtils.getShopUser().getShopId());
@@ -197,21 +197,21 @@ public class OrderRefundController {
         OrderRefundDto orderRefundDto = orderRefundService.getOrderRefundByRefundSn(refundSn.getRefundSn());
 
         if (orderRefundDto == null) {
-            throw new YamiShopBindException("退款单不存在");
+            throw new GlobalException("退款单不存在");
         }
 
         if (orderRefundDto.getDecisionTime() == null) {
-            throw new YamiShopBindException("请先确定退款,才能发起退款操作");
+            throw new GlobalException("请先确定退款,才能发起退款操作");
         }
 
         if (orderRefundDto.getRefundTime() != null) {
-            throw new YamiShopBindException("已退款成功,无法再申请退款操作");
+            throw new GlobalException("已退款成功,无法再申请退款操作");
         }
         if (!Objects.equals(orderRefundDto.getShopId(), SecurityUtils.getShopUser().getShopId())) {
-            throw new YamiShopBindException(YamiHttpStatus.UNAUTHORIZED);
+            throw new GlobalException(YamiHttpStatus.UNAUTHORIZED);
         }
         if (Objects.equals(-1,orderRefundDto.getReturnMoneySts())) {
-            throw new YamiShopBindException("买家已取消申请");
+            throw new GlobalException("买家已取消申请");
         }
         // 提交退款请求
         orderRefundService.submitWxRefund(orderRefundDto);

+ 1 - 1
yami-shop-multishop/src/main/java/com/yami/shop/multishop/controller/PickAddrController.java

@@ -76,7 +76,7 @@ public class PickAddrController {
 	public ResponseEntity<Void> update(@Valid @RequestBody PickAddr pickAddr){
 		PickAddr dbPickAddr = pickAddrService.getById(pickAddr.getAddrId());
 		if (!Objects.equals(dbPickAddr.getShopId(),pickAddr.getShopId())) {
-			throw new YamiShopBindException(YamiHttpStatus.UNAUTHORIZED);
+			throw new GlobalException(YamiHttpStatus.UNAUTHORIZED);
 		}
 		pickAddrService.updateById(pickAddr);
 		return ResponseEntity.ok().build();

+ 1 - 1
yami-shop-multishop/src/main/java/com/yami/shop/multishop/controller/ProdCommController.java

@@ -90,7 +90,7 @@ public class ProdCommController {
     public ResponseEntity<Boolean> updateById(@RequestBody @Valid ProdComm prodComm) {
         Long shopId = productService.getById(prodComm.getProdId()).getShopId();
         if(!Objects.equals(shopId ,SecurityUtils.getShopUser().getShopId())){
-            throw new YamiShopBindException("没有权限修改此商品");
+            throw new GlobalException("没有权限修改此商品");
         }
         ProdComm newProdComm = new ProdComm();
         newProdComm.setProdCommId(prodComm.getProdCommId());

+ 12 - 12
yami-shop-multishop/src/main/java/com/yami/shop/multishop/controller/ProductController.java

@@ -122,7 +122,7 @@ public class ProductController {
     public ResponseEntity<Product> info(@PathVariable("prodId") Long prodId) {
         Product prod = productService.getProductByProdId(prodId);
         if (!Objects.equals(prod.getShopId(), SecurityUtils.getShopUser().getShopId())) {
-            throw new YamiShopBindException("没有权限获取该商品规格信息");
+            throw new GlobalException("没有权限获取该商品规格信息");
         }
         Brand brand = brandService.getById(prod.getBrandId());
         if (Objects.nonNull(brand)){
@@ -143,7 +143,7 @@ public class ProductController {
         Long shopId = SecurityUtils.getShopUser().getShopId();
         ShopDetail shopDetail = shopDetailService.getShopDetailByShopId(shopId);
         if (Objects.equals(shopDetail.getShopStatus(), ShopStatus.OFFLINE.value())) {
-            throw new YamiShopBindException("店铺违规下线中,不能发布商品,请联系管理员后重试");
+            throw new GlobalException("店铺违规下线中,不能发布商品,请联系管理员后重试");
         }
         Product product = mapperFacade.map(productParam, Product.class);
         product.setStatus(1);
@@ -176,7 +176,7 @@ public class ProductController {
         Long shopId = SecurityUtils.getShopUser().getShopId();
         ShopDetail shopDetail = shopDetailService.getShopDetailByShopId(shopId);
         if (Objects.equals(shopDetail.getShopStatus(), ShopStatus.OFFLINE.value())) {
-            throw new YamiShopBindException("店铺违规下线中,不能修改商品,请联系管理员后重试");
+            throw new GlobalException("店铺违规下线中,不能修改商品,请联系管理员后重试");
         }
 
         List<Sku> dbSkus = skuService.listByProdId(dbProduct.getProdId());
@@ -208,7 +208,7 @@ public class ProductController {
     public ResponseEntity<Void> delete(@PathVariable("prodId") Long prodId) {
         Product dbProduct = productService.getProductByProdId(prodId);
         if (!Objects.equals(dbProduct.getShopId(), SecurityUtils.getShopUser().getShopId())) {
-            throw new YamiShopBindException("无法获取非本店铺商品信息");
+            throw new GlobalException("无法获取非本店铺商品信息");
         }
         List<Sku> dbSkus = skuService.listByProdId(dbProduct.getProdId());
         // 删除商品
@@ -238,22 +238,22 @@ public class ProductController {
         Integer prodStatus = productParam.getStatus();
         Product dbProduct = productService.getProductByProdId(prodId);
         if (!Objects.equals(dbProduct.getShopId(), SecurityUtils.getShopUser().getShopId())) {
-            throw new YamiShopBindException("无法获取非本店铺商品信息");
+            throw new GlobalException("无法获取非本店铺商品信息");
         }
         if (!(Objects.equals(dbProduct.getStatus(), ProdStatusEnums.NORMAL.getValue())
                 || Objects.equals(dbProduct.getStatus(), ProdStatusEnums.SHOP_OFFLINE.getValue()))) {
-            throw new YamiShopBindException("商品不在正常状态,修改失败");
+            throw new GlobalException("商品不在正常状态,修改失败");
         }
         Long shopId = SecurityUtils.getShopUser().getShopId();
         ShopDetail shopDetail = shopDetailService.getShopDetailByShopId(shopId);
         if (Objects.equals(shopDetail.getShopStatus(), ShopStatus.OFFLINE.value())) {
-            throw new YamiShopBindException("店铺处于违规下线中,不能修改商品,请联系管理员后重试");
+            throw new GlobalException("店铺处于违规下线中,不能修改商品,请联系管理员后重试");
         }
 
         if(Objects.equals(productParam.getStatus(),1)){
             Category category = categoryService.getById(dbProduct.getCategoryId());
             if (Objects.equals(category.getStatus(), 0)){
-                throw new YamiShopBindException("平台分类处于下线中,商品不能上架,请联系管理员后再进行操作");
+                throw new GlobalException("平台分类处于下线中,商品不能上架,请联系管理员后再进行操作");
             }
         }
 
@@ -284,7 +284,7 @@ public class ProductController {
     public ResponseEntity<Void> auditApply(@RequestBody OfflineHandleEventAuditParam offlineHandleEventAuditParam) {
         Product product = productService.getProductByProdId(offlineHandleEventAuditParam.getHandleId());
         if (product == null) {
-            throw new YamiShopBindException("商品信息不存在");
+            throw new GlobalException("商品信息不存在");
         }
         productService.auditApply(offlineHandleEventAuditParam.getEventId(), offlineHandleEventAuditParam.getHandleId(), offlineHandleEventAuditParam.getReapplyReason());
         // 移除缓存
@@ -328,7 +328,7 @@ public class ProductController {
     @ResponseBody
     public ResponseEntity exportExcel(@RequestParam("excelFile") MultipartFile excelFile) throws Exception {
         if(excelFile == null) {
-            throw new YamiShopBindException("网络繁忙,请稍后重试");
+            throw new GlobalException("网络繁忙,请稍后重试");
         }
         Long shopId = SecurityUtils.getShopUser().getShopId();
         return ResponseEntity.ok(productService.parseFile(excelFile,shopId));
@@ -340,7 +340,7 @@ public class ProductController {
         boolean hasDeliverMode = deliveryMode != null
                 && (deliveryMode.getHasShopDelivery() || deliveryMode.getHasUserPickUp());
         if (!hasDeliverMode) {
-            throw new YamiShopBindException("请选择配送方式");
+            throw new GlobalException("请选择配送方式");
         }
         List<Sku> skuList = productParam.getSkuList();
         boolean isAllUnUse = true;
@@ -350,7 +350,7 @@ public class ProductController {
             }
         }
         if (isAllUnUse) {
-            throw new YamiShopBindException("至少要启用一种商品规格");
+            throw new GlobalException("至少要启用一种商品规格");
         }
     }
     /**

+ 1 - 1
yami-shop-multishop/src/main/java/com/yami/shop/multishop/controller/ShopBankCardController.java

@@ -73,7 +73,7 @@ public class ShopBankCardController {
     public ResponseEntity<Void> removeById(@PathVariable("shopBankCardId") Long shopBankCardId) {
         ShopBankCard shopBankCard = shopBankCardService.getById(shopBankCardId);
         if (Objects.equals(shopBankCard.getIsDefault(),1)){
-            throw new YamiShopBindException("不能删除默认银行卡");
+            throw new GlobalException("不能删除默认银行卡");
         }
         shopBankCardService.removeById(shopBankCardId);
         return ResponseEntity.ok().build();

+ 3 - 2
yami-shop-multishop/src/main/java/com/yami/shop/multishop/controller/ShopDetailController.java

@@ -23,6 +23,7 @@ import com.yami.shop.bean.model.ShopDetail;
 import com.yami.shop.bean.param.ShopDetailParam;
 import com.yami.shop.bean.param.OfflineHandleEventAuditParam;
 import com.yami.shop.common.config.Constant;
+import com.yami.shop.common.exception.GlobalException;
 import com.yami.shop.common.exception.YamiShopBindException;
 import com.yami.shop.common.util.PageParam;
 import com.yami.shop.delivery.comment.api.paotui.PaoTuiApi;
@@ -158,7 +159,7 @@ public class ShopDetailController {
     public ResponseEntity<Void> auditApply(@RequestBody OfflineHandleEventAuditParam offlineHandleEventAuditParam) {
         ShopDetail shopDetail = shopDetailService.getShopDetailByShopId(offlineHandleEventAuditParam.getHandleId());
         if (shopDetail == null) {
-            throw new YamiShopBindException("未找到该店铺信息");
+            throw new GlobalException("未找到该店铺信息");
         }
         shopDetailService.auditApply(offlineHandleEventAuditParam.getEventId(), offlineHandleEventAuditParam.getHandleId(), offlineHandleEventAuditParam.getReapplyReason());
         return ResponseEntity.ok().build();
@@ -175,7 +176,7 @@ public class ShopDetailController {
 //        }
         // 每个ip每分钟只能发十个注册的验证码,免得接口被利用
         if (Objects.equals(shopDetail.getShopId(), Constant.MAIN_SHOP)) {
-            throw new YamiShopBindException("自营店无法提现");
+            throw new GlobalException("自营店无法提现");
         }
         smsLogService.sendSms(SmsType.VALID, shopDetail.getShopId().toString(), shopDetail.getMobile(), Maps.newHashMap());
         return ResponseEntity.ok(shopDetail.getMobile());

+ 3 - 2
yami-shop-multishop/src/main/java/com/yami/shop/multishop/controller/ShopWithdrawCashController.java

@@ -14,6 +14,7 @@ import com.yami.shop.bean.model.ShopBankCard;
 import com.yami.shop.bean.model.ShopDetail;
 import com.yami.shop.bean.model.ShopWithdrawCash;
 import com.yami.shop.common.config.Constant;
+import com.yami.shop.common.exception.GlobalException;
 import com.yami.shop.common.exception.YamiShopBindException;
 import com.yami.shop.security.multishop.util.SecurityUtils;
 import com.yami.shop.service.ShopBankCardService;
@@ -52,10 +53,10 @@ public class ShopWithdrawCashController {
             throw  new YamiShopBindException("自营店无法提现");
         }
         if(shopWithdrawCash.getAmount() < 1){
-            throw new YamiShopBindException("提现金额不能少于1.00元");
+            throw new GlobalException("提现金额不能少于1.00元");
         }
         if (!smsLogService.checkValidCode(shopDetail.getMobile(), shopWithdrawCash.getCode(), SmsType.VALID)){
-            throw new YamiShopBindException("验证码有误或已过期");
+            throw new GlobalException("验证码有误或已过期");
         }
 
         shopWithdrawCash.setUpdateTime(new Date());

+ 1 - 1
yami-shop-multishop/src/main/java/com/yami/shop/multishop/controller/SpecController.java

@@ -90,7 +90,7 @@ public class SpecController {
     public ResponseEntity<Void> update(@Valid @RequestBody ProdProp prodProp) {
         ProdProp dbProdProp = prodPropService.getById(prodProp.getPropId());
         if (!Objects.equals(dbProdProp.getShopId(), SecurityUtils.getShopUser().getShopId())) {
-            throw new YamiShopBindException("没有权限获取该商品规格信息");
+            throw new GlobalException("没有权限获取该商品规格信息");
         }
         prodProp.setRule(ProdPropRule.SPEC.value());
         prodProp.setShopId(SecurityUtils.getShopUser().getShopId());

+ 2 - 1
yami-shop-platform/src/main/java/com/yami/shop/platform/controller/AreaController.java

@@ -13,6 +13,7 @@ package com.yami.shop.platform.controller;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.yami.shop.bean.model.Area;
+import com.yami.shop.common.exception.GlobalException;
 import com.yami.shop.common.exception.YamiShopBindException;
 import com.yami.shop.common.util.PageParam;
 import com.yami.shop.common.util.R;
@@ -125,7 +126,7 @@ public class AreaController {
     @PreAuthorize("@pms.hasPermission('admin:area:delete')")
     public R<Void> delete(@PathVariable Long id) {
         if (areaService.count(new LambdaQueryWrapper<Area>().eq(Area::getParentId,id)) > 0) {
-            throw new YamiShopBindException("请先删除子地区");
+            throw new GlobalException("请先删除子地区");
         }
 
         Area area = areaService.getById(id);

+ 3 - 2
yami-shop-platform/src/main/java/com/yami/shop/platform/controller/BrandController.java

@@ -9,6 +9,7 @@
  */
 
 package com.yami.shop.platform.controller;
+import com.yami.shop.common.exception.GlobalException;
 import com.yami.shop.common.util.R;
 import cn.hutool.core.util.StrUtil;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@@ -70,7 +71,7 @@ public class BrandController {
     public R<Void> save(@RequestBody @Valid Brand brand) {
         Brand dbBrand = brandService.getByBrandName(brand.getBrandName(),Constant.PLATFORM_SHOP_ID);
         if (dbBrand != null) {
-            throw new YamiShopBindException("该品牌名称已存在");
+            throw new GlobalException("该品牌名称已存在");
         }
         Date date = new Date();
         brand.setRecTime(date);
@@ -87,7 +88,7 @@ public class BrandController {
     public R<Void> update(@RequestBody @Valid Brand brand) {
         Brand dbBrand = brandService.getByBrandName(brand.getBrandName(),Constant.PLATFORM_SHOP_ID);
         if (dbBrand != null && !Objects.equals(dbBrand.getBrandId(), brand.getBrandId())) {
-            throw new YamiShopBindException("该品牌名称已存在");
+            throw new GlobalException("该品牌名称已存在");
         }
         brand.setUpdateTime(new Date());
         brandService.updateById(brand);

+ 4 - 5
yami-shop-platform/src/main/java/com/yami/shop/platform/controller/CategoryController.java

@@ -89,15 +89,14 @@ public class CategoryController {
 	@PutMapping
 	@PreAuthorize("@pms.hasPermission('prod:category:update')")
 	public R<String> update(@RequestBody Category category){
-//		category.setShopId(Constant.PLATFORM_SHOP_ID);
-		Category categoryDB = categoryService.getById(category.getCategoryId());
-		if (Objects.equals(categoryDB.getParentId(), Constant.CATEGORY_ID) && !Objects.equals(category.getParentId(), Constant.CATEGORY_ID)){
+		Category categoryById = categoryService.getById(category.getCategoryId());
+		if (Objects.equals(categoryById.getParentId(), Constant.CATEGORY_ID) && !Objects.equals(category.getParentId(), Constant.CATEGORY_ID)){
 			return R.FAIL("一级分类不能改为二级分类");
-		}else if(Objects.equals(category.getParentId(), Constant.CATEGORY_ID) && !Objects.equals(categoryDB.getParentId(), Constant.CATEGORY_ID)){
+		}else if(Objects.equals(category.getParentId(), Constant.CATEGORY_ID) && !Objects.equals(categoryById.getParentId(), Constant.CATEGORY_ID)){
 			return R.FAIL("二级分类不能改为一级分类");
 		}
 		category.setGrade(getGradeByParentId(category.getParentId()));
-		category.setOldCategoryName(categoryDB.getCategoryName());
+		category.setOldCategoryName(categoryById.getCategoryName());
 		categoryService.updateCategroy(category);
 		return R.SUCCESS();
 	}

+ 147 - 0
yami-shop-platform/src/main/java/com/yami/shop/platform/controller/ChannelProdController.java

@@ -0,0 +1,147 @@
+package com.yami.shop.platform.controller;
+
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.yami.shop.bean.model.ChannelProd;
+import com.yami.shop.common.util.PageParam;
+import com.yami.shop.common.util.R;
+import com.yami.shop.service.ChannelProdService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.AllArgsConstructor;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletResponse;
+import javax.validation.Valid;
+import java.util.List;
+
+/**
+ * 渠道商品管理控制器
+ * @author lgh on 2024/01/01.
+ */
+@RestController
+@RequestMapping("/platform/channelProd")
+@Api(tags = "渠道商品管理接口")
+@AllArgsConstructor
+public class ChannelProdController {
+
+    private final ChannelProdService channelProdService;
+
+    @GetMapping("/channel/{channelId}")
+    @ApiOperation(value = "根据渠道ID获取商品列表")
+    public R<List<ChannelProd>> getChannelProdsBychannelId(@PathVariable Long channelId) {
+        List<ChannelProd> channelProds = channelProdService.getChannelProdsBychannelId(channelId);
+        return R.SUCCESS(channelProds);
+    }
+
+    @GetMapping("/sku/{skuId}")
+    @ApiOperation(value = "根据SKU ID获取渠道商品列表")
+    public R<List<ChannelProd>> getChannelProdsBySkuId(@PathVariable Long skuId) {
+        List<ChannelProd> channelProds = channelProdService.getChannelProdsBySkuId(skuId);
+        return R.SUCCESS(channelProds);
+    }
+
+    @GetMapping("/channel/{channelId}/sku/{skuId}")
+    @ApiOperation(value = "根据渠道ID和SKU ID获取渠道商品")
+    public R<ChannelProd> getChannelProdBychannelIdAndSkuId(
+            @PathVariable Long channelId,
+            @PathVariable Long skuId) {
+        ChannelProd channelProd = channelProdService.getChannelProdBychannelIdAndSkuId(channelId, skuId);
+        return R.SUCCESS(channelProd);
+    }
+
+    @GetMapping("/page")
+    @ApiOperation(value = "分页查询渠道商品")
+    public R<IPage<ChannelProd>> getChannelProdPage(PageParam<ChannelProd> page, ChannelProd channelProd) {
+        IPage<ChannelProd> channelProdPage = channelProdService.getChannelProdPage(page, channelProd);
+        return R.SUCCESS(channelProdPage);
+    }
+
+    @PostMapping
+    @ApiOperation(value = "保存渠道商品")
+    public R<Void> saveChannelProd(@RequestBody @Valid ChannelProd channelProd) {
+        channelProdService.saveChannelProd(channelProd);
+        return R.SUCCESS();
+    }
+
+    @PutMapping
+    @ApiOperation(value = "更新渠道商品")
+    public R<Void> updateChannelProd(@RequestBody @Valid ChannelProd channelProd) {
+        channelProdService.updateChannelProd(channelProd);
+        return R.SUCCESS();
+    }
+
+    @DeleteMapping("/{id}")
+    @ApiOperation(value = "根据ID删除渠道商品")
+    public R<Void> deleteChannelProdById(@PathVariable Long id) {
+        channelProdService.deleteChannelProdById(id);
+        return R.SUCCESS();
+    }
+
+    @DeleteMapping("/channel/{channelId}")
+    @ApiOperation(value = "根据渠道ID删除渠道商品")
+    public R<Void> deleteChannelProdsBychannelId(@PathVariable Long channelId) {
+        channelProdService.deleteChannelProdsBychannelId(channelId);
+        return R.SUCCESS();
+    }
+
+    @DeleteMapping("/sku/{skuId}")
+    @ApiOperation(value = "根据SKU ID删除渠道商品")
+    public R<Void> deleteChannelProdsBySkuId(@PathVariable Long skuId) {
+        channelProdService.deleteChannelProdsBySkuId(skuId);
+        return R.SUCCESS();
+    }
+
+    @PutMapping("/batch/prices")
+    @ApiOperation(value = "批量更新渠道商品价格")
+    public R<Void> updateBatchPrices(@RequestBody List<ChannelProd> channelProds) {
+        channelProdService.updateBatchPrices(channelProds);
+        return R.SUCCESS();
+    }
+
+    @GetMapping("/channel/{channelId}/count")
+    @ApiOperation(value = "根据渠道ID统计商品数量")
+    public R<Integer> countBychannelId(@PathVariable Long channelId) {
+        Integer count = channelProdService.countByChannelId(channelId);
+        return R.SUCCESS(count);
+    }
+
+    @GetMapping("/sku/{skuId}/count")
+    @ApiOperation(value = "根据SKU ID统计渠道数量")
+    public R<Integer> countBySkuId(@PathVariable Long skuId) {
+        Integer count = channelProdService.countBySkuId(skuId);
+        return R.SUCCESS(count);
+    }
+
+    @GetMapping("/exists/channel/{channelId}/sku/{skuId}")
+    @ApiOperation(value = "检查渠道商品是否存在")
+    public R<Boolean> existsBychannelIdAndSkuId(
+            @PathVariable Long channelId,
+            @PathVariable Long skuId) {
+        Boolean exists = channelProdService.existsByChannelIdAndSkuId(channelId, skuId);
+        return R.SUCCESS(exists);
+    }
+
+
+
+    @GetMapping("/template/download")
+    @ApiOperation(value = "下载渠道商品导入模板")
+    public void downloadTemplate(HttpServletResponse response){
+            channelProdService.downloadTemplate(response);
+    }
+
+    @PostMapping("/import")
+    @ApiOperation(value = "导入渠道商品数据")
+    public R<String> importChannelProds(@RequestParam("file") MultipartFile file) {
+            String result = channelProdService.importChannelProds(file);
+            return R.SUCCESS(result);
+    }
+
+    @PostMapping("/export")
+    @ApiOperation(value = "导出渠道商品数据")
+    public void exportChannelProds(@RequestBody ChannelProd channelProd, HttpServletResponse response) {
+            channelProdService.exportChannelProds(channelProd, response);
+    }
+
+}

+ 141 - 0
yami-shop-platform/src/main/java/com/yami/shop/platform/controller/DeptController.java

@@ -0,0 +1,141 @@
+package com.yami.shop.platform.controller;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.yami.shop.bean.model.Dept;
+import com.yami.shop.common.util.PageParam;
+import com.yami.shop.common.util.R;
+import com.yami.shop.service.DeptService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiOperation;
+import lombok.AllArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.web.bind.annotation.*;
+
+import javax.validation.Valid;
+import java.util.List;
+
+/**
+ * 部门管理控制器
+ *
+ * @author
+ */
+@Slf4j
+@RestController
+@RequestMapping("/admin/dept")
+@AllArgsConstructor
+@Api(tags = "部门管理接口")
+public class DeptController {
+
+    private final DeptService deptService;
+
+    /**
+     * 获取部门列表
+     *
+     * @return 部门列表
+     */
+    @GetMapping("/list")
+    @ApiOperation(value = "获取部门列表", notes = "获取所有部门信息")
+    public R<List<Dept>> list() {
+        List<Dept> deptList = deptService.listAllDept();
+        return R.SUCCESS(deptList);
+    }
+
+    /**
+     * 分页获取部门列表
+     *
+     * @param page 分页参数
+     * @param dept 查询条件
+     * @return 部门分页数据
+     */
+    @GetMapping("/page")
+    @ApiOperation(value = "分页获取部门列表", notes = "分页获取部门信息")
+    public R<IPage<Dept>> page(PageParam<Dept> page, Dept dept) {
+        IPage<Dept> deptPage = deptService.page(page, null);
+        return R.SUCCESS(deptPage);
+    }
+
+    /**
+     * 根据ID获取部门详情
+     *
+     * @param deptId 部门ID
+     * @return 部门详情
+     */
+    @GetMapping("/{deptId}")
+    @ApiOperation(value = "根据ID获取部门详情", notes = "根据部门ID获取部门详细信息")
+    @ApiImplicitParam(name = "deptId", value = "部门ID", required = true, dataType = "Long", paramType = "path")
+    public R<Dept> info(@PathVariable("deptId") Long deptId) {
+        Dept dept = deptService.getById(deptId);
+        return R.SUCCESS(dept);
+    }
+
+    /**
+     * 添加部门
+     *
+     * @param dept 部门信息
+     * @return 添加结果
+     */
+    @PostMapping
+    @ApiOperation(value = "添加部门", notes = "添加新的部门信息")
+    public R<Boolean> save(@Valid @RequestBody Dept dept) {
+        Boolean result = deptService.saveDept(dept);
+        return R.SUCCESS(result);
+    }
+
+    /**
+     * 修改部门
+     *
+     * @param dept 部门信息
+     * @return 修改结果
+     */
+    @PutMapping
+    @ApiOperation(value = "修改部门", notes = "修改部门信息")
+    public R<Boolean> update(@Valid @RequestBody Dept dept) {
+        Boolean result = deptService.updateDept(dept);
+        return R.SUCCESS(result);
+    }
+
+
+
+    /**
+     * 删除部门
+     *
+     * @param deptId 部门ID
+     * @return 删除结果
+     */
+    @DeleteMapping("/{deptId}")
+    @ApiOperation(value = "删除部门", notes = "根据部门ID删除部门")
+    @ApiImplicitParam(name = "deptId", value = "部门ID", required = true, dataType = "Long", paramType = "path")
+    public R<Boolean> delete(@PathVariable("deptId") Long deptId) {
+        Boolean result = deptService.deleteDept(deptId);
+        return R.SUCCESS(result);
+    }
+
+    /**
+     * 获取部门树结构
+     *
+     * @return 部门树结构
+     */
+    @GetMapping("/tree")
+    @ApiOperation(value = "获取部门树结构", notes = "获取部门树形结构数据")
+    public R<List<Dept>> tree() {
+        List<Dept> tree = deptService.treeDept();
+        return R.SUCCESS(tree);
+    }
+
+    /**
+     * 根据父级部门ID获取子部门列表
+     *
+     * @param parentId 父级部门ID
+     * @return 子部门列表
+     */
+    @GetMapping("/listByParentId/{parentId}")
+    @ApiOperation(value = "根据父级部门ID获取子部门列表", notes = "根据父级部门ID获取子部门列表")
+    @ApiImplicitParam(name = "parentId", value = "父级部门ID", required = true, dataType = "Long", paramType = "path")
+    public R<List<Dept>> listByParentId(@PathVariable("parentId") Long parentId) {
+        List<Dept> deptList = deptService.listByParentId(parentId);
+        return R.SUCCESS(deptList);
+    }
+
+
+}

+ 116 - 0
yami-shop-platform/src/main/java/com/yami/shop/platform/controller/DeptUserController.java

@@ -0,0 +1,116 @@
+package com.yami.shop.platform.controller;
+
+import com.yami.shop.bean.model.DeptUser;
+import com.yami.shop.common.util.R;
+import com.yami.shop.service.DeptUserService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiOperation;
+import lombok.AllArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 部门用户关联控制器
+ *
+ * @author
+ */
+@Slf4j
+@RestController
+@RequestMapping("/admin/deptUser")
+@AllArgsConstructor
+@Api(tags = "部门用户关联接口")
+public class DeptUserController {
+
+    private final DeptUserService deptUserService;
+
+    /**
+     * 根据用户ID获取部门用户关联列表
+     *
+     * @param userId 用户ID
+     * @return 部门用户关联列表
+     */
+    @GetMapping("/listByUserId/{userId}")
+    @ApiOperation(value = "根据用户ID获取部门用户关联列表", notes = "根据用户ID获取部门用户关联列表")
+    @ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "String", paramType = "path")
+    public R<List<DeptUser>> listByUserId(@PathVariable("userId") String userId) {
+        List<DeptUser> deptUserList = deptUserService.listByUserId(userId);
+        return R.SUCCESS(deptUserList);
+    }
+
+    /**
+     * 根据部门ID获取部门用户关联列表
+     *
+     * @param deptId 部门ID
+     * @return 部门用户关联列表
+     */
+    @GetMapping("/listByDeptId/{deptId}")
+    @ApiOperation(value = "根据部门ID获取部门用户关联列表", notes = "根据部门ID获取部门用户关联列表")
+    @ApiImplicitParam(name = "deptId", value = "部门ID", required = true, dataType = "Long", paramType = "path")
+    public R<List<DeptUser>> listByDeptId(@PathVariable("deptId") Long deptId) {
+        List<DeptUser> deptUserList = deptUserService.listByDeptId(deptId);
+        return R.SUCCESS(deptUserList);
+    }
+
+    /**
+     * 保存用户部门关联
+     *
+     * @param userId  用户ID
+     * @param deptIds 部门ID列表
+     * @return 保存结果
+     */
+    @PostMapping("/saveUserDepts")
+    @ApiOperation(value = "保存用户部门关联", notes = "保存用户与部门的关联关系")
+    public R<Boolean> saveUserDepts(
+            @RequestParam("userId") String userId,
+            @RequestBody List<Long> deptIds) {
+        Boolean result = deptUserService.saveUserDept(userId, deptIds);
+        return R.SUCCESS(result);
+    }
+
+    /**
+     * 批量保存用户部门关联
+     *
+     * @param userIds 用户ID列表
+     * @param deptId  部门ID
+     * @return 保存结果
+     */
+    @PostMapping("/saveBatchUserDepts")
+    @ApiOperation(value = "批量保存用户部门关联", notes = "批量保存用户与部门的关联关系")
+    public R<Boolean> saveBatchUserDepts(
+            @RequestBody List<String> userIds,
+            @RequestParam("deptId") Long deptId) {
+        Boolean result = deptUserService.saveBatchUserDepts(userIds, deptId);
+        return R.SUCCESS(result);
+    }
+
+    /**
+     * 根据用户ID删除部门用户关联
+     *
+     * @param userId 用户ID
+     * @return 删除结果
+     */
+    @DeleteMapping("/deleteByUserId/{userId}")
+    @ApiOperation(value = "根据用户ID删除部门用户关联", notes = "根据用户ID删除部门用户关联")
+    @ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "String", paramType = "path")
+    public R<Boolean> deleteByUserId(@PathVariable("userId") String userId) {
+        Boolean result = deptUserService.deleteByUserId(userId);
+        return R.SUCCESS(result);
+    }
+
+    /**
+     * 根据部门ID删除部门用户关联
+     *
+     * @param deptId 部门ID
+     * @return 删除结果
+     */
+    @DeleteMapping("/deleteByDeptId/{deptId}")
+    @ApiOperation(value = "根据部门ID删除部门用户关联", notes = "根据部门ID删除部门用户关联")
+    @ApiImplicitParam(name = "deptId", value = "部门ID", required = true, dataType = "Long", paramType = "path")
+    public R<Boolean> deleteByDeptId(@PathVariable("deptId") Long deptId) {
+        Boolean result = deptUserService.deleteByDeptId(deptId);
+        return R.SUCCESS(result);
+    }
+}

+ 2 - 1
yami-shop-platform/src/main/java/com/yami/shop/platform/controller/FileController.java

@@ -17,6 +17,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.yami.shop.bean.model.AttachFile;
 import com.yami.shop.common.bean.Qiniu;
 import com.yami.shop.common.config.Constant;
+import com.yami.shop.common.exception.GlobalException;
 import com.yami.shop.common.exception.YamiShopBindException;
 import com.yami.shop.common.util.PageParam;
 import com.yami.shop.config.ShopConfig;
@@ -109,7 +110,7 @@ public class FileController {
 	@PutMapping("/updateFileName")
 	public R<Boolean> updateFileName(@RequestBody  AttachFile attachFile) {
 		if (Objects.isNull(attachFile.getFileName())){
-			throw new YamiShopBindException("图片名称不能为空");
+			throw new GlobalException("图片名称不能为空");
 		}
 		return R.SUCCESS(attachFileService.updateFileName(attachFile));
 	}

+ 2 - 1
yami-shop-platform/src/main/java/com/yami/shop/platform/controller/OrderController.java

@@ -17,6 +17,7 @@ import com.yami.shop.bean.model.OrderItem;
 import com.yami.shop.bean.model.UserAddrOrder;
 import com.yami.shop.bean.param.OrderParam;
 import com.yami.shop.bean.param.OrderPayParam;
+import com.yami.shop.common.exception.GlobalException;
 import com.yami.shop.common.exception.YamiShopBindException;
 import com.yami.shop.common.util.PageParam;
 import com.yami.shop.service.OrderItemService;
@@ -85,7 +86,7 @@ public class OrderController {
 
         Order order = orderService.getOne(new LambdaUpdateWrapper<Order>().eq(Order::getOrderNumber, orderNumber));
         if (order == null) {
-            throw new YamiShopBindException("未找到所在的订单");
+            throw new GlobalException("未找到所在的订单");
         }
         UserAddrOrder userAddrOrder = userAddrOrderService.getById(order.getAddrOrderId());
         order.setUserAddrOrder(userAddrOrder);

+ 2 - 1
yami-shop-platform/src/main/java/com/yami/shop/platform/controller/ProductController.java

@@ -26,6 +26,7 @@ import com.yami.shop.bean.param.OfflineHandleEventAuditParam;
 import com.yami.shop.bean.param.ProductParam;
 import com.yami.shop.bean.param.ProductScoreParam;
 import com.yami.shop.common.config.Constant;
+import com.yami.shop.common.exception.GlobalException;
 import com.yami.shop.common.exception.YamiShopBindException;
 import com.yami.shop.common.util.PageParam;
 import com.yami.shop.security.platform.util.SecurityUtils;
@@ -133,7 +134,7 @@ public class ProductController {
     public R<Void> offline(@RequestBody OfflineHandleEvent offlineHandleEvent) {
         Product dbProduct = productService.getProductByProdId(offlineHandleEvent.getHandleId());
         if (dbProduct == null) {
-            throw new YamiShopBindException("未找到刚商品的信息");
+            throw new GlobalException("未找到刚商品的信息");
         }
         Long sysUserId = SecurityUtils.getSysUser().getUserId();
         productService.offline(offlineHandleEvent.getHandleId(), offlineHandleEvent.getOfflineReason(), sysUserId);

+ 3 - 2
yami-shop-platform/src/main/java/com/yami/shop/platform/controller/ScoreProductController.java

@@ -20,6 +20,7 @@ import com.yami.shop.bean.model.*;
 import com.yami.shop.bean.param.ProductParam;
 import com.yami.shop.bean.param.ProductScoreParam;
 import com.yami.shop.common.config.Constant;
+import com.yami.shop.common.exception.GlobalException;
 import com.yami.shop.common.exception.YamiShopBindException;
 import com.yami.shop.common.util.PageParam;
 import com.yami.shop.common.util.R;
@@ -132,7 +133,7 @@ public class ScoreProductController {
         Product dbProduct = productService.getProductByProdId(prodId);
         if (!(Objects.equals(dbProduct.getStatus(), ProdStatusEnums.NORMAL.getValue())
                 || Objects.equals(dbProduct.getStatus(), ProdStatusEnums.SHOP_OFFLINE.getValue()))) {
-            throw new YamiShopBindException("商品不在正常状态,修改失败");
+            throw new GlobalException("商品不在正常状态,修改失败");
         }
         Product product = new Product();
         product.setProdId(prodId);
@@ -212,7 +213,7 @@ public class ScoreProductController {
             }
         }
         if (isAllUnUse) {
-            throw new YamiShopBindException("至少要启用一种商品规格");
+            throw new GlobalException("至少要启用一种商品规格");
         }
     }
 

+ 4 - 3
yami-shop-platform/src/main/java/com/yami/shop/platform/controller/ShopAuditingController.java

@@ -20,6 +20,7 @@ import com.yami.shop.bean.model.ShopDetail;
 import com.yami.shop.bean.param.AuditingInfoParam;
 import com.yami.shop.bean.param.OfflineHandleEventAuditParam;
 import com.yami.shop.common.annotation.SysLog;
+import com.yami.shop.common.exception.GlobalException;
 import com.yami.shop.common.exception.YamiShopBindException;
 import com.yami.shop.common.util.PageParam;
 import com.yami.shop.security.platform.util.SecurityUtils;
@@ -99,7 +100,7 @@ public class ShopAuditingController {
 
         ShopAuditing shopAuditing = shopAuditingService.getOne(new LambdaQueryWrapper<ShopAuditing>().eq(ShopAuditing::getShopId, shopId));
         if (Objects.equals(shopAuditing.getStatus(), AuditStatus.SUCCESSAUDIT.value())) {
-            throw new YamiShopBindException("商家已经审核成功,无需再次审核");
+            throw new GlobalException("商家已经审核成功,无需再次审核");
         }
         shopAuditing.setUpdateTime(new Date());
         shopAuditing.setRemarks(shopAuditingParam.getRemarks());
@@ -157,10 +158,10 @@ public class ShopAuditingController {
 //    public ResponseEntity<Boolean> lowerShelfShop(@RequestBody OfflineHandleEvent offlineHandleEvent) {
 //        ShopDetail shopDetail = shopDetailService.getShopDetailByShopId(offlineHandleEvent.getHandleId());
 //        if (shopDetail == null) {
-//            throw new YamiShopBindException("店铺信息不存在");
+//            throw new GlobalException("店铺信息不存在");
 //        }
 //        if (!Objects.equals(shopDetail.getShopStatus(), ShopStatus.OPEN.value())) {
-//            throw new YamiShopBindException("店铺不处于营业状态,不能进行下线");
+//            throw new GlobalException("店铺不处于营业状态,不能进行下线");
 //        }
 //        shopDetail.setShopStatus(ShopStatus.STOP.value());
 //        return ResponseEntity.ok(shopDetailService.updateById(shopDetail));

+ 4 - 3
yami-shop-platform/src/main/java/com/yami/shop/platform/controller/ShopDetailController.java

@@ -15,6 +15,7 @@ import com.yami.shop.bean.model.OfflineHandleEvent;
 import com.yami.shop.bean.model.ShopDetail;
 import com.yami.shop.bean.model.User;
 import com.yami.shop.bean.param.OfflineHandleEventAuditParam;
+import com.yami.shop.common.exception.GlobalException;
 import com.yami.shop.common.exception.YamiShopBindException;
 import com.yami.shop.common.util.RedisUtil;
 import com.yami.shop.security.comment.constants.SecurityConstants;
@@ -78,10 +79,10 @@ public class ShopDetailController {
         Long sysUserId = SecurityUtils.getSysUser().getUserId();
         ShopDetail shopDetail = shopDetailService.getShopDetailByShopId(offlineHandleEvent.getHandleId());
         if (shopDetail == null) {
-            throw new YamiShopBindException("未找到该店铺信息");
+            throw new GlobalException("未找到该店铺信息");
         }
         if (!Objects.equals(shopDetail.getShopStatus(), ShopStatus.OPEN.value())) {
-            throw new YamiShopBindException("店铺不处于营业状态,不能进行下线");
+            throw new GlobalException("店铺不处于营业状态,不能进行下线");
         }
         shopDetailService.offline(shopDetail, offlineHandleEvent.getOfflineReason(), sysUserId);
 
@@ -118,7 +119,7 @@ public class ShopDetailController {
         Long sysUserId = SecurityUtils.getSysUser().getUserId();
         ShopDetail shopDetail = shopDetailService.getShopDetailByShopId(offlineHandleEventAuditParam.getHandleId());
         if (shopDetail == null) {
-            throw new YamiShopBindException("未找到店铺信息");
+            throw new GlobalException("未找到店铺信息");
         }
         shopDetailService.auditOfflineShop(offlineHandleEventAuditParam, sysUserId);
 

+ 4 - 3
yami-shop-platform/src/main/java/com/yami/shop/platform/controller/ShopWithdrawCashController.java

@@ -13,6 +13,7 @@ import com.yami.shop.bean.enums.ShopWalletChangeReason;
 import com.yami.shop.bean.model.ShopDetail;
 import com.yami.shop.bean.model.ShopWithdrawCash;
 import com.yami.shop.common.annotation.SysLog;
+import com.yami.shop.common.exception.GlobalException;
 import com.yami.shop.common.exception.YamiShopBindException;
 import com.yami.shop.common.util.Arith;
 import com.yami.shop.common.util.PageParam;
@@ -80,17 +81,17 @@ public class ShopWithdrawCashController {
     public R<Void> audit(@RequestBody ShopWithdrawCash shopWithdrawCash) {
         ShopWithdrawCash dbShopWithdrawCash = shopWithdrawCashService.getById(shopWithdrawCash.getCashId());
         if (dbShopWithdrawCash == null) {
-            throw new YamiShopBindException("未找到申请信息");
+            throw new GlobalException("未找到申请信息");
         }
         ShopDetail shopdetail = shopDetailService.getShopDetailByShopId(dbShopWithdrawCash.getShopId());
         if (shopdetail == null) {
-            throw new YamiShopBindException("未找到该店铺信息");
+            throw new GlobalException("未找到该店铺信息");
         }
         AppConnect appConnect = appConnectService.getOne(new LambdaQueryWrapper<AppConnect>()
                 .eq(AppConnect::getAppId, 1)
                 .eq(AppConnect::getUserId, shopdetail.getUserId()));
         if (appConnect == null) {
-            throw new YamiShopBindException("未找到该店铺身份信息");
+            throw new GlobalException("未找到该店铺身份信息");
         }
         shopWithdrawCash.setCreateTime(null);
 

+ 1 - 0
yami-shop-platform/src/main/java/com/yami/shop/platform/controller/hb/GoodsController.java

@@ -49,6 +49,7 @@ public class GoodsController {
      * @return 商品响应
      */
     @PostMapping("/update")
+    @ApiOperation(value = "修改商品信息", notes = "海博新增商品信息回调接口")
     public HBR updateGoods(@RequestBody JSONObject HBRequest) {
         log.info("海博变更商品{}",HBRequest);
         return goodsService.updateGoods(HBRequest);

+ 5 - 4
yami-shop-platform/src/main/java/com/yami/shop/platform/task/OrderRefundTask.java

@@ -13,6 +13,7 @@ import com.yami.shop.bean.model.OrderRefund;
 import com.yami.shop.bean.param.OrderRefundParam;
 import com.yami.shop.common.config.Constant;
 import com.yami.shop.common.enums.YamiHttpStatus;
+import com.yami.shop.common.exception.GlobalException;
 import com.yami.shop.common.exception.YamiShopBindException;
 import com.yami.shop.delivery.comment.model.DeliveryOrder;
 import com.yami.shop.delivery.comment.service.DeliveryOrderService;
@@ -83,17 +84,17 @@ public class OrderRefundTask {
                 // 获取退款信息
                 OrderRefundDto orderRefundDto = orderRefundService.getOrderRefundByRefundSn(orderRefund.getRefundSn());
                 if (orderRefundDto == null) {
-                    throw new YamiShopBindException("退款单不存在");
+                    throw new GlobalException("退款单不存在");
                 }
                 if (orderRefundDto.getDecisionTime() == null) {
-                    throw new YamiShopBindException("请先确定退款,才能发起退款操作");
+                    throw new GlobalException("请先确定退款,才能发起退款操作");
                 }
 
                 if (orderRefundDto.getRefundTime() != null) {
-                    throw new YamiShopBindException("已退款成功,无法再申请退款操作");
+                    throw new GlobalException("已退款成功,无法再申请退款操作");
                 }
                 if (Objects.equals(-1, orderRefundDto.getReturnMoneySts())) {
-                    throw new YamiShopBindException("买家已取消申请");
+                    throw new GlobalException("买家已取消申请");
                 }
                 // 提交退款请求
                 orderRefundService.submitWxRefund(orderRefundDto);

Неке датотеке нису приказане због велике количине промена