解决线程不安全的时间操作,防止时间溢出
This commit is contained in:
parent
8815fb9d94
commit
32ef77830d
@ -5373,7 +5373,7 @@ public class ShopProductBaseServiceImpl extends BaseServiceImpl<ShopProductBaseM
|
|||||||
// shopProductIndexList.get(i).setProduct_unit_points(BigDecimal.ZERO);
|
// shopProductIndexList.get(i).setProduct_unit_points(BigDecimal.ZERO);
|
||||||
shopProductIndexList.get(i).setProduct_unit_price_max(base.getProduct_market_price());
|
shopProductIndexList.get(i).setProduct_unit_price_max(base.getProduct_market_price());
|
||||||
shopProductIndexList.get(i).setProduct_unit_sp(Convert.toBigDecimal(base.getProduct_unit_sp()));
|
shopProductIndexList.get(i).setProduct_unit_sp(Convert.toBigDecimal(base.getProduct_unit_sp()));
|
||||||
shopProductIndexList.get(i).setProduct_sale_time(base.getProduct_sale_time().getTime());
|
// shopProductIndexList.get(i).setProduct_sale_time(base.getProduct_sale_time().getTime());
|
||||||
shopProductIndexList.get(i).setProduct_verify_id(base.getProduct_verify_id());
|
shopProductIndexList.get(i).setProduct_verify_id(base.getProduct_verify_id());
|
||||||
shopProductIndexList.get(i).setProduct_state_id(base.getProduct_state_id());
|
shopProductIndexList.get(i).setProduct_state_id(base.getProduct_state_id());
|
||||||
shopProductIndexList.get(i).setProduct_src_id(existId);
|
shopProductIndexList.get(i).setProduct_src_id(existId);
|
||||||
@ -5420,7 +5420,7 @@ public class ShopProductBaseServiceImpl extends BaseServiceImpl<ShopProductBaseM
|
|||||||
shopProductIndexList.get(i).setProduct_unit_points(BigDecimal.ZERO);
|
shopProductIndexList.get(i).setProduct_unit_points(BigDecimal.ZERO);
|
||||||
shopProductIndexList.get(i).setProduct_unit_price_max(base.getProduct_market_price());
|
shopProductIndexList.get(i).setProduct_unit_price_max(base.getProduct_market_price());
|
||||||
shopProductIndexList.get(i).setProduct_unit_sp(Convert.toBigDecimal(base.getProduct_unit_sp()));
|
shopProductIndexList.get(i).setProduct_unit_sp(Convert.toBigDecimal(base.getProduct_unit_sp()));
|
||||||
shopProductIndexList.get(i).setProduct_sale_time(base.getProduct_sale_time().getTime());
|
//shopProductIndexList.get(i).setProduct_sale_time(base.getProduct_sale_time().getTime());
|
||||||
shopProductIndexList.get(i).setProduct_verify_id(base.getProduct_verify_id());
|
shopProductIndexList.get(i).setProduct_verify_id(base.getProduct_verify_id());
|
||||||
shopProductIndexList.get(i).setProduct_state_id(base.getProduct_state_id());
|
shopProductIndexList.get(i).setProduct_state_id(base.getProduct_state_id());
|
||||||
// 判断店铺是否开启
|
// 判断店铺是否开启
|
||||||
|
|||||||
@ -799,8 +799,7 @@ public abstract class SyncBaseThirdSxAbstract{
|
|||||||
|
|
||||||
ShopProductBase shopProductBase = new ShopProductBase();
|
ShopProductBase shopProductBase = new ShopProductBase();
|
||||||
shopProductBase.setCategoryId(categoryId);
|
shopProductBase.setCategoryId(categoryId);
|
||||||
long seconds=System.currentTimeMillis();
|
shopProductBase.setProduct_sale_time(currentDate);
|
||||||
shopProductBase.setProduct_sale_time(Date.from(Instant.now().plusSeconds(seconds))); //10分钟
|
|
||||||
shopProductBase.setStore_id(storeIdInt);
|
shopProductBase.setStore_id(storeIdInt);
|
||||||
shopProductBase.setProduct_number((String) jsonObj.get("product_number"));
|
shopProductBase.setProduct_number((String) jsonObj.get("product_number"));
|
||||||
|
|
||||||
@ -867,7 +866,7 @@ public abstract class SyncBaseThirdSxAbstract{
|
|||||||
// ShopProductIndex
|
// ShopProductIndex
|
||||||
ShopProductIndex shopProductIndex = new ShopProductIndex();
|
ShopProductIndex shopProductIndex = new ShopProductIndex();
|
||||||
shopProductIndex.setProduct_add_time(currentDate.getTime());
|
shopProductIndex.setProduct_add_time(currentDate.getTime());
|
||||||
shopProductIndex.setProduct_sale_time(seconds);
|
shopProductIndex.setProduct_sale_time(currentDate.getTime());
|
||||||
shopProductIndex.setStore_category_ids(""); // 店铺分类编号(DOT)
|
shopProductIndex.setStore_category_ids(""); // 店铺分类编号(DOT)
|
||||||
shopProductIndex.setProduct_tags("");// 商品标签(DOT)
|
shopProductIndex.setProduct_tags("");// 商品标签(DOT)
|
||||||
shopProductIndex.setBrand_id(0);
|
shopProductIndex.setBrand_id(0);
|
||||||
|
|||||||
@ -591,6 +591,8 @@ public class SyncThirdDataServiceImpl extends SyncBaseThirdSxAbstract implements
|
|||||||
// Map shopProductSpecItemMap = shopProductSpecItemService.getExistItem(Integer.valueOf(storeId));//切割缓存
|
// Map shopProductSpecItemMap = shopProductSpecItemService.getExistItem(Integer.valueOf(storeId));//切割缓存
|
||||||
// Map productMappingMap = productMappingService.getProductMapping(Integer.valueOf(storeId));//切割缓存
|
// Map productMappingMap = productMappingService.getProductMapping(Integer.valueOf(storeId));//切割缓存
|
||||||
// Map ShopBaseProductSpecMap = baseProductSpecService.getShopBaseProductSpecMap(Integer.valueOf(storeId));//切割商品缓存
|
// Map ShopBaseProductSpecMap = baseProductSpecService.getShopBaseProductSpecMap(Integer.valueOf(storeId));//切割商品缓存
|
||||||
|
// long seconds=System.currentTimeMillis();
|
||||||
|
// Date productSaleTime=Date.from(Instant.now().plusSeconds(seconds));
|
||||||
for (int i = 0; i < newFolders.size(); i++) {
|
for (int i = 0; i < newFolders.size(); i++) {
|
||||||
final int taskId = i;
|
final int taskId = i;
|
||||||
final String isNegativeAllowed = storeDbConfig.getIsNegativeAllowed();
|
final String isNegativeAllowed = storeDbConfig.getIsNegativeAllowed();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user