From 7c88de3a071d59b67452fb7848c3b6af3c56e0c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=9D=BE?= <8605635+zhang3064194730@user.noreply.gitee.com> Date: Sat, 11 Oct 2025 17:34:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=AE=A2=E7=AB=8B=E5=87=8F=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/MkShopConsumeDiscountRecordServiceImpl.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cash-service/market-service/src/main/java/com/czg/service/market/service/impl/MkShopConsumeDiscountRecordServiceImpl.java b/cash-service/market-service/src/main/java/com/czg/service/market/service/impl/MkShopConsumeDiscountRecordServiceImpl.java index 170c7deeb..b04e67564 100644 --- a/cash-service/market-service/src/main/java/com/czg/service/market/service/impl/MkShopConsumeDiscountRecordServiceImpl.java +++ b/cash-service/market-service/src/main/java/com/czg/service/market/service/impl/MkShopConsumeDiscountRecordServiceImpl.java @@ -19,6 +19,7 @@ import com.czg.market.entity.MkShopConsumeDiscountRecord; import com.czg.market.service.MkShopConsumeDiscountRecordService; import com.czg.service.market.mapper.MkShopConsumeDiscountRecordMapper; import jakarta.annotation.Resource; +import lombok.extern.slf4j.Slf4j; import org.apache.dubbo.auth.v1alpha1.Ca; import org.apache.dubbo.config.annotation.DubboReference; import org.springframework.stereotype.Service; @@ -33,6 +34,7 @@ import java.util.Random; * @author zs * @since 2025-09-17 */ +@Slf4j @Service public class MkShopConsumeDiscountRecordServiceImpl extends ServiceImpl implements MkShopConsumeDiscountRecordService { @Resource @@ -116,14 +118,17 @@ public class MkShopConsumeDiscountRecordServiceImpl extends ServiceImpl 0) { - throw new ApiNotPrintException("新客立减仅新用户可用"); +// throw new ApiNotPrintException("新客立减仅新用户可用"); + log.info("新客立减仅限新用户使用"); + return null; } MkConsumeDiscountVO consumeDiscountVO = canUse(shopId, userId); DateTime now = DateUtil.date(); if (!now.isAfterOrEquals(DateUtil.date(consumeDiscountVO.getStartTime())) || !now.isBeforeOrEquals(DateUtil.date(consumeDiscountVO.getEndTime()))) { - throw new ApiNotPrintException("此时间段未开启新客立减"); + log.info("此时间段未开启新客立减"); + return null; } MkShopConsumeDiscountRecord shopConsumeDiscountRecord = new MkShopConsumeDiscountRecord(); shopConsumeDiscountRecord.setShopId(shopId);