发布后更改发版时间

This commit is contained in:
liyj 2025-10-31 10:22:41 +08:00
parent a0b92c219e
commit a20ca370b9

View File

@ -207,6 +207,7 @@ public class ProductMappingServiceImpl extends BaseServiceImpl<ProductMappingMap
*/
@Transactional
public void dealData(List<ShopProductBase> shopProductBaseList,Map shopProductSpecItemMap,Map ShopBaseProductSpecMap, Map<String,ProductMapping> productMappingMap,boolean isUpdate,String isPublish){
Date currentDate=new Date();
List<ShopProductItem> shopProductItems=findShopProductItemsList(shopProductBaseList);
Map<String,Integer> shopProductItemCategoryIdMap=new HashMap<>();
shopProductItemCategoryIdMap=shopProductItems.stream().collect(Collectors.toMap(ShopProductItem::getItem_number,ShopProductItem::getCategory_id,
@ -243,8 +244,10 @@ public class ProductMappingServiceImpl extends BaseServiceImpl<ProductMappingMap
// shopProductItems.get(i).setItem_enable(StateCode.PRODUCT_STATE_OFF_THE_SHELF);
}
if(StringUtils.isNotEmpty(shopProductBaseList.get(i).getProduct_image())){
shopProductBaseList.get(i).setProduct_sale_time(currentDate);
shopProductBaseList.get(i).setProduct_state_id(StateCode.PRODUCT_STATE_NORMAL);
shopProductIndex.setProduct_state_id(StateCode.PRODUCT_STATE_NORMAL);
shopProductIndex.setProduct_sale_time(currentDate.getTime());
shopProductItems.get(i).setItem_enable(StateCode.PRODUCT_STATE_NORMAL);
}