From 99a399b245510a0e36de0251b4af3958a86d56fa Mon Sep 17 00:00:00 2001 From: SUCH HAVE YOU <2207141659@qq.com> Date: Fri, 8 Nov 2024 15:13:51 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E6=9B=B4=E6=96=B0=E5=AF=B9=E8=BF=90?= =?UTF-8?q?=E8=B4=B9=E6=A8=A1=E6=9D=BF=E7=9A=84name=E9=95=BF=E5=BA=A6?= =?UTF-8?q?=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/ShopDeliveryTemplateServiceImpl.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/skyeye-shop/shop-store/src/main/java/com/skyeye/delivery/service/impl/ShopDeliveryTemplateServiceImpl.java b/skyeye-shop/shop-store/src/main/java/com/skyeye/delivery/service/impl/ShopDeliveryTemplateServiceImpl.java index 3c77988b..fc4d80fc 100644 --- a/skyeye-shop/shop-store/src/main/java/com/skyeye/delivery/service/impl/ShopDeliveryTemplateServiceImpl.java +++ b/skyeye-shop/shop-store/src/main/java/com/skyeye/delivery/service/impl/ShopDeliveryTemplateServiceImpl.java @@ -4,7 +4,6 @@ package com.skyeye.delivery.service.impl; -import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; import cn.hutool.json.JSONUtil; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; @@ -72,15 +71,18 @@ public class ShopDeliveryTemplateServiceImpl extends SkyeyeBusinessServiceImpl 100) { + throw new CustomException("运费模板名称过长"); + } + if (!(shopDeliveryTemplate.getOrderBy() instanceof Integer)){ + throw new CustomException("排序值类型错误,请输入整数数字"); } //判断StoreId是否存在 if (StrUtil.isNotEmpty(shopDeliveryTemplate.getStoreId())) { ShopStore shopStore = shopStoreService.selectById(shopDeliveryTemplate.getStoreId()); //判断shopStore是否为空,如果为空,则抛出异常 if (StrUtil.isNotEmpty(shopStore.getId())) { - throw new CustomException("门店不存在: " + shopDeliveryTemplate.getName()); + throw new CustomException("门店不存在: " + shopStore); } } }