From 072bf26b129808dd4067bf29178c102555f3b46b Mon Sep 17 00:00:00 2001 From: liyj <1617420630@qq.com> Date: Tue, 28 Oct 2025 10:47:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=8A=E6=9E=B6=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E4=B8=8D=E5=87=86=E7=A1=AE,=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E5=BA=93=E5=AD=98=E5=90=8C=E6=AD=A5=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shop/sync/service/impl/SyncBaseThirdSxAbstract.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/mall-shop/src/main/java/com/suisung/mall/shop/sync/service/impl/SyncBaseThirdSxAbstract.java b/mall-shop/src/main/java/com/suisung/mall/shop/sync/service/impl/SyncBaseThirdSxAbstract.java index 8b0450ee..05447fd4 100644 --- a/mall-shop/src/main/java/com/suisung/mall/shop/sync/service/impl/SyncBaseThirdSxAbstract.java +++ b/mall-shop/src/main/java/com/suisung/mall/shop/sync/service/impl/SyncBaseThirdSxAbstract.java @@ -59,6 +59,7 @@ import org.springframework.stereotype.Service; import java.math.BigDecimal; import java.text.ParseException; +import java.time.Instant; import java.util.*; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReference; @@ -795,7 +796,8 @@ public abstract class SyncBaseThirdSxAbstract{ ShopProductBase shopProductBase = new ShopProductBase(); shopProductBase.setCategoryId(categoryId); - shopProductBase.setProduct_sale_time(Convert.toDate(DateUtil.current() + 600)); //10分钟 + long seconds=System.currentTimeMillis(); + shopProductBase.setProduct_sale_time(Date.from(Instant.now().plusSeconds(seconds))); //10分钟 shopProductBase.setStore_id(storeIdInt); shopProductBase.setProduct_number((String) jsonObj.get("product_number")); @@ -821,7 +823,7 @@ public abstract class SyncBaseThirdSxAbstract{ } BigDecimal stock= jsonObj.getBigDecimal("stock");//库存 if(ObjectUtil.equals(isNegativeAllowed,DicEnum.YESORNO_1.getCode())&&stock.compareTo(BigDecimal.ZERO)<=0){//允许负库存,每次都加满,就是一直有售卖 - stock=new BigDecimal("99"); + stock=new BigDecimal("500"); } //商品总量 if(ObjectUtil.isNotEmpty(jsonObj.getStr("unit"))&&ObjectUtil.isNotEmpty(jsonObj.getStr("stock")) @@ -862,7 +864,7 @@ public abstract class SyncBaseThirdSxAbstract{ // ShopProductIndex ShopProductIndex shopProductIndex = new ShopProductIndex(); shopProductIndex.setProduct_add_time(currentDate.getTime()); - shopProductIndex.setProduct_sale_time(DateUtil.current() + 600); //10分钟 + shopProductIndex.setProduct_sale_time(seconds); shopProductIndex.setStore_category_ids(""); // 店铺分类编号(DOT) shopProductIndex.setProduct_tags("");// 商品标签(DOT) shopProductIndex.setBrand_id(0);