From 2aeddf5d098b99d28783c6a73bfa67414aa1f2fe Mon Sep 17 00:00:00 2001
From: 喻健 <喻健@Admin>
Date: 星期六, 15 十二月 2018 10:11:42 +0800
Subject: [PATCH] 精选库代码优化:更新数据加入更新时间,删除无用代码

---
 fanli/src/main/java/com/yeshi/fanli/service/impl/goods/TaoBaoGoodsBriefServiceImpl.java |   49 +------------------------------------------------
 1 files changed, 1 insertions(+), 48 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/goods/TaoBaoGoodsBriefServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/goods/TaoBaoGoodsBriefServiceImpl.java
index 37b740e..d9d2b7a 100644
--- a/fanli/src/main/java/com/yeshi/fanli/service/impl/goods/TaoBaoGoodsBriefServiceImpl.java
+++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/goods/TaoBaoGoodsBriefServiceImpl.java
@@ -4,7 +4,6 @@
 import java.math.BigDecimal;
 import java.util.Date;
 import java.util.List;
-import java.util.Map;
 
 import javax.annotation.Resource;
 import javax.transaction.Transactional;
@@ -14,6 +13,7 @@
 import org.hibernate.Session;
 import org.springframework.orm.hibernate4.HibernateCallback;
 import org.springframework.stereotype.Service;
+import org.yeshi.utils.NumberUtil;
 
 import com.yeshi.fanli.dao.config.AddEveryDayTaskDao;
 import com.yeshi.fanli.dao.goods.RecommendSectionGoodsDao;
@@ -46,7 +46,6 @@
 import com.yeshi.fanli.util.StringUtil;
 import com.yeshi.fanli.util.taobao.TaoBaoUtil;
 import com.yeshi.fanli.util.taobao.TaoKeApiUtil;
-import org.yeshi.utils.NumberUtil;
 
 @Service
 public class TaoBaoGoodsBriefServiceImpl implements TaoBaoGoodsBriefService {
@@ -336,10 +335,6 @@
 		return taoBaoGoodsBriefMapper.selectByPrimaryKey(id);
 	}
 
-	@Override
-	public int updateByPrimaryKey(TaoBaoGoodsBrief taoBaoGoodsBrief) {
-		return taoBaoGoodsBriefMapper.updateByPrimaryKey(taoBaoGoodsBrief);
-	}
 
 	@Override
 	public void updateTBGoodsWithNewInfo(TaoBaoGoodsBrief tb) throws NotExistObjectException {
@@ -356,48 +351,6 @@
 			}
 		}
 
-	}
-
-	@Override
-	public void updateTaoBaoGoodsByMybatis(TaoBaoGoodsBrief taoBaoGoodsBrief) throws TaobaoGoodsDownException {
-
-		SearchFilter filter = new SearchFilter();
-		filter.setKey("https://item.taobao.com/item.htm?id=" + taoBaoGoodsBrief.getAuctionId());
-		TaoBaoGoodsBrief tb = TaoKeApiUtil.searchGoodsDetail(taoBaoGoodsBrief.getAuctionId());
-		if (tb == null) {
-			return;
-		}
-
-		taoBaoGoodsBrief.setCouponLink(tb.getCouponLink());
-		taoBaoGoodsBrief.setCouponActivityId(tb.getCouponActivityId());
-		taoBaoGoodsBrief.setCouponAmount(tb.getCouponAmount());
-		taoBaoGoodsBrief.setCouponEffectiveStartTime(tb.getCouponEffectiveStartTime());
-		taoBaoGoodsBrief.setCouponEffectiveEndTime(tb.getCouponEffectiveEndTime());
-		taoBaoGoodsBrief.setCouponInfo(tb.getCouponInfo());
-		taoBaoGoodsBrief.setCouponLeftCount(tb.getCouponLeftCount());
-		taoBaoGoodsBrief.setCouponLinkTaoToken(tb.getCouponLinkTaoToken());
-		taoBaoGoodsBrief.setCouponOriLink(tb.getCouponOriLink());
-		taoBaoGoodsBrief.setCouponShortLink(tb.getCouponShortLink());
-		taoBaoGoodsBrief.setCouponStartFee(tb.getCouponStartFee());
-		taoBaoGoodsBrief.setCouponTotalCount(tb.getCouponTotalCount());
-		taoBaoGoodsBrief.setBiz30day(tb.getBiz30day());
-		taoBaoGoodsBrief.setTkRate(tb.getTkRate());
-		taoBaoGoodsBrief.setZkPrice(tb.getZkPrice());
-		taoBaoGoodsBrief.setEventRate(tb.getEventRate());
-		taoBaoGoodsBrief.setTkMktStatus(tb.getTkMktStatus());
-		taoBaoGoodsBrief.setReservePrice(tb.getReservePrice());
-		taoBaoGoodsBrief.setCreatetime(new Date());
-
-		setGoodsBriefDefault(taoBaoGoodsBrief);
-
-		taoBaoGoodsBriefMapper.updateByPrimaryKeySelective(taoBaoGoodsBrief);
-
-	}
-
-	@Override
-	public void updateByPrimaryKeySelective(TaoBaoGoodsBrief taoBaoGoodsBrief) throws TaobaoGoodsDownException {
-		setGoodsBriefDefault(taoBaoGoodsBrief);
-		taoBaoGoodsBriefMapper.updateByPrimaryKeySelective(taoBaoGoodsBrief);
 	}
 
 	@Override

--
Gitblit v1.8.0