| | |
| | | package com.yeshi.fanli.service.inter.lable;
|
| | |
|
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | |
|
| | | import com.yeshi.fanli.entity.bus.lable.BoutiqueAutoRule;
|
| | | import com.yeshi.fanli.entity.bus.lable.Label;
|
| | | import com.yeshi.fanli.entity.bus.lable.QualityFactory;
|
| | | import com.yeshi.fanli.entity.common.AdminUser;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
|
| | | import com.yeshi.fanli.exception.QualityFactoryException;
|
| | | import com.yeshi.fanli.vo.quality.QualityFactoryVO;
|
| | |
|
| | | public interface QualityFactoryService {
|
| | |
|
| | | /**
|
| | | * 选择性更新内容——不为空则更新该字段
|
| | | * |
| | | * @param record
|
| | | * @return
|
| | | * @throws QualityFactoryException
|
| | | */
|
| | | public int updateByPrimaryKeySelective(QualityFactory record) throws QualityFactoryException;
|
| | |
|
| | | /**
|
| | | * 根据id查找当前对象
|
| | | * |
| | | * @param id
|
| | | * @return
|
| | | * @throws QualityFactoryException
|
| | | */
|
| | | public QualityFactory selectByPrimaryKey(Long id) throws QualityFactoryException;
|
| | |
|
| | | /**
|
| | | * 统计商品数量
|
| | | * |
| | | * @return
|
| | | */
|
| | | public Map<String, Object> getCountAll();
|
| | |
|
| | | /**
|
| | | * 根据商品id 移除精品库
|
| | | * |
| | | * @param ids
|
| | | * @throws QualityFactoryException
|
| | | */
|
| | | public void deleteByGoodsId(List<String> ids) throws QualityFactoryException;
|
| | |
|
| | |
|
| | | /**
|
| | | * 根据淘宝id集合 批量删除精选库对应信息
|
| | | * |
| | | * @param listId
|
| | | * @throws QualityFactoryException
|
| | | */
|
| | | public void deleteBatchByTaoBaoGoodsId(List<Long> listId);
|
| | |
|
| | | /**
|
| | | * 根据淘宝id 删除
|
| | | * |
| | | * @param auctionId
|
| | | * @throws QualityFactoryException
|
| | | */
|
| | | public void deleteByTaoBaoGoodsId(Long auctionId);
|
| | |
|
| | | /**
|
| | | * 统计商品id 是存在精品库
|
| | | * |
| | | * @param goodsId
|
| | | * @return
|
| | | */
|
| | | public Long queryCountByGoodsId(Long goodsId);
|
| | |
|
| | |
|
| | | /**
|
| | | * 精选库商品筛选
|
| | | * |
| | | * @throws QualityFactoryException
|
| | | */
|
| | | public List<QualityFactory> query(QualityFactoryVO qualityFactoryVO) throws QualityFactoryException;
|
| | |
|
| | | public long queryCount(QualityFactoryVO qualityFactoryVO) throws QualityFactoryException;
|
| | |
|
| | | /**
|
| | | * 批量设置权重 + 随机权重
|
| | | * |
| | | * @param idList
|
| | | * @param admin
|
| | | * @param weight
|
| | | * @param weightSmall
|
| | | * @param weightLarge
|
| | | * @throws Exception
|
| | | */
|
| | | public void setWeightBatch(List<Long> idList, AdminUser admin, Integer weight, Integer weightSmall,
|
| | | Integer weightLarge) throws Exception;
|
| | |
|
| | | /**
|
| | | * 统计总行数
|
| | | * |
| | | * @return
|
| | | */
|
| | | public Long countTotalRows(Integer days);
|
| | |
|
| | | /**
|
| | | * 查询所有数据-无条件
|
| | | * |
| | | * @param start
|
| | | * @param count
|
| | | * @return
|
| | | */
|
| | | public List<QualityFactory> queryAll(long start, int count, Integer days);
|
| | |
|
| | | /**
|
| | | * 查询需要更新的精选库商品id
|
| | | * |
| | | * @param count
|
| | | * @param hour
|
| | | * @return
|
| | | */
|
| | | public List<Long> queryNeedUpdate(long start, int count, int hour);
|
| | |
|
| | | /**
|
| | | * 统计更新数据量
|
| | | * |
| | | * @return
|
| | | */
|
| | | public long queryNeedUpdateCount();
|
| | |
|
| | | /**
|
| | | * 查询精选商品数据应用前端
|
| | | * |
| | | * @param start
|
| | | * @param count
|
| | | * @param key
|
| | | * @param classId
|
| | | * 分类id
|
| | | * @param labId
|
| | | * 标签id
|
| | | * @return
|
| | | */
|
| | | public List<QualityFactory> listQuery(long start, int count, String key, Long classId, Long labId);
|
| | |
|
| | | /**
|
| | | * 对应查询精选商品数据应用前端统计
|
| | | */
|
| | | public long countQuery(String key, Integer goodsSource, Long classId, Long labId);
|
| | |
|
| | | /**
|
| | | * 更新精选库商品
|
| | | * |
| | | * @param goodsList
|
| | | * @param systemCid
|
| | | * @param labels
|
| | | */
|
| | | public void autoInsertOrUpadateStorage(BoutiqueAutoRule autoRule, List<TaoBaoGoodsBrief> goodsList, List<Label> listLabs) throws Exception;
|
| | |
|
| | | /**
|
| | | * AuctionId查收精选库
|
| | | * |
| | | * @param list
|
| | | * @return
|
| | | */
|
| | | public List<QualityFactory> listQueryByAuctionId(List<Long> list);
|
| | |
|
| | | /**
|
| | | * 根据时间 获取当前时间之前创建的商品信息
|
| | | * |
| | | * @param systemCid
|
| | | * 系统分类id
|
| | | * @param dateTime
|
| | | * 筛选时间
|
| | | * @param goodsSource
|
| | | * 商品来源
|
| | | * @return
|
| | | */
|
| | | public List<Long> getAuctionIdbyClassId(Long systemCid, Integer goodsSource, String dateTime);
|
| | |
|
| | | /**
|
| | | * 更新权重
|
| | | * |
| | | * @param weight
|
| | | * @param time
|
| | | * @return
|
| | | */
|
| | | public void updateWeight(Integer weight, Integer time);
|
| | |
|
| | | /**
|
| | | * 根据精选库商品id 更新商品信息
|
| | | * |
| | | * @param gid
|
| | | * 商品主键
|
| | | */
|
| | | public void updateQualityGoods(Long goodsId);
|
| | |
|
| | | /**
|
| | | * 根据最低销量查询精选库(按创建时间倒叙排列)
|
| | | * |
| | | * @param salesCount
|
| | | * @param page
|
| | | * @param pageSize
|
| | | * @return
|
| | | */
|
| | | public List<QualityFactory> listByMinSalesCountOrderByCreateTimeDesc(int salesCount, int page, int pageSize);
|
| | |
|
| | | /**
|
| | | * 批量添加商品至精选库 并贴上标签
|
| | | * @param listTaoBaoGoods
|
| | | * @param lableNames
|
| | | * @param admin
|
| | | * @throws Exception
|
| | | */
|
| | | public void addBatchTaoBaoGoods(List<TaoBaoGoodsBrief> listTaoBaoGoods, String lableNames, AdminUser admin)
|
| | | throws Exception;
|
| | |
|
| | | /**
|
| | | * 删除数据
|
| | | * @param systemCid
|
| | | * @param formatDate
|
| | | * @param source
|
| | | */
|
| | | public void deleteNotUpdateGoods(Long systemCid, String formatDate, int source);
|
| | |
|
| | | }
|
| | | package com.yeshi.fanli.service.inter.lable; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import com.yeshi.fanli.entity.bus.lable.BoutiqueAutoRule; |
| | | import com.yeshi.fanli.entity.bus.lable.Label; |
| | | import com.yeshi.fanli.entity.bus.lable.QualityFactory; |
| | | import com.yeshi.fanli.entity.common.AdminUser; |
| | | import com.yeshi.goods.facade.entity.taobao.TaoBaoGoodsBrief; |
| | | import com.yeshi.fanli.exception.goods.quality.QualityFactoryException; |
| | | import com.yeshi.fanli.vo.quality.QualityFactoryVO; |
| | | |
| | | public interface QualityFactoryService { |
| | | |
| | | /** |
| | | * 选择性更新内容——不为空则更新该字段 |
| | | * |
| | | * @param record |
| | | * @return |
| | | * @throws QualityFactoryException |
| | | */ |
| | | public int updateByPrimaryKeySelective(QualityFactory record) throws QualityFactoryException; |
| | | |
| | | /** |
| | | * 根据id查找当前对象 |
| | | * |
| | | * @param id |
| | | * @return |
| | | * @throws QualityFactoryException |
| | | */ |
| | | public QualityFactory selectByPrimaryKey(Long id) throws QualityFactoryException; |
| | | |
| | | /** |
| | | * 统计商品数量 |
| | | * |
| | | * @return |
| | | */ |
| | | public Map<String, Object> getCountAll(); |
| | | |
| | | /** |
| | | * 根据商品id 移除精品库 |
| | | * |
| | | * @param ids |
| | | * @throws QualityFactoryException |
| | | */ |
| | | public void deleteByGoodsId(List<String> ids) throws QualityFactoryException; |
| | | |
| | | |
| | | /** |
| | | * 根据淘宝id集合 批量删除精选库对应信息 |
| | | * |
| | | * @param listId |
| | | * @throws QualityFactoryException |
| | | */ |
| | | public void deleteBatchByTaoBaoGoodsId(List<String> listId); |
| | | |
| | | /** |
| | | * 根据淘宝id 删除 |
| | | * |
| | | * @param auctionId |
| | | * @throws QualityFactoryException |
| | | */ |
| | | public void deleteByTaoBaoGoodsId(String auctionId); |
| | | |
| | | /** |
| | | * 统计商品id 是存在精品库 |
| | | * |
| | | * @param goodsId |
| | | * @return |
| | | */ |
| | | public Long queryCountByGoodsId(String goodsId); |
| | | |
| | | |
| | | /** |
| | | * 精选库商品筛选 |
| | | * |
| | | * @throws QualityFactoryException |
| | | */ |
| | | public List<QualityFactory> query(QualityFactoryVO qualityFactoryVO) throws QualityFactoryException; |
| | | |
| | | public long queryCount(QualityFactoryVO qualityFactoryVO) throws QualityFactoryException; |
| | | |
| | | /** |
| | | * 批量设置权重 + 随机权重 |
| | | * |
| | | * @param idList |
| | | * @param admin |
| | | * @param weight |
| | | * @param weightSmall |
| | | * @param weightLarge |
| | | * @throws Exception |
| | | */ |
| | | public void setWeightBatch(List<Long> idList, AdminUser admin, Integer weight, Integer weightSmall, |
| | | Integer weightLarge) throws Exception; |
| | | |
| | | /** |
| | | * 统计总行数 |
| | | * |
| | | * @return |
| | | */ |
| | | public Long countTotalRows(Integer days); |
| | | |
| | | /** |
| | | * 查询所有数据-无条件 |
| | | * |
| | | * @param start |
| | | * @param count |
| | | * @return |
| | | */ |
| | | public List<QualityFactory> queryAll(long start, int count, Integer days); |
| | | |
| | | |
| | | /** |
| | | * 查询精选商品数据应用前端 |
| | | * |
| | | * @param start |
| | | * @param count |
| | | * @param key |
| | | * @param classId |
| | | * 分类id |
| | | * @param labId |
| | | * 标签id |
| | | * @return |
| | | */ |
| | | public List<QualityFactory> listQuery(long start, int count, String key, Long classId, Long labId); |
| | | |
| | | /** |
| | | * 对应查询精选商品数据应用前端统计 |
| | | */ |
| | | public long countQuery(String key, Integer goodsSource, Long classId, Long labId); |
| | | |
| | | /** |
| | | * 更新精选库商品 |
| | | * |
| | | * @param goodsList |
| | | */ |
| | | public void autoInsertOrUpadateStorage(BoutiqueAutoRule autoRule, List<TaoBaoGoodsBrief> goodsList, List<Label> listLabs); |
| | | |
| | | /** |
| | | * AuctionId查收精选库 |
| | | * |
| | | * @param list |
| | | * @return |
| | | */ |
| | | public List<QualityFactory> listQueryByAuctionId(List<String> list); |
| | | |
| | | /** |
| | | * 根据时间 获取当前时间之前创建的商品信息 |
| | | * |
| | | * @param systemCid |
| | | * 系统分类id |
| | | * @param dateTime |
| | | * 筛选时间 |
| | | * @param goodsSource |
| | | * 商品来源 |
| | | * @return |
| | | */ |
| | | public List<String> getAuctionIdbyClassId(Long systemCid, Integer goodsSource, String dateTime); |
| | | |
| | | /** |
| | | * 更新权重 |
| | | * |
| | | * @param weight |
| | | * @param time |
| | | * @return |
| | | */ |
| | | public void updateWeight(Integer weight, Integer time); |
| | | |
| | | /** |
| | | * 根据精选库商品id 更新商品信息 |
| | | * |
| | | * @param goodsId |
| | | * 商品主键 |
| | | */ |
| | | public void updateQualityGoods(String goodsId); |
| | | |
| | | /** |
| | | * 根据最低销量查询精选库(按创建时间倒叙排列) |
| | | * |
| | | * @param salesCount |
| | | * @param page |
| | | * @param pageSize |
| | | * @return |
| | | */ |
| | | public List<QualityFactory> listByMinSalesCountOrderByCreateTimeDesc(int salesCount, int page, int pageSize); |
| | | |
| | | /** |
| | | * 批量添加商品至精选库 并贴上标签 |
| | | * @param listTaoBaoGoods |
| | | * @param lableNames |
| | | * @param admin |
| | | * @throws Exception |
| | | */ |
| | | public void addBatchTaoBaoGoods(List<TaoBaoGoodsBrief> listTaoBaoGoods, String lableNames, AdminUser admin) |
| | | throws Exception; |
| | | |
| | | /** |
| | | * 删除数据 |
| | | * @param systemCid |
| | | * @param formatDate |
| | | * @param source |
| | | */ |
| | | public void deleteNotUpdateGoods(Long systemCid, String formatDate, int source); |
| | | |
| | | } |