package com.yeshi.fanli.service.inter.taobao;
|
|
import java.util.Date;
|
import java.util.List;
|
|
import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
|
import com.yeshi.fanli.exception.taobao.TaobaoGoodsUpdateException;
|
|
/**
|
* 淘宝商品更新
|
*
|
* @author Administrator
|
*
|
*/
|
public interface TaoBaoGoodsUpdateService {
|
// 更新商品库
|
// 更新动态商品
|
// 更新首页的推荐
|
// 精选库更新
|
|
/**
|
* 开始更新淘宝商品库信息 按照更新时间升序排列 只更新最近2个小时未更新的数据
|
*/
|
public void startUpdate();
|
|
/**
|
* 删除创建时间过长的商品
|
*/
|
public void deleteOutOfDate();
|
|
/**
|
* 淘宝商品更新
|
*
|
* @param goods
|
* 需要携带券信息
|
*/
|
public void updateTaoBaoGoods(TaoBaoGoodsBrief goods) throws TaobaoGoodsUpdateException;
|
|
/**
|
* 淘宝商品批量更新
|
*
|
* @param goods
|
* 需要携带券信息
|
*/
|
public void updateTaoBaoGoods(List<TaoBaoGoodsBrief> goodsList) throws TaobaoGoodsUpdateException;
|
|
/**
|
* 删除淘宝的商品数据和对应的依赖数据
|
*
|
* @param auctionId
|
*/
|
|
public void deleteTaoBaoGoods(Long auctionId);
|
|
/**
|
* 下架某个商品的数据
|
*
|
* @param auctionId
|
*/
|
public void offlineTaoBaoGoods(Long auctionId);
|
|
/**
|
* 淘宝商品更新信息
|
*
|
* @param taoBaoGoodsBrief
|
* @return
|
*/
|
public TaoBaoGoodsBrief getUpdateTaoBaoGoodsBrief(TaoBaoGoodsBrief taoBaoGoodsBrief);
|
|
/**
|
* 队列更新商品
|
*
|
* @param start
|
* @param count
|
* @param hour
|
* @return
|
*/
|
public List<Long> listNeedUpdateGoodsId(long start, int count, int hour);
|
|
/**
|
* 根据taoke更新商品信息
|
*
|
* @param id
|
*/
|
public void updateByTaoKeGoodsDetail(Long id);
|
|
/**
|
* 批量加入更新队列
|
*
|
* @param goodsList
|
*/
|
public void addUpdateQueueAsync(List<TaoBaoGoodsBrief> goodsList);
|
|
/**
|
* 添加到更新队列
|
*
|
* @param auctionId
|
*/
|
public void addUpdateQueueAsync(Long auctionId);
|
|
/**
|
* 更新淘宝重要的商品
|
*
|
* @param goods
|
*/
|
public void updateImplTBGoods(TaoBaoGoodsBrief goods);
|
|
/**
|
* 过滤淘宝商品
|
*
|
* @param goodsList
|
* @return
|
*/
|
public List<TaoBaoGoodsBrief> filterImportantTaoBaoGoods(List<TaoBaoGoodsBrief> goodsList);
|
|
/**
|
* 根据最大的更新时间移除
|
*
|
* @param maxTime
|
* @return
|
*/
|
public int listAndRemoveByMaxUpdateTime(Date maxTime,int page,int pageSize);
|
|
/**
|
* 根据最大更新时间计算
|
* @param maxTime
|
* @return
|
*/
|
public long countByMaxUpdateTime(Date maxTime);
|
|
}
|