Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
002baf3ffd
@ -207,6 +207,7 @@ public class ProductMappingServiceImpl extends BaseServiceImpl<ProductMappingMap
|
|||||||
*/
|
*/
|
||||||
@Transactional
|
@Transactional
|
||||||
public void dealData(List<ShopProductBase> shopProductBaseList,Map shopProductSpecItemMap,Map ShopBaseProductSpecMap, Map<String,ProductMapping> productMappingMap,boolean isUpdate,String isPublish){
|
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);
|
List<ShopProductItem> shopProductItems=findShopProductItemsList(shopProductBaseList);
|
||||||
Map<String,Integer> shopProductItemCategoryIdMap=new HashMap<>();
|
Map<String,Integer> shopProductItemCategoryIdMap=new HashMap<>();
|
||||||
shopProductItemCategoryIdMap=shopProductItems.stream().collect(Collectors.toMap(ShopProductItem::getItem_number,ShopProductItem::getCategory_id,
|
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);
|
// shopProductItems.get(i).setItem_enable(StateCode.PRODUCT_STATE_OFF_THE_SHELF);
|
||||||
}
|
}
|
||||||
if(StringUtils.isNotEmpty(shopProductBaseList.get(i).getProduct_image())){
|
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);
|
shopProductBaseList.get(i).setProduct_state_id(StateCode.PRODUCT_STATE_NORMAL);
|
||||||
shopProductIndex.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);
|
shopProductItems.get(i).setItem_enable(StateCode.PRODUCT_STATE_NORMAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user