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