From ebce479a2d0634c90e5f80045e204248336b410d Mon Sep 17 00:00:00 2001
From: yujian <yujian@123.com>
Date: 星期四, 30 五月 2019 09:42:37 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 fanli/src/main/java/com/yeshi/fanli/service/impl/taobao/TaoBaoGoodsUpdateServiceImpl.java |   26 +++++++++++---------------
 1 files changed, 11 insertions(+), 15 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/taobao/TaoBaoGoodsUpdateServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/taobao/TaoBaoGoodsUpdateServiceImpl.java
index c34e343..7fcd8d0 100644
--- a/fanli/src/main/java/com/yeshi/fanli/service/impl/taobao/TaoBaoGoodsUpdateServiceImpl.java
+++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/taobao/TaoBaoGoodsUpdateServiceImpl.java
@@ -19,7 +19,6 @@
 import com.yeshi.fanli.exception.taobao.TaobaoGoodsUpdateException;
 import com.yeshi.fanli.service.inter.activity.ActivityService;
 import com.yeshi.fanli.service.inter.goods.CommonGoodsService;
-import com.yeshi.fanli.service.inter.goods.RecommendSectionGoodsService;
 import com.yeshi.fanli.service.inter.lable.QualityFactoryService;
 import com.yeshi.fanli.service.inter.taobao.TaoBaoGoodsUpdateService;
 import com.yeshi.fanli.util.BeanUtil;
@@ -29,8 +28,6 @@
 
 @Service
 public class TaoBaoGoodsUpdateServiceImpl implements TaoBaoGoodsUpdateService {
-	@Resource
-	private RecommendSectionGoodsService recommendSectionGoodsService;
 
 	@Resource
 	private ActivityService activityService;
@@ -61,7 +58,7 @@
 				}
 
 			} catch (TaobaoGoodsDownException e) {
-				 offlineTaoBaoGoods(goods.getAuctionId());
+				offlineTaoBaoGoods(goods.getAuctionId());
 			} catch (Exception e) {
 
 			}
@@ -71,11 +68,8 @@
 	@Transactional
 	@Override
 	public void deleteTaoBaoGoods(Long auctionId) {
-		// 鍒犻櫎棣栭〉鎺ㄨ崘鏁版嵁
-		recommendSectionGoodsService.deleteRecommendSectionGoodsByTbAuctionId(auctionId);
-
 		// 鍒犻櫎绮鹃�夊簱鐩稿叧鐨勬暟鎹�
-		qualityFactoryService.deleteByTbAuctionId(auctionId);
+		qualityFactoryService.deleteByTaoBaoGoodsId(auctionId);
 
 		// 鍒犻櫎鍟嗗搧鏈韩鏁版嵁
 		taoBaoGoodsBriefMapper.deleteByAuctionId(auctionId);
@@ -83,14 +77,12 @@
 
 	@Transactional
 	@Override
-	public void  offlineTaoBaoGoods(Long auctionId) {
-		// 鍒犻櫎棣栭〉鎺ㄨ崘鏁版嵁
-		recommendSectionGoodsService.deleteRecommendSectionGoodsByTbAuctionId(auctionId);
+	public void offlineTaoBaoGoods(Long auctionId) {
 		// 鏇存柊鍔ㄦ�佹暟鎹�
 		activityService.downTaoBaoGoods(auctionId);
 
 		// 鍒犻櫎绮鹃�夊簱鐩稿叧鐨勬暟鎹�
-		qualityFactoryService.deleteByTbAuctionId(auctionId);
+		qualityFactoryService.deleteByTaoBaoGoodsId(auctionId);
 
 		// 鍒犻櫎鍟嗗搧鏈韩鏁版嵁
 		taoBaoGoodsBriefMapper.deleteByAuctionId(auctionId);
@@ -124,6 +116,9 @@
 				taoBaoGoodsBriefMapper.updateByPrimaryKeySelective(updateGoods);
 
 			}
+
+		// 鏇存柊鍔ㄦ�佸晢鍝�
+		activityService.updateRecommendActivityGoods(goods);
 	}
 
 	@Override
@@ -149,6 +144,7 @@
 		// 鏇存柊鏍囬锛屽晢鍝佸浘鐗囷紝閿�閲忥紝浠锋牸锛屽埜淇℃伅锛岃繑鍒╀俊鎭紝搴楅摵淇℃伅锛屽垎绫讳俊鎭�
 		updateGoods.setTitle(goods.getTitle());
 		updateGoods.setPictUrl(goods.getPictUrl());
+		updateGoods.setPictUrlWhite(goods.getPictUrlWhite());
 		updateGoods.setImgList(goods.getImgList());
 		updateGoods.setBiz30day(goods.getBiz30day());
 		updateGoods.setZkPrice(goods.getZkPrice());
@@ -186,6 +182,7 @@
 		updateGoods.setRootCategoryName(goods.getRootCategoryName());
 		updateGoods.setLeafCatId(goods.getLeafCatId());
 		updateGoods.setLeafName(goods.getLeafName());
+		updateGoods.setMaterialLibType(goods.getMaterialLibType());
 
 		return updateGoods;
 	}
@@ -198,14 +195,13 @@
 		List<TaoBaoGoodsBrief> updateList = new ArrayList<>();
 
 		for (TaoBaoGoodsBrief goods : goodsList) {
-
 			if (goods.getId() == null || goods.getId() == 0L) {
 				throw new TaobaoGoodsUpdateException(1, "鍟嗗搧涓婚敭ID涓虹┖");
 			}
-
+			
+			// 闇�瑕佹洿鏂扮殑淇℃伅
 			TaoBaoGoodsBrief updateGoods = getUpdateTaoBaoGoodsBrief(goods);
 			updateGoods.setCreatetime(goods.getCreatetime());
-
 			updateList.add(updateGoods);
 		}
 

--
Gitblit v1.8.0