同步时 如果存在 保留某些字段
This commit is contained in:
@@ -500,6 +500,15 @@ public class ShopSyncServiceImpl implements ShopSyncService {
|
||||
if (finalMap.containsKey(shopId)) {
|
||||
Product childEntity = finalMap.get(shopId);
|
||||
newEntity.setId(childEntity.getId());
|
||||
newEntity.setStartTime(null);
|
||||
newEntity.setEndTime(null);
|
||||
newEntity.setDays(null);
|
||||
newEntity.setIsHot(null);
|
||||
newEntity.setIsStock(null);
|
||||
newEntity.setIsSoldStock(null);
|
||||
newEntity.setStockNumber(null);
|
||||
newEntity.setIsSale(null);
|
||||
newEntity.setIsRefundStock(null);
|
||||
productService.updateById(newEntity);
|
||||
} else {
|
||||
newEntity.setId(null);
|
||||
@@ -728,6 +737,9 @@ public class ShopSyncServiceImpl implements ShopSyncService {
|
||||
if (childSkuMap.containsKey(skus.getId())) {
|
||||
ProdSku childSku = childSkuMap.get(skus.getId());
|
||||
newSku.setId(childSku.getId());
|
||||
newSku.setIsGrounding(null);
|
||||
newSku.setIsPauseSale(null);
|
||||
newSku.setRealSalesNumber(null);
|
||||
} else {
|
||||
newSku.setId(null);
|
||||
}
|
||||
@@ -854,6 +866,7 @@ public class ShopSyncServiceImpl implements ShopSyncService {
|
||||
if (finalMap.containsKey(shopId)) {
|
||||
ConsInfo childEntity = finalMap.get(shopId);
|
||||
newEntity.setId(childEntity.getId());
|
||||
newEntity.setStockNumber(null);
|
||||
consInfoService.updateById(newEntity);
|
||||
} else {
|
||||
newEntity.setId(null);
|
||||
|
||||
Reference in New Issue
Block a user