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);